Skip to content
Discussion options

You must be logged in to vote

Hey @luan-xiaokun,

The last method does not differentiate between type names and variable names at the parsing time, whether the identifier is a type or an expression is determined by the semantic analysis that follows, and this approach is adopted by Clang. As far as I can understand, I think this approach suites the Langium framework the best, but it requries creating a new set of parse rules to mix expressions and types, and these rules are only used in the template related parse rules.

I believe so as well. While we recently added support for custom lexers (#721), I'm worried that the lexer hack won't turn out as expected. The Clang approach is definitely the one that is best suited…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@luan-xiaokun
Comment options

Answer selected by luan-xiaokun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants