on master help sign in
Rule out backtick as a symbol in AST.Helpers

It should never count as a symbol under any circumstances. No reason to special case.

commita41b661242b0a749543e783331e002def40afb37 authorEvan Czaplicki <evancz@users.noreply.github.com> dateFri 5 Aug 2016, 19:15 (10 years ago) parent0d2c5a2
2 files changed+2−2
src/AST/Helpers.hs+1−1 src/Parse/Binop.hs+1−1
src/AST/Helpers.hs+1−1
@@ -29,4 +29,4 @@ isOp name =
2929
3030isSymbol :: Char -> Bool
3131isSymbol 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
2121infixOp :: IParser String
2222infixOp =
2323 expecting "an infix operator like (+)" $
24− do op <- many1 (satisfy (\c -> Help.isSymbol c && c /= '`'))
24+ do op <- many1 (satisfy (\c -> Help.isSymbol c))
2525 guard (op `notElem` [ "=", "->", "--", "|", ":" ])
2626 case op of
2727 "." -> notFollowedBy lower >> return op