From 3bfbc8087fc6c73139d536004be6c5595147649f Mon Sep 17 00:00:00 2001 From: volodya-lombrozo Date: Wed, 15 Jan 2025 16:53:54 +0300 Subject: [PATCH] feat(#3744): fix several parsing error messages --- .../org/eolang/parser/eo-typos/binding-with-rho.yaml | 7 +++++-- .../resources/org/eolang/parser/eo-typos/broken-head.yaml | 1 - .../org/eolang/parser/eo-typos/double-empty-lines.yaml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/eo-parser/src/test/resources/org/eolang/parser/eo-typos/binding-with-rho.yaml b/eo-parser/src/test/resources/org/eolang/parser/eo-typos/binding-with-rho.yaml index 6785e4b727..f099d662da 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/eo-typos/binding-with-rho.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/eo-typos/binding-with-rho.yaml @@ -21,10 +21,13 @@ # SOFTWARE. --- line: 2 -message: >- +message: |- [2:4] error: 'Invalid objects declaration that may be used inside abstract object' y:^ ^ + [3:-1] error: 'Unexpected part of the program' + EOF + ^^^ input: | x - y:^ + y:^ \ No newline at end of file diff --git a/eo-parser/src/test/resources/org/eolang/parser/eo-typos/broken-head.yaml b/eo-parser/src/test/resources/org/eolang/parser/eo-typos/broken-head.yaml index 6dff838238..3807b745fc 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/eo-typos/broken-head.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/eo-typos/broken-head.yaml @@ -25,7 +25,6 @@ message: |- [2:0] error: 'Atom must have a type' [] > a [] > b [] > c [] > d hello world ^^^^^^^ - [2:7] error: 'mismatched input '[' expecting '/'' [] > a [] > b [] > c [] > d hello world ^ diff --git a/eo-parser/src/test/resources/org/eolang/parser/eo-typos/double-empty-lines.yaml b/eo-parser/src/test/resources/org/eolang/parser/eo-typos/double-empty-lines.yaml index 4622b95f40..a20678800c 100644 --- a/eo-parser/src/test/resources/org/eolang/parser/eo-typos/double-empty-lines.yaml +++ b/eo-parser/src/test/resources/org/eolang/parser/eo-typos/double-empty-lines.yaml @@ -26,7 +26,7 @@ line: 4 # The error message should be more informative and should highlight the exact location # of the error. message: |+ - [4:0] error: 'Invalid program declaration' + [4:0] error: 'Unexpected part of the program' input: | # No comments.