Package com.google.dart.engine.scanner

Examples of com.google.dart.engine.scanner.StringToken


* @coverage dart.engine.ast
*/
public class EphemeralIdentifier extends SimpleIdentifier {

  public EphemeralIdentifier(AstNode parent, int location) {
    super(new StringToken(TokenType.IDENTIFIER, "", location));
    parent.becomeParentOf(this);
  }
View Full Code Here


    }
    return false;
  }

  static SimpleIdentifier createIdentifier(String name, int offset) {
    StringToken token = createStringToken(name, offset);
    return new SimpleIdentifier(token);
  }
View Full Code Here

    }
  }

  // TODO(scheglov) rename to: createIdentifierToken
  private static StringToken createStringToken(String name, int offset) {
    return new StringToken(TokenType.IDENTIFIER, name, offset);
  }
View Full Code Here

   */
  private static ExecutableElement createSyntheticExecutableElement(
      ExecutableElement[] elementArrayToMerge, String name, int numOfRequiredParameters,
      int numOfPositionalParameters, String... namedParameters) {
    DynamicTypeImpl dynamicType = DynamicTypeImpl.getInstance();
    SimpleIdentifier nameIdentifier = new SimpleIdentifier(new StringToken(
        TokenType.IDENTIFIER,
        name,
        0));
    ExecutableElementImpl executable;
    if (elementArrayToMerge[0] instanceof MethodElement) {
View Full Code Here

   * Create a synthetic token with the given type.
   *
   * @return the synthetic token that was created
   */
  private Token createSyntheticToken(TokenType type) {
    return injectToken(new StringToken(type, "", currentToken.getOffset()));
  }
View Full Code Here

            // terminating ']' is not typed yet
            char charAfterLeft = comment.charAt(leftIndex + 1);
            if (Character.isLetterOrDigit(charAfterLeft)) {
              int nameEnd = StringUtilities.indexOfFirstNotLetterDigit(comment, leftIndex + 1);
              String name = comment.substring(leftIndex + 1, nameEnd);
              Token nameToken = new StringToken(TokenType.IDENTIFIER, name, nameOffset);
              references.add(new CommentReference(null, new SimpleIdentifier(nameToken)));
            } else {
              Token nameToken = new SyntheticStringToken(TokenType.IDENTIFIER, "", nameOffset);
              references.add(new CommentReference(null, new SimpleIdentifier(nameToken)));
            }
View Full Code Here

TOP

Related Classes of com.google.dart.engine.scanner.StringToken

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.