Skip to content
Discussion options

You must be logged in to vote

@cdietrich The decision to omit whitespace tokens in the CST was a deliberate one. Mostly due to it not being necessary (you can calculate the information based on the offsets of the previous or succeeding note and the original document text) and it being a huge memory consumption sink. It effectively doubles the amount of leaf CST nodes in a given document. Running into performance issues to to this in the past with Xtext, we decide to omit all whitespace information.

You should be able to override the TokenBuilder to change that behavior though. I think that would yield the expected results.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cdietrich
Comment options

cdietrich May 10, 2023
Collaborator Author

Comment options

You must be logged in to vote
0 replies
Answer selected by cdietrich
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants