MCPcopy Create free account
hub / github.com/ZDoom/Raze / Break

Method Break

source/common/scripting/frontend/ast.cpp:108–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 NeedSpace = true;
107 }
108 void Break()
109 {
110 // Don't break if not needed.
111 if (Column != NestDepth)
112 {
113 if (NeedSpace)
114 {
115 ConsecOpens = 0;
116 }
117 else
118 { // Move hanging ( characters to the new line
119 Str.Truncate(Str.Len() - ConsecOpens);
120 NestDepth -= ConsecOpens;
121 }
122 Str << '\n';
123 Column = NestDepth;
124 NeedSpace = false;
125 if (NestDepth > 0)
126 {
127 Str.AppendFormat("%*s", (int)NestDepth, "");
128 }
129 if (ConsecOpens > 0)
130 {
131 for (size_t i = 0; i < ConsecOpens; ++i)
132 {
133 Str << '(';
134 }
135 NestDepth += ConsecOpens;
136 }
137 }
138 }
139 bool CheckWrap(size_t len)
140 {
141 if (len + Column > WrapWidth)

Callers 15

PrintNodesFunction · 0.80
PrintClassFunction · 0.80
PrintStructFunction · 0.80
PrintPropertyFunction · 0.80
PrintFlagDefFunction · 0.80
PrintStaticArrayStateFunction · 0.80
PrintEnumFunction · 0.80
PrintStatesFunction · 0.80
PrintFuncPtrParamDeclFunction · 0.80
PrintFuncPtrTypeFunction · 0.80
PrintFuncParamFunction · 0.80
PrintCompoundStmtFunction · 0.80

Calls 3

TruncateMethod · 0.80
LenMethod · 0.80
AppendFormatMethod · 0.80

Tested by

no test coverage detected