Created
August 2, 2010 18:59
-
-
Save samsonjs/505128 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parseComment :: Parser LispVal | |
parseComment = do skipMany space | |
char ';' | |
skipMany $ noneOf "\n\r" | |
return $ Null False | |
parseAtom :: Parser LispVal | |
parseAtom = do first <- letter <|> symbol | |
rest <- many (letter <|> digit <|> symbol) | |
let atom = [first] ++ rest | |
return $ case atom of | |
"#t" -> Bool True | |
"#f" -> Bool False | |
otherwise -> Atom atom |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment