Replies: 1 comment 11 replies
-
Hey @enikao, unlike in Xtext, whitespace tokens aren't actually stored in the CST and simply discarded. All other hidden tokens can be accessed via the CST though. You can change that behavior by overriding the |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to retrieve the complete input text for a specific AST node, including all hidden tokens.
My example is a properties file:
So if I accessed AST
model.props[0].$cstNode.content
, I'd expect to see 5 tokens:ID
,WS
,EQ
,WS
,INT
. But the twoWS
tokens are omitted.I also tried to poke around in the
model.$document
structure, to no avail.They seem to exist in
lexerResult.hidden
, but not propagated further?Beta Was this translation helpful? Give feedback.
All reactions