@@ -37,9 +37,12 @@ var Preprocessors = []Mapping{
37
37
Part ("_" , Obj {
38
38
uast .KeyType : String ("StringLiteral" ),
39
39
"value" : AnyNode (nil ),
40
- "extra" : Obj {
41
- "raw" : Var ("raw" ),
42
- "rawValue" : AnyNode (nil ),
40
+ "extra" : Fields {
41
+ {Name : "raw" , Op : Var ("raw" )},
42
+ {Name : "rawValue" , Op : Any ()},
43
+ //FIXME(bzz): map parenthesis
44
+ {Name : "parenthesized" , Drop : true , Op : Any ()},
45
+ {Name : "parenStart" , Drop : true , Op : Any ()},
43
46
},
44
47
}),
45
48
Part ("_" , Obj {
@@ -50,8 +53,11 @@ var Preprocessors = []Mapping{
50
53
Map (
51
54
Part ("_" , Obj {
52
55
uast .KeyType : String ("RegExpLiteral" ),
53
- "extra" : Obj {
54
- "raw" : Var ("raw" ),
56
+ "extra" : Fields {
57
+ {Name : "raw" , Op : Var ("raw" )},
58
+ //FIXME(bzz): map parenthesis
59
+ {Name : "parenthesized" , Drop : true , Op : Any ()},
60
+ {Name : "parenStart" , Drop : true , Op : Any ()},
55
61
},
56
62
}),
57
63
Part ("_" , Obj {
@@ -61,7 +67,7 @@ var Preprocessors = []Mapping{
61
67
),
62
68
// drop extra info for other nodes (it duplicates other node fields)
63
69
Map (
64
- Part ("_" , Obj {"extra" : AnyNode ( nil )}),
70
+ Part ("_" , Obj {"extra" : Any ( )}),
65
71
Part ("_" , Obj {}),
66
72
),
67
73
// FIXME(bzz): make sure such comments are mapped properly
0 commit comments