Accept ./? in function names
This commit is contained in:
parent
8d265aa25e
commit
83c3dd3418
|
@ -42,7 +42,7 @@ singleQuote = char '\'' <|> unicodeSingleQuote
|
||||||
doubleQuote = char '"' <|> unicodeDoubleQuote
|
doubleQuote = char '"' <|> unicodeDoubleQuote
|
||||||
variableStart = upper <|> lower <|> oneOf "_"
|
variableStart = upper <|> lower <|> oneOf "_"
|
||||||
variableChars = upper <|> lower <|> digit <|> oneOf "_"
|
variableChars = upper <|> lower <|> digit <|> oneOf "_"
|
||||||
functionChars = variableChars <|> oneOf ":+-"
|
functionChars = variableChars <|> oneOf ":+-.?"
|
||||||
specialVariable = oneOf "@*#?-$!"
|
specialVariable = oneOf "@*#?-$!"
|
||||||
tokenDelimiter = oneOf "&|;<> \t\n\r" <|> nbsp
|
tokenDelimiter = oneOf "&|;<> \t\n\r" <|> nbsp
|
||||||
quotable = oneOf "|&;<>()$`\\ \"'\t\n\r" <|> nbsp <|> unicodeDoubleQuote
|
quotable = oneOf "|&;<>()$`\\ \"'\t\n\r" <|> nbsp <|> unicodeDoubleQuote
|
||||||
|
@ -1472,6 +1472,8 @@ prop_readFunctionDefinition2 = isWarning readFunctionDefinition "function foo()
|
||||||
prop_readFunctionDefinition3 = isWarning readFunctionDefinition "function foo { lol; }"
|
prop_readFunctionDefinition3 = isWarning readFunctionDefinition "function foo { lol; }"
|
||||||
prop_readFunctionDefinition4 = isWarning readFunctionDefinition "foo(a, b) { true; }"
|
prop_readFunctionDefinition4 = isWarning readFunctionDefinition "foo(a, b) { true; }"
|
||||||
prop_readFunctionDefinition5 = isOk readFunctionDefinition ":(){ :|:;}"
|
prop_readFunctionDefinition5 = isOk readFunctionDefinition ":(){ :|:;}"
|
||||||
|
prop_readFunctionDefinition6 = isOk readFunctionDefinition "?(){ foo; }"
|
||||||
|
prop_readFunctionDefinition7 = isOk readFunctionDefinition "..(){ cd ..; }"
|
||||||
readFunctionDefinition = called "function" $ do
|
readFunctionDefinition = called "function" $ do
|
||||||
id <- getNextId
|
id <- getNextId
|
||||||
name <- try readFunctionSignature
|
name <- try readFunctionSignature
|
||||||
|
|
Loading…
Reference in New Issue