Replies: 2 comments 7 replies
-
Are you thinking about adding this kind of support to the syntax of Langium? If so I've thought about it as well, similar to how Monarch structures which tokens can be recognized by state. By default the behavior would just be the current state, but it could get tricky if a user wants multiple states to still recognize the same token. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have two thoughts on this, one in favor of this idea and one against it:
@spoenemann Your thoughts on that? Do you think the feature is worth the complexity/effort? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Antlr4 has this feature 'lexer modes', where you can set, push and pop a mode as extra state. This enables the user to define tokens for WITHIN a string or a comment, and at the end switch back to the previous mode.
You can have it somehow in Langium when you implement your own
TokenBuilder
.My question is: Should Langium also have this option (new code actions)? Is there a need by Langium's users?
//I am also asking to get this idea out of my head :3 tehee
Beta Was this translation helpful? Give feedback.
All reactions