Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added while_inside_goto test #93

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ on:
branches:
- master
paths-ignore: ['paper/**', 'README.md', 'LICENSE.txt']
permissions:
actions: write
checks: write
contents: write
deployments: write
issues: write
packages: write
pull-requests: write
repository-projects: write
security-events: write
statuses: write
jobs:
make:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ SOFTWARE.
<archive>
<manifestEntries>
<Main-Class>org.eolang.dejump.Main</Main-Class>
<Dejump-Version>${project.version}</Dejump-Version>
</manifestEntries>
</archive>
<descriptorRefs>
Expand Down
23 changes: 20 additions & 3 deletions src/main/java/org/eolang/dejump/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.eolang.dejump;

import com.jcabi.manifests.Manifests;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.Callable;
Expand All @@ -34,10 +35,12 @@
* @since 0.0.1
* @checkstyle ClassDataAbstractionCouplingCheck (500 lines)
*/
@CommandLine.Command(name = "dejump",
@CommandLine.Command(
name = "dejump",
mixinStandardHelpOptions = true,
version = "Version 0.0.1",
description = "Replaces objects GOTO with semantically equivalent")
versionProvider = Main.Version.class,
description = "Replaces objects GOTO with semantically equivalent"
)
public final class Main implements Callable<Integer> {

/**
Expand Down Expand Up @@ -68,4 +71,18 @@ public Integer call() throws IOException {
public static void main(final String[] args) {
new CommandLine(new Main()).execute(args);
}

/**
* Version.
* @since 0.0.2
*/
static final class Version implements CommandLine.IVersionProvider {
@Override
public String[] getVersion() {
return new String[]{
Manifests.read("Dejump-Version")
};
}
}

}
15 changes: 15 additions & 0 deletions src/test/eo/org/eolang/dejump/while_inside_goto.eo
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[] > while_inside_goto
[] > run
goto > @
[g]
while. > @
TRUE
[i]
seq > @
g.forward 1337
if. > @
eq.
run
1337
TRUE
FALSE