mirror of
https://github.com/aNNiMON/Own-Programming-Language-Tutorial.git
synced 2024-09-20 00:34:20 +03:00
Константа std::OwnLang с версией и платформой
This commit is contained in:
parent
9540834d2f
commit
dbdc56f323
@ -21,8 +21,13 @@ import java.util.concurrent.TimeUnit;
|
||||
* @author aNNiMON
|
||||
*/
|
||||
public final class Main {
|
||||
|
||||
public static final String VERSION = "1.3.1_" + Gen.BUILD_DATE;
|
||||
|
||||
public static int VERSION_MAJOR = 1;
|
||||
public static int VERSION_MINOR = 4;
|
||||
public static int VERSION_PATCH = 0;
|
||||
public static final String VERSION = VERSION_MAJOR + "."
|
||||
+ VERSION_MINOR + "." + VERSION_PATCH
|
||||
+ "_" + Gen.BUILD_DATE;
|
||||
|
||||
private static String[] ownlangArgs = new String[0];
|
||||
|
||||
|
@ -11,6 +11,13 @@ import com.annimon.ownlang.modules.Module;
|
||||
public final class std implements Module {
|
||||
|
||||
public static void initConstants() {
|
||||
MapValue ownlang = new MapValue(5);
|
||||
ownlang.set("PLATFORM", new StringValue("desktop"));
|
||||
ownlang.set("VERSION", new StringValue(Main.VERSION));
|
||||
ownlang.set("VERSION_MAJOR", NumberValue.of(Main.VERSION_MAJOR));
|
||||
ownlang.set("VERSION_MINOR", NumberValue.of(Main.VERSION_MINOR));
|
||||
ownlang.set("VERSION_PATCH", NumberValue.of(Main.VERSION_PATCH));
|
||||
Variables.define("OwnLang", ownlang);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user