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

Method Analyze

CodeFormatCore/src/Format/FormatState.cpp:49–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void FormatState::Analyze(const LuaSyntaxTree &t) {
50 AddAnalyzer<SpaceAnalyzer>();
51 AddAnalyzer<IndentationAnalyzer>();
52 AddAnalyzer<LineBreakAnalyzer>();
53 AddAnalyzer<AlignAnalyzer>();
54 AddAnalyzer<TokenAnalyzer>();
55 AddAnalyzer<FormatDocAnalyze>();
56 AddAnalyzer<SemicolonAnalyzer>();
57
58 _fileEndOfLine = t.GetFile().GetEndOfLine();
59 for (const auto &analyzer: _analyzers) {
60 if (analyzer) {
61 analyzer->Analyze(*this, t);
62 }
63 }
64
65 for (const auto &analyzer: _analyzers) {
66 if (analyzer) {
67 analyzer->ComplexAnalyze(*this, t);
68 }
69 }
70}
71
72void FormatState::AddRelativeIndent(LuaSyntaxNode syntaxNoe, std::size_t indent) {
73 if (_indentStack.empty()) {

Callers 5

TypeFormatMethod · 0.45
TypeFormatMethod · 0.45
GetFormatResultMethod · 0.45
GetFormatResultMethod · 0.45
TypeFormatMethod · 0.45

Calls 3

GetFileMethod · 0.80
GetEndOfLineMethod · 0.45
ComplexAnalyzeMethod · 0.45

Tested by

no test coverage detected