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

Method GetTokens

LuaParser/src/Ast/LuaSyntaxTree.cpp:429–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429std::vector<LuaSyntaxNode> LuaSyntaxTree::GetTokens() const {
430 std::vector<LuaSyntaxNode> results;
431 if (_tokens.empty()) {
432 return results;
433 }
434
435 results.reserve(_tokens.size());
436 for (auto &token: _tokens) {
437 results.emplace_back(token.NodeIndex);
438 }
439
440 return results;
441}
442
443LuaSyntaxNode LuaSyntaxTree::GetRootNode() const {
444 return LuaSyntaxNode(1);

Callers 15

CheckSingleFileMethod · 0.80
ReformatSingleFileMethod · 0.80
RangeReformatMethod · 0.80
ReformatMethod · 0.80
RangeFormatMethod · 0.80
TypeFormatMethod · 0.80
DiagnosticMethod · 0.80
mainFunction · 0.80
ReformatMethod · 0.80
RangeFormatMethod · 0.80
TypeFormatMethod · 0.80
DiagnosticMethod · 0.80

Calls 3

emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45

Tested by 4

mainFunction · 0.64
TestFormattedMethod · 0.64
TestRangeFormattedMethod · 0.64
GetParserMethod · 0.64