Examples of SourcePosition


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

  // 12.6 Iteration Statements

  // 12.6.1 The do-while Statement
  private ParseTree parseDoWhileStatement() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.DO);
    ParseTree body = parseStatement();
    eat(TokenType.WHILE);
    eat(TokenType.OPEN_PAREN);
    ParseTree condition = parseExpression();
View Full Code Here

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

    return new DoWhileStatementTree(getTreeLocation(start), body, condition);
  }

  // 12.6.2 The while Statement
  private ParseTree parseWhileStatement() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.WHILE);
    eat(TokenType.OPEN_PAREN);
    ParseTree condition = parseExpression();
    eat(TokenType.CLOSE_PAREN);
    ParseTree body = parseStatement();
View Full Code Here

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

  // 12.6.3 The for Statement
  // 12.6.4 The for-in Statement
  // The for-of Statement
  private ParseTree parseForStatement() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.FOR);
    eat(TokenType.OPEN_PAREN);
    if (peekVariableDeclarationList()) {
      VariableDeclarationListTree variables = parseVariableDeclarationListNoIn();
      if (peek(TokenType.IN)) {
View Full Code Here

Examples of com.intellij.debugger.SourcePosition

  public final String getStratumId() {
    return myStratumId;
  }

  public SourcePosition getSourcePosition(final Location location) throws NoDataException {
    SourcePosition sourcePosition = null;

    try {
      String sourcePath = getRelativeSourcePathByLocation(location);
      PsiFile file = mySourcesFinder.findSourceFile(sourcePath, myDebugProcess.getProject(), myScope);
      if(file != null) {
View Full Code Here

Examples of com.sun.javadoc.SourcePosition

          "Expected only a member, type, or package");
    }
  }

  private boolean looksSynthesized(ExecutableMemberDoc memberDoc) {
    SourcePosition memberPos = memberDoc.position();
    int memberLine = memberPos.line();

    SourcePosition classPos = memberDoc.containingClass().position();
    int classLine = classPos.line();

    if (memberLine == classLine) {
      return true;
    } else {
      return false;
View Full Code Here

Examples of com.sun.mirror.util.SourcePosition

        // APT supports the operation mode where it creates Declarations from
        // a class file, in which case the source position is not available
        // use that as a key to sort them correctly. This isn't "correct" in
        // the sense that it relies on undocumented behavior of APT where
        // it returns declarations in the reverse order, but this makes things work.
        SourcePosition pos = l.get(0).getPosition();
        if(pos!=null)
            Collections.sort(l,SOURCE_POS_COMPARATOR);
        else
            Collections.reverse(l);
        return l;
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.util.SourcePosition

    }
   
    public static File getSourceFile( TypeDeclaration decl, boolean mustBeNonNull )
    {
        decl = getOutermostClass( decl );
        SourcePosition position = decl.getPosition();
        if ( mustBeNonNull ) assert position != null : "no source file for " + decl.toString();
        return position != null ? position.file() : null;
    }
View Full Code Here

Examples of org.chromium.debug.core.sourcemap.SourcePosition

        id = VmResourceId.forScript(script);
      }
      TextStreamPosition vmPosition = stackFrame.getStatementStartPosition();
      SourcePositionMap sourceTransformationMap = getConnectedData().getSourcePositionMap();
      SourcePositionMap.Token token = sourceTransformationMap.getCurrentToken();
      SourcePosition originalPosition;
      if (id == null) {
        originalPosition = new SourcePosition(id, vmPosition.getLine(), vmPosition.getColumn());
      } else {
        originalPosition = sourceTransformationMap.translatePosition(id,
            vmPosition.getLine(), vmPosition.getColumn(),
            TranslateDirection.VM_TO_USER);
      }
View Full Code Here

Examples of org.chromium.debug.ui.liveedit.LiveEditDiffViewer.SourcePosition

    if (compileError.getEndPosition() == null) {
      endOffset = startOffset + 1;
    } else {
      endOffset = compileError.getEndPosition().getOffset();
    }
    final SourcePosition sourcePosition = new SourcePosition() {
      @Override public int getStart() {
        return startOffset;
      }
      @Override public int getEnd() {
        return endOffset;
View Full Code Here

Examples of org.jrubyparser.SourcePosition

   *            An id that will be used as the file name or <code>null</code> if the file name should be extracted
   *            from the exception
   * @return The created diagnostic
   */
  public static FileDiagnostic createSyntaxErrorDiagnostic(SyntaxException syntaxException, String id) {
    SourcePosition pos = syntaxException.getPosition();
    String msg = syntaxException.getMessage();
    if(msg == null)
      msg = "syntax error";
    FileDiagnostic fd = new FileDiagnostic(ERROR, PARSE_FAILURE, msg, new File(id == null
        ? pos.getFile()
        : id));
    fd.setLineNumber(pos.getStartLine() + 1);
    return fd;
  }
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.