-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiline formatting of generic for syntax (#337)
* Properly verify generic for line width, and format multiline where necessary * Add test case * Remove punctuated buffer comments functions * Update test snapshots * Update changelog * Put names and expr onto a different line if they need expanding Aligned more with `if .... then` syntax etc. * Update tests
- Loading branch information
1 parent
6272fdf
commit 7388e66
Showing
7 changed files
with
189 additions
and
79 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
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
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,14 @@ | ||
local function system(world) | ||
for id, model, lasering, transform in world:query(Components.Model, Components.Lasering, Components.Transform, Components.Mothership) do | ||
end | ||
end | ||
|
||
local function system(world) | ||
for id, model, lasering, transform, id, model, lasering, transform, id, model, lasering, transform, id, model, lasering, transform in world:query(Components.Model, Components.Lasering, Components.Transform, Components.Mothership) do | ||
end | ||
end | ||
|
||
local function system(world) | ||
for id, model, lasering, transform, id, model, lasering, transform, id, model, lasering, transform, id, model, lasering, transform in world:query(Components.Model, Components.Lasering, Components.Transform, Components.Mothership, Components.Mothership) do | ||
end | ||
end |
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
64 changes: 64 additions & 0 deletions
64
tests/snapshots/tests__standard@generic-for-multiline.lua.snap
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,64 @@ | ||
--- | ||
source: tests/tests.rs | ||
expression: format(&contents) | ||
|
||
--- | ||
local function system(world) | ||
for id, model, lasering, transform in | ||
world:query(Components.Model, Components.Lasering, Components.Transform, Components.Mothership) | ||
do | ||
end | ||
end | ||
|
||
local function system(world) | ||
for | ||
id, | ||
model, | ||
lasering, | ||
transform, | ||
id, | ||
model, | ||
lasering, | ||
transform, | ||
id, | ||
model, | ||
lasering, | ||
transform, | ||
id, | ||
model, | ||
lasering, | ||
transform | ||
in world:query(Components.Model, Components.Lasering, Components.Transform, Components.Mothership) do | ||
end | ||
end | ||
|
||
local function system(world) | ||
for | ||
id, | ||
model, | ||
lasering, | ||
transform, | ||
id, | ||
model, | ||
lasering, | ||
transform, | ||
id, | ||
model, | ||
lasering, | ||
transform, | ||
id, | ||
model, | ||
lasering, | ||
transform | ||
in | ||
world:query( | ||
Components.Model, | ||
Components.Lasering, | ||
Components.Transform, | ||
Components.Mothership, | ||
Components.Mothership | ||
) | ||
do | ||
end | ||
end | ||
|