Add \s to expand to whitespace characters
This commit is contained in:
1 parent
c6bac6d3a1
commit
f67dd62b20
3 files changed
+31
No files matched your search
@@ -90,6 +90,19 @@ EOF
|
||||
expect(run(<<EOF, "+++")).to eq expected
|
||||
token plus \\+
|
||||
token plusplus \\+\\+
|
||||
EOF
|
||||
end
|
||||
|
||||
it "lexes whitespace" do
|
||||
expected = [
|
||||
["foo", "foo"],
|
||||
["WS", " \t"],
|
||||
["bar", "bar"],
|
||||
]
|
||||
expect(run(<<EOF, "foo \tbar")).to eq expected
|
||||
token foo
|
||||
token bar
|
||||
token WS \\s+
|
||||
EOF
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user