github.com/cheshirekow/buildtools@v0.0.0-20200224190056-5d637702fe81/build/testdata/051.build.golden (about) 1 foo( 2 name = "foo", 3 srcs = [bar], 4 ) 5 6 aaa 7 8 bbb 9 10 ccc 11 12 ddd 13 14 # multiline 15 # comment 16 eee 17 18 fff 19 20 ggg 21 22 def function( 23 # This shouldn't mess with indentation counting 24 x, 25 y = z): 26 aaa 27 bbb 28 29 def g( 30 a, 31 s, 32 d): # this is d 33 # this is function definition 34 ccc 35 36 # Misalingned comments 37 # are not a syntax error 38 ddd 39 40 def h(a, s = d): # this is h 41 eee 42 43 def k(g): 44 g += 1 45 return g 46 47 for x in y: 48 print(y) 49 50 if x: 51 print(x) 52 elif y: 53 print(y) 54 else: 55 print(z) 56 print(y) 57 print(x) 58 59 if x: 60 print(x) 61 62 elif y: 63 print(y) 64 65 else: 66 print(z) 67 print(y) 68 print(x) 69 70 def i(): 71 def j(): 72 return h( 73 [1], 74 [2], 75 ) # returns h 76 77 return u() + w 78 79 for b in a: # first 80 for c, d in b: # second 81 for ((e, f), g) in zip(c, d): # third 82 pass 83 84 if foo in bar: 85 for f in foo: 86 # loop 87 f() 88 elif True: 89 a = b 90 91 elif False: 92 #assign 93 b = a 94 else: 95 (a, b) = (b, a) 96 97 if foo: 98 bar 99 100 if foo: 101 bar 102 103 #comment 104 bar 105 106 bar 107 108 def a(name, foo = True, **kwargs): 109 # comment here 110 return