Revert operator indentation in an argument list

This commit is contained in:
Eugen Wissner 2023-01-25 12:32:02 +01:00 committed by Jan Jurzitza
parent a4fbc6f881
commit dba8c87ebc
9 changed files with 128 additions and 2 deletions

View File

@ -1625,7 +1625,7 @@ private:
const commaLine = tokens[index].line; const commaLine = tokens[index].line;
writeToken(); writeToken();
if (indents.topIs(tok!".")) if (indents.topIsWrap && !indents.topIs(tok!","))
{ {
indents.pop; indents.pop;
} }
@ -1647,7 +1647,7 @@ private:
{ {
pushWrapIndent(); pushWrapIndent();
writeToken(); writeToken();
if (indents.topIs(tok!".")) if (indents.topIsWrap && !indents.topIs(tok!","))
{ {
indents.pop; indents.pop;
} }

View File

@ -8,6 +8,16 @@ class C
.map.map.map.map.map.map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, .map.map.map.map.map.map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __LINE__); __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __LINE__);
g(map && map && map && map && map && map && map && map && map && map && map
&& map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __LINE__);
h(map || map || map || map || map || map || map || map || map || map || map
|| map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __LINE__);
i(map + map + map + map + map + map + map + map + map + map + map + map + map
+ map + map + map + map + map, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __LINE__);
} }
} }
} }

View File

@ -10,6 +10,22 @@ class C
.to!string, .to!string,
__FILE__, __FILE__,
__LINE__); __LINE__);
g(
map &&
map,
__FILE__,
__LINE__);
h(
map ||
map,
__FILE__,
__LINE__);
i(
map
+ map,
__FILE__,
__LINE__);
} }
} }
} }

View File

@ -23,6 +23,38 @@ class C
__FILE__, __FILE__,
__FILE__, __FILE__,
__LINE__); __LINE__);
g(
map && map && map && map && map && map && map && map && map && map && map && map,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__LINE__);
h(
map || map || map || map || map || map || map || map || map || map || map || map,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__LINE__);
i(
map + map + map + map + map + map + map + map + map + map + map + map + map + map + map + map + map
+ map,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__FILE__,
__LINE__);
} }
} }
} }

View File

@ -10,6 +10,22 @@ class C
.to!string, .to!string,
__FILE__, __FILE__,
__LINE__); __LINE__);
g(
map &&
map,
__FILE__,
__LINE__);
h(
map ||
map,
__FILE__,
__LINE__);
i(
map
+ map,
__FILE__,
__LINE__);
} }
} }
} }

View File

@ -6,6 +6,16 @@ class C {
.map.map.map.map.map.map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, .map.map.map.map.map.map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __LINE__); __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __LINE__);
g(map && map && map && map && map && map && map && map && map && map && map
&& map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __LINE__);
h(map || map || map || map || map || map || map || map || map || map || map
|| map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __LINE__);
i(map + map + map + map + map + map + map + map + map + map + map + map + map
+ map + map + map + map + map, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __LINE__);
} }
} }
} }

View File

@ -8,6 +8,22 @@ class C {
.to!string, .to!string,
__FILE__, __FILE__,
__LINE__); __LINE__);
g(
map &&
map,
__FILE__,
__LINE__);
h(
map ||
map,
__FILE__,
__LINE__);
i(
map
+ map,
__FILE__,
__LINE__);
} }
} }
} }

View File

@ -5,6 +5,16 @@ class C {
.map.map.map.map.map.map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, .map.map.map.map.map.map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __LINE__); __FILE__, __FILE__, __FILE__, __FILE__, __FILE__, __LINE__);
g(map && map && map && map && map && map && map && map && map && map && map
&& map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __LINE__);
h(map || map || map || map || map || map || map || map || map || map || map
|| map, __FILE__, __FILE__, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __LINE__);
i(map + map + map + map + map + map + map + map + map + map + map + map + map
+ map + map + map + map + map, __FILE__, __FILE__, __FILE__,
__FILE__, __FILE__, __FILE__, __FILE__, __LINE__);
} }
} }
} }

View File

@ -7,6 +7,22 @@ class C {
.to!string, .to!string,
__FILE__, __FILE__,
__LINE__); __LINE__);
g(
map &&
map,
__FILE__,
__LINE__);
h(
map ||
map,
__FILE__,
__LINE__);
i(
map
+ map,
__FILE__,
__LINE__);
} }
} }
} }