Skip to content

Commit

Permalink
Merge pull request #156 from yegor256/155
Browse files Browse the repository at this point in the history
new syntax
  • Loading branch information
yegor256 authored Nov 13, 2020
2 parents cf7d3cd + 2ad604c commit e51fbfe
Show file tree
Hide file tree
Showing 149 changed files with 2,728 additions and 4,811 deletions.
12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

11 changes: 0 additions & 11 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 eolang.org
Copyright (c) 2016-2020 Yegor Bugayenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ These things we **don't tolerate**:
* NULL ([why?](http://www.yegor256.com/2014/05/13/why-null-is-bad.html))
* global variables/procedures
* reflection
* constants
* type casting ([why?](http://www.yegor256.com/2015/04/02/class-casting-is-anti-pattern.html))
* scalar types
* scalar types and data primitives
* annotations ([why?](http://www.yegor256.com/2016/04/12/java-annotations-are-evil.html))
* unchecked exceptions ([why?](http://www.yegor256.com/2015/07/28/checked-vs-unchecked-exceptions.html))
* operators
Expand All @@ -69,21 +68,30 @@ independent.

## Quick Start

Here is a classic "Hello, world!" example:
Here is a simple program that asks for a year and tells you
whether it's leap or not:

```
import org.eolang.cli
import org.eolang.printed
import org.eolang.string
cli:
printed:
string:
"Hello, world!"
+alias stdout org.eolang.io.Stdout
+alias stdin org.eolang.io.Stdin
+alias scanner org.eolang.txt.Scanner
[args] > main
[y] > leap
or
and
eq (mod y 4) 0
not (eq (mod y 100) 0)
eq (mod y 400) 0
and
stdout "Enter a year:"
stdout
concat
(scanner stdin).nextInt > !year
" is a leap year?"
leap year:y
```

This code will compile into a `.java` class that will compile into
a `.class` byte code that will run and print "Hello, world!".

## How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:
Expand Down
2 changes: 1 addition & 1 deletion eo-archetype/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 eolang.org
Copyright (c) 2016-2020 Yegor Bugayenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
21 changes: 20 additions & 1 deletion eo-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
The MIT License (MIT)
Copyright (c) 2016 eolang.org
Copyright (c) 2016-2020 Yegor Bugayenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -31,4 +31,23 @@ SOFTWARE.
</parent>
<artifactId>eo-archetype</artifactId>
<packaging>jar</packaging>
<profiles>
<profile>
<id>qulice</id>
<build>
<plugins>
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>checkstyle:.*</exclude>
<exclude>pmd:.*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
The MIT License (MIT)
Copyright (c) 2016 eolang.org
Copyright (c) 2016-2020 Yegor Bugayenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
The MIT License (MIT)
Copyright (c) 2016 eolang.org
Copyright (c) 2016-2020 Yegor Bugayenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+alias stdout org.eolang.io.Stdout

[] > hello
[] > say
stdout "Hello, world!"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
/*
* The MIT License (MIT)
*
* Copyright (c) 2016 eolang.org
* Copyright (c) 2016-2020 Yegor Bugayenko
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -21,10 +21,21 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/**
* XML eo objects.
* @author Kirill ([email protected])
* @version $Id$
* Eo entry point.
*
* @since 0.1
*/
package org.eolang.compiler.xml;
public final class App {

/**
* Java app entry point.
* @param args Command line args
* @throws Exception In case of failure
*/
public static void main(final String... args) throws Exception {
new hello().say().call();
}

}

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions eo-compiler/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gen/
2 changes: 1 addition & 1 deletion eo-compiler/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 eolang.org
Copyright (c) 2016-2020 Yegor Bugayenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
38 changes: 28 additions & 10 deletions eo-compiler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--
The MIT License (MIT)
Copyright (c) 2016 eolang.org
Copyright (c) 2016-2020 Yegor Bugayenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -29,7 +29,6 @@ SOFTWARE.
<artifactId>eo-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>org.eolang</groupId>
<artifactId>eo-compiler</artifactId>
<packaging>jar</packaging>
<name>eo-compiler</name>
Expand All @@ -49,26 +48,45 @@ SOFTWARE.
<artifactId>cactoos</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.5.0-beta-1</version>
<scope>test</scope>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.8.0-5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-xml</artifactId>
<version>0.21.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-log</artifactId>
</dependency>
<dependency>
<groupId>com.jcabi.incubator</groupId>
<artifactId>xembly</artifactId>
<version>0.22</version>
<version>0.24.0</version>
</dependency>
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-matchers</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.21</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit e51fbfe

Please sign in to comment.