Input
Representation of the input stream with some util functions. The class is used by the botlang
lexer which takes an instance of Input
as a constructor argument and converts it into a
token stream.
Test:
Constructor Summary
Public Constructor | ||
public |
constructor(input: String) Create an Input. |
Method Summary
Public Methods | ||
public |
Determine whether or not there are no more values in the stream. |
|
public |
Throw a new Error. |
|
public |
Return the next character from the input stream. |
|
public |
Return the character from the current position without "consuming" it. |
Public Constructors
Public Methods
public error(message: String): void source
Throw a new Error.
Params:
Name | Type | Attribute | Description |
message | String |
Return:
void |