Package org.eclipse.imp.pdb.facts

Examples of org.eclipse.imp.pdb.facts.IValue


    return false;
  }
 
  public boolean visit(ContinueStatement node) {
   
    IValue label = node.getLabel() == null ? null : values.string(node.getLabel().getFullyQualifiedName());
    ownValue = constructStatementNode("continue", label);
   
    return false;
  }
View Full Code Here


    return false;
  }
 
  public boolean visit(DoStatement node) {
   
    IValue body = visitChild(node.getBody());
    IValue whileExpression = visitChild(node.getExpression());
 
    ownValue = constructStatementNode("do", body, whileExpression);
   
    return false;
  }
View Full Code Here

    return false;
  }
 
  public boolean visit(EnhancedForStatement node) {
   
    IValue parameter = visitChild(node.getParameter());
    IValue collectionExpression = visitChild(node.getExpression());
    IValue body = visitChild(node.getBody());
 
    ownValue = constructStatementNode("foreach", parameter, collectionExpression, body);
   
    return false;
  }
View Full Code Here

  }
 
  public boolean visit(EnumConstantDeclaration node) {
   
    IValueList extendedModifiers = parseExtendedModifiers(node.modifiers());
    IValue name = values.string(node.getName().getFullyQualifiedName());
 
    IValueList arguments = new IValueList(values);
    if (!node.arguments().isEmpty()) {
      for (Iterator it = node.arguments().iterator(); it.hasNext();) {
        Expression e = (Expression) it.next();
        arguments.add(visitChild(e));
      }
    }
 
    IValue anonymousClassDeclaration = node.getAnonymousClassDeclaration() == null ? null : visitChild(node.getAnonymousClassDeclaration());
   
    ownValue = constructDeclarationNode("enumConstant", name, arguments.asList(), anonymousClassDeclaration);
    setAnnotation("modifiers", extendedModifiers);
    return false;
  }
View Full Code Here

  }
 
  public boolean visit(EnumDeclaration node) {
   
    IValueList extendedModifiers = parseExtendedModifiers(node.modifiers());
    IValue name = values.string(node.getName().getFullyQualifiedName());
 
    IValueList implementedInterfaces = new IValueList(values);
    if (!node.superInterfaceTypes().isEmpty()) {
      for (Iterator it = node.superInterfaceTypes().iterator(); it.hasNext();) {
        Type t = (Type) it.next();
View Full Code Here

    return false;
  }
 
  public boolean visit(ExpressionStatement node) {
   
    IValue expression = visitChild(node.getExpression());
    ownValue = constructStatementNode("expressionStatement", expression);
   
    return false;
  }
View Full Code Here

    return false;
  }
 
  public boolean visit(FieldAccess node) {
   
    IValue expression = visitChild(node.getExpression());
    IValue name = values.string(node.getName().getFullyQualifiedName());
 
    ownValue = constructExpressionNode("fieldAccess", values.bool(false), expression, name);
   
    return false;
  }
View Full Code Here

  }
 
  public boolean visit(FieldDeclaration node) {
   
    IValueList extendedModifiers = parseExtendedModifiers(node);
    IValue type = visitChild(node.getType());
 
    IValueList fragments = new IValueList(values);
    for (Iterator it = node.fragments().iterator(); it.hasNext();) {
      VariableDeclarationFragment f = (VariableDeclarationFragment) it.next();
      fragments.add(visitChild(f));
View Full Code Here

    for (Iterator it = node.initializers().iterator(); it.hasNext();) {
      Expression e = (Expression) it.next();
      initializers.add(visitChild(e));
    }
 
    IValue booleanExpression = node.getExpression() == null ? null : visitChild(node.getExpression());
 
    IValueList updaters = new IValueList(values);
    for (Iterator it = node.updaters().iterator(); it.hasNext();) {
      Expression e = (Expression) it.next();
      updaters.add(visitChild(e));
    }
 
    IValue body = visitChild(node.getBody());
 
    ownValue = constructStatementNode("for", initializers.asList(), booleanExpression, updaters.asList(), body);
   
    return false;
  }
View Full Code Here

    return false;
  }
 
  public boolean visit(IfStatement node) {
   
    IValue booleanExpression = visitChild(node.getExpression());
    IValue thenStatement = visitChild(node.getThenStatement());
    IValue elseStatement = node.getElseStatement() == null ? null : visitChild(node.getElseStatement());
 
    ownValue = constructStatementNode("if", booleanExpression, thenStatement, elseStatement);
   
    return false;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.imp.pdb.facts.IValue

Copyright © 2018 www.massapicom. 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.