fixing non-spaced function application.
This commit is contained in:
parent
4ced1d65b4
commit
0d860516ac
|
@ -434,7 +434,7 @@
|
|||
tok[0] = 'PARAM';
|
||||
} else if (_a === ')') {
|
||||
tok[0] = 'PARAM_END';
|
||||
} else if (_a === '(') {
|
||||
} else if (_a === '(' || _a === 'CALL_START') {
|
||||
tok[0] = 'PARAM_START';
|
||||
return tok[0];
|
||||
}
|
||||
|
|
|
@ -315,9 +315,9 @@ exports.Lexer: class Lexer
|
|||
tok: @prev i
|
||||
return if not tok
|
||||
switch tok[0]
|
||||
when 'IDENTIFIER' then tok[0]: 'PARAM'
|
||||
when ')' then tok[0]: 'PARAM_END'
|
||||
when '(' then return tok[0]: 'PARAM_START'
|
||||
when 'IDENTIFIER' then tok[0]: 'PARAM'
|
||||
when ')' then tok[0]: 'PARAM_END'
|
||||
when '(', 'CALL_START' then return tok[0]: 'PARAM_START'
|
||||
true
|
||||
|
||||
# Close up all remaining open blocks at the end of the file.
|
||||
|
|
|
@ -76,6 +76,11 @@ fn: (arg) -> arg
|
|||
|
||||
ok fn(fn {prop: 101}).prop is 101
|
||||
|
||||
# Function calls sans-spacing.
|
||||
ok((fn(x) ->
|
||||
3
|
||||
)() is 3)
|
||||
|
||||
|
||||
# Multi-blocks with optional parens.
|
||||
result: fn( ->
|
||||
|
|
Loading…
Reference in New Issue