s-ludwig / sdlite

Light and fast SDLang parser/generator
MIT License
15 stars 5 forks source link

Support For Comments #5

Open jobbyworld opened 3 years ago

jobbyworld commented 3 years ago

Thanks for the lib, simplest than d-sdlang, but, In parseSDLDocument from parser.d, comments are filtered. .filter!(t => t.type != TokenType.comment); I don't find any "SDLComment" struct. Are comments supported ?

Best regards,

s-ludwig commented 3 years ago

The question is how to best represent comments in the AST, since they can also occur in-between attributes and values. Maybe instead of in the AST, there should be an additional StAX style parser API that supports comments.