-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: lambdas and parens, multiple indents #347
Open
ludamad
wants to merge
8
commits into
Scony:master
Choose a base branch
from
ludamad:ad/fix-lambda-deep-indents
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0e06eba
Attempted fix
ludamad 7cd7528
progress!
ludamad 3811ef0
bugfix
ludamad 44081c1
fix
ludamad e7bcef0
fix
ludamad 55d08b5
format
ludamad e3d01c5
dont double emit newlines
ludamad 57b1693
fix
ludamad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,234 @@ | ||
extends Node | ||
|
||
func _ready(): | ||
var l1 = func(x): pass;print('l1', x) | ||
l1.call('foo') | ||
var ls = [func(): print('l3'), func(): print('l4')] | ||
ls[1].call() | ||
var lss = [ | ||
func(): print('l6')] | ||
lss[1].call() | ||
get_tree().process_frame.connect(func(): pass;print('x')) | ||
func parened1(): | ||
stack(func(): | ||
source.owner.remove_card(source) | ||
if source == 1: | ||
var x: = 1 | ||
pass) | ||
|
||
func parened2(): | ||
stack(func(): | ||
if true: | ||
pass | ||
if false: | ||
pass) | ||
|
||
func foo(x): | ||
pass | ||
func bar(x,y): | ||
pass | ||
func actual_params(): | ||
foo(func(): | ||
var x = 1 | ||
return x) | ||
|
||
foo(func(): | ||
var x = 1 | ||
if x > 1: | ||
print(x)) | ||
|
||
foo(func(): | ||
var x = 1 | ||
if x > 1: | ||
print(x) | ||
) | ||
|
||
bar(func(): | ||
var x = 1 | ||
return x, func(): | ||
var y = 1 | ||
return y) | ||
|
||
bar(func(): | ||
var x = 1 | ||
return x, | ||
func(): | ||
var y = 1 | ||
return y) | ||
|
||
bar(func(): | ||
var x = 1 | ||
return x, | ||
|
||
func(): | ||
var y = 1 | ||
return y) | ||
|
||
bar(func(): | ||
var x = 1 | ||
if x > 0: | ||
print(x), func(): | ||
var y = 1 | ||
return y) | ||
|
||
bar(func(): | ||
var x = 1 | ||
if x > 0: | ||
print(x), | ||
func(): | ||
var y = 1 | ||
return y) | ||
|
||
func arrays(): | ||
var x1 = [func(): | ||
var x = 1 | ||
return x] | ||
var x2 = [func(): | ||
var x = 1 | ||
return x | ||
] | ||
var x3 = [func(): | ||
var x = 1 | ||
return x,func(): | ||
var x = 1 | ||
return x | ||
] | ||
var x4 = [func(): | ||
var x = 1 | ||
return x, | ||
func(): | ||
var x = 1 | ||
return x | ||
] | ||
var x5 = [func(): | ||
var x = 1 | ||
return x, | ||
|
||
func(): | ||
var x = 1 | ||
return x | ||
] | ||
var x6 = [func(): | ||
var x = 1 | ||
if x > 0: | ||
print(x), | ||
func(): | ||
var x = 1 | ||
return x | ||
] | ||
var x7 = [func(): | ||
var x = 1 | ||
if x > 0: | ||
print(x), | ||
|
||
func(): | ||
var x = 1 | ||
return x | ||
] | ||
|
||
func dicts(): | ||
var x1 = {'a':func(): | ||
var x = 1 | ||
return x} | ||
var x2 = {'a':func(): | ||
var x = 1 | ||
return x | ||
} | ||
var x3 = {'a':func(): | ||
var x = 1 | ||
return x,'b':func(): | ||
var x = 1 | ||
return x | ||
} | ||
var x4 = {'a':func(): | ||
var x = 1 | ||
return x, | ||
'b':func(): | ||
var x = 1 | ||
return x | ||
} | ||
var x5 = {'a':func(): | ||
var x = 1 | ||
return x,'b': | ||
func(): | ||
var x = 1 | ||
return x | ||
} | ||
var x6 = {'a':func(): | ||
var x = 1 | ||
return x, | ||
|
||
'b':func(): | ||
var x = 1 | ||
return x | ||
} | ||
var x7 = {'a':func(): | ||
var x = 1 | ||
if x > 0: | ||
print(x),'b':func(): | ||
var x = 1 | ||
return x | ||
} | ||
var x8 = {'a':func(): | ||
var x = 1 | ||
if x > 0: | ||
print(x), | ||
'b':func(): | ||
var x = 1 | ||
return x | ||
} | ||
var x9 = {'a':func(): | ||
var x = 1 | ||
if x > 0: | ||
print(x), | ||
|
||
'b':func(): | ||
var x = 1 | ||
return x | ||
} | ||
|
||
func nested(): | ||
var x1 = func(): | ||
var x1r = func(): | ||
var x = 1 | ||
return x | ||
return x1r | ||
|
||
var x2 = func(): | ||
var x2r = func(): | ||
pass | ||
pass | ||
pass | ||
|
||
var x3 = func(): | ||
var x3r = func(): | ||
var x3rr = func(): | ||
pass | ||
pass | ||
pass | ||
pass | ||
|
||
var x4 = func(): | ||
if true: | ||
var x4r = func(): | ||
pass | ||
pass | ||
pass | ||
pass | ||
|
||
var x5 = func(): | ||
if true: | ||
var x5r = func(): | ||
if true: | ||
pass | ||
pass | ||
pass | ||
pass | ||
pass | ||
|
||
var x6 = func(): | ||
if true: | ||
var x6r = func(): | ||
if true: | ||
var x6rr = func(): | ||
pass | ||
pass | ||
pass | ||
pass | ||
pass | ||
pass | ||
|
||
var x7 = [func(): | ||
pass | ||
var x = func(): | ||
pass | ||
pass,] |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opinionated, but I think fixing compound func stmt is the way to go and this works some of the time. could def revert this part tho