Skip to content

Commit

Permalink
feat(objectionary#3744): fix error message in 'empty-line-between-met…
Browse files Browse the repository at this point in the history
…as.yaml' check
  • Loading branch information
volodya-lombrozo committed Jan 15, 2025
1 parent 3bfbc80 commit 54a7650
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ public void syntaxError(
final Parser parser = (Parser) recognizer;
final String rule = parser.getRuleInvocationStack().get(0);
final String detailed;
if (parser.getRuleNames()[EoParser.RULE_program].equals(rule)) {
final String[] names = parser.getRuleNames();
if (names[EoParser.RULE_program].equals(rule)) {
detailed = "Unexpected part of the program";
} else if (names[EoParser.RULE_objects].equals(rule)) {
detailed = "We expected a list of objects here, but found something else";
} else {
detailed = msg;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
---
line: 3
message: |-
[3:0] error: 'Invalid object list declaration'
[3:0] error: 'We expected a list of objects here, but found something else'
+meta other
^^^^^^^^^^
input: |
Expand Down

0 comments on commit 54a7650

Please sign in to comment.