Life is an embeddable scripting language. Heavily based on Java.
| Todo | Status |
|---|
It's super easy to use this. See Test.life for a sample input.
public class Methods {
public static void main(String[] args) {
Parser parser = new Parser();
parser.register(new Methods());
parser.execute("Test.life", new String[] {"And this prints from args[0]!"});
}
@LifeExecutable
public static void log(String str) {
System.out.println(str);
}
}This will print out Logging! to the console (can you guess what else?), based on the file listed above.
Add these to your pom.xml (no ellipses, replace @VERSION@ with the version you'd like):
<repositories>
...
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
...
</repositories> <dependencies>
...
<dependency>
<groupId>com.github.xaanit</groupId>
<artifactId>life</artifactId>
<version>@VERSION@</version>
</dependency>
...
</dependencies>Add these to your build.gradle (replace @VERSION@ with the version you'd like):
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
} dependencies {
compile 'com.github.xaanit:life:@VERSION@'
}