Skip to content

Commit

Permalink
#3592: fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 3, 2024
1 parent 290e3f4 commit 8b4a2df
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public final class TranspileMojo extends SafeMojo {

@Override
public void exec() {
final Collection<ForeignTojo> sources = this.scopedTojos().withOptimized();
final Collection<ForeignTojo> sources = this.scopedTojos().withShaken();
final Optimization optimization = this.transpilation();
final int saved = new Threaded<>(
sources,
Expand Down Expand Up @@ -197,7 +197,7 @@ private int transpiled(final ForeignTojo tojo, final Optimization transpilation)
throws IOException {
final Path source;
try {
source = tojo.optimized();
source = tojo.shaken();
} catch (final AttributeNotFoundException exception) {
throw new IllegalStateException(
"You should check that 'Verify' goal of the plugin was run first",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void transpilesSeveralEoProgramsInParallel(@Mktmp final Path temp) throws IOExce
.resolve("EOeolang")
.resolve("EOexamples")
).count(),
Matchers.equalTo(2L)
Matchers.equalTo(4L)
);
}

Expand Down
12 changes: 8 additions & 4 deletions eo-parser/src/main/java/org/eolang/parser/DrProgram.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,19 @@ public Iterator<Directive> iterator() {
"\n ",
"",
"This is XMIR, a dialect of XML, which is used to represent a parsed",
"EO program. For more information about the XMIR format, please visit",
"EO program. For more information about XMIR format please visit:",
"https://news.eolang.org/2022-11-25-xmir-guide.html.",
"",
String.format(
"The file was auto-generated by the parser %s (%s) at %s.",
"The file was auto-generated by the parser %s (%s)",
Manifests.read("EO-Version"),
Manifests.read("EO-Revision"),
Manifests.read("EO-Revision")
),
String.format(
"at %s. Do not edit it manually.",
when
),
"Do not edit it manually. The source code of the parser is available",
"The source code of the parser is available",
"on GitHub, at https://github.com/objectionary/eo (bug reports are welcome).",
""
)
Expand Down Expand Up @@ -112,6 +115,7 @@ private static String schema() {
final String[] opts = {
"XMIR.xsd",
"src/main/resources/XMIR.xsd",
"eo-parser/src/main/resources/XMIR.xsd",
"../eo-parser/src/main/resources/XMIR.xsd",
};
for (final String opt : opts) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# The MIT License (MIT)
#
# Copyright (c) 2016-2024 Objectionary.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
xsls:
- /org/eolang/parser/optimize/abstracts-float-up.xsl
- /org/eolang/parser/clean-up.xsl
tests:
- /program/objects[count(o)=2]
eo: |
# No comments.
[x] > foo
bar > @
zzz 42 > [t]
2 changes: 0 additions & 2 deletions eo-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ SOFTWARE.
<goal>register</goal>
<goal>deps</goal>
<goal>assemble</goal>
<goal>lint</goal>
<goal>transpile</goal>
<goal>copy</goal>
<goal>unplace</goal>
Expand All @@ -240,7 +239,6 @@ SOFTWARE.
<goal>register</goal>
<goal>deps</goal>
<goal>assemble</goal>
<goal>lint</goal>
<goal>transpile</goal>
<goal>binarize</goal>
</goals>
Expand Down

0 comments on commit 8b4a2df

Please sign in to comment.