-
Notifications
You must be signed in to change notification settings - Fork 2k
OMeta JS 2.0 #25
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
Comments
|
This ticket has been superseded by the "CoffeeScript in CoffeeScript" one, which may or may not use OMeta for the parser. http://github.com/jashkenas/coffee-script/issues#issue/8 Closing... |
you can use ometajs narwhal's module http://github.com/veged/ometa-js/tree/narwhal/ |
#1)
Started a JavaScript version of the compiler using OMeta JS 2.0:
http://www.tinlizzie.org/ometa-js/#Coffee
Currently sub-classing the Javascript Compiler, so it can execute CoffeeScript aliases or JavaScript, but may need to redo it as a complete compiler in order to do CoffeeScript Statements.
Not sure how much time I'll have to work on this, so anyone else is welcome to to take it over.
#2)
Suggest that Objects should be either CoffeeScript format OR standard JSON format to make it easier to read JSON directly without parsing to CoffeeScript or visa versa.
With the newlines it looks good, but I think
ages: {max: 10, ida: 9, tim: 11 }
is slightly more legible than
ages: { max: 10 ida: 9 tim: 11 }
#3)
In your Docs [ http://jashkenas.github.com/coffee-script/#array_comprehensions ]
Suggest you change the example from:
Eat lunch.
lunch: food.eat() for food in ['toast', 'cheese', 'wine'].
to something like:
Eat lunch.
lunch: eat(food) for food in ['toast', 'cheese', 'wine'].
eat: edible => log("yum: " + edible).
log: msg => if (window && window.console) console.log(msg) else alert(msg).
This works better than having to define eat in String.prototype.eat
Otherwise you end up eating Strings instead of Food! ;-)
The text was updated successfully, but these errors were encountered: