瀏覽代碼

Resolve compilation errors due to merge.

Niklas Seyfarth 6 年之前
父節點
當前提交
bf890da883
共有 2 個文件被更改,包括 0 次插入76 次删除
  1. 0 0
      src/main/java/me/hammerle/code/Syntax.java
  2. 0 76
      src/me/hammerle/snuviscript/SnuviScript.java

+ 0 - 0
src/me/hammerle/code/Syntax.java → src/main/java/me/hammerle/code/Syntax.java


+ 0 - 76
src/me/hammerle/snuviscript/SnuviScript.java

@@ -1,76 +0,0 @@
-package me.hammerle.snuviscript;
-
-import me.hammerle.code.ISnuviLogger;
-import me.hammerle.code.ISnuviScheduler;
-import me.hammerle.code.Script;
-import me.hammerle.code.SnuviParser;
-import me.hammerle.exceptions.PreScriptException;
-import me.hammerle.math.Fraction;
-
-public class SnuviScript 
-{
-    public static void main(String[] args) 
-    {
-        ISnuviLogger logger = new ISnuviLogger() 
-        {
-            @Override
-            public void printException(Exception ex, String function, Script s, int line) 
-            {
-                System.out.println("Exception " + ex);
-                System.out.println("function " + function);
-                System.out.println("Line: " + line);
-            }
-
-            @Override
-            public void printException(Exception ex, String function, String s, int line) 
-            {
-                System.out.println("Exception " + ex);
-                System.out.println("function " + function);
-                System.out.println("Line: " + line);
-            }
-
-            @Override
-            public void printWarning(String s) 
-            {
-                System.out.println("Warning: " + s);
-            }
-
-            @Override
-            public void printInfo(String s) 
-            {
-                System.out.println("Info: " + s);
-            }
-        };
-        
-        SnuviParser parser = new SnuviParser(logger, new ISnuviScheduler() 
-        {
-            @Override
-            public int scheduleTask(Runnable r) 
-            {
-                System.out.println("Schedule");
-                return 0;
-            }
-
-            @Override
-            public int scheduleTask(Runnable r, long delay) 
-            {
-                System.out.println("Schedule");
-                return 0;
-            }
-        });
-        parser.registerConsumer("print", (o, sc) -> System.out.println(o[0]));
-        parser.registerFunction("get", (o, sc) -> new Fraction(1));
-            
-        String s = "print(5*(-3));";
-        System.out.println(s);
-        System.out.println();
-        try
-        {
-            parser.startScript("test", s);
-        }
-        catch(PreScriptException ex)
-        {
-            logger.printException(ex, "none" , "test", ex.getLine());
-        }
-    }   
-}