Add "drop" grammar keyword to drop patterns
This commit is contained in:
1 parent
f67dd62b20
commit
db70f8b94d
2 files changed
+16
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user