Simple example
undefLiteral = do symbol "undef" return $ Val VUndef
- symbol is a Parsec builtin
- it asserts the next symbol is a literal ("undef" in this case)
- eats it up
- and returns a small chunk of AST representing undef
undefLiteral = do symbol "undef" return $ Val VUndef
| Copyright © 2006 Gaal Yahas |