Implementing indentation based parsing using codemirror simple mode

126 Views Asked by At

I would like to implement a parser for an indentation based language using codemirror simple mode. How do I match a dedent. That is, I would like the state of the parser to change when a line is dedented.

1

There are 1 best solutions below

0
On

You'll have to write a non-simple mode, since regexps can't express dynamic properties like being indented less than the current indentation level.