Implementing indentation based parsing using codemirror simple mode

90 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 answers

0
Marijn 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.