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

Method FinishNode

LuaParser/src/Ast/LuaSyntaxTree.cpp:127–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void LuaSyntaxTree::FinishNode(LuaParser &p) {
128 if (!_nodePosStack.empty()) {
129 auto nodePos = _nodePosStack.top();
130 auto &node = _nodeOrTokens[nodePos];
131 if (node.Type == NodeOrTokenType::Node &&
132 IsEatAllComment(node.Data.NodeKind)) {
133 EatComments(p);
134 } else {
135 if (_tokenIndex < p.GetTokens().size() && _tokenIndex > 0) {
136 EatInlineComment(p);
137 }
138 }
139
140 _nodePosStack.pop();
141 }
142}
143
144void LuaSyntaxTree::BuildNode(LuaSyntaxNodeKind kind) {
145 auto currentPos = _nodeOrTokens.size();

Callers

nothing calls this directly

Calls 5

topMethod · 0.80
GetTokensMethod · 0.80
popMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected