public final class CSSCharStream extends Object implements CharStream
CharStream, where the stream is
assumed to contain only ASCII characters (with java-like unicode escape
processing).| Constructor and Description |
|---|
CSSCharStream(Reader aReader) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustBeginLineColumn(int nNewLine,
int newCol)
Method to adjust line and column numbers for the start of a token.
|
void |
backup(int nAmount)
Retreat.
|
char |
beginToken() |
void |
done()
Set buffers back to null when finished.
|
int |
getBeginColumn() |
int |
getBeginLine() |
int |
getEndColumn() |
int |
getEndLine() |
String |
getImage() |
char[] |
getSuffix(int len) |
int |
getTabSize() |
boolean |
isTrackLineColumn() |
char |
readChar()
Read a character.
|
void |
setTabSize(int i)
Set the tab size to use.
|
void |
setTrackLineColumn(boolean tlc)
Enable or disable line number and column number tracking.
|
public void setTabSize(int i)
CharStreamsetTabSize in interface CharStreami - spaces per tabpublic int getTabSize()
getTabSize in interface CharStreampublic char beginToken()
throws IOException
beginToken in interface CharStreamIOException - from readCharpublic char readChar()
throws IOException
readChar in interface CharStreamIOException - if an I/O error occurspublic int getBeginColumn()
getBeginColumn in interface CharStreampublic int getBeginLine()
getBeginLine in interface CharStreampublic int getEndColumn()
getEndColumn in interface CharStreampublic int getEndLine()
getEndLine in interface CharStreampublic void backup(int nAmount)
backup in interface CharStreamnAmount - Number of chars to back up.public String getImage()
getImage in interface CharStreampublic char[] getSuffix(int len)
getSuffix in interface CharStreampublic void done()
done in interface CharStreampublic void adjustBeginLineColumn(int nNewLine,
int newCol)
nNewLine - line indexnewCol - column indexpublic boolean isTrackLineColumn()
isTrackLineColumn in interface CharStreamtrue if line number and column numbers should be tracked.public void setTrackLineColumn(boolean tlc)
CharStreamsetTrackLineColumn in interface CharStreamtlc - true to track it, false to not do it.Copyright © 2014–2022 Philip Helger. All rights reserved.