diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8826d59..1a4b73b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,17 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 18 + - run: git tag pre-updates - run: npm install + - name: Create generated files + run: | + npm run gen + git diff pre-updates --no-patch --exit-code; exitcode=$? + + if [ "$exitcode" -ne 0 ]; then + echo '::error::Generated files are out of date!' + echo '::error::run `npm run gen` and commit the changes' + exit "$exitcode" + fi - run: npm test # FIXME: also parse tests/*.just - diff --git a/grammar.js b/grammar.js index d1cb09c..7bd5c47 100644 --- a/grammar.js +++ b/grammar.js @@ -80,7 +80,7 @@ module.exports = grammar({ ), // boolean : ':=' ('true' | 'false') - boolean: (_) => choice("true", "false"), + boolean: (_) => choice("true", "false", "a"), // expression : 'if' condition '{' expression '}' 'else' '{' expression '}' // | value '/' expression