1#ifndef TEXTMATELIB_TOKENIZE_STRING_H
2#define TEXTMATELIB_TOKENIZE_STRING_H
15class AttributedScopeStack;
23 StateStackImpl* stack;
29 : stack(nullptr), linePos(0), anchorPosition(0), stoppedEarly(false) {}
34 std::vector<IOnigCaptureIndex> captureIndices;
41struct IMatchInjectionsResult {
43 std::vector<IOnigCaptureIndex> captureIndices;
46 IMatchInjectionsResult() : priorityMatch(false), matchedRuleId(
ruleIdFromNumber(0)) {}
50struct IWhileCheckResult {
51 StateStackImpl* stack;
57 : stack(nullptr), linePos(0), anchorPosition(-1), isFirstLine(false) {}
61class LocalStackElement {
63 AttributedScopeStack* scopes;
66 LocalStackElement(AttributedScopeStack* scopes_,
int endPos_)
67 : scopes(scopes_), endPos(endPos_) {}
71StackElement tokenizeString(
76 StateStackImpl* stack,
77 LineTokens* lineTokens,
78 bool checkWhileConditions,
83IWhileCheckResult _checkWhileConditions(
88 StateStackImpl* stack,
89 LineTokens* lineTokens
92IMatchResult* matchRuleOrInjections(
97 StateStackImpl* stack,
101IMatchResult* matchRule(
103 OnigString* lineText,
106 StateStackImpl* stack,
110IMatchInjectionsResult* matchInjections(
111 const std::vector<Injection>& injections,
113 OnigString* lineText,
116 StateStackImpl* stack,
122 OnigString* lineText,
124 StateStackImpl* stack,
125 LineTokens* lineTokens,
126 const std::vector<CaptureRule*>& captures,
127 const std::vector<IOnigCaptureIndex>& captureIndices
RuleId ruleIdFromNumber(int id)
Convert an integer to a RuleId.
Core type definitions and interfaces for TextMateLib.