Provides a wrapper for reading characters from a string of code. It strips comments and other junk internally such as tabs and spaces.
|
| CodeLexer (string code) |
| Creates a new code lexer with the given code text. More...
|
|
override char | Read () |
| Reads a character from the string. More...
|
|
bool | PeekJunk () |
| Finds if the current location is followed by junk. Note that the junk has already been read off. More...
|
|
bool | ReadJunk () |
| Skips junk in the text such as tabs or comments. More...
|
|
| StringReader (byte[] str) |
| Creates a new reader for the raw single-byte encoded string. Useful if you're talking to e.g. a webserver with a binary protocol. More...
|
|
| StringReader (string str) |
| Creates a new reader for the given string. More...
|
|
bool | More () |
| Checks if there is anything left to read. More...
|
|
char | Peek () |
| Takes a peek at the next character in the stream without reading it. More...
|
|
char | Peek (int delta) |
| Takes a peek at the character that is a number of characters away from the next one without actually reading it. Peek(0) is the next character, Peek(1) is the one after that etc. More...
|
|
void | StepBack () |
| Steps back one place in the stream. More...
|
|
void | Advance () |
| Steps forward one place in the stream. More...
|
|
void | Advance (int places) |
| Steps forward the given number of places in the stream. More...
|
|
int | Length () |
| The length of the string. More...
|
|
void | ReadUntil (char character) |
| Keeps reading the given character from the stream until it's no longer next. Used for e.g. stripping an unknown length block of whitespaces in the stream. More...
|
|
void | ReadOff (char[] chars) |
| Keeps reading from the stream until no characters in the given set are next. Used for e.g. stripping an unknown number of newlines (
or ) from this stream. More...
|
|
void | ReadOff (char[] chars, out int count) |
| Keeps reading from the stream until no characters in the given set are next. Used for e.g. stripping an unknown number of newlines (
or ) from this stream. More...
|
|
int | GetLineNumber () |
| Gets the line number that the pointer is currently at. More...
|
|
int | GetLineNumber (out int charOnLine) |
| Gets the line number and character number that the pointer is currently at. More...
|
|
string | ReadLine (int lineNumber) |
| Reads the numbered line from this stream. More...
|
|