Examples of declare()


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

        }
      }
    }else{
      if(pfmc instanceof Declare){
        Declare declare = (Declare) pfmc;
        declare.declare(runtime, pfmc.getResult(parameters));
      }else{
        runtime.stack.push(pfmc.getResult(parameters));
      }
    }
   
View Full Code Here

Examples of kodkod.ast.Variable.declare()

    if (ret!=null) return ret;
   
    final Variable variable = (Variable) decl.variable().accept(this);
    final Expression expression = decl.expression().accept(this);
    ret = (variable==decl.variable() && expression==decl.expression()) ?
        decl : variable.declare(decl.multiplicity(), expression);
    return cache(decl,ret);
  }
 
  /**
   * Calls lookup(relation) and returns the cached value, if any. 
View Full Code Here

Examples of loop.ast.script.Unit.declare()

  public Unit script(String file) {
    Unit unit = new Unit(file, ModuleDecl.DEFAULT);
    Node parse = parse();
    for (Node child : parse.children()) {
      if (child instanceof FunctionDecl)
        unit.declare((FunctionDecl) child);
      else
        unit.addToInitializer(child);
    }

    return unit;
View Full Code Here

Examples of loop.ast.script.Unit.declare()

          addError("Duplicate module import: " + require.toSymbol(),
              require.sourceLine, require.sourceColumn);
          throw new LoopCompileException();
        }

        unit.declare(require);
      }
    } while (require != null);

    FunctionDecl function;
    ClassDecl classDecl = null;
View Full Code Here

Examples of loop.ast.script.Unit.declare()

              function.sourceLine,
              function.sourceColumn);
          throw new LoopCompileException();
        }

        unit.declare(function);
      } else if (null != classDecl) {
        if (unit.getType(classDecl.name) != null) {
          addError("Duplicate type definition: " + classDecl.name,
              classDecl.sourceLine, classDecl.sourceColumn);
          throw new LoopCompileException();
View Full Code Here

Examples of loop.ast.script.Unit.declare()

          addError("Duplicate type definition: " + classDecl.name,
              classDecl.sourceLine, classDecl.sourceColumn);
          throw new LoopCompileException();
        }

        unit.declare(classDecl);
      }

    } while (function != null || classDecl != null);

    // Now slurp up any freeform expressions into the module initializer.
View Full Code Here

Examples of loop.ast.script.Unit.declare()

      reader.setExpandEvents(false);
      reader.addCompleter(new MetaCommandCompleter());

      Unit shellScope = new Unit(null, ModuleDecl.SHELL);
      FunctionDecl main = new FunctionDecl("main", null);
      shellScope.declare(main);
      shellContext = new HashMap<String, Object>();

      boolean inFunction = false;

      // Used to build up multiline statement blocks (like functions)
View Full Code Here

Examples of loop.ast.script.Unit.declare()

        if (line.isEmpty())
          continue;

        // Add a require import.
        if (line.startsWith("require ")) {
          shellScope.declare(new LexprParser(new Tokenizer(line + '\n').tokenize()).require());
          shellScope.loadDeps("<shell>");
          continue;
        }

        if (line.startsWith(":q") || line.startsWith(":quit")) {
View Full Code Here

Examples of loop.ast.script.Unit.declare()

        if (line.startsWith(":r") || line.startsWith(":reset")) {
          System.out.println("Context reset.");
          shellScope = new Unit(null, ModuleDecl.SHELL);
          main = new FunctionDecl("main", null);
          shellScope.declare(main);
          shellContext = new HashMap<String, Object>();
          continue;
        }
        if (line.startsWith(":i") || line.startsWith(":imports")) {
          for (RequireDecl requireDecl : shellScope.imports()) {
View Full Code Here

Examples of ma.glasnost.orika.impl.generator.MultiOccurrenceVariableRef.declare()

         *  fill it, and then assign it to the destination using the setter.
         */
      
        MultiOccurrenceVariableRef newDest = new MultiOccurrenceVariableRef(d.type(), "new_" + d.name());
        if (d.isAssignable()) {
            out.append(statement(newDest.declare(d.newInstance(source.size()))));
        } else {
            out.append(statement(newDest.declare(""+d)));
            out.append(statement("%s.clear()", newDest));
        }
       
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.