![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ExpressionParserTypes.h>
A token stream wraps up a raw string, providing accessors into it for consuming tokens
|
explicit |
Constructor. The stream is only valid for the lifetime of the string provided
| int32 TTokenStream< CharType >::CharsRemaining | ( | ) | const |
Get the number of characters remaining in the stream after the current read position
| TOptional< TStringToken< CharType > > TTokenStream< CharType >::GenerateToken | ( | int32 | NumChars, |
| TStringToken< CharType > * | Accumulate = nullptr |
||
| ) | const |
Generate a token for the specified number of chars, at the current read position (or end of Accumulate)
|
inline |
| FString TTokenStream< CharType >::GetErrorContext | ( | ) | const |
Get the error context from the current read position
| int32 TTokenStream< CharType >::GetPosition | ( | ) | const |
Get the current read position from the start of the stream
|
inline |
|
inline |
| bool TTokenStream< CharType >::IsEmpty | ( | ) | const |
Check if the stream is empty
| bool TTokenStream< CharType >::IsReadPosValid | ( | const CharType * | InPos, |
| int32 | MinNumChars = 1 |
||
| ) | const |
Check if it is valid to read (the optional number of characters) from the specified position
| TOptional< TStringToken< CharType > > TTokenStream< CharType >::ParseSymbol | ( | CharType | Symbol, |
| TStringToken< CharType > * | Accumulate = nullptr |
||
| ) | const |
Attempt parse out the specified pre-defined string from the current read position (or accumulating into the specified existing token)
| TOptional< TStringToken< CharType > > TTokenStream< CharType >::ParseSymbol | ( | TStringToken< CharType > * | Accumulate = nullptr | ) | const |
Return a string token for the next character in the stream (or accumulating into the specified existing token)
| TOptional< TStringToken< CharType > > TTokenStream< CharType >::ParseToken | ( | const CharType * | Symbol, |
| TStringToken< CharType > * | Accumulate = nullptr |
||
| ) | const |
Attempt parse out the specified pre-defined string from the current read position (or accumulating into the specified existing token)
| TOptional< TStringToken< CharType > > TTokenStream< CharType >::ParseToken | ( | TFunctionRef< EParseState(CharType)> | Pred, |
| TStringToken< CharType > * | Accumulate = nullptr |
||
| ) | const |
Parse out a token using the supplied predicate. Will keep consuming characters into the resulting token provided the predicate returns EParseState::Continue or EParseState::StopAfter. Optionally supply a token to accumulate into Returns a string token for the stream, or empty on error
Parse out a token
| TOptional< TStringToken< CharType > > TTokenStream< CharType >::ParseTokenIgnoreCase | ( | const CharType * | Symbol, |
| TStringToken< CharType > * | Accumulate = nullptr |
||
| ) | const |
| TOptional< TStringToken< CharType > > TTokenStream< CharType >::ParseWhitespace | ( | TStringToken< CharType > * | Accumulate = nullptr | ) | const |
Parse a whitespace token
| CharType TTokenStream< CharType >::PeekChar | ( | int32 | Offset = 0 | ) | const |
Peek at the character at the specified offset from the current read position
| void TTokenStream< CharType >::SetReadPos | ( | const TStringToken< CharType > & | Token | ) |
Set the current read position to the character proceeding the specified token