tlaplus-community / tree-sitter-tlaplus

A tree-sitter grammar for TLA⁺ and PlusCal
MIT License
57 stars 10 forks source link

Implement nested contexts in external scanner #53

Closed ahelwer closed 2 years ago

ahelwer commented 2 years ago

Fixes #51 Every time you start a new PlusCal block the external scanner's state is pushed to a stack so the PlusCal block has a fresh scanner state. This state is popped when the PlusCal block ends. Supports multiply-nested PlusCal blocks in case someone does that for some weird reason.

ahelwer commented 2 years ago

cc @susliko

ahelwer commented 2 years ago

Reminder to myself: update the tlaplus/examples submodule to improve corpus tests.