Package org.eclipse.dltk.ast.expressions

Examples of org.eclipse.dltk.ast.expressions.StringLiteral


      if (object instanceof ASTListNode) {
        List childs2 = ((ASTListNode) object).getChilds();
        if (childs2 != null && !childs2.isEmpty()) {
          Object object2 = childs2.get(0);
          if (object2 instanceof StringLiteral) {
            StringLiteral sl = (StringLiteral) object2;
            feat = sl.getValue().replaceAll("\"", "");
          }
        }
      }
    }
    String message = "error: Feature \"" + feat + "\" is not defined.";
View Full Code Here


            // append(PAR_CLOSE);
            // } else {
            append(expr);
            // }
          } else if (object instanceof StringLiteral) {
            StringLiteral sl = (StringLiteral) object;
            String value = sl.getValue();
            append(value);
          } else if (object instanceof RutaVariableReference) {
            RutaVariableReference vr = (RutaVariableReference) object;
            append(vr.getName());
          }
View Full Code Here

      if (object instanceof ASTListNode) {
        List<?> childs2 = ((ASTListNode) object).getChilds();
        if (childs2 != null && !childs2.isEmpty()) {
          Object object2 = childs2.get(0);
          if (object2 instanceof StringLiteral) {
            StringLiteral sl = (StringLiteral) object2;
            result = sl.getValue().replaceAll("\"", "");
          }
        }
      }
    }
    return result;
View Full Code Here

    return new RutaStringExpression(start, end, exprList);
  }

  public static StringLiteral createSimpleString(Token stringToken) {
    int bounds[] = getBounds(stringToken);
    return new StringLiteral(bounds[0], bounds[1], stringToken.getText());
  }
View Full Code Here

    try {
      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) {
            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

    return new RutaStringExpression(start, end, exprList);
  }

  public static StringLiteral createSimpleString(Token stringToken) {
    int bounds[] = getBounds(stringToken);
    return new StringLiteral(bounds[0], bounds[1], stringToken.getText());
  }
View Full Code Here

        if (object instanceof ASTListNode) {
          List<?> childs2 = ((ASTListNode) object).getChilds();
          if (childs2 != null && !childs2.isEmpty()) {
            Object object2 = childs2.get(0);
            if (object2 instanceof StringLiteral) {
              StringLiteral sl = (StringLiteral) object2;
              feat = sl.getValue().replaceAll("\"", "");
            }
          }
        }
      }
      return feat;
View Full Code Here

    try {
      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) {
            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

      if (object instanceof ASTListNode) {
        List childs2 = ((ASTListNode) object).getChilds();
        if (childs2 != null && !childs2.isEmpty()) {
          Object object2 = childs2.get(0);
          if (object2 instanceof StringLiteral) {
            StringLiteral sl = (StringLiteral) object2;
            feat = sl.getValue().replaceAll("\"", "");
          }
        }
      }
    }
    String message = "error: Feature \"" + feat + "\" is not defined.";
View Full Code Here

            // append(PAR_CLOSE);
            // } else {
            append(expr);
            // }
          } else if (object instanceof StringLiteral) {
            StringLiteral sl = (StringLiteral) object;
            String value = sl.getValue();
            append(value);
          } else if (object instanceof RutaVariableReference) {
            RutaVariableReference vr = (RutaVariableReference) object;
            append(vr.getName());
          }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.ast.expressions.StringLiteral

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.