Made set line parsing more specific
This commit is contained in:
parent
db9148a76b
commit
8596c81c62
1 changed files with 2 additions and 2 deletions
|
@ -87,12 +87,12 @@ stats_line = do
|
||||||
|
|
||||||
sets_line :: Parser [(String, Rarity)]
|
sets_line :: Parser [(String, Rarity)]
|
||||||
sets_line = do
|
sets_line = do
|
||||||
sets <- sepBy set (string ", ")
|
sets <- sepBy1 set (string ", ")
|
||||||
return sets
|
return sets
|
||||||
|
|
||||||
set :: Parser (String, Rarity)
|
set :: Parser (String, Rarity)
|
||||||
set = do
|
set = do
|
||||||
set' <- many1 (noneOf "\n-")
|
set' <- many1 $ oneOf $ ['A'..'Z'] ++ ['0'..'9']
|
||||||
char '-'
|
char '-'
|
||||||
rarity' <- oneOf "LCURMS"
|
rarity' <- oneOf "LCURMS"
|
||||||
case rarity' of
|
case rarity' of
|
||||||
|
|
Loading…
Reference in a new issue