4 ms·
One minor correction: Trivia are part of tokens, not nodes, which allows to represent things like white space between the if keyword and the opening parenthesis
by ygra 11y ago
One minor correction: Trivia are part of tokens, not nodes, which allows to represent things like white space between the if keyword and the opening parenthesis. There is a convenience method to get leading and trailing trivia of nodes, though, but all it does is take the first token and grab trivia from there.
Having worked with Roslyn for the past seven months I'm actually very impressed of the overall architecture. We're using it to convert C# to Java and JavaScript, so we essentially convert one AST into another. I took a few design decisions from Roslyn and applied them to our own AST.
- krallja 11y agoThanks, I appreciate the correction. My experience with Roslyn was very ad-hoc: just enough to do the job, see the sights, and get out of the compiler business :) It's interesting how many people are out there trying to switch from one language to another!