An interpreted, lazy lisp.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
677 B

module Rose.Parser.Test.Literal
import Text.Parser
import Text.Lexer
import Test.Unit.Assertions
import Rose.Testing
import Rose.Lexer
import Rose.Data.SExpression
import Rose.Parser.Core
import Rose.Parser.Literal
tokenize : Token -> List ParseToken
tokenize = pure . MkToken 0 0
testSymbol : IO ()
testSymbol =
runTest "testSymbol"
(testWith [parsesSymbol, doesNotParseAString] (map (parse symbol) examples))
where parsesSymbol = assertWith "Parses a symbol?" assertRight
doesNotParseAString = assertWith "Doesn't parse a string?" assertLeft
examples : List (List ParseToken)
examples = map tokenize [(TkSymbol "foo"), (TkString "bar")]