Show grammar line numbers for regex errors
This commit is contained in:
1 parent
25d6e3bc34
commit
5b243507cf
4 files changed
+46
-33
No files matched your search
@@ -249,6 +249,18 @@ EOF
|
||||
expect(results.status).to eq 0
|
||||
end
|
||||
|
||||
it "shows error line number for unmatched left curly brace" do
|
||||
write_grammar <<EOF
|
||||
# Line 1
|
||||
# Line 2
|
||||
token a /a{/;
|
||||
Start -> a;
|
||||
EOF
|
||||
results = run_propane(capture: true)
|
||||
expect(results.stderr).to match /Line 3: unexpected match count following \{/
|
||||
expect(results.status).to_not eq 0
|
||||
end
|
||||
|
||||
%w[d c].each do |language|
|
||||
|
||||
context "#{language.upcase} language" do
|
||||
|
||||
Reference in new issue
Block a user