3#include <Foundation/CodeUtils/Tokenizer.h>
4#include <Foundation/Containers/HybridArray.h>
6namespace plTokenParseUtils
13 PL_FOUNDATION_DLL
void SkipWhitespace(
const TokenStream& tokens, plUInt32& ref_uiCurToken);
18 PL_FOUNDATION_DLL
void SkipWhitespaceAndNewline(
const TokenStream& tokens, plUInt32& ref_uiCurToken);
25 PL_FOUNDATION_DLL
bool IsEndOfLine(
const TokenStream& tokens, plUInt32 uiCurToken,
bool bIgnoreWhitespace);
32 PL_FOUNDATION_DLL
void CopyRelevantTokens(
const TokenStream& source, plUInt32 uiFirstSourceToken, TokenStream& ref_destination,
bool bPreserveNewLines);
40 PL_FOUNDATION_DLL
bool Accept(
const TokenStream& tokens, plUInt32& ref_uiCurToken,
plStringView sToken, plUInt32* pAccepted =
nullptr);
43 PL_FOUNDATION_DLL
bool Accept(
const TokenStream& tokens, plUInt32& ref_uiCurToken,
plTokenType::Enum type, plUInt32* pAccepted =
nullptr);
52 PL_FOUNDATION_DLL
bool Accept(
const TokenStream& tokens, plUInt32& ref_uiCurToken,
plStringView sToken1,
plStringView sToken2, plUInt32* pAccepted =
nullptr);
61 PL_FOUNDATION_DLL
bool AcceptUnless(
const TokenStream& tokens, plUInt32& ref_uiCurToken,
plStringView sToken1,
plStringView sToken2, plUInt32* pAccepted =
nullptr);
112 PL_FOUNDATION_DLL
void CombineTokensToString(
const TokenStream& tokens, plUInt32 uiCurToken,
plStringBuilder& ref_sResult,
bool bKeepComments =
true,
bool bRemoveRedundantWhitespace =
false,
bool bInsertLine =
false);
118 PL_FOUNDATION_DLL
void CombineRelevantTokensToString(
const TokenStream& tokens, plUInt32 uiCurToken,
plStringBuilder& ref_sResult);
124 PL_FOUNDATION_DLL
void CreateCleanTokenStream(
const TokenStream& tokens, plUInt32 uiCurToken, TokenStream& ref_destination);
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
Definition DynamicArray.h:81
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
A token to be matched by the plTokenParseUtils::Accept overload for arrays of tokens....
Definition TokenParseUtils.h:66
TokenMatch(plStringView sToken)
This matches a token string of any type.
Definition TokenParseUtils.h:68
TokenMatch(plTokenType::Enum type, plStringView sToken)
For internal use. Use one of the other constructors instead.
Definition TokenParseUtils.h:79
TokenMatch(plTokenType::Enum type)
This matches a token type of any string value.
Definition TokenParseUtils.h:73
Enum
Definition Tokenizer.h:13
@ Unknown
for internal use
Definition Tokenizer.h:14