Examples of sourceEnd()


Examples of org.eclipse.dltk.ast.expressions.Expression.sourceEnd()

          exprs.add(expr);
        }
      }
      if (!exprs.isEmpty()) {
        Expression lastExpr = (Expression) exprs.get(exprs.size() - 1);
        bounds[1] = Math.max(bounds[1], lastExpr.sourceEnd());
      }
    }
    return new RutaFunction(bounds[0], bounds[1], exprs, kind, type.getText(), nameStart, nameEnd);
  }
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.Expression.sourceEnd()

          exprs.add(expr);
        }
      }
      if (!exprs.isEmpty()) {
        Expression lastExpr = (Expression) exprs.get(exprs.size() - 1);
        bounds[1] = Math.max(bounds[1], lastExpr.sourceEnd());
      }
    }
    return new RutaAction(bounds[0], bounds[1], exprs, ExpressionConstants.USER_EXPRESSION_START
            + type.getType(), type.getText(), nameStart, nameEnd);
  }
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.Expression.sourceEnd()

          exprs.add(expr);
        }
      }
      if (!exprs.isEmpty()) {
        Expression lastExpr = exprs.get(exprs.size() - 1);
        bounds[1] = Math.max(bounds[1], lastExpr.sourceEnd());
      }
    }
  }

  public static RutaAction createLogAction(Token type, Expression logString, Token level) {
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.Expression.sourceEnd()

      exprs = new ArrayList<Expression>();
    }
    if (!exprs.isEmpty()) {
      Expression lastExpr = (Expression) exprs.get(exprs.size() - 1);
      if (lastExpr != null) {
        wholeConditionBounds[1] = Math.max(wholeConditionBounds[1], lastExpr.sourceEnd());
      }
    }
    return new RutaCondition(wholeConditionBounds[0], wholeConditionBounds[1], exprs,
            RutaConditionConstants.CONSTANT_OFFSET + type.getType(), type.getText(), nameStart,
            nameEnd);
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.Expression.sourceEnd()

    int end = 0;
    if (!exprList.isEmpty()) {
      start = exprList.get(0).sourceStart();
      Expression expression = exprList.get(exprList.size() - 1);
      if (expression != null) {
        end = expression.sourceEnd();
      } else {
        exprList.get(0).sourceEnd();
      }
    }
    return new RutaListExpression(start, end, exprList, type);
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.Expression.sourceEnd()

          exprs.add(expr);
        }
      }
      if (!exprs.isEmpty()) {
        Expression lastExpr = (Expression) exprs.get(exprs.size() - 1);
        bounds[1] = Math.max(bounds[1], lastExpr.sourceEnd());
      }
    }
    return new RutaFunction(bounds[0], bounds[1], exprs,
            kind, type.getText(), nameStart,
            nameEnd);
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.Expression.sourceEnd()

      if (s instanceof RutaRuleElement) {
        RutaRuleElement re = (RutaRuleElement) s;
        Expression head = re.getHead();
        if (head != null) {
          String type = currentFile.getSource().substring(head.sourceStart(), head.sourceEnd());
          matchedType = type;
        }
      }
      if (s instanceof RutaVariableReference) {
        RutaVariableReference ref = (RutaVariableReference) s;
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.Expression.sourceEnd()

        if (s instanceof RutaStructureAction) {
          RutaStructureAction sa = (RutaStructureAction) s;
          Expression struct = sa.getStructure();
          String structure = null;
          if (struct != null) {
            structure = currentFile.getSource().substring(struct.sourceStart(), struct.sourceEnd());
          }
          Map<Expression, Expression> assignments = sa.getAssignments();
          // hotfix... correct name in ast
          String action = currentFile.getSource().substring(sa.getNameStart(), sa.getNameEnd());
          if (assignments != null && !action.equals("TRIE")) {
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.StringLiteral.sourceEnd()

      md.traverse(new ASTVisitor() {
        @Override
        public boolean visitGeneral(ASTNode node) throws Exception {
          if (node instanceof StringLiteral) {
            StringLiteral be = (StringLiteral) node;
            result.add(new PairBlock(offset + be.sourceStart(), offset + be.sourceEnd() - 1, '\"'));
            // } else if (node instanceof RutaExecuteExpression) {
            // RutaExecuteExpression be = (RutaExecuteExpression) node;
            // result.add(new PairBlock(offset + be.sourceStart(),
            // offset + be.sourceEnd() - 1, '['));
          } else if (node instanceof Block) {
View Full Code Here

Examples of org.eclipse.dltk.ast.expressions.StringLiteral.sourceEnd()

            // RutaExecuteExpression be = (RutaExecuteExpression) node;
            // result.add(new PairBlock(offset + be.sourceStart(),
            // offset + be.sourceEnd() - 1, '['));
          } else if (node instanceof Block) {
            Block be = (Block) node;
            result.add(new PairBlock(offset + be.sourceStart(), offset + be.sourceEnd() - 1, '{'));
          }
          return super.visitGeneral(node);
        }
      });
    } catch (Exception e) {
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.