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

Method GetChildTokens

LuaParser/src/Ast/LuaSyntaxNode.cpp:212–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212std::vector<LuaSyntaxNode> LuaSyntaxNode::GetChildTokens(LuaTokenKind kind, const LuaSyntaxTree &t) const {
213 std::vector<LuaSyntaxNode> results;
214 auto child = GetFirstChild(t);
215 for (; !child.IsNull(t); child.ToNext(t)) {
216 if (child.GetTokenKind(t) == kind) {
217 results.push_back(child);
218 }
219 }
220 return results;
221}
222
223bool LuaSyntaxNode::IsSingleLineNode(const LuaSyntaxTree &t) const {
224 if (_index == 0) {

Callers 5

CheckInNodeMethod · 0.80
CheckInBodyMethod · 0.80
ComplexAnalyzeMethod · 0.80
AnalyzeIfStatementMethod · 0.80
AnalyzeNameListMethod · 0.80

Calls 4

ToNextMethod · 0.80
IsNullMethod · 0.45
GetTokenKindMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected