T4Editor icon indicating copy to clipboard operation
T4Editor copied to clipboard

Implement custom token based parser instead of RegEx filtering

Open Tim-Maes opened this issue 3 years ago • 2 comments

Currently T4Editor is leaning heavily on the use of RegEx patterns to filter out codeblocks from the textView and colorize them.

A better approach would be to create something that parses the textView on a token based implemenation. We only catch the T4 open/close tags and this leaves room to try and introduce C# language features inside these blocks.

Tim-Maes avatar Dec 23 '21 08:12 Tim-Maes

Can we at least replace the regex things with a custom parser for a better performance? And later think about "C# language features inside these blocks". Currently it feels "laggy" with a large template on my i3 notebook. I suspect it is caused by the RegEx thing. It seems not difficult to parse these tags. And as a bonus can try to add an error if tag is unclosed/unopened.

KirillBorunov avatar Aug 20 '22 00:08 KirillBorunov

I started working on this just recently.

T4Lexer.

Tim-Maes avatar Mar 21 '24 08:03 Tim-Maes