java.lang.Object
com.maroontress.clione.impl.Eof
All Implemented Interfaces:
SourceChar

public abstract class Eof extends Object implements SourceChar
Represents the abstract EOF.
  • Constructor Details

    • Eof

      public Eof()
  • Method Details

    • isEof

      public final boolean isEof()
      Returns whether this object represents EOF.
      Specified by:
      isEof in interface SourceChar
      Returns:
      true if this represents EOF.
    • toChar

      public final char toChar()
      Returns a char value corresponding to this object.

      This method throws an IllegalStateException if this object represents EOF.

      Specified by:
      toChar in interface SourceChar
      Returns:
      The char value.
    • getSpan

      public abstract SourceSpan 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 interface SourceChar
      Returns:
      The location.
    • getChildren

      public abstract List<SourceChar> getChildren()
      Returns the child characters.
      Specified by:
      getChildren in interface SourceChar
      Returns:
      The unmodifiable list containing the child characters, or SourceChar.EMPTY_LIST if this object has no child characters.