- SyntaxTrivia is a great idea, if a little hard to grok. I wish I'd have thought of it for Wasabi's comments. (CComment inherits from CStatement, which is CLEARLY wrong.)
- The SyntaxKind enum is a giant blob of magic numbers. I would have appreciated it being implemented as sum types.
I hear you about the enum -- it's not the best programming experience. Unfortunately, for performance it's much faster for SyntaxTokens to be struct types, which means no inheritance and thus no sum types. In addition, the SyntaxKind allows a faster check on the SyntaxToken Kind since you can simply pull an int field, rather than having to do a runtime type check.