Modifier and Type | Field and Description |
---|---|
int |
column
the column at the captured index
|
int |
index
the captured index
|
boolean |
inString
whether we are in a string at the captured index
|
int |
line
the line at the captured index
|
int |
originalColumn
the original source column.
|
int |
originalLine
the original source line.
|
Modifier and Type | Method and Description |
---|---|
boolean |
rollback()
Reverts to the state (index, line, column, etc...) captured within this given snapshot.
|
void |
rollback(String message,
Object... args)
Similar to
rollback() , but this will also throw a ParserException with the given message and optional
message args. |
public final int index
public final int line
public final int column
public final boolean inString
public final int originalLine
Source.originalLine()
.public final int originalColumn
Source.originalColumn()
.public boolean rollback()
public void rollback(String message, Object... args)
rollback()
, but this will also throw a ParserException
with the given message and optional
message args.
This is a convenience function to combine the common scenario of rolling back before throwing an error so that the error message indicates a more accurate location of where the error occurred.
message
- The error message.args
- Optional args for the error message.ParserException
- An exception with the given message.Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.