Skip to content

Warn about syntax the tree-sitter parser will not accept - #1059

Draft
Dekker1 wants to merge 1 commit into
MiniZinc:developfrom
Dekker1:feat/bison_warn
Draft

Warn about syntax the tree-sitter parser will not accept#1059
Dekker1 wants to merge 1 commit into
MiniZinc:developfrom
Dekker1:feat/bison_warn

Conversation

@Dekker1

@Dekker1 Dekker1 commented Sep 11, 2026

Copy link
Copy Markdown
Member

Description

op will become a reserved word, but the bison lexer accepts it as an
identifier. == and = are also the same token, so var bool: x == e is
silently a definition rather than the comparison it looks like. Warn about
both so that models can be fixed before the parser is replaced.

Checklist

  • Changes are ready for inclusion in next release
  • Changelog has been updated, or no changes required
  • Test cases changed or added, or no changes required
  • Documentation altered, or no changes required
  • Pull request(s) opened for required changes to upstream repos, or none required

`op` will become a reserved word, but the bison lexer accepts it as an
identifier. `==` and `=` are also the same token, so `var bool: x == e` is
silently a definition rather than the comparison it looks like. Warn about
both so that models can be fixed before the parser is replaced.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant