This repository was archived by the owner on May 19, 2018. It is now read-only.
Commit c6b6609 1 parent eeba714 commit c6b6609 Copy full SHA for c6b6609
File tree 18 files changed +64
-256
lines changed
anonymous-function-no-parens-types
18 files changed +64
-256
lines changed Original file line number Diff line number Diff line change @@ -575,7 +575,7 @@ pp.flowParseFunctionTypeParam = function () {
575
575
} ;
576
576
577
577
pp . reinterpretTypeAsFunctionTypeParam = function ( type ) {
578
- const node = this . startNodeAt ( type . start , type . loc ) ;
578
+ const node = this . startNodeAt ( type . start , type . loc . start ) ;
579
579
node . name = null ;
580
580
node . optional = false ;
581
581
node . typeAnnotation = type ;
@@ -787,7 +787,7 @@ pp.flowParsePrefixType = function () {
787
787
pp . flowParseAnonFunctionWithoutParens = function ( ) {
788
788
const param = this . flowParsePrefixType ( ) ;
789
789
if ( ! this . state . noAnonFunctionType && this . eat ( tt . arrow ) ) {
790
- const node = this . startNodeAt ( param . start , param . loc ) ;
790
+ const node = this . startNodeAt ( param . start , param . loc . start ) ;
791
791
node . params = [ this . reinterpretTypeAsFunctionTypeParam ( param ) ] ;
792
792
node . rest = null ;
793
793
node . returnType = this . flowParseType ( ) ;
Original file line number Diff line number Diff line change 66
66
"end" : 23 ,
67
67
"loc" : {
68
68
"start" : {
69
- "start" : {
70
- "line" : 1 ,
71
- "column" : 9
72
- },
73
- "end" : {
74
- "line" : 1 ,
75
- "column" : 15
76
- }
69
+ "line" : 1 ,
70
+ "column" : 9
77
71
},
78
72
"end" : {
79
73
"line" : 1 ,
87
81
"end" : 18 ,
88
82
"loc" : {
89
83
"start" : {
90
- "start" : {
91
- "line" : 1 ,
92
- "column" : 9
93
- },
94
- "end" : {
95
- "line" : 1 ,
96
- "column" : 15
97
- }
84
+ "line" : 1 ,
85
+ "column" : 9
98
86
},
99
87
"end" : {
100
88
"line" : 1 ,
Original file line number Diff line number Diff line change 66
66
"end" : 30 ,
67
67
"loc" : {
68
68
"start" : {
69
- "start" : {
70
- "line" : 1 ,
71
- "column" : 9
72
- },
73
- "end" : {
74
- "line" : 1 ,
75
- "column" : 22
76
- }
69
+ "line" : 1 ,
70
+ "column" : 9
77
71
},
78
72
"end" : {
79
73
"line" : 1 ,
87
81
"end" : 25 ,
88
82
"loc" : {
89
83
"start" : {
90
- "start" : {
91
- "line" : 1 ,
92
- "column" : 9
93
- },
94
- "end" : {
95
- "line" : 1 ,
96
- "column" : 22
97
- }
84
+ "line" : 1 ,
85
+ "column" : 9
98
86
},
99
87
"end" : {
100
88
"line" : 1 ,
Original file line number Diff line number Diff line change 108
108
"end" : 27 ,
109
109
"loc" : {
110
110
"start" : {
111
- "start" : {
112
- "line" : 1 ,
113
- "column" : 14
114
- },
115
- "end" : {
116
- "line" : 1 ,
117
- "column" : 20
118
- }
111
+ "line" : 1 ,
112
+ "column" : 14
119
113
},
120
114
"end" : {
121
115
"line" : 1 ,
129
123
"end" : 23 ,
130
124
"loc" : {
131
125
"start" : {
132
- "start" : {
133
- "line" : 1 ,
134
- "column" : 14
135
- },
136
- "end" : {
137
- "line" : 1 ,
138
- "column" : 20
139
- }
126
+ "line" : 1 ,
127
+ "column" : 14
140
128
},
141
129
"end" : {
142
130
"line" : 1 ,
Original file line number Diff line number Diff line change 96
96
"end" : 35 ,
97
97
"loc" : {
98
98
"start" : {
99
- "start" : {
100
- "line" : 1 ,
101
- "column" : 18
102
- },
103
- "end" : {
104
- "line" : 1 ,
105
- "column" : 24
106
- }
99
+ "line" : 1 ,
100
+ "column" : 18
107
101
},
108
102
"end" : {
109
103
"line" : 1 ,
117
111
"end" : 27 ,
118
112
"loc" : {
119
113
"start" : {
120
- "start" : {
121
- "line" : 1 ,
122
- "column" : 18
123
- },
124
- "end" : {
125
- "line" : 1 ,
126
- "column" : 24
127
- }
114
+ "line" : 1 ,
115
+ "column" : 18
128
116
},
129
117
"end" : {
130
118
"line" : 1 ,
Original file line number Diff line number Diff line change 96
96
"end" : 35 ,
97
97
"loc" : {
98
98
"start" : {
99
- "start" : {
100
- "line" : 1 ,
101
- "column" : 18
102
- },
103
- "end" : {
104
- "line" : 1 ,
105
- "column" : 24
106
- }
99
+ "line" : 1 ,
100
+ "column" : 18
107
101
},
108
102
"end" : {
109
103
"line" : 1 ,
117
111
"end" : 27 ,
118
112
"loc" : {
119
113
"start" : {
120
- "start" : {
121
- "line" : 1 ,
122
- "column" : 18
123
- },
124
- "end" : {
125
- "line" : 1 ,
126
- "column" : 24
127
- }
114
+ "line" : 1 ,
115
+ "column" : 18
128
116
},
129
117
"end" : {
130
118
"line" : 1 ,
Original file line number Diff line number Diff line change 66
66
"end" : 27 ,
67
67
"loc" : {
68
68
"start" : {
69
- "start" : {
70
- "line" : 1 ,
71
- "column" : 9
72
- },
73
- "end" : {
74
- "line" : 1 ,
75
- "column" : 16
76
- }
69
+ "line" : 1 ,
70
+ "column" : 9
77
71
},
78
72
"end" : {
79
73
"line" : 1 ,
87
81
"end" : 19 ,
88
82
"loc" : {
89
83
"start" : {
90
- "start" : {
91
- "line" : 1 ,
92
- "column" : 9
93
- },
94
- "end" : {
95
- "line" : 1 ,
96
- "column" : 16
97
- }
84
+ "line" : 1 ,
85
+ "column" : 9
98
86
},
99
87
"end" : {
100
88
"line" : 1 ,
Original file line number Diff line number Diff line change 66
66
"end" : 28 ,
67
67
"loc" : {
68
68
"start" : {
69
- "start" : {
70
- "line" : 1 ,
71
- "column" : 9
72
- },
73
- "end" : {
74
- "line" : 1 ,
75
- "column" : 17
76
- }
69
+ "line" : 1 ,
70
+ "column" : 9
77
71
},
78
72
"end" : {
79
73
"line" : 1 ,
87
81
"end" : 20 ,
88
82
"loc" : {
89
83
"start" : {
90
- "start" : {
91
- "line" : 1 ,
92
- "column" : 9
93
- },
94
- "end" : {
95
- "line" : 1 ,
96
- "column" : 17
97
- }
84
+ "line" : 1 ,
85
+ "column" : 9
98
86
},
99
87
"end" : {
100
88
"line" : 1 ,
Original file line number Diff line number Diff line change 81
81
"end" : 27 ,
82
82
"loc" : {
83
83
"start" : {
84
- "start" : {
85
- "start" : {
86
- "line" : 1 ,
87
- "column" : 10
88
- },
89
- "end" : {
90
- "line" : 1 ,
91
- "column" : 16
92
- }
93
- },
94
- "end" : {
95
- "line" : 1 ,
96
- "column" : 27
97
- }
84
+ "line" : 1 ,
85
+ "column" : 10
98
86
},
99
87
"end" : {
100
88
"line" : 1 ,
109
97
"end" : 27 ,
110
98
"loc" : {
111
99
"start" : {
112
- "start" : {
113
- "line" : 1 ,
114
- "column" : 10
115
- },
116
- "end" : {
117
- "line" : 1 ,
118
- "column" : 16
119
- }
100
+ "line" : 1 ,
101
+ "column" : 10
120
102
},
121
103
"end" : {
122
104
"line" : 1 ,
130
112
"end" : 19 ,
131
113
"loc" : {
132
114
"start" : {
133
- "start" : {
134
- "line" : 1 ,
135
- "column" : 10
136
- },
137
- "end" : {
138
- "line" : 1 ,
139
- "column" : 16
140
- }
115
+ "line" : 1 ,
116
+ "column" : 10
141
117
},
142
118
"end" : {
143
119
"line" : 1 ,
Original file line number Diff line number Diff line change 66
66
"end" : 35 ,
67
67
"loc" : {
68
68
"start" : {
69
- "start" : {
70
- "line" : 1 ,
71
- "column" : 9
72
- },
73
- "end" : {
74
- "line" : 1 ,
75
- "column" : 15
76
- }
69
+ "line" : 1 ,
70
+ "column" : 9
77
71
},
78
72
"end" : {
79
73
"line" : 1 ,
87
81
"end" : 18 ,
88
82
"loc" : {
89
83
"start" : {
90
- "start" : {
91
- "line" : 1 ,
92
- "column" : 9
93
- },
94
- "end" : {
95
- "line" : 1 ,
96
- "column" : 15
97
- }
84
+ "line" : 1 ,
85
+ "column" : 9
98
86
},
99
87
"end" : {
100
88
"line" : 1 ,
You can’t perform that action at this time.
0 commit comments