java.lang.Object
com.maroontress.clione.impl.Eof
- All Implemented Interfaces:
SourceChar
Represents the abstract EOF.
-
Field Summary
Fields inherited from interface com.maroontress.clione.SourceChar
EMPTY_LIST, STATIC_EOF
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract List<SourceChar>
Returns the child characters.abstract SourceSpan
getSpan()
Returns location of this object in the source file.final boolean
isEof()
Returns whether this object represents EOF.final char
toChar()
Returns achar
value corresponding to this object.
-
Constructor Details
-
Eof
public Eof()
-
-
Method Details
-
isEof
public final boolean isEof()Returns whether this object represents EOF.- Specified by:
isEof
in interfaceSourceChar
- Returns:
true
if this represents EOF.
-
toChar
public final char toChar()Returns achar
value corresponding to this object.This method throws an
IllegalStateException
if this object represents EOF.- Specified by:
toChar
in interfaceSourceChar
- Returns:
- The
char
value.
-
getSpan
Returns location of this object in the source file.If this object has its child characters, its location depends on their location. So, its location may represent a range of the characters.
This method throws an
IllegalStateException
if this object represents EOF.- Specified by:
getSpan
in interfaceSourceChar
- Returns:
- The location.
-
getChildren
Returns the child characters.- Specified by:
getChildren
in interfaceSourceChar
- Returns:
- The unmodifiable list containing the child characters, or
SourceChar.EMPTY_LIST
if this object has no child characters.
-