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

Method SpaceLeft

CodeFormatCore/src/Format/Analyzer/SpaceAnalyzer.cpp:406–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406void SpaceAnalyzer::SpaceLeft(LuaSyntaxNode n, const LuaSyntaxTree &t, std::size_t space, SpacePriority priority) {
407 auto token = n.GetPrevToken(t);
408 auto it = _rightSpaces.find(token.GetIndex());
409 if (it != _rightSpaces.end()) {
410 if (it->second.Priority > priority) {
411 return;
412 }
413 }
414
415 _rightSpaces[token.GetIndex()] = SpaceData(space, priority);
416}
417
418void SpaceAnalyzer::SpaceRight(LuaSyntaxNode n, const LuaSyntaxTree &t, std::size_t space, SpacePriority priority) {
419 auto token = n.GetLastToken(t);

Callers 1

AnalyzeCallExpressionMethod · 0.80

Calls 5

SpaceDataClass · 0.85
GetIndexMethod · 0.80
GetPrevTokenMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected