-
Notifications
You must be signed in to change notification settings - Fork 191
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
reimplemented litmoon #217
base: master
Are you sure you want to change the base?
Conversation
whoops, thanks travis, missed something there, i'll fix |
done. |
@leafo ping? |
Haven't had a chance to review yet, this is a much bigger change. |
will this be reviewed anytime soon? most of the changes are autocompiled lua anyway, busted passes (ofc i added a test for litmoon), and there's at least 2 projects already using it, so imho it'd be worth the time… |
seriously, i don't see how this "bigger change" (consisting of some few adjustments in about 5 files and running |
concat moonpaths, ";" | ||
|
||
to_lua = (text, options={}) -> | ||
to_lua = (text, options={}, litmoon=false) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think adding another argument specific to litmoon is a good change to this interface. (If we add more formats are we supposed to keep adding new arguments?) Any reason you didn't re-purpose options
?
you're right, i'll try to reimplement this using the options tables instead. did kinda mistake them for being strictly structured stuff i'd better not touch… |
there you go. using lpeg this time, because what the hell did I hack there before :P
tried to break as little as possible, and went with a factory approach where I always default to litmoon=false and generate the default functions in case someone was depending on them somewhere else.
general idea:
also the mechanism for filtering is actually pretty simple: extend
moonscript.parser.literals.EmptyLine
on demand (using above factory design) and redefineLine
as(CheckIndent * Statement + Space * #Stop) + EmptyLine