| 38 | } |
| 39 | |
| 40 | bool FormatState::IsNewLine(LuaSyntaxNode &n, const LuaSyntaxTree &t) const { |
| 41 | if (_mode == Mode::Format) { |
| 42 | return _currentWidth == 0; |
| 43 | } else { |
| 44 | auto prev = n.GetPrevToken(t); |
| 45 | return prev.IsNull(t) || n.GetPrevToken(t).GetEndLine(t) != n.GetStartLine(t); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | void FormatState::Analyze(const LuaSyntaxTree &t) { |
| 50 | AddAnalyzer<SpaceAnalyzer>(); |
no test coverage detected