-
Notifications
You must be signed in to change notification settings - Fork 156
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
choose your own syntax rules #888
Comments
That's far, far, far too complex. Just look at the lexer's complexity. It's insane. |
Instead of "turning on certain rules" you could have a layered language (like Racket and Oz). But that would require LiveScript to be completely redesigned, from scratch. A middleground would be implementing layers as macros (see Racket again, but also Dylan), but again, LiveScript's syntax is far too complicated for macros to work well. In either case, you're way better off just designing your own minimal language and building optional features on top of that by using macros or something, really. It's going to be a ton less work. |
And sweetjs is not nearly ready to use whitespace-sensitive readtables... |
You can pass string literals to the LiveScript compiler, then call Or put your LiveScript and ECMAScript code in different files. |
@vendethiel @robotlolita @rightfold thanks for the ideas |
just curious as to why livescript doesn't have macros - wouldn't it make it easier for people like @thurt to write their own extensions as they please ? |
We've discussed this at least a few times before (see #328), but no one has seriously worked on it afaik. Adding macros to the existing LiveScript compiler would be kind of impossible, writing a new compiler for it from scratch, that includes macros, is a lot of work given LiveScript's super flexible syntax, and the fact that LiveScript doesn't have a formal grammar or semantics (there's a lot of semantic work being done in the lexer :'D) makes it even harder, at least if you're looking to make it have the same semantics as existing LS :) |
I would like to slowly transition into livescript by selectively "turning on" certain rules. Could this be possible with livescript or some other tool? How might I get started down this path? Thanks!
The text was updated successfully, but these errors were encountered: