Package foundry.veil.lib.anarres.cpp
Class LexerSource
java.lang.Object
foundry.veil.lib.anarres.cpp.Source
foundry.veil.lib.anarres.cpp.LexerSource
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<Token>
- Direct Known Subclasses:
StringLexerSource
Does not handle digraphs.
-
Constructor Summary
-
Method Summary
Methods inherited from class foundry.veil.lib.anarres.cpp.Source
error, getName, iterator, setListener, skipline, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LexerSource
-
-
Method Details
-
getLine
public int getLine()Returns the line number of the last read character in this source.Lines are numbered from 1.
-
getColumn
public int getColumn()Returns the column number of the last read character in this source.Columns are numbered from 0.
-
token
Description copied from class:Source
Returns the next Token parsed from this input stream.- Specified by:
token
in classSource
- Throws:
IOException
LexerException
- See Also:
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classSource
- Throws:
IOException
-