From 50c2b71b9d7e07d2b54e9cb9fef524ad2c96dca1 Mon Sep 17 00:00:00 2001 From: volodya-lombrozo Date: Thu, 19 Dec 2024 12:42:44 +0300 Subject: [PATCH] feat(#3332): format puzzles and javadocs --- eo-parser/src/main/java/org/eolang/parser/ParsingErrors.java | 3 ++- .../src/main/java/org/eolang/parser/UnderlinedMessage.java | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/eo-parser/src/main/java/org/eolang/parser/ParsingErrors.java b/eo-parser/src/main/java/org/eolang/parser/ParsingErrors.java index 31247fe267..8ca2909983 100644 --- a/eo-parser/src/main/java/org/eolang/parser/ParsingErrors.java +++ b/eo-parser/src/main/java/org/eolang/parser/ParsingErrors.java @@ -86,7 +86,8 @@ public void syntaxError( // @checkstyle MethodBodyCommentsCheck (20 lines) // @todo #3332:30min Add more specific error messages. // Currently we write just "error: no viable alternative at input" for all errors. - // It's better to use {@link #recognizer} to get more specific error messages. + // It's better to use 'Recognizer recognizer' parameter of the current method + // to retrieve more specific error messages. if (error instanceof NoViableAltException) { final Token token = (Token) symbol; this.errors.add( diff --git a/eo-parser/src/main/java/org/eolang/parser/UnderlinedMessage.java b/eo-parser/src/main/java/org/eolang/parser/UnderlinedMessage.java index 8cd9a20b40..1e90d53df3 100644 --- a/eo-parser/src/main/java/org/eolang/parser/UnderlinedMessage.java +++ b/eo-parser/src/main/java/org/eolang/parser/UnderlinedMessage.java @@ -27,14 +27,18 @@ /** * Underlined message. + *

* For example, if you have a message "Problem is here" and you want to underline * the word "is", you can create an instance of this class with the following * parameters: origin="Problem is here", from=8, length=2. + *

+ *

* The result will be: * {@code * Problem is here * ^^ * } + *

* @since 0.50 * @todo #3332:30min Add more decorators for the error message. * For example, {@link ParsingErrors} currently contains logic related to the message formatting.