Skip to content

Commit ad9bf40

Browse files
committed
Parser: m refactor
1 parent db99de8 commit ad9bf40

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Nix/Parser.hs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@ braces = on between symbol '{' '}'
191191
brackets :: Parser (NExprF f) -> Parser (NExprF f)
192192
brackets = on between symbol '[' ']'
193193

194-
-- colon = symbol ":"
195-
-- dot = symbol "."
196-
197194
antiquotedIsHungryForTrailingSpaces :: Bool -> Parser (Antiquoted v NExprLoc)
198195
antiquotedIsHungryForTrailingSpaces hungry = Antiquoted <$> (antiStart *> nixExpr <* antiEnd)
199196
where
@@ -447,7 +444,7 @@ nixPath =
447444
nixSearchPath :: Parser NExprLoc
448445
nixSearchPath =
449446
annotateNamedLocation "spath" $
450-
mkPathF True <$> try (char '<' *> many (satisfy pathChar <|> slash) <* symbol '>')
447+
mkPathF True <$> try (lexeme $ char '<' *> many (satisfy pathChar <|> slash) <* char '>')
451448

452449

453450
-- ** Operators
@@ -662,7 +659,7 @@ argExpr =
662659
-- there's a valid URI parse here.
663660
onlyname =
664661
msum
665-
[ nixUri *> unexpected (Label $ 'v' :| "alid uri")
662+
[ nixUri *> unexpected (Label $ fromList "valid uri" )
666663
, Param <$> identifier
667664
]
668665

0 commit comments

Comments
 (0)