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