File tree Expand file tree Collapse file tree 1 file changed +21
-16
lines changed Expand file tree Collapse file tree 1 file changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -244,21 +244,26 @@ nixFloat =
244244 mkFloatF . realToFrac <$> float
245245
246246nixUri :: Parser NExprLoc
247- nixUri = lexeme $ annotateLocation $ try $ do
248- start <- letterChar
249- protocol <- many $
250- satisfy $
251- \ x ->
252- isAlphanumeric x
253- || (`elem` (" +-." :: String )) x
254- _ <- chunk " :"
255- address <-
256- some $
257- satisfy $
258- \ x ->
259- isAlphanumeric x
260- || (`elem` (" %/?:@&=+$,-_.!~*'" :: String )) x
261- pure $ NStr $ DoubleQuoted $ one $ Plain $ toText $ one start <> protocol <> " :" <> address
247+ nixUri =
248+ lexeme $
249+ annotateLocation $
250+ try $
251+ do
252+ start <- letterChar
253+ protocol <-
254+ many $
255+ satisfy $
256+ \ x ->
257+ isAlphanumeric x
258+ || (`elem` (" +-." :: String )) x
259+ _ <- chunk " :"
260+ address <-
261+ some $
262+ satisfy $
263+ \ x ->
264+ isAlphanumeric x
265+ || (`elem` (" %/?:@&=+$,-_.!~*'" :: String )) x
266+ pure $ NStr $ DoubleQuoted $ one $ Plain $ toText $ one start <> protocol <> " :" <> address
262267
263268
264269-- ** Strings
@@ -377,7 +382,7 @@ nixBinders = (inherit <|> namedVar) `endBy` symbol ';' where
377382 do
378383 -- We can't use 'reserved' here because it would consume the whitespace
379384 -- after the keyword, which is not exactly the semantics of C++ Nix.
380- try $ chunk " inherit" *> lookAhead (void ( satisfy reservedEnd) )
385+ try $ chunk " inherit" *> lookAhead (void $ satisfy reservedEnd)
381386 p <- getSourcePos
382387 x <- whiteSpace *> optional scope
383388 label " inherited binding" $
You can’t perform that action at this time.
0 commit comments