patrickfrey / mewa

Compiler-compiler for writing compiler frontends with Lua
https://github.com/patrickfrey/mewa
MIT License
23 stars 2 forks source link

Maybe also languages with indentiation having meaning should be considered #3

Closed patrickfrey closed 3 years ago

patrickfrey commented 3 years ago

The lexer could be defined to emit terminals for indentation raise or lowering if defined. A new command is needed in the grammar that defines the name of the terminals emitted.

I do not like spaces in languages having a meaning. But it is currently widespread.

patrickfrey commented 3 years ago

Fixed. Implemented an optional command with 4 arguments for the language description (grammar): % INDENTL open close nl tabsize

If defined, it issues terminals for indentation events. See https://github.com/patrickfrey/mewa/blob/master/doc/grammar.md