@@ -49,13 +49,19 @@ func funcDefMap(typ string, async bool) Mapping {
49
49
}),
50
50
},
51
51
{Name : "decorator_list" , Op : Var ("func_decorators" )},
52
+ {Name : "noops_previous" , Optional : "np_opt" , Op : Var ("noops_previous" )},
53
+ {Name : "noops_sameline" , Optional : "ns_opt" , Op : Var ("noops_sameline" )},
52
54
},
53
55
Obj {
54
56
"Nodes" : Arr (
55
- Obj {
57
+ Fields {
56
58
// FIXME: generator=true if it uses yield anywhere in the body
57
- "async" : Bool (async ),
58
- "decorators" : Var ("func_decorators" ),
59
+ {Name : "async" , Op : Bool (async )},
60
+ {Name : "decorators" , Op : Var ("func_decorators" )},
61
+ {Name : "comments" , Op : Fields {
62
+ {Name : "noops_previous" , Optional : "np_opt" , Op : Var ("noops_previous" )},
63
+ {Name : "noops_sameline" , Optional : "ns_opt" , Op : Var ("noops_sameline" )},
64
+ }},
59
65
},
60
66
UASTType (uast.Alias {}, Obj {
61
67
// FIXME: can't call identifierWithPos because it would take the position of the
@@ -154,11 +160,6 @@ var Normalizers = []Mapping{
154
160
{Name : uast .KeyType , Op : String ("BoxedBoolLiteral" )},
155
161
{Name : "boxed_value" , Op : UASTType (uast.Bool {}, Obj {
156
162
uast .KeyPos : Var ("pos_" ),
157
- << << << < HEAD
158
- "Value" : Var ("lv" ),
159
- || || || | merged common ancestors
160
- "Value" : Var ("lv" ),
161
- == == == =
162
163
"Value" : Var ("lv" ),
163
164
})},
164
165
{Name : "noops_previous" , Optional : "np_opt" , Op : Var ("noops_previous" )},
@@ -171,7 +172,8 @@ var Normalizers = []Mapping{
171
172
{Name : uast .KeyType , Op : String ("Attribute" )},
172
173
{Name : uast .KeyPos , Op : Var ("pos_" )},
173
174
{Name : "attr" , Op : Var ("aname" )},
174
- // No problem dropping this one, it's used by an internal interpreter optimization/cache
175
+ // No problem dropping this one, it's used by an internal interpreter optimization
176
+ //cache
175
177
// without semantic meaning
176
178
{Name : "ctx" , Op : Any ()},
177
179
{Name : "noops_previous" , Optional : "np_opt" , Op : Var ("noops_previous" )},
@@ -182,7 +184,6 @@ var Normalizers = []Mapping{
182
184
{Name : "boxed_value" , Op : UASTType (uast.Identifier {}, Obj {
183
185
uast .KeyPos : Var ("pos_" ),
184
186
"Name" : Var ("aname" ),
185
- >> >> >> > Checkpoint with the C # like transform
186
187
})},
187
188
{Name : "noops_previous" , Optional : "np_opt" , Op : Var ("noops_previous" )},
188
189
{Name : "noops_sameline" , Optional : "ns_opt" , Op : Var ("noops_sameline" )},
@@ -251,7 +252,7 @@ var Normalizers = []Mapping{
251
252
Fields {
252
253
{Name : uast .KeyToken , Op : Var ("name" )},
253
254
{Name : "default" , Op : Var ("init" )},
254
- // TODO : change this once we've a way to store other nodes on semantic objects
255
+ // FIXME : change this once we've a way to store other nodes on semantic objects
255
256
// See: https://github.com/bblfsh/sdk/issues/361
256
257
// See: https://github.com/bblfsh/python-driver/issues/178
257
258
{Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
@@ -269,7 +270,7 @@ var Normalizers = []Mapping{
269
270
MapSemantic ("vararg" , uast.Argument {}, MapObj (
270
271
Fields {
271
272
{Name : uast .KeyToken , Op : Var ("name" )},
272
- // TODO : change this once we've a way to store other nodes on semantic objects
273
+ // FIXME : change this once we've a way to store other nodes on semantic objects
273
274
// See: https://github.com/bblfsh/sdk/issues/361
274
275
// See: https://github.com/bblfsh/python-driver/issues/178
275
276
{Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
@@ -287,7 +288,7 @@ var Normalizers = []Mapping{
287
288
MapSemantic ("kwarg" , uast.Argument {}, MapObj (
288
289
Fields {
289
290
{Name : uast .KeyToken , Op : Var ("name" )},
290
- // TODO : change this once we've a way to store other nodes on semantic objects
291
+ // FIXME : change this once we've a way to store other nodes on semantic objects
291
292
// See: https://github.com/bblfsh/sdk/issues/361
292
293
// See: https://github.com/bblfsh/python-driver/issues/178
293
294
{Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
@@ -297,8 +298,8 @@ var Normalizers = []Mapping{
297
298
{Name : "annotation" , Op : Any ()},
298
299
},
299
300
Obj {
300
- "Name" : identifierWithPos ("name" ),
301
- "MapVariadic" : Bool (true ),
301
+ "Name" : identifierWithPos ("name" ),
302
+ "MapVariadic" : Bool (true ),
302
303
},
303
304
)),
304
305
@@ -359,7 +360,7 @@ var Normalizers = []Mapping{
359
360
)},
360
361
{Name : "level" , Op : Var ("level" )},
361
362
{Name : "module" , Op : Var ("module" )},
362
- // TODO : change this once we've a way to store other nodes on semantic objects
363
+ // FIXME : change this once we've a way to store other nodes on semantic objects
363
364
// See: https://github.com/bblfsh/sdk/issues/361
364
365
// See: https://github.com/bblfsh/python-driver/issues/178
365
366
{Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
@@ -384,7 +385,7 @@ var Normalizers = []Mapping{
384
385
{Name : "names" , Op : Var ("names" )},
385
386
{Name : "module" , Op : Var ("module" )},
386
387
{Name : "level" , Op : Var ("level" )},
387
- // TODO : change this once we've a way to store other nodes on semantic objects
388
+ // FIXME : change this once we've a way to store other nodes on semantic objects
388
389
// See: https://github.com/bblfsh/sdk/issues/361
389
390
// See: https://github.com/bblfsh/python-driver/issues/178
390
391
{Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
0 commit comments