We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdae3b1 commit e0e9c67Copy full SHA for e0e9c67
examples/Test.purs
@@ -46,7 +46,13 @@ exprTest = buildExprParser [[Infix (string "/" >>= \_ -> return (/)) AssocRight]
46
,[Infix (string "*" >>= \_ -> return (*)) AssocRight]
47
,[Infix (string "-" >>= \_ -> return (-)) AssocRight]
48
,[Infix (string "+" >>= \_ -> return (+)) AssocRight]] digit
49
-
+
50
+manySatisfyTest :: Parser String [String]
51
+manySatisfyTest = do
52
+ r <- many1 $ satisfy (\s -> s /= "?")
53
+ string "?"
54
+ return r
55
56
main = do
57
parseTest nested "(((a)))"
58
parseTest (many (string "a")) "aaa"
@@ -60,3 +66,4 @@ main = do
60
66
return as) "a,a,a,"
61
67
parseTest opTest "a+b+c"
62
68
parseTest exprTest "1*2+3/4-5"
69
+ parseTest manySatisfyTest "ab?" -- Should return "[a, b]" but it's not
0 commit comments