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

Method SpaceRight

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

Source from the content-addressed store, hash-verified

416}
417
418void SpaceAnalyzer::SpaceRight(LuaSyntaxNode n, const LuaSyntaxTree &t, std::size_t space, SpacePriority priority) {
419 auto token = n.GetLastToken(t);
420 auto it = _rightSpaces.find(token.GetIndex());
421 if (it != _rightSpaces.end()) {
422 if (it->second.Priority > priority) {
423 return;
424 }
425 }
426
427 _rightSpaces[token.GetIndex()] = SpaceData(space, priority);
428}
429
430void SpaceAnalyzer::SpaceIgnore(LuaSyntaxNode n) {
431 _ignoreSpace.insert(n.GetIndex());

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected