Create group begin - end with syntax grammar

Hello guys, I’m doing a grammar syntax that allows creating a group with the following words “begin” and “end” keeping the indentation for each line. Example

      property myvar = 5;
      property myvar2 = 10;

Could you help me with an example please?

I think you need:

  1. An external context tracker to track the indentation level
    2 . An external tokens provider to use indentation in the grammar.

The lezer python parser is a very good reference point.