diff --git a/calc.js b/calc.js index 0fc66d4..f8c64ac 100644 --- a/calc.js +++ b/calc.js @@ -121,7 +121,7 @@ function* iterate(arr) { function unwrapToken(type, token) { assert( token.tokenType.name == type, - `expected token ${type}, got ${token.tokenType.name}` + `expected token ${type}, got ${token.tokenType.name}`, ); return token.image; } @@ -216,6 +216,9 @@ function parseAndCalculate(line) { case "Item": opts().item = unwrapToken("Item", item); break; + case "Ability": + opts().ability = unwrapToken("Ability", item); + break; case "Pokemon": { let name = unwrapToken("Pokemon", item);