Fix #949 (failing on @ in function names)
'@' was previously mentioned in 5005dc0fa1
as a
character needed to fix #909, but was not included
in the actual change at that time.
This commit is contained in:
parent
5005dc0fa1
commit
0d1a34a291
|
@ -66,7 +66,7 @@ doubleQuote = char '"'
|
||||||
variableStart = upper <|> lower <|> oneOf "_"
|
variableStart = upper <|> lower <|> oneOf "_"
|
||||||
variableChars = upper <|> lower <|> digit <|> oneOf "_"
|
variableChars = upper <|> lower <|> digit <|> oneOf "_"
|
||||||
-- Chars to allow in function names
|
-- Chars to allow in function names
|
||||||
functionChars = variableChars <|> oneOf ":+?-./^"
|
functionChars = variableChars <|> oneOf ":+?-./^@"
|
||||||
-- Chars to allow in functions using the 'function' keyword
|
-- Chars to allow in functions using the 'function' keyword
|
||||||
extendedFunctionChars = functionChars <|> oneOf "[]*=!"
|
extendedFunctionChars = functionChars <|> oneOf "[]*=!"
|
||||||
specialVariable = oneOf "@*#?-$!"
|
specialVariable = oneOf "@*#?-$!"
|
||||||
|
@ -2499,6 +2499,7 @@ prop_readFunctionDefinition9 = isOk readFunctionDefinition "function foo { true;
|
||||||
prop_readFunctionDefinition10= isOk readFunctionDefinition "function foo () { true; }"
|
prop_readFunctionDefinition10= isOk readFunctionDefinition "function foo () { true; }"
|
||||||
prop_readFunctionDefinition11= isWarning readFunctionDefinition "function foo{\ntrue\n}"
|
prop_readFunctionDefinition11= isWarning readFunctionDefinition "function foo{\ntrue\n}"
|
||||||
prop_readFunctionDefinition12= isOk readFunctionDefinition "function []!() { true; }"
|
prop_readFunctionDefinition12= isOk readFunctionDefinition "function []!() { true; }"
|
||||||
|
prop_readFunctionDefinition13= isOk readFunctionDefinition "@require(){ true; }"
|
||||||
readFunctionDefinition = called "function" $ do
|
readFunctionDefinition = called "function" $ do
|
||||||
start <- startSpan
|
start <- startSpan
|
||||||
functionSignature <- try readFunctionSignature
|
functionSignature <- try readFunctionSignature
|
||||||
|
|
Loading…
Reference in New Issue