Add support for backslashes to identifiers

This commit is contained in:
Danila Fedorin 2023-03-11 16:42:08 -08:00
parent 3ab3126bbf
commit fe7c01f6c2

View File

@ -26,7 +26,7 @@ whitespace :: Parser String Unit
whitespace = void $ many space
identifier :: Parser String String
identifier = (charsToString <$> many1 (letter <|> digit <|> char '_')) <* whitespace
identifier = (charsToString <$> many1 (letter <|> digit <|> char '_' <|> char '\\')) <* whitespace
expr :: Parser String (Expr Metavariable)
expr = (defer $ \_ -> atom) <|> (defer $ \_ -> metavariable)