git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Disallow ticks/underscore in data constructor names
315498fGary Burgess
src/Language/PureScript/Parser/Common.hs+1−7
@@ -134,12 +134,6 @@ reservedOpNames = [ "=>", "->", "=", ".", "\\" ]
134identStart :: P.Parsec String u Char
134identStart :: P.Parsec String u Char
135identStart = P.lower <|> P.oneOf "_"
135identStart = P.lower <|> P.oneOf "_"
136
136
137−-- |
138−-- Valid first characters for a proper name
139−--
140−properNameStart :: P.Parsec String u Char
141−properNameStart = P.upper
142−
143-- |
137-- |
144-- Valid identifier characters
138-- Valid identifier characters
145--
139--
@@ -270,7 +264,7 @@ natural = PT.natural tokenParser
270-- Parse a proper name
264-- Parse a proper name
271--
265--
272properName :: P.Parsec String u ProperName
266properName :: P.Parsec String u ProperName
273−properName = lexeme $ ProperName <$> P.try ((:) <$> P.upper <*> many (PT.identLetter langDef) P.<?> "name")
267+properName = lexeme $ ProperName <$> P.try ((:) <$> P.upper <*> many P.alphaNum P.<?> "name")
274
268
275-- |
269-- |
276-- Parse a qualified name, i.e. M.name or just name
270-- Parse a qualified name, i.e. M.name or just name