java.lang.Object
com.maroontress.clione.SourceLocation
The location of the source file.
Note that the SourceLocation
instance is an immutable
object.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SourceLocation
public SourceLocation(int line, int column) Creates a new instance.- Parameters:
line
- The line number.column
- The column number.- Throws:
IllegalArgumentException
- If theline
orcolumn
is less than or equal to zero.
-
-
Method Details
-
getLine
public int getLine()Returns the line number.- Returns:
- The line number.
-
getColumn
public int getColumn()Returns the column number.- Returns:
- The column number.
-
toString
Returns a new string representation of this location that is easy for a person to read.This method returns a string equal to the value of:
Lnn:mm
where
mm
andnn
are positive integers,nn
represents the line number, andmm
represents the column number.
-