tokens#

Fully qualified name: carb::tokens

namespace tokens#

Namespace for ITokens.

Namespace for all low level Carbonite functionality.

Classes#

ITokens

Interface for storing tokens and resolving strings containing them.

Enumerations#

ResolveError

Errors for resolving tokens.

Functions#

std::string escapeString(carb::cpp::string_view str)

A helper function that escapes necessary symbols in the provided string so that they won't be recognized as related to token parsing.

bool registerPathAlias(cpp::string_view alias, cpp::string_view value)

Registers a new path string alias for replacement with resolvePathAliases() .

omni::expected< omni::string, ResolveError > resolvePathAliases(cpp::string_view srcBuf)

Replaces path alias markers in a path with the full names.

omni::expected< omni::string, ResolveError > resolveString(const ITokens *tokens, carb::cpp::string_view str, ResolveFlags resolveFlags=kResolveFlagNone)

Helper for resolving a token string using the v2.0 interface.

bool unregisterPathAlias(cpp::string_view alias)

Unregisters a path string alias.

Typedefs#

ResolveFlags

Flags for token resolution algorithm.

Variables#

const ResolveFlags kResolveFlagLeaveTokenIfNotFound

If cannot resolve token in a string then leave it as is.

const ResolveFlags kResolveFlagNone

Default token resolution process. Unknown tokens are replaced with empty strings.