Pos
You can directly use instance of this class.
StartPos
Represents a single location in the source string.
Constructor Summary
Public Constructor | ||
public |
constructor(line: *, column: *) |
Method Summary
Public Methods | ||
public |
next(ch: *): * Advance the pos by any character.
|
|
public |
onNextColumn(): * Loc after a non-newline character.
|
|
public |
onNextLine(): * Poc after a newline.
|
|
public |
onPrevColumn(): * Undoes {@link onNextLine}.
|
|
public |
|
Public Constructors
public constructor(line: *, column: *) source
Params:
Name | Type | Attribute | Description |
line | * | ||
column | * |
Public Methods
public next(ch: *): * source
Advance the pos by any character.
Params:
Name | Type | Attribute | Description |
ch | * |
Return:
* |
public onPrevColumn(): * source
Undoes onNextLine. Only call this is you know this is not the first column.
Return:
* |