Additional tests
This commit is contained in:
@ -33,12 +33,9 @@ parseTricu input =
|
||||
|
||||
parseSingle :: String -> TricuAST
|
||||
parseSingle input = case runParser parseExpression "" (lexTricu input) of
|
||||
Left err -> error $ handleParseError err
|
||||
Left err -> error $ handleParseError err
|
||||
Right ast -> ast
|
||||
|
||||
scnParser :: Parser ()
|
||||
scnParser = skipMany (satisfy isNewline)
|
||||
|
||||
parseExpression :: Parser TricuAST
|
||||
parseExpression = choice
|
||||
[ try parseFunction
|
||||
@ -50,6 +47,9 @@ parseExpression = choice
|
||||
, parseLiteral
|
||||
]
|
||||
|
||||
scnParser :: Parser ()
|
||||
scnParser = skipMany (satisfy isNewline)
|
||||
|
||||
parseFunction :: Parser TricuAST
|
||||
parseFunction = do
|
||||
LIdentifier name <- satisfy isIdentifier
|
||||
|
Reference in New Issue
Block a user