-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix array literal indentation in foreach (#554)
- Loading branch information
Showing
7 changed files
with
228 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
static foreach (x; [ | ||
1, | ||
2, | ||
3, | ||
]) | ||
{ | ||
} | ||
|
||
static foreach_reverse (x; [ | ||
1, | ||
2, | ||
3, | ||
]) | ||
{ | ||
} | ||
|
||
void f() | ||
{ | ||
foreach (x; [ | ||
1, | ||
2, | ||
3, | ||
]) | ||
{ | ||
} | ||
foreach_reverse (x; [ | ||
1, | ||
2, | ||
3, | ||
]) | ||
{ | ||
} | ||
|
||
if (!SymbolTool.instance.workspacesFilesUris.canFind!sameFile(uri)) | ||
{ | ||
send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [ | ||
])); | ||
} | ||
|
||
foreach (x; map([ | ||
1, | ||
2, | ||
3, | ||
])) | ||
{ | ||
} | ||
foreach (x; foo!(map!([ | ||
1, | ||
2, | ||
3, | ||
]))) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--keep_line_breaks true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
static foreach (x; [ | ||
1, | ||
2, | ||
3, | ||
]) | ||
{ | ||
} | ||
|
||
static foreach_reverse (x; [ | ||
1, | ||
2, | ||
3, | ||
]) | ||
{ | ||
} | ||
|
||
void f() | ||
{ | ||
foreach (x; [ | ||
1, | ||
2, | ||
3, | ||
]) | ||
{ | ||
} | ||
foreach_reverse (x; [ | ||
1, | ||
2, | ||
3, | ||
]) | ||
{ | ||
} | ||
|
||
if (!SymbolTool.instance.workspacesFilesUris.canFind!sameFile(uri)) | ||
{ | ||
send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [])); | ||
} | ||
|
||
foreach (x; map([ | ||
1, | ||
2, | ||
3, | ||
])) | ||
{ | ||
} | ||
foreach (x; foo!(map!([ | ||
1, | ||
2, | ||
3, | ||
]))) | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
static foreach (x; [ | ||
1, | ||
2, | ||
3, | ||
]) { | ||
} | ||
|
||
static foreach_reverse (x; [ | ||
1, | ||
2, | ||
3, | ||
]) { | ||
} | ||
|
||
void f() | ||
{ | ||
foreach (x; [ | ||
1, | ||
2, | ||
3, | ||
]) { | ||
} | ||
foreach_reverse (x; [ | ||
1, | ||
2, | ||
3, | ||
]) { | ||
} | ||
|
||
if (!SymbolTool.instance.workspacesFilesUris.canFind!sameFile(uri)) { | ||
send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [ | ||
])); | ||
} | ||
|
||
foreach (x; map([ | ||
1, | ||
2, | ||
3, | ||
])) { | ||
} | ||
foreach (x; foo!(map!([ | ||
1, | ||
2, | ||
3, | ||
]))) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
static foreach (x; [ | ||
1, | ||
2, | ||
3, | ||
]) { | ||
} | ||
|
||
static foreach_reverse (x; [ | ||
1, | ||
2, | ||
3, | ||
]) { | ||
} | ||
|
||
void f() { | ||
foreach (x; [ | ||
1, | ||
2, | ||
3, | ||
]) { | ||
} | ||
foreach_reverse (x; [ | ||
1, | ||
2, | ||
3, | ||
]) { | ||
} | ||
|
||
if (!SymbolTool.instance.workspacesFilesUris.canFind!sameFile(uri)) { | ||
send(TextDocument.publishDiagnostics, new PublishDiagnosticsParams(uri, [ | ||
])); | ||
} | ||
|
||
foreach (x; map([ | ||
1, | ||
2, | ||
3, | ||
])) { | ||
} | ||
foreach (x; foo!(map!([ | ||
1, | ||
2, | ||
3, | ||
]))) { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters