Examples of declare()


Examples of anvil.script.statements.FunctionStatement.declare()

        {
          consumeSymbol();
          FunctionStatement function = _statement.getFunctionStatement();
          type = function.lookupDeclaration(symbol);
          if (type == null) {
            type = function.declare(symbol);
          }
        }
        break;
       
      case ASSIGN:
View Full Code Here

Examples of anvil.script.statements.FunctionStatement.declare()

          type = _statement.lookupAnyDeclaration(symbol);
          if (type == null) {
            consumeSymbol();
            FunctionStatement function = _statement.getFunctionStatement();
            if (function != null) {
              type = function.declare(symbol);
            } else {
              listener.error(_location, "Entity '" + _name + "' is undeclared");
              return null;
            }
          }
View Full Code Here

Examples of anvil.script.statements.FunctionStatement.declare()

    case FALSE:
    case TRUE:
    case PATTERN:
      ArrayArgument();
      FunctionStatement function = flowPeek().getFunctionStatement();
      VariableNode var = new VariableNode(function.declare("array$"+root.hashCode()));
      Location location = parent.getLocation();
      AssignmentNode assign = new AssignmentNode(location, 2);
      assign.setChild(0, new EmptyReferenceNode(var));
      assign.setChild(1, pop());
      parent.setChildStatement(new EvalStatement(parent, location,
View Full Code Here

Examples of anvil.script.statements.InterfaceStatement.declare()

        Location location = toLocation(t);
        String name = s.image;
        InterfaceStatement intrface = flowPeek().getInterfaceStatement();
        InterfaceMethodStatement method = new InterfaceMethodStatement(location, intrface, name, t.document, parameters);
        if (intrface.lookupDeclaration(name) == null) {
          intrface.declare(method);
        } else {
          error(location, "Entity '" + name + "' is already declared");
        }
  }
View Full Code Here

Examples of com.google.dexmaker.DexMaker.declare()

        TypeId<? extends T> generatedType = TypeId.get("L" + generatedName + ";");
        TypeId<T> superType = TypeId.get(baseClass);
        generateConstructorsAndFields(dexMaker, generatedType, superType, baseClass);
        Method[] methodsToProxy = getMethodsToProxyRecursive();
        generateCodeForAllMethods(dexMaker, generatedType, methodsToProxy, superType);
        dexMaker.declare(generatedType, generatedName + ".generated", PUBLIC, superType,
                getInterfacesAsTypeIds());
        ClassLoader classLoader = dexMaker.generateAndLoad(parentClassLoader, dexCache);
        try {
            proxyClass = loadClass(classLoader, generatedName);
        } catch (IllegalAccessError e) {
View Full Code Here

Examples of com.google.dexmaker.DexMaker.declare()

    public static void main(String[] args) throws Exception {
        TypeId<?> fibonacci = TypeId.get("Lcom/google/dexmaker/examples/Fibonacci;");

        String fileName = "Fibonacci.generated";
        DexMaker dexMaker = new DexMaker();
        dexMaker.declare(fibonacci, fileName, Modifier.PUBLIC, TypeId.OBJECT);

        MethodId<?, Integer> fib = fibonacci.getMethod(TypeId.INT, "fib", TypeId.INT);
        Code code = dexMaker.declare(fib, Modifier.PUBLIC | Modifier.STATIC);

        Local<Integer> i = code.getParameter(0, TypeId.INT);
View Full Code Here

Examples of com.google.dexmaker.DexMaker.declare()

        String fileName = "Fibonacci.generated";
        DexMaker dexMaker = new DexMaker();
        dexMaker.declare(fibonacci, fileName, Modifier.PUBLIC, TypeId.OBJECT);

        MethodId<?, Integer> fib = fibonacci.getMethod(TypeId.INT, "fib", TypeId.INT);
        Code code = dexMaker.declare(fib, Modifier.PUBLIC | Modifier.STATIC);

        Local<Integer> i = code.getParameter(0, TypeId.INT);
        Local<Integer> constant1 = code.newLocal(TypeId.INT);
        Local<Integer> constant2 = code.newLocal(TypeId.INT);
        Local<Integer> a = code.newLocal(TypeId.INT);
View Full Code Here

Examples of com.google.dexmaker.DexMaker.declare()

    public static void main(String[] args) throws Exception {
        DexMaker dexMaker = new DexMaker();

        // Generate a HelloWorld class.
        TypeId<?> helloWorld = TypeId.get("LHelloWorld;");
        dexMaker.declare(helloWorld, "HelloWorld.generated", Modifier.PUBLIC, TypeId.OBJECT);
        generateHelloMethod(dexMaker, helloWorld);

        // Create the dex file and load it.
        File outputDir = new File(".");
        ClassLoader loader = dexMaker.generateAndLoad(HelloWorldMaker.class.getClassLoader(),
View Full Code Here

Examples of com.meidusa.amoeba.sqljep.function.Declare.declare()

            comp.setValue(value);
          }
        }
        if(pfmc instanceof Declare){
          Declare declare = (Declare) pfmc;
          declare.declare(runtime, list);
        }else{
          runtime.stack.push(list);
        }
      }else{
        //分析每个参数是否是 Comparative 类型
View Full Code Here

Examples of com.meidusa.amoeba.sqljep.function.Declare.declare()

          lastComparative.setValue(result);
          result = lastComparative;
        }
        if(pfmc instanceof Declare){
          Declare declare = (Declare) pfmc;
          declare.declare(runtime, result);
        }else{
          runtime.stack.push(result);
        }
      }
    }else{
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.