Om
1.0.0
A universal framework for multimedia simulation
|
A class that represents a character position within a source file. More...
#include <omScriptingPosition.h>
Public Member Functions | |
Position () | |
Create a new source position pointing to the first character of the first line in the source code. More... | |
Position (Index newCodePointIndex, Index newLineNumber, Index newLineCharacterNumber) | |
Create a new source position with the specified absolute index, line number, and line character number. More... | |
Index | getCodePointIndex () const |
Return the code point index within the original source string of this position. More... | |
Index | getLineNumber () const |
Return the line number of this position, where the lines are numbered starting from 1. More... | |
Index | getLineCharacterNumber () const |
Return the character number of this position within its line. More... | |
Bool | operator< (const Position &other) const |
Return whether or not this position is earlier than another. More... | |
Bool | operator<= (const Position &other) const |
Return whether or not this position is earlier or the same as another. More... | |
Bool | operator> (const Position &other) const |
Return whether or not this position is later than another. More... | |
Bool | operator>= (const Position &other) const |
Return whether or not this position is later or the same as another. More... | |
UTF8String | toString () const |
Return a string representation of the token type. More... | |
operator UTF8String () const | |
Convert this token type into a string representation. More... | |
A class that represents a character position within a source file.
|
inline |
Create a new source position pointing to the first character of the first line in the source code.
|
inline |
Create a new source position with the specified absolute index, line number, and line character number.
|
inline |
Return the code point index within the original source string of this position.
|
inline |
Return the line number of this position, where the lines are numbered starting from 1.
|
inline |
Return the character number of this position within its line.
Characters are numbered starting from 1.
Return whether or not this position is earlier than another.
Return whether or not this position is earlier or the same as another.
Return whether or not this position is later than another.
Return whether or not this position is later or the same as another.
UTF8String om::scripting::util::Position::toString | ( | ) | const |
Return a string representation of the token type.
|
inline |
Convert this token type into a string representation.