MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / GetChildToken

Method GetChildToken

LuaParser/src/Ast/LuaSyntaxNode.cpp:170–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168
169
170LuaSyntaxNode LuaSyntaxNode::GetChildToken(LuaTokenKind kind, const LuaSyntaxTree &t) const {
171 auto child = GetFirstChild(t);
172 for (; !child.IsNull(t); child.ToNext(t)) {
173 if (child.GetTokenKind(t) == kind) {
174 break;
175 }
176 }
177 return child;
178}
179
180LuaSyntaxNode LuaSyntaxNode::GetChildToken(std::function<bool(LuaTokenKind)> predicated, const LuaSyntaxTree &t) const {
181 auto child = GetFirstChild(t);

Callers 15

AnalyzeMethod · 0.80
CheckInBodyMethod · 0.80
ComplexAnalyzeMethod · 0.80
CollectBinaryOperatorMethod · 0.80
IsRectFieldFunction · 0.80
ResolveAlignGroupMethod · 0.80
AnalyzeIfStatementMethod · 0.80
TableFieldAddSepMethod · 0.80
AnalyzeTableFieldMethod · 0.80
AnalyzeCallExpressionMethod · 0.80

Calls 3

ToNextMethod · 0.80
IsNullMethod · 0.45
GetTokenKindMethod · 0.45

Tested by

no test coverage detected