Merge pull request #1302 from pjeby/fix949
Fix #949 (failing on @ in function names)
This commit is contained in:
commit
4b0a35d4c9
|
@ -66,7 +66,7 @@ doubleQuote = char '"'
|
|||
variableStart = upper <|> lower <|> oneOf "_"
|
||||
variableChars = upper <|> lower <|> digit <|> oneOf "_"
|
||||
-- Chars to allow in function names
|
||||
functionChars = variableChars <|> oneOf ":+?-./^"
|
||||
functionChars = variableChars <|> oneOf ":+?-./^@"
|
||||
-- Chars to allow in functions using the 'function' keyword
|
||||
extendedFunctionChars = functionChars <|> oneOf "[]*=!"
|
||||
specialVariable = oneOf "@*#?-$!"
|
||||
|
@ -2497,6 +2497,7 @@ prop_readFunctionDefinition9 = isOk readFunctionDefinition "function foo { true;
|
|||
prop_readFunctionDefinition10= isOk readFunctionDefinition "function foo () { true; }"
|
||||
prop_readFunctionDefinition11= isWarning readFunctionDefinition "function foo{\ntrue\n}"
|
||||
prop_readFunctionDefinition12= isOk readFunctionDefinition "function []!() { true; }"
|
||||
prop_readFunctionDefinition13= isOk readFunctionDefinition "@require(){ true; }"
|
||||
readFunctionDefinition = called "function" $ do
|
||||
start <- startSpan
|
||||
functionSignature <- try readFunctionSignature
|
||||
|
|
Loading…
Reference in New Issue