From a0f2e2b4342cb0cfe87705692a46a2f81ff06a76 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 23 Sep 2024 11:22:56 +0300 Subject: [PATCH] #3380 explained the name of program --- .../main/java/org/eolang/parser/EoSyntax.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java b/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java index 77bad1a4cb..7b493f2c3a 100644 --- a/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java +++ b/eo-parser/src/main/java/org/eolang/parser/EoSyntax.java @@ -49,7 +49,11 @@ public final class EoSyntax implements Syntax { /** - * The name of it. + * The name of the EO program being parsed, usually the name of + * .eo file itself. This name will be present in the + * generated XML. This is done for the sake of traceability: it will + * always be possible to tell which XMIR file was generated from + * which EO program. */ private final String name; @@ -61,8 +65,8 @@ public final class EoSyntax implements Syntax { /** * Ctor. * - * @param nme The name of it - * @param ipt Input text + * @param nme The name of the EO program being parsed + * @param ipt The EO program to parse */ public EoSyntax(final String nme, final Input ipt) { this.name = nme; @@ -99,11 +103,15 @@ public XML parsed() throws IOException { ); new Schema(dom).check(); if (spy.size() == 0) { - Logger.debug(this, "Input of %d EO lines compiled, no errors", lines.size()); + Logger.debug( + this, + "The %s program of %d EO lines compiled, no errors", + this.name, lines.size() + ); } else { Logger.debug( - this, "Input of %d EO lines failed to compile (%d errors)", - lines.size(), spy.size() + this, "The %s program of %d EO lines failed to compile (%d errors)", + this.name, lines.size(), spy.size() ); } return dom;