public ExtendedStringLiteral extendWith(CharLiteral lit){ //add the lit source to mine, just as if it was mine return new ExtendedStringLiteral(this,lit); }
/** * Build a string+char literal */ public ExtendedStringLiteral(StringLiteral str, CharLiteral character) { super(str.source, str.sourceStart, str.sourceEnd, str.lineNumber); extendWith(character); }
@Override public boolean visit(ExtendedStringLiteral extendedStringLiteral, BlockScope scope) { context.enter(factory.Code().createLiteral(CharOperation.charToString(extendedStringLiteral.source())), extendedStringLiteral); return true; }
private Expression tryStringConcat(Expression lhs, Expression rhs) { if (options.parseLiteralExpressionsAsConstants) { if (lhs instanceof ExtendedStringLiteral) { if (rhs instanceof CharLiteral) { return ((ExtendedStringLiteral)lhs).extendWith((CharLiteral)rhs); } else if (rhs instanceof StringLiteral) { return ((ExtendedStringLiteral)lhs).extendWith((StringLiteral)rhs); } } else if (lhs instanceof StringLiteral) { if (rhs instanceof CharLiteral) { return new ExtendedStringLiteral((StringLiteral)lhs, (CharLiteral)rhs); } else if (rhs instanceof StringLiteral) { return new ExtendedStringLiteral((StringLiteral)lhs, (StringLiteral)rhs); } } } else { if (lhs instanceof StringLiteralConcatenation) { if (rhs instanceof StringLiteral) { return ((StringLiteralConcatenation)lhs).extendsWith((StringLiteral)rhs); } } else if (lhs instanceof StringLiteral) { if (rhs instanceof StringLiteral) { return new StringLiteralConcatenation((StringLiteral) lhs, (StringLiteral) rhs); } } } return null; }
public StringLiteral convert(org.eclipse.jdt.internal.compiler.ast.ExtendedStringLiteral expression) { expression.computeConstant(); StringLiteral literal = new StringLiteral(this.ast); if (this.resolveBindings) { this.recordNodes(literal, expression); } literal.setLiteralValue(expression.constant.stringValue()); literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1); return literal; }
private Expression tryStringConcat(Expression lhs, Expression rhs) { if (options.parseLiteralExpressionsAsConstants) { if (lhs instanceof ExtendedStringLiteral) { if (rhs instanceof CharLiteral) { return ((ExtendedStringLiteral)lhs).extendWith((CharLiteral)rhs); } else if (rhs instanceof StringLiteral) { return ((ExtendedStringLiteral)lhs).extendWith((StringLiteral)rhs); } } else if (lhs instanceof StringLiteral) { if (rhs instanceof CharLiteral) { return new ExtendedStringLiteral((StringLiteral)lhs, (CharLiteral)rhs); } else if (rhs instanceof StringLiteral) { return new ExtendedStringLiteral((StringLiteral)lhs, (StringLiteral)rhs); } } } else { if (lhs instanceof StringLiteralConcatenation) { if (rhs instanceof StringLiteral) { return ((StringLiteralConcatenation)lhs).extendsWith((StringLiteral)rhs); } } else if (lhs instanceof StringLiteral) { if (rhs instanceof StringLiteral) { return new StringLiteralConcatenation((StringLiteral) lhs, (StringLiteral) rhs); } } } return null; }
public StringLiteral convert(org.eclipse.jdt.internal.compiler.ast.ExtendedStringLiteral expression) { expression.computeConstant(); StringLiteral literal = new StringLiteral(this.ast); if (this.resolveBindings) { this.recordNodes(literal, expression); } literal.setLiteralValue(expression.constant.stringValue()); literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1); return literal; }
public ExtendedStringLiteral extendWith(StringLiteral lit){ //add the lit source to mine, just as if it was mine return new ExtendedStringLiteral(this,lit); }
/** * Build a string+char literal */ public ExtendedStringLiteral(StringLiteral str, CharLiteral character) { super(str.source, str.sourceStart, str.sourceEnd, str.lineNumber); extendWith(character); }
private Expression tryStringConcat(Expression lhs, Expression rhs) { if (options.parseLiteralExpressionsAsConstants) { if (lhs instanceof ExtendedStringLiteral) { if (rhs instanceof CharLiteral) { return ((ExtendedStringLiteral)lhs).extendWith((CharLiteral)rhs); } else if (rhs instanceof StringLiteral) { return ((ExtendedStringLiteral)lhs).extendWith((StringLiteral)rhs); } } else if (lhs instanceof StringLiteral) { if (rhs instanceof CharLiteral) { return new ExtendedStringLiteral((StringLiteral)lhs, (CharLiteral)rhs); } else if (rhs instanceof StringLiteral) { return new ExtendedStringLiteral((StringLiteral)lhs, (StringLiteral)rhs); } } } else { if (lhs instanceof StringLiteralConcatenation) { if (rhs instanceof StringLiteral) { return ((StringLiteralConcatenation)lhs).extendsWith((StringLiteral)rhs); } } else if (lhs instanceof StringLiteral) { if (rhs instanceof StringLiteral) { return new StringLiteralConcatenation((StringLiteral) lhs, (StringLiteral) rhs); } } } return null; }
public StringLiteral convert(org.eclipse.jdt.internal.compiler.ast.ExtendedStringLiteral expression) { expression.computeConstant(); StringLiteral literal = new StringLiteral(this.ast); if (this.resolveBindings) { this.recordNodes(literal, expression); } literal.setLiteralValue(expression.constant.stringValue()); literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1); return literal; }
@Override public boolean visit(ExtendedStringLiteral extendedStringLiteral, BlockScope scope) { CtLiteral<String> l = factory.Core().createLiteral(); l.setValue(new String(extendedStringLiteral.source())); context.enter(l, extendedStringLiteral); return true; }
public ExtendedStringLiteral extendWith(StringLiteral lit){ //add the lit source to mine, just as if it was mine return new ExtendedStringLiteral(this,lit); }
/** * Build a two-strings literal * */ public ExtendedStringLiteral(StringLiteral str1, StringLiteral str2) { super(str1.source, str1.sourceStart, str1.sourceEnd, str1.lineNumber); extendWith(str2); }
public StringLiteral convert(org.eclipse.jdt.internal.compiler.ast.ExtendedStringLiteral expression) { expression.computeConstant(); StringLiteral literal = new StringLiteral(this.ast); if (this.resolveBindings) { this.recordNodes(literal, expression); } literal.setLiteralValue(expression.constant.stringValue()); literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1); return literal; }
public ExtendedStringLiteral extendWith(CharLiteral lit){ //add the lit source to mine, just as if it was mine return new ExtendedStringLiteral(this,lit); }
/** * Build a two-strings literal * */ public ExtendedStringLiteral(StringLiteral str1, StringLiteral str2) { super(str1.source, str1.sourceStart, str1.sourceEnd, str1.lineNumber); extendWith(str2); }
public StringLiteral convert(org.eclipse.jdt.internal.compiler.ast.ExtendedStringLiteral expression) { expression.computeConstant(); StringLiteral literal = new StringLiteral(this.ast); if (this.resolveBindings) { this.recordNodes(literal, expression); } literal.setLiteralValue(expression.constant.stringValue()); literal.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1); return literal; }
public ExtendedStringLiteral extendWith(StringLiteral lit){ //add the lit source to mine, just as if it was mine return new ExtendedStringLiteral(this,lit); }
/** * Build a two-strings literal * */ public ExtendedStringLiteral(StringLiteral str1, StringLiteral str2) { super(str1.source, str1.sourceStart, str1.sourceEnd, str1.lineNumber); extendWith(str2); }