• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "FunctionDeclaration",
6      "function": {
7        "type": "ScriptFunction",
8        "id": {
9          "type": "Identifier",
10          "name": "getPropAccessor",
11          "loc": {
12            "start": {
13              "line": 17,
14              "column": 10
15            },
16            "end": {
17              "line": 17,
18              "column": 25
19            }
20          }
21        },
22        "generator": false,
23        "async": false,
24        "expression": false,
25        "params": [
26          {
27            "type": "Identifier",
28            "name": "key",
29            "loc": {
30              "start": {
31                "line": 17,
32                "column": 26
33              },
34              "end": {
35                "line": 17,
36                "column": 29
37              }
38            }
39          }
40        ],
41        "body": {
42          "type": "BlockStatement",
43          "statements": [
44            {
45              "type": "ReturnStatement",
46              "argument": {
47                "type": "ConditionalExpression",
48                "test": {
49                  "type": "CallExpression",
50                  "callee": {
51                    "type": "Identifier",
52                    "name": "test",
53                    "loc": {
54                      "start": {
55                        "line": 18,
56                        "column": 12
57                      },
58                      "end": {
59                        "line": 18,
60                        "column": 16
61                      }
62                    }
63                  },
64                  "arguments": [
65                    {
66                      "type": "Identifier",
67                      "name": "key",
68                      "loc": {
69                        "start": {
70                          "line": 18,
71                          "column": 17
72                        },
73                        "end": {
74                          "line": 18,
75                          "column": 20
76                        }
77                      }
78                    }
79                  ],
80                  "optional": false,
81                  "loc": {
82                    "start": {
83                      "line": 18,
84                      "column": 12
85                    },
86                    "end": {
87                      "line": 18,
88                      "column": 21
89                    }
90                  }
91                },
92                "consequent": {
93                  "type": "TemplateLiteral",
94                  "expressions": [
95                    {
96                      "type": "Identifier",
97                      "name": "key",
98                      "loc": {
99                        "start": {
100                          "line": 18,
101                          "column": 29
102                        },
103                        "end": {
104                          "line": 18,
105                          "column": 32
106                        }
107                      }
108                    }
109                  ],
110                  "quasis": [
111                    {
112                      "type": "TemplateElement",
113                      "value": {
114                        "raw": ".",
115                        "cooked": "."
116                      },
117                      "loc": {
118                        "start": {
119                          "line": 18,
120                          "column": 26
121                        },
122                        "end": {
123                          "line": 18,
124                          "column": 27
125                        }
126                      }
127                    },
128                    {
129                      "type": "TemplateElement",
130                      "value": {
131                        "raw": "",
132                        "cooked": ""
133                      },
134                      "loc": {
135                        "start": {
136                          "line": 18,
137                          "column": 33
138                        },
139                        "end": {
140                          "line": 18,
141                          "column": 33
142                        }
143                      }
144                    }
145                  ],
146                  "loc": {
147                    "start": {
148                      "line": 18,
149                      "column": 24
150                    },
151                    "end": {
152                      "line": 18,
153                      "column": 35
154                    }
155                  }
156                },
157                "alternate": {
158                  "type": "TemplateLiteral",
159                  "expressions": [
160                    {
161                      "type": "CallExpression",
162                      "callee": {
163                        "type": "Identifier",
164                        "name": "escapeForJS",
165                        "loc": {
166                          "start": {
167                            "line": 18,
168                            "column": 43
169                          },
170                          "end": {
171                            "line": 18,
172                            "column": 54
173                          }
174                        }
175                      },
176                      "arguments": [
177                        {
178                          "type": "Identifier",
179                          "name": "key",
180                          "loc": {
181                            "start": {
182                              "line": 18,
183                              "column": 55
184                            },
185                            "end": {
186                              "line": 18,
187                              "column": 58
188                            }
189                          }
190                        }
191                      ],
192                      "optional": false,
193                      "loc": {
194                        "start": {
195                          "line": 18,
196                          "column": 43
197                        },
198                        "end": {
199                          "line": 18,
200                          "column": 59
201                        }
202                      }
203                    }
204                  ],
205                  "quasis": [
206                    {
207                      "type": "TemplateElement",
208                      "value": {
209                        "raw": "[",
210                        "cooked": "["
211                      },
212                      "loc": {
213                        "start": {
214                          "line": 18,
215                          "column": 40
216                        },
217                        "end": {
218                          "line": 18,
219                          "column": 41
220                        }
221                      }
222                    },
223                    {
224                      "type": "TemplateElement",
225                      "value": {
226                        "raw": "]",
227                        "cooked": "]"
228                      },
229                      "loc": {
230                        "start": {
231                          "line": 18,
232                          "column": 60
233                        },
234                        "end": {
235                          "line": 18,
236                          "column": 61
237                        }
238                      }
239                    }
240                  ],
241                  "loc": {
242                    "start": {
243                      "line": 18,
244                      "column": 38
245                    },
246                    "end": {
247                      "line": 18,
248                      "column": 63
249                    }
250                  }
251                },
252                "loc": {
253                  "start": {
254                    "line": 18,
255                    "column": 12
256                  },
257                  "end": {
258                    "line": 18,
259                    "column": 63
260                  }
261                }
262              },
263              "loc": {
264                "start": {
265                  "line": 18,
266                  "column": 5
267                },
268                "end": {
269                  "line": 18,
270                  "column": 64
271                }
272              }
273            }
274          ],
275          "loc": {
276            "start": {
277              "line": 17,
278              "column": 31
279            },
280            "end": {
281              "line": 19,
282              "column": 2
283            }
284          }
285        },
286        "loc": {
287          "start": {
288            "line": 17,
289            "column": 1
290          },
291          "end": {
292            "line": 19,
293            "column": 2
294          }
295        }
296      },
297      "loc": {
298        "start": {
299          "line": 17,
300          "column": 1
301        },
302        "end": {
303          "line": 19,
304          "column": 2
305        }
306      }
307    }
308  ],
309  "loc": {
310    "start": {
311      "line": 1,
312      "column": 1
313    },
314    "end": {
315      "line": 20,
316      "column": 1
317    }
318  }
319}
320