/** * Exits the currently scanned tree. */ @Override protected void exit() { JCTree tree = stack.peek(); if (compilationUnit != null && tree instanceof JCBlock) { int endPos = tree.getEndPosition(diagnosticSource.getEndPosTable()); sourceMap.addEntry( new Position(endPos, // compilationUnit.lineMap.getLineNumber(endPos), // compilationUnit.lineMap.getColumnNumber(endPos)), new Position(getCurrentPosition(), currentLine, currentColumn)); } super.exit(); positionStack.pop(); }
|| lineMap.getLineNumber(c.getSourcePos(0)) <= lineMap.getLineNumber(argumentTracker.currentArgumentEndPosition)) { argumentTracker.addCommentToCurrentArgument(c, Position.ANY);
/** Source file positions in CRT are integers in the format: * {@literal line-number << LINESHIFT + column-number } */ private int encodePosition(int pos, Position.LineMap lineMap, Log log) { int line = lineMap.getLineNumber(pos); int col = lineMap.getColumnNumber(pos); int new_pos = Position.encodePosition(line, col); if (crtDebug) { System.out.println(", line = " + line + ", column = " + col + ", new_pos = " + new_pos); } if (new_pos == Position.NOPOS) log.warning(pos, "position.overflow", line); return new_pos; }
/** Source file positions in CRT are integers in the format: * line-number << LINESHIFT + column-number */ private int encodePosition(int pos, Position.LineMap lineMap, Log log) { int line = lineMap.getLineNumber(pos); int col = lineMap.getColumnNumber(pos); int new_pos = Position.encodePosition(line, col); if (crtDebug) { System.out.println(", line = " + line + ", column = " + col + ", new_pos = " + new_pos); } if (new_pos == Position.NOPOS) log.warning(pos, "position.overflow", line); return new_pos; }
/** Source file positions in CRT are integers in the format: * {@literal line-number << LINESHIFT + column-number } */ private int encodePosition(int pos, Position.LineMap lineMap, Log log) { int line = lineMap.getLineNumber(pos); int col = lineMap.getColumnNumber(pos); int new_pos = Position.encodePosition(line, col); if (crtDebug) { System.out.println(", line = " + line + ", column = " + col + ", new_pos = " + new_pos); } if (new_pos == Position.NOPOS) log.warning(pos, "position.overflow", line); return new_pos; }
public int getLine() { return (lineMap != null) ? lineMap.getLineNumber(pos) : -1; }
public int getColumn() { return (lineMap != null) ? lineMap.getColumnNumber(pos) : -1; }
public int getLine() { return (lineMap != null) ? lineMap.getLineNumber(pos) : -1; }
public int getLine() { return (lineMap != null) ? lineMap.getLineNumber(pos) : -1; }
/** Source file positions in CRT are integers in the format: * line-number << LINESHIFT + column-number */ private int encodePosition(int pos, Position.LineMap lineMap, Log log) { int line = lineMap.getLineNumber(pos); int col = lineMap.getColumnNumber(pos); int new_pos = Position.encodePosition(line, col); if (crtDebug) { System.out.println(", line = " + line + ", column = " + col + ", new_pos = " + new_pos); } if (new_pos == Position.NOPOS) log.warning(pos, "position.overflow", line); return new_pos; }
public int getColumn() { return (lineMap != null) ? lineMap.getColumnNumber(pos) : -1; }
boolean isCommentOnPreviousLine(Comment c) { int tokenLine = lineMap.getLineNumber(c.getSourcePos(0)); return tokenLine == currentLineNumber - 1; }
public int getColumn() { return (lineMap != null) ? lineMap.getColumnNumber(pos) : -1; }
/** Force stat begin eagerly */ public void markStatBegin() { if (alive && lineDebugInfo) { int line = lineMap.getLineNumber(pendingStatPos); char cp1 = (char)cp; char line1 = (char)line; if (cp1 == cp && line1 == line) addLineNumber(cp1, line1); } pendingStatPos = Position.NOPOS; }
/** The column in the source file. The first column is * numbered 1; 0 means no column information is available. * Columns count characters in the input stream; a tab * advances the column number to the next 8-column tab stop. */ public int column() { if (lineMap == null) { return 0; }else { return lineMap.getColumnNumber(position); } }
public int getLine() { return (lineMap != null) ? lineMap.getLineNumber(pos) : -1; }
public int getColumn() { return (lineMap != null) ? lineMap.getColumnNumber(pos) : -1; }
/** Force stat begin eagerly */ public void markStatBegin() { if (alive && lineDebugInfo) { int line = lineMap.getLineNumber(pendingStatPos); char cp1 = (char)cp; char line1 = (char)line; if (cp1 == cp && line1 == line) addLineNumber(cp1, line1); } pendingStatPos = Position.NOPOS; }
/** Force stat begin eagerly */ public void markStatBegin() { if (alive && lineDebugInfo) { int line = lineMap.getLineNumber(pendingStatPos); char cp1 = (char)cp; char line1 = (char)line; if (cp1 == cp && line1 == line) addLineNumber(cp1, line1); } pendingStatPos = Position.NOPOS; }
/** Force stat begin eagerly */ public void markStatBegin() { if (alive && lineDebugInfo) { int line = lineMap.getLineNumber(pendingStatPos); char cp1 = (char)cp; char line1 = (char)line; if (cp1 == cp && line1 == line) addLineNumber(cp1, line1); } pendingStatPos = Position.NOPOS; }