| 259 | } |
| 260 | |
| 261 | TextRange 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 | |
| 272 | std::size_t LuaSyntaxTree::GetNextSibling(std::size_t index) const { |
| 273 | if (index < _nodeOrTokens.size()) { |
no test coverage detected