mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
bang function call
This commit is contained in:
parent
17184f2aa8
commit
96abc5986e
@ -306,7 +306,7 @@ local build_grammar = wrap(function()
|
||||
Callable = Name + Parens / mark"parens",
|
||||
Parens = sym"(" * Exp * sym")",
|
||||
|
||||
FnArgs = symx"(" * Ct(ExpList^-1) * sym")",
|
||||
FnArgs = symx"(" * Ct(ExpList^-1) * sym")" + sym"!" * -P"=" * Ct"",
|
||||
|
||||
-- chain that starts with colon expression (for precedence over table literal)
|
||||
ColonChain =
|
||||
|
@ -167,4 +167,14 @@ what whack - 5
|
||||
|
||||
x = hello - world - something
|
||||
|
||||
hello!
|
||||
hello.world!
|
||||
|
||||
hello!.something
|
||||
what!["ofefe"]
|
||||
|
||||
what! the! heck!
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -123,4 +123,9 @@ _ = 5 + what(wack)
|
||||
what(whack + 5)
|
||||
_ = 5 - what(wack)
|
||||
what(whack - 5)
|
||||
x = hello - world - something
|
||||
x = hello - world - something
|
||||
hello()
|
||||
hello.world()
|
||||
_ = hello().something
|
||||
_ = what()["ofefe"]
|
||||
what()(the()(heck()))
|
Loading…
Reference in New Issue
Block a user