Skip to content

Commit

Permalink
#3380 explained the name of program
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Sep 23, 2024
1 parent 89166cb commit a0f2e2b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions eo-parser/src/main/java/org/eolang/parser/EoSyntax.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
* <tt>.eo</tt> 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;

Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

1 comment on commit a0f2e2b

@0crat
Copy link

@0crat 0crat commented on a0f2e2b Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 It is not a good idea to push directly to the default branch master. You've earned -16 points. Next time, create a new branch, push your changes over there, then make a pull request and merge it. Even if you are flying solo, contributing via pull requests is a good practice. Your running balance is -27.

Please sign in to comment.