From 6aa1cac3285d5580fac48dfa772e7157fbeba044 Mon Sep 17 00:00:00 2001 From: xeals Date: Thu, 27 Apr 2023 11:58:02 +1000 Subject: [PATCH] disallow "in through " --- calc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/calc.js b/calc.js index 97accba..3dcfdd2 100644 --- a/calc.js +++ b/calc.js @@ -82,10 +82,12 @@ function buildLexer() { const Weather = createToken({ name: "Weather", pattern: /Sun|Rain|Sand|Snow/, + pop_mode: true, }); const Terrain = createToken({ name: "Terrain", pattern: /(Electric|Grassy|Misty|Psychic) Terrain/, + pop_mode: true, }); const screenEnter = createToken({ @@ -110,7 +112,7 @@ function buildLexer() { terrainEnter, screenEnter, ], - terrain_mode: [whitespace, screenEnter, Weather, Terrain], + terrain_mode: [whitespace, Weather, Terrain], screen_mode: [whitespace, Move], }, defaultMode: "default_mode",