Package com.mackenziehigh.sexpr
Class SourceLocation
java.lang.Object
com.mackenziehigh.sexpr.SourceLocation
An instance of this interface indicate the location
of a symbolic-expression within a string of text.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
column()
This method retrieves the column-number where the symbolic-expression starts.int
line()
This method retrieves the line-number where the symbolic-expression starts.message()
This method returns a human-readable message based on this location.source()
This method retrieves the name of the source.toString()
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
SourceLocation
Sole Constructor.- Parameters:
source
- is the value that will be returnable by source().line
- is the value that will be returnable by line().column
- is the value that will be returnable by column().
-
-
Method Details
-
source
This method retrieves the name of the source. This is usually the path to a file.- Returns:
- the identifier of the source.
-
line
public int line()This method retrieves the line-number where the symbolic-expression starts.- Returns:
- the line-number.
-
column
public int column()This method retrieves the column-number where the symbolic-expression starts.- Returns:
- the line-number.
-
message
This method returns a human-readable message based on this location.- Returns:
- this object in human readable form.
-
toString
-