@@ -49,13 +49,19 @@ func funcDefMap(typ string, async bool) Mapping {
4949 }),
5050 },
5151 {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" )},
5254 },
5355 Obj {
5456 "Nodes" : Arr (
55- Obj {
57+ Fields {
5658 // 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+ }},
5965 },
6066 UASTType (uast.Alias {}, Obj {
6167 // FIXME: can't call identifierWithPos because it would take the position of the
@@ -154,11 +160,6 @@ var Normalizers = []Mapping{
154160 {Name : uast .KeyType , Op : String ("BoxedBoolLiteral" )},
155161 {Name : "boxed_value" , Op : UASTType (uast.Bool {}, Obj {
156162 uast .KeyPos : Var ("pos_" ),
157- << << << < HEAD
158- "Value" : Var ("lv" ),
159- || || || | merged common ancestors
160- "Value" : Var ("lv" ),
161- == == == =
162163 "Value" : Var ("lv" ),
163164 })},
164165 {Name : "noops_previous" , Optional : "np_opt" , Op : Var ("noops_previous" )},
@@ -171,7 +172,8 @@ var Normalizers = []Mapping{
171172 {Name : uast .KeyType , Op : String ("Attribute" )},
172173 {Name : uast .KeyPos , Op : Var ("pos_" )},
173174 {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
175177 // without semantic meaning
176178 {Name : "ctx" , Op : Any ()},
177179 {Name : "noops_previous" , Optional : "np_opt" , Op : Var ("noops_previous" )},
@@ -182,7 +184,6 @@ var Normalizers = []Mapping{
182184 {Name : "boxed_value" , Op : UASTType (uast.Identifier {}, Obj {
183185 uast .KeyPos : Var ("pos_" ),
184186 "Name" : Var ("aname" ),
185- >> >> >> > Checkpoint with the C # like transform
186187 })},
187188 {Name : "noops_previous" , Optional : "np_opt" , Op : Var ("noops_previous" )},
188189 {Name : "noops_sameline" , Optional : "ns_opt" , Op : Var ("noops_sameline" )},
@@ -251,7 +252,7 @@ var Normalizers = []Mapping{
251252 Fields {
252253 {Name : uast .KeyToken , Op : Var ("name" )},
253254 {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
255256 // See: https://github.com/bblfsh/sdk/issues/361
256257 // See: https://github.com/bblfsh/python-driver/issues/178
257258 {Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
@@ -269,7 +270,7 @@ var Normalizers = []Mapping{
269270 MapSemantic ("vararg" , uast.Argument {}, MapObj (
270271 Fields {
271272 {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
273274 // See: https://github.com/bblfsh/sdk/issues/361
274275 // See: https://github.com/bblfsh/python-driver/issues/178
275276 {Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
@@ -287,7 +288,7 @@ var Normalizers = []Mapping{
287288 MapSemantic ("kwarg" , uast.Argument {}, MapObj (
288289 Fields {
289290 {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
291292 // See: https://github.com/bblfsh/sdk/issues/361
292293 // See: https://github.com/bblfsh/python-driver/issues/178
293294 {Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
@@ -297,8 +298,8 @@ var Normalizers = []Mapping{
297298 {Name : "annotation" , Op : Any ()},
298299 },
299300 Obj {
300- "Name" : identifierWithPos ("name" ),
301- "MapVariadic" : Bool (true ),
301+ "Name" : identifierWithPos ("name" ),
302+ "MapVariadic" : Bool (true ),
302303 },
303304 )),
304305
@@ -359,7 +360,7 @@ var Normalizers = []Mapping{
359360 )},
360361 {Name : "level" , Op : Var ("level" )},
361362 {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
363364 // See: https://github.com/bblfsh/sdk/issues/361
364365 // See: https://github.com/bblfsh/python-driver/issues/178
365366 {Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
@@ -384,7 +385,7 @@ var Normalizers = []Mapping{
384385 {Name : "names" , Op : Var ("names" )},
385386 {Name : "module" , Op : Var ("module" )},
386387 {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
388389 // See: https://github.com/bblfsh/sdk/issues/361
389390 // See: https://github.com/bblfsh/python-driver/issues/178
390391 {Name : "noops_previous" , Optional : "np_opt" , Op : Any ()},
0 commit comments