Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement custom token based parser instead of RegEx filtering #6

Open
Tim-Maes opened this issue Dec 23, 2021 · 2 comments
Open

Implement custom token based parser instead of RegEx filtering #6

Tim-Maes opened this issue Dec 23, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Tim-Maes
Copy link
Owner

Tim-Maes commented Dec 23, 2021

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.

@KirillBorunov
Copy link

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.

@Tim-Maes Tim-Maes added the help wanted Extra attention is needed label Aug 20, 2022
@Tim-Maes
Copy link
Owner Author

I started working on this just recently.

T4Lexer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants