on master help sign in
Rule out backtick as a symbol in AST.Helpers
a41b661Evan Czaplicki
src/AST/Helpers.hs+1−1
@@ -29,4 +29,4 @@ isOp name =
29
29
30isSymbol :: Char -> Bool
30isSymbol :: Char -> Bool
31isSymbol c =
31isSymbol c =
32− Char.isSymbol c || elem c "+-/*=.$<>:&|^?%#@~!"
32+ c /= '`' && (Char.isSymbol c || elem c "+-/*=.$<>:&|^?%#@~!")
src/Parse/Binop.hs+1−1
@@ -21,7 +21,7 @@ import qualified Reporting.Annotation as A
21infixOp :: IParser String
21infixOp :: IParser String
22infixOp =
22infixOp =
23 expecting "an infix operator like (+)" $
23 expecting "an infix operator like (+)" $
24− do op <- many1 (satisfy (\c -> Help.isSymbol c && c /= '`'))
24+ do op <- many1 (satisfy (\c -> Help.isSymbol c))
25 guard (op `notElem` [ "=", "->", "--", "|", ":" ])
25 guard (op `notElem` [ "=", "->", "--", "|", ":" ])
26 case op of
26 case op of
27 "." -> notFollowedBy lower >> return op
27 "." -> notFollowedBy lower >> return op