From fe7c01f6c246bf479020d0c49b79c6993e07c819 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Sat, 11 Mar 2023 16:42:08 -0800 Subject: [PATCH] Add support for backslashes to identifiers --- src/Language/Bergamot/Parser.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Language/Bergamot/Parser.purs b/src/Language/Bergamot/Parser.purs index b18d4fe..88f29c4 100644 --- a/src/Language/Bergamot/Parser.purs +++ b/src/Language/Bergamot/Parser.purs @@ -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)