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

Method GetTokenRange

LuaParser/src/Ast/LuaSyntaxTree.cpp:261–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261TextRange LuaSyntaxTree::GetTokenRange(std::size_t index) const {
262 if (index < _nodeOrTokens.size()) {
263 auto &n = _nodeOrTokens[index];
264 if (n.Type == NodeOrTokenType::Token) {
265 auto &token = _tokens[n.Data.TokenIndex];
266 return TextRange(token.Start, token.Length);
267 }
268 }
269 return TextRange();
270}
271
272std::size_t LuaSyntaxTree::GetNextSibling(std::size_t index) const {
273 if (index < _nodeOrTokens.size()) {

Callers 1

GetTextRangeMethod · 0.45

Calls 2

TextRangeClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected