mirror of
https://github.com/leafo/moonscript.git
synced 2025-01-09 00:04:22 +00:00
fixed whitespace/comment issue after statements
This commit is contained in:
parent
1ef297349a
commit
2ea42c3387
@ -281,8 +281,11 @@ local build_grammar = wrap_env(function()
|
|||||||
CheckIndent = Cmt(Indent, check_indent), -- validates line is in correct indent
|
CheckIndent = Cmt(Indent, check_indent), -- validates line is in correct indent
|
||||||
Line = (CheckIndent * Statement + Space * #Stop),
|
Line = (CheckIndent * Statement + Space * #Stop),
|
||||||
|
|
||||||
Statement = (Import + While + With + For + ForEach + Switch + Return
|
Statement = (
|
||||||
+ ClassDecl + Export + BreakLoop + Assign + Update + Ct(ExpList) / flatten_or_mark"explist" * Space) * ((
|
Import + While + With + For + ForEach + Switch + Return + ClassDecl +
|
||||||
|
Export + BreakLoop + Assign + Update +
|
||||||
|
Ct(ExpList) / flatten_or_mark"explist"
|
||||||
|
) * Space * ((
|
||||||
-- statement decorators
|
-- statement decorators
|
||||||
key"if" * Exp * (key"else" * Exp)^-1 * Space / mark"if" +
|
key"if" * Exp * (key"else" * Exp)^-1 * Space / mark"if" +
|
||||||
CompInner / mark"comprehension"
|
CompInner / mark"comprehension"
|
||||||
|
Loading…
Reference in New Issue
Block a user