Fix extendedFunction definition
This commit is contained in:
parent
34b03040d9
commit
ad1d5fa64f
|
@ -70,8 +70,10 @@ variableChars = upper <|> lower <|> digit <|> oneOf "_"
|
|||
functionStartChars = variableChars <|> oneOf ":+?-./^@,"
|
||||
-- Chars to allow inside function names
|
||||
functionChars = variableChars <|> oneOf "#:+?-./^@,"
|
||||
-- Chars to allow function names to start with, using the 'function' keyword
|
||||
extendedFunctionStartChars = functionStartChars <|> oneOf "[]*=!"
|
||||
-- Chars to allow in functions using the 'function' keyword
|
||||
extendedFunctionChars = functionChars <|> oneOf "[]*=!"
|
||||
extendedFunctionChars = extendedFunctionStartChars <|> oneOf "[]*=!"
|
||||
specialVariable = oneOf (concat specialVariables)
|
||||
paramSubSpecialChars = oneOf "/:+-=%"
|
||||
quotableChars = "|&;<>()\\ '\t\n\r\xA0" ++ doubleQuotableChars
|
||||
|
@ -2770,7 +2772,7 @@ readFunctionDefinition = called "function" $ do
|
|||
string "function"
|
||||
whitespace
|
||||
spacing
|
||||
name <- (:) <$> functionStartChars <*> many extendedFunctionChars
|
||||
name <- (:) <$> extendedFunctionStartChars <*> many extendedFunctionChars
|
||||
spaces <- spacing
|
||||
hasParens <- wasIncluded readParens
|
||||
when (not hasParens && null spaces) $
|
||||
|
|
Loading…
Reference in New Issue