Add \s to expand to whitespace characters

This commit is contained in:
josh committed 2021-06-09 22:37:00 -04:00
1 parent c6bac6d3a1
commit f67dd62b20
3 files changed
+31

No files matched your search

+13
View File
@@ -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