Add "drop" grammar keyword to drop patterns

This commit is contained in:
josh committed 2021-06-09 22:48:30 -04:00
1 parent f67dd62b20
commit db70f8b94d
2 files changed
+16

No files matched your search

+13
View File
@@ -103,6 +103,19 @@ EOF
token foo
token bar
token WS \\s+
EOF
end
it "allows dropping a matched pattern" do
expected = [
["foo", "foo"],
[nil, " \t"],
["bar", "bar"],
]
expect(run(<<EOF, "foo \tbar")).to eq expected
token foo
token bar
drop \\s+
EOF
end
end