From b25452b6a689f35e914e4e19a5de9d31f92098ac Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Wed, 3 Jan 2024 17:19:33 -0600 Subject: [PATCH] Add CI check that tree-sitter files are up to date --- .github/workflows/ci.yaml | 5 ++++- grammar.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8826d59..b186183 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,7 +26,10 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 18 + - run: git tag pre-updates - run: npm install + - run: npm run gen - run: npm test # FIXME: also parse tests/*.just - + - name: Verify `npm run gen` does not change files + run: git diff pre-updates --no-patch --exit-code 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