|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jruby.lexer.yacc.SimpleSourcePosition
public class SimpleSourcePosition
| Constructor Summary | |
|---|---|
SimpleSourcePosition(java.lang.String filename,
int line)
|
|
| Method Summary | |
|---|---|
void |
adjustStartOffset(int relativeValue)
Modify startOffset by a relativeValue. |
java.util.Collection<CommentNode> |
getComments()
Get comments associated with this position (really we get this from node, but this is a hack to save some space when using the interpreter). |
int |
getEndLine()
Which is the last(end) line that this source position occurs on (zero-based) |
int |
getEndOffset()
Get offset (relative to beginning of source file) immediately after the last character represented by this source position |
java.lang.String |
getFile()
Which file does this source position live in? |
int |
getStartLine()
Which is the first(start) line that this source position occurs on (zero-based) |
int |
getStartOffset()
Get offset (relative to beginning of source file) immediately before first character represented by this source position. |
void |
setComments(java.util.Collection<CommentNode> comments)
|
java.lang.String |
toString()
|
ISourcePosition |
union(ISourcePosition other)
Calculates the logical union of the two positions and creates a new resulting position |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleSourcePosition(java.lang.String filename,
int line)
| Method Detail |
|---|
public void adjustStartOffset(int relativeValue)
ISourcePosition
adjustStartOffset in interface ISourcePositionrelativeValue - to nudge startOffset up or downpublic int getEndLine()
ISourcePosition
getEndLine in interface ISourcePositionpublic int getEndOffset()
ISourcePosition
getEndOffset in interface ISourcePositionpublic java.lang.String getFile()
ISourcePosition
getFile in interface ISourcePositionpublic int getStartLine()
ISourcePosition
getStartLine in interface ISourcePositionpublic int getStartOffset()
ISourcePosition
getStartOffset in interface ISourcePositionpublic ISourcePosition union(ISourcePosition other)
ISourcePosition
union in interface ISourcePositionother - to be unioned against this position
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Collection<CommentNode> getComments()
ISourcePosition
getComments in interface ISourcePositionpublic void setComments(java.util.Collection<CommentNode> comments)
setComments in interface ISourcePosition
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||