style(lexer): pluralize moduleNames parser
This commit is contained in:
parent
7ceb9b0277
commit
75c4817166
1 changed files with 3 additions and 3 deletions
|
|
@ -181,8 +181,8 @@ anchors =
|
|||
]
|
||||
|
||||
|
||||
moduleName :: Parser Text
|
||||
moduleName = intercalate "." . fmap Text.pack <$> upperId `sepBy1` char '.'
|
||||
moduleNames :: Parser Text
|
||||
moduleNames = intercalate "." . fmap Text.pack <$> upperId `sepBy1` char '.'
|
||||
|
||||
upperId :: Parser String
|
||||
upperId = (:) <$> satisfy isUpper <*> many1 identifierChar
|
||||
|
|
@ -197,7 +197,7 @@ modules :: Lexer
|
|||
modules = between (char '"') (char '"') inner
|
||||
where
|
||||
inner = do
|
||||
module_ <- located $ Module <$> moduleName
|
||||
module_ <- located $ Module <$> moduleNames
|
||||
mAnchor <- optionMaybe (located $ anchorHash *> (Anchor <$> anchorText))
|
||||
pure $ case mAnchor of
|
||||
Just anchor -> [module_, anchor]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue