Examples of SourceRange


Examples of ch.uzh.ifi.seal.changedistiller.model.classifiers.SourceRange

    }

    public Node convertMethodBody(String methodName, JavaCompilation compilation) {
        AbstractMethodDeclaration method = CompilationUtils.findMethod(compilation.getCompilationUnit(), methodName);
        Node root = new Node(JavaEntityType.METHOD, methodName);
        root.setEntity(new SourceCodeEntity(methodName, JavaEntityType.METHOD, new SourceRange(
                method.declarationSourceStart,
                method.declarationSourceEnd)));
        List<Comment> comments = CompilationUtils.extractComments(compilation);
        sMethodBodyConverter.initialize(root, method, comments, compilation.getScanner());
        method.traverse(sMethodBodyConverter, (ClassScope) null);
View Full Code Here

Examples of ch.uzh.ifi.seal.changedistiller.model.classifiers.SourceRange

    }

    public Node convertMethodDeclaration(String methodName, JavaCompilation compilation) {
        AbstractMethodDeclaration method = CompilationUtils.findMethod(compilation.getCompilationUnit(), methodName);
        Node root = new Node(JavaEntityType.METHOD, methodName);
        root.setEntity(new SourceCodeEntity(methodName, JavaEntityType.METHOD, new SourceRange(
                method.declarationSourceStart,
                method.declarationSourceEnd)));
        sDeclarationConverter.initialize(root, compilation.getScanner());
        method.traverse(sDeclarationConverter, (ClassScope) null);
        return root;
View Full Code Here

Examples of com.google.dart.engine.utilities.source.SourceRange

  @Override
  public SourceRange getVisibleRange() {
    if (visibleRangeLength < 0) {
      return null;
    }
    return new SourceRange(visibleRangeOffset, visibleRangeLength);
  }
View Full Code Here

Examples of com.google.javascript.jscomp.parsing.parser.util.SourceRange

  /**
   * Returns a SourceRange for a parse tree that starts at {start} and ends at the current
   * location.
   */
  private SourceRange getTreeLocation(SourcePosition start) {
    return new SourceRange(start, getTreeEndLocation());
  }
View Full Code Here

Examples of com.google.javascript.jscomp.parsing.parser.util.SourceRange

  private void skipSingleLineComment(Comment.Type type) {
    int startOffset = index;
    while (!isAtEnd() && !isLineTerminator(peekChar())) {
      nextChar();
    }
    SourceRange range = getLineNumberTable().getSourceRange(startOffset, index);
    String value = this.source.contents.substring(startOffset, index);
    recordComment(type, range, value);
  }
View Full Code Here

Examples of com.google.javascript.jscomp.parsing.parser.util.SourceRange

      nextChar();
      Comment.Type type = (index - startOffset > 4
          && this.source.contents.charAt(startOffset + 2) == '*')
          ? Comment.Type.JSDOC
          : Comment.Type.BLOCK;
      SourceRange range = getLineNumberTable().getSourceRange(
          startOffset, index);
      String value = this.source.contents.substring(
          startOffset, index);
      recordComment(type, range, value);
    } else {
View Full Code Here

Examples of com.google.javascript.jscomp.parsing.parser.util.SourceRange

  private int getColumn(int line, int offset) {
    return offset - offsetOfLine(line);
  }

  public SourceRange getSourceRange(int startOffset, int endOffset) {
    return new SourceRange(getSourcePosition(startOffset), getSourcePosition(endOffset));
  }
View Full Code Here

Examples of com.google.javascript.jscomp.parsing.parser.util.SourceRange

        || config.languageMode == LanguageMode.ECMASCRIPT6_STRICT;
  }

  double normalizeNumber(LiteralToken token) {
    String value = token.value;
    SourceRange location = token.location;
    int length = value.length();
    Preconditions.checkState(length > 0);
    Preconditions.checkState(value.charAt(0) != '-'
        && value.charAt(0) != '+');
    if (value.charAt(0) == '.') {
View Full Code Here

Examples of melnorme.lang.tooling.ast.SourceRange

  public void testALL() throws Exception { testALL$(); }
  public void testALL$() throws Exception {
   
    testFindDefinition(BASIC_FOO_FilePath, indexOf(BASIC_FOO_Contents, "/*defA_REF1*/"),
      new FindDefinitionResultEntry(
        "defA", false, BASIC_FOO_FilePath, new SourceRange(indexOf(BASIC_FOO_Contents, "defA/*DEF*/"), 4))
    );
   
    // Test implicit source module
    testFindDefinition(BASIC_FOO_FilePath, indexOf(BASIC_FOO_Contents, "implicit_name/*MARKER*/"),
      new FindDefinitionResultEntry(
        "implicit_name", false, BUNDLE_FOO__SRC_FOLDER.resolve("basic_pack/implicit_name.d"),
        new SourceRange(0, 0))
    );
   
    // Test intrinsic
    testFindDefinition(BASIC_FOO_FilePath, indexOf(BASIC_FOO_Contents, "int/*int_ref*/"),
      new FindDefinitionResultEntry(
View Full Code Here

Examples of melnorme.lang.tooling.ast.SourceRange

      this.parentScopeMDE = parentScopeMDE;
      this.sourceWasIncluded = sourceWasIncluded;
    }
   
    public SourceRange getSourceRange() {
      return new SourceRange(offset, sourceValue == null ? 0 : sourceValue.length());
    }
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.