Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long comment syntax #8

Closed
daveyarwood opened this issue Jan 14, 2015 · 1 comment
Closed

Long comment syntax #8

daveyarwood opened this issue Jan 14, 2015 · 1 comment

Comments

@daveyarwood
Copy link
Member

#{ Long comments } don't quite work correctly -- they will always terminate prematurely at the first instance of #{ or } after the beginning of the comment -- which means nested comments don't work, nor will commenting out any block of code that includes } ({ ... } is a planned syntax for advanced rhythms, so this is something that could very well happen)

Need to tweak the way I've defined long comments in the grammar... for reference, see how long comments are handled in Instaparse examples.

Another thing to consider: is there a smarter and/or better-looking syntax for long comments than #{ this }? I'm not totally happy with #{ this }, in part because it reminds me of Ruby string interpolation instead of a long comment. For inspiration, this is how other languages handle comment syntax.

@daveyarwood
Copy link
Member Author

I ended up talking about this with Mark Engelberg himself at ClojureWest today, and he recommended using the greediness regexes as much as possible -- I think making the long comment rule more regex-y might help solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant