4#ifndef TEXTMATELIB_TYPES_H
5#define TEXTMATELIB_TYPES_H
91 return id == other.
id;
96 return id != other.
id;
Abstract interface representing the parsing state at the end of a line.
virtual int getDepth() const =0
Get the nesting depth (number of active rules)
virtual bool equals(StateStack *other)=0
Check if this state equals another (for incremental tokenization)
virtual StateStack * clone()=0
Create an independent copy of this state.
std::string RegExpString
Regular expression pattern as a string.
std::string ScopePattern
Regular expression pattern string used in grammar rules.
int OrMask
Generic template for bitwise OR-able flags/masks.
std::string ScopeName
Semantic name identifying a scope (e.g., "source.javascript", "comment.line")
std::string ScopePath
Full hierarchical scope path (e.g., "source.js keyword.control string.quoted.double")
std::string IncludeString
String referencing another grammar to include (scope name or file path)
std::map< std::string, int > EmbeddedLanguagesMap
Map from embedded language name to token type ID.
std::map< std::string, StandardTokenType > TokenTypeMap
Map from scope pattern to standard token type.
RuleId ruleIdFromNumber(int id)
Convert an integer to a RuleId.
const RuleId END_RULE_ID(-1)
Special rule ID indicating the end of a matched region.
int ruleIdToNumber(RuleId id)
Convert a RuleId to its integer value.
const RuleId WHILE_RULE_ID(-2)
Special rule ID for 'while' rule matching.
FontStyle
Font styling attributes (italic, bold, underline, strikethrough)
@ Bold
Bold (heavy weight) text.
@ Underline
Underlined text.
@ Strikethrough
Struck-through text.
StandardTokenType
Standard TextMate token type for syntax classification.
OptionalStandardTokenType
Standard token type with optional (unknown) state.
@ Other
Not a recognized standard type.
@ RegEx
Regular expression literal.
@ NotSet
Type not determined or not applicable.
int32_t EncodedTokenAttributes
Compact 32-bit encoding of a token's attributes.
Opaque identifier for a grammar rule.
RuleId(int value)
Create a RuleId with the given value.
bool operator!=(const RuleId &other) const
Inequality comparison.
bool operator==(const RuleId &other) const
Equality comparison.
int id
Internal rule identifier (positive for normal rules, negative for special rules)