git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Disallow ticks/underscore in data constructor names
commit315498f27c0e23beb1eaf0606fe8b2ac3d4800e4 authorGary Burgess <garyb@users.noreply.github.com> dateThu 6 Feb 2014, 21:20 (13 years ago) parent64289a1
1 file changed+1−7
src/Language/PureScript/Parser/Common.hs+1−7
src/Language/PureScript/Parser/Common.hs+1−7
@@ -134,12 +134,6 @@ reservedOpNames = [ "=>", "->", "=", ".", "\\" ]
134134identStart :: P.Parsec String u Char
135135identStart = P.lower <|> P.oneOf "_"
136136
137−-- |
138−-- Valid first characters for a proper name
139−--
140−properNameStart :: P.Parsec String u Char
141−properNameStart = P.upper
142−
143137-- |
144138-- Valid identifier characters
145139--
@@ -270,7 +264,7 @@ natural = PT.natural tokenParser
270264-- Parse a proper name
271265--
272266properName :: 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")
274268
275269-- |
276270-- Parse a qualified name, i.e. M.name or just name