diff --git a/compiler/forget/crates/forget_estree/src/range.rs b/compiler/forget/crates/forget_estree/src/range.rs index 61c48191b8..21fcec8945 100644 --- a/compiler/forget/crates/forget_estree/src/range.rs +++ b/compiler/forget/crates/forget_estree/src/range.rs @@ -1,18 +1,24 @@ use std::num::NonZeroU32; +use serde::ser::SerializeTuple; use serde::{Deserialize, Serialize}; -#[derive( - Serialize, - Deserialize, - Copy, - Clone, - Debug, - PartialEq, - PartialOrd, - Hash -)] +#[derive(Deserialize, Copy, Clone, Debug, PartialEq, PartialOrd, Hash)] pub struct SourceRange { pub start: u32, pub end: NonZeroU32, } + +// ESTree and Babel store the `range` as `[start, end]`, so we customize +// the serialization to use a tuple representation. +impl Serialize for SourceRange { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + let mut tuple = serializer.serialize_tuple(2)?; + tuple.serialize_element(&self.start)?; + tuple.serialize_element(&self.end)?; + tuple.end() + } +} diff --git a/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@for-statement.json.snap b/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@for-statement.json.snap index 8727d72d14..f520ae7693 100644 --- a/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@for-statement.json.snap +++ b/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@for-statement.json.snap @@ -554,10 +554,10 @@ Output: "column": 18 } }, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -575,10 +575,10 @@ Output: "column": 24 } }, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -605,10 +605,10 @@ Output: "column": 7 } }, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "Literal", @@ -627,10 +627,10 @@ Output: "column": 11 } }, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": { "source": null, @@ -643,10 +643,10 @@ Output: "column": 11 } }, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": { @@ -660,10 +660,10 @@ Output: "column": 12 } }, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "ForStatement", @@ -688,10 +688,10 @@ Output: "column": 12 } }, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "Literal", @@ -710,10 +710,10 @@ Output: "column": 16 } }, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "loc": { "source": null, @@ -726,10 +726,10 @@ Output: "column": 16 } }, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] } ], "loc": { @@ -743,10 +743,10 @@ Output: "column": 16 } }, - "range": { - "start": 48, - "end": 57 - } + "range": [ + 48, + 57 + ] }, "test": { "type": "BinaryExpression", @@ -765,10 +765,10 @@ Output: "column": 19 } }, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "operator": "<", "right": { @@ -788,10 +788,10 @@ Output: "column": 24 } }, - "range": { - "start": 63, - "end": 65 - } + "range": [ + 63, + 65 + ] }, "loc": { "source": null, @@ -804,10 +804,10 @@ Output: "column": 24 } }, - "range": { - "start": 59, - "end": 65 - } + "range": [ + 59, + 65 + ] }, "update": { "type": "UpdateExpression", @@ -827,10 +827,10 @@ Output: "column": 27 } }, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "prefix": false, "loc": { @@ -844,10 +844,10 @@ Output: "column": 29 } }, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] }, "body": { "type": "BlockStatement", @@ -872,10 +872,10 @@ Output: "column": 5 } }, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "right": { "type": "Identifier", @@ -892,10 +892,10 @@ Output: "column": 10 } }, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] }, "loc": { "source": null, @@ -908,10 +908,10 @@ Output: "column": 10 } }, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] }, "directive": null, "loc": { @@ -925,10 +925,10 @@ Output: "column": 11 } }, - "range": { - "start": 78, - "end": 85 - } + "range": [ + 78, + 85 + ] } ], "loc": { @@ -942,10 +942,10 @@ Output: "column": 3 } }, - "range": { - "start": 72, - "end": 89 - } + "range": [ + 72, + 89 + ] }, "loc": { "source": null, @@ -958,10 +958,10 @@ Output: "column": 3 } }, - "range": { - "start": 43, - "end": 89 - } + "range": [ + 43, + 89 + ] }, { "type": "ReturnStatement", @@ -980,10 +980,10 @@ Output: "column": 10 } }, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": { "source": null, @@ -996,10 +996,10 @@ Output: "column": 11 } }, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] } ], "loc": { @@ -1013,10 +1013,10 @@ Output: "column": 1 } }, - "range": { - "start": 26, - "end": 103 - } + "range": [ + 26, + 103 + ] }, "generator": false, "async": false, @@ -1033,10 +1033,10 @@ Output: "column": 1 } }, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } ], "sourceType": "script", @@ -1051,8 +1051,8 @@ Output: "column": 1 } }, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } diff --git a/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@import.json.snap b/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@import.json.snap index 825b9122bd..e5e11de332 100644 --- a/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@import.json.snap +++ b/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@import.json.snap @@ -133,10 +133,10 @@ Output: "column": 12 } }, - "range": { - "start": 7, - "end": 12 - } + "range": [ + 7, + 12 + ] }, "loc": { "source": null, @@ -149,10 +149,10 @@ Output: "column": 12 } }, - "range": { - "start": 7, - "end": 12 - } + "range": [ + 7, + 12 + ] } ], "source": { @@ -172,10 +172,10 @@ Output: "column": 25 } }, - "range": { - "start": 18, - "end": 25 - } + "range": [ + 18, + 25 + ] }, "loc": { "source": null, @@ -188,10 +188,10 @@ Output: "column": 26 } }, - "range": { - "start": 0, - "end": 26 - } + "range": [ + 0, + 26 + ] } ], "sourceType": "module", @@ -206,8 +206,8 @@ Output: "column": 26 } }, - "range": { - "start": 0, - "end": 26 - } + "range": [ + 0, + 26 + ] } diff --git a/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@simple.json.snap b/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@simple.json.snap index 096e3a558b..44f4e2ea5b 100644 --- a/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@simple.json.snap +++ b/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@simple.json.snap @@ -215,10 +215,10 @@ Output: "column": 18 } }, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -236,10 +236,10 @@ Output: "column": 24 } }, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -264,10 +264,10 @@ Output: "column": 14 } }, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "property": { "type": "Identifier", @@ -284,10 +284,10 @@ Output: "column": 20 } }, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "computed": false, "loc": { @@ -301,10 +301,10 @@ Output: "column": 20 } }, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] }, "loc": { "source": null, @@ -317,10 +317,10 @@ Output: "column": 21 } }, - "range": { - "start": 30, - "end": 49 - } + "range": [ + 30, + 49 + ] } ], "loc": { @@ -334,10 +334,10 @@ Output: "column": 1 } }, - "range": { - "start": 26, - "end": 51 - } + "range": [ + 26, + 51 + ] }, "generator": false, "async": false, @@ -354,10 +354,10 @@ Output: "column": 1 } }, - "range": { - "start": 0, - "end": 51 - } + "range": [ + 0, + 51 + ] } ], "sourceType": "module", @@ -372,8 +372,8 @@ Output: "column": 1 } }, - "range": { - "start": 0, - "end": 51 - } + "range": [ + 0, + 51 + ] } diff --git a/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@test.json.snap b/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@test.json.snap index 5f07ae17e3..67806d6143 100644 --- a/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@test.json.snap +++ b/compiler/forget/crates/forget_estree/src/snapshots/forget_estree__tests__fixtures@test.json.snap @@ -377,10 +377,10 @@ Output: "column": 12 } }, - "range": { - "start": 10, - "end": 13 - } + "range": [ + 10, + 13 + ] }, "params": [], "body": { @@ -408,10 +408,10 @@ Output: "column": 13 } }, - "range": { - "start": 28, - "end": 31 - } + "range": [ + 28, + 31 + ] }, "property": { "type": "JSXIdentifier", @@ -427,10 +427,10 @@ Output: "column": 17 } }, - "range": { - "start": 32, - "end": 35 - } + "range": [ + 32, + 35 + ] }, "loc": { "source": null, @@ -443,10 +443,10 @@ Output: "column": 17 } }, - "range": { - "start": 28, - "end": 35 - } + "range": [ + 28, + 35 + ] }, "attributes": [ { @@ -465,10 +465,10 @@ Output: "column": 19 } }, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "JSXExpressionContainer", @@ -489,10 +489,10 @@ Output: "column": 23 } }, - "range": { - "start": 39, - "end": 41 - } + "range": [ + 39, + 41 + ] }, "loc": { "source": null, @@ -505,10 +505,10 @@ Output: "column": 24 } }, - "range": { - "start": 38, - "end": 42 - } + "range": [ + 38, + 42 + ] }, "loc": { "source": null, @@ -521,10 +521,10 @@ Output: "column": 24 } }, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "selfClosing": false, @@ -539,10 +539,10 @@ Output: "column": 26 } }, - "range": { - "start": 27, - "end": 44 - } + "range": [ + 27, + 44 + ] }, "children": [], "closingElement": { @@ -563,10 +563,10 @@ Output: "column": 31 } }, - "range": { - "start": 46, - "end": 49 - } + "range": [ + 46, + 49 + ] }, "property": { "type": "JSXIdentifier", @@ -582,10 +582,10 @@ Output: "column": 35 } }, - "range": { - "start": 50, - "end": 53 - } + "range": [ + 50, + 53 + ] }, "loc": { "source": null, @@ -598,10 +598,10 @@ Output: "column": 35 } }, - "range": { - "start": 46, - "end": 53 - } + "range": [ + 46, + 53 + ] }, "loc": { "source": null, @@ -614,10 +614,10 @@ Output: "column": 36 } }, - "range": { - "start": 44, - "end": 54 - } + "range": [ + 44, + 54 + ] }, "loc": { "source": null, @@ -630,10 +630,10 @@ Output: "column": 36 } }, - "range": { - "start": 27, - "end": 54 - } + "range": [ + 27, + 54 + ] }, "loc": { "source": null, @@ -646,10 +646,10 @@ Output: "column": 36 } }, - "range": { - "start": 20, - "end": 54 - } + "range": [ + 20, + 54 + ] } ], "loc": { @@ -663,10 +663,10 @@ Output: "column": 1 } }, - "range": { - "start": 16, - "end": 56 - } + "range": [ + 16, + 56 + ] }, "generator": false, "async": false, @@ -683,10 +683,10 @@ Output: "column": 1 } }, - "range": { - "start": 1, - "end": 56 - } + "range": [ + 1, + 56 + ] } ], "sourceType": "script", @@ -701,8 +701,8 @@ Output: "column": 1 } }, - "range": { - "start": 1, - "end": 56 - } + "range": [ + 1, + 56 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-capture-in-method-receiver-and-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-capture-in-method-receiver-and-mutate.js.snap index 709862d6bd..4fd122e9ff 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-capture-in-method-receiver-and-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-capture-in-method-receiver-and-mutate.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -48,10 +48,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] }, "init": { "type": "CallExpression", @@ -60,30 +60,30 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 163 - } + "range": [ + 156, + 163 + ] }, "arguments": [], "loc": null, - "range": { - "start": 156, - "end": 165 - } + "range": [ + 156, + 165 + ] }, "loc": null, - "range": { - "start": 152, - "end": 165 - } + "range": [ + 152, + 165 + ] } ], "loc": null, - "range": { - "start": 148, - "end": 166 - } + "range": [ + 148, + 166 + ] }, { "type": "VariableDeclaration", @@ -96,32 +96,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 178, - "end": 180 - } + "range": [ + 178, + 180 + ] }, "loc": null, - "range": { - "start": 174, - "end": 180 - } + "range": [ + 174, + 180 + ] } ], "loc": null, - "range": { - "start": 170, - "end": 181 - } + "range": [ + 170, + 181 + ] }, { "type": "ExpressionStatement", @@ -134,27 +134,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 186, - "end": 190 - } + "range": [ + 186, + 190 + ] }, "computed": false, "loc": null, - "range": { - "start": 184, - "end": 190 - } + "range": [ + 184, + 190 + ] }, "arguments": [ { @@ -162,24 +162,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 191, - "end": 192 - } + "range": [ + 191, + 192 + ] } ], "loc": null, - "range": { - "start": 184, - "end": 193 - } + "range": [ + 184, + 193 + ] }, "directive": null, "loc": null, - "range": { - "start": 184, - "end": 194 - } + "range": [ + 184, + 194 + ] }, { "type": "ExpressionStatement", @@ -190,10 +190,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 204 - } + "range": [ + 198, + 204 + ] }, "arguments": [ { @@ -201,24 +201,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 206 - } + "range": [ + 205, + 206 + ] } ], "loc": null, - "range": { - "start": 198, - "end": 207 - } + "range": [ + 198, + 207 + ] }, "directive": null, "loc": null, - "range": { - "start": 198, - "end": 208 - } + "range": [ + 198, + 208 + ] }, { "type": "ReturnStatement", @@ -230,59 +230,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 219, - "end": 220 - } + "range": [ + 219, + 220 + ] }, { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 222, - "end": 223 - } + "range": [ + 222, + 223 + ] } ], "loc": null, - "range": { - "start": 218, - "end": 224 - } + "range": [ + 218, + 224 + ] }, "loc": null, - "range": { - "start": 211, - "end": 225 - } + "range": [ + 211, + 225 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 227 - } + "range": [ + 21, + 227 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 227 - }, + "range": [ + 0, + 227 + ], "loc": null, - "range": { - "start": 0, - "end": 227 - } + "range": [ + 0, + 227 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 227 - } + "range": [ + 0, + 227 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-capture-in-method-receiver.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-capture-in-method-receiver.js.snap index 2424ee37ca..bea4f4630d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-capture-in-method-receiver.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-capture-in-method-receiver.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -47,10 +47,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "CallExpression", @@ -59,30 +59,30 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 105 - } + "range": [ + 98, + 105 + ] }, "arguments": [], "loc": null, - "range": { - "start": 98, - "end": 107 - } + "range": [ + 98, + 107 + ] }, "loc": null, - "range": { - "start": 94, - "end": 107 - } + "range": [ + 94, + 107 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 108 - } + "range": [ + 90, + 108 + ] }, { "type": "VariableDeclaration", @@ -95,32 +95,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 120, - "end": 122 - } + "range": [ + 120, + 122 + ] }, "loc": null, - "range": { - "start": 116, - "end": 122 - } + "range": [ + 116, + 122 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 123 - } + "range": [ + 112, + 123 + ] }, { "type": "ExpressionStatement", @@ -133,27 +133,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 132 - } + "range": [ + 128, + 132 + ] }, "computed": false, "loc": null, - "range": { - "start": 126, - "end": 132 - } + "range": [ + 126, + 132 + ] }, "arguments": [ { @@ -161,24 +161,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] } ], "loc": null, - "range": { - "start": 126, - "end": 135 - } + "range": [ + 126, + 135 + ] }, "directive": null, "loc": null, - "range": { - "start": 126, - "end": 136 - } + "range": [ + 126, + 136 + ] }, { "type": "ReturnStatement", @@ -190,59 +190,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 149 - } + "range": [ + 148, + 149 + ] }, { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] } ], "loc": null, - "range": { - "start": 147, - "end": 153 - } + "range": [ + 147, + 153 + ] }, "loc": null, - "range": { - "start": 140, - "end": 154 - } + "range": [ + 140, + 154 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 156 - } + "range": [ + 21, + 156 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 156 - }, + "range": [ + 0, + 156 + ], "loc": null, - "range": { - "start": 0, - "end": 156 - } + "range": [ + 0, + 156 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 156 - } + "range": [ + 0, + 156 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-computed-load.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-computed-load.js.snap index bc2a31e172..dcb95b9e81 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-computed-load.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-computed-load.js.snap @@ -25,10 +25,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -71,50 +71,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -127,32 +127,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 51, - "end": 53 - } + "range": [ + 51, + 53 + ] }, "loc": null, - "range": { - "start": 47, - "end": 53 - } + "range": [ + 47, + 53 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, { "type": "ExpressionStatement", @@ -166,27 +166,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 61 - } + "range": [ + 58, + 61 + ] }, "right": { "type": "MemberExpression", @@ -195,39 +195,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "property": { "type": "StringLiteral", "value": "a", "loc": null, - "range": { - "start": 66, - "end": 69 - } + "range": [ + 66, + 69 + ] }, "computed": true, "loc": null, - "range": { - "start": 64, - "end": 70 - } + "range": [ + 64, + 70 + ] }, "loc": null, - "range": { - "start": 58, - "end": 70 - } + "range": [ + 58, + 70 + ] }, "directive": null, "loc": null, - "range": { - "start": 58, - "end": 71 - } + "range": [ + 58, + 71 + ] }, { "type": "ExpressionStatement", @@ -238,10 +238,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 80 - } + "range": [ + 74, + 80 + ] }, "arguments": [ { @@ -249,24 +249,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 83 - } + "range": [ + 74, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 74, - "end": 84 - } + "range": [ + 74, + 84 + ] }, { "type": "ReturnStatement", @@ -275,42 +275,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 98 - } + "range": [ + 22, + 98 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 98 - }, + "range": [ + 0, + 98 + ], "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-nested-member-path-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-nested-member-path-mutate.js.snap index 1ea77383d6..3c35aa268a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-nested-member-path-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-nested-member-path-mutate.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -46,32 +46,32 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 33, - "end": 35 - } + "range": [ + 33, + 35 + ] }, "loc": null, - "range": { - "start": 29, - "end": 35 - } + "range": [ + 29, + 35 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 36 - } + "range": [ + 25, + 36 + ] }, { "type": "VariableDeclaration", @@ -84,32 +84,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 47, - "end": 49 - } + "range": [ + 47, + 49 + ] }, "loc": null, - "range": { - "start": 43, - "end": 49 - } + "range": [ + 43, + 49 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 50 - } + "range": [ + 39, + 50 + ] }, { "type": "ExpressionStatement", @@ -123,50 +123,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "loc": null, - "range": { - "start": 53, - "end": 60 - } + "range": [ + 53, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 61 - } + "range": [ + 53, + 61 + ] }, { "type": "VariableDeclaration", @@ -179,32 +179,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 72, - "end": 74 - } + "range": [ + 72, + 74 + ] }, "loc": null, - "range": { - "start": 68, - "end": 74 - } + "range": [ + 68, + 74 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 75 - } + "range": [ + 64, + 75 + ] }, { "type": "ExpressionStatement", @@ -218,50 +218,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 78, - "end": 85 - } + "range": [ + 78, + 85 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 86 - } + "range": [ + 78, + 86 + ] }, { "type": "ExpressionStatement", @@ -272,10 +272,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 95 - } + "range": [ + 89, + 95 + ] }, "arguments": [ { @@ -287,58 +287,58 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "computed": false, "loc": null, - "range": { - "start": 96, - "end": 99 - } + "range": [ + 96, + 99 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "computed": false, "loc": null, - "range": { - "start": 96, - "end": 101 - } + "range": [ + 96, + 101 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 102 - } + "range": [ + 89, + 102 + ] }, "directive": null, "loc": null, - "range": { - "start": 89, - "end": 103 - } + "range": [ + 89, + 103 + ] }, { "type": "ReturnStatement", @@ -347,42 +347,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 117 - } + "range": [ + 21, + 117 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 117 - }, + "range": [ + 0, + 117 + ], "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-nested-member-path.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-nested-member-path.js.snap index bfbf210f75..58c3b045a2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-nested-member-path.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-nested-member-path.js.snap @@ -25,10 +25,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 33, - "end": 35 - } + "range": [ + 33, + 35 + ] }, "loc": null, - "range": { - "start": 29, - "end": 35 - } + "range": [ + 29, + 35 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 36 - } + "range": [ + 25, + 36 + ] }, { "type": "VariableDeclaration", @@ -83,32 +83,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 47, - "end": 49 - } + "range": [ + 47, + 49 + ] }, "loc": null, - "range": { - "start": 43, - "end": 49 - } + "range": [ + 43, + 49 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 50 - } + "range": [ + 39, + 50 + ] }, { "type": "ExpressionStatement", @@ -122,50 +122,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "loc": null, - "range": { - "start": 53, - "end": 60 - } + "range": [ + 53, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 61 - } + "range": [ + 53, + 61 + ] }, { "type": "VariableDeclaration", @@ -178,32 +178,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 72, - "end": 74 - } + "range": [ + 72, + 74 + ] }, "loc": null, - "range": { - "start": 68, - "end": 74 - } + "range": [ + 68, + 74 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 75 - } + "range": [ + 64, + 75 + ] }, { "type": "ExpressionStatement", @@ -217,50 +217,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 78, - "end": 85 - } + "range": [ + 78, + 85 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 86 - } + "range": [ + 78, + 86 + ] }, { "type": "ReturnStatement", @@ -269,42 +269,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] }, "loc": null, - "range": { - "start": 89, - "end": 98 - } + "range": [ + 89, + 98 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 100 - } + "range": [ + 21, + 100 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 100 - }, + "range": [ + 0, + 100 + ], "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-while.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-while.js.snap index 9e588c78fa..8e3efd4acd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-while.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@alias-while.js.snap @@ -35,10 +35,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -46,10 +46,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 17 - } + "range": [ + 13, + 17 + ] } ], "body": { @@ -66,32 +66,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 31, - "end": 33 - } + "range": [ + 31, + 33 + ] }, "loc": null, - "range": { - "start": 27, - "end": 33 - } + "range": [ + 27, + 33 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 34 - } + "range": [ + 23, + 34 + ] }, { "type": "VariableDeclaration", @@ -104,32 +104,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 45, - "end": 47 - } + "range": [ + 45, + 47 + ] }, "loc": null, - "range": { - "start": 41, - "end": 47 - } + "range": [ + 41, + 47 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] }, { "type": "VariableDeclaration", @@ -142,32 +142,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 59, - "end": 61 - } + "range": [ + 59, + 61 + ] }, "loc": null, - "range": { - "start": 55, - "end": 61 - } + "range": [ + 55, + 61 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 62 - } + "range": [ + 51, + 62 + ] }, { "type": "WhileStatement", @@ -176,10 +176,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 76 - } + "range": [ + 72, + 76 + ] }, "body": { "type": "BlockStatement", @@ -195,33 +195,33 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "init": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 94 - } + "range": [ + 84, + 94 + ] }, { "type": "ExpressionStatement", @@ -233,33 +233,33 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "loc": null, - "range": { - "start": 99, - "end": 104 - } + "range": [ + 99, + 104 + ] }, "directive": null, "loc": null, - "range": { - "start": 99, - "end": 105 - } + "range": [ + 99, + 105 + ] }, { "type": "ExpressionStatement", @@ -271,33 +271,33 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "loc": null, - "range": { - "start": 110, - "end": 115 - } + "range": [ + 110, + 115 + ] }, "directive": null, "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] }, { "type": "ExpressionStatement", @@ -309,33 +309,33 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "loc": null, - "range": { - "start": 121, - "end": 126 - } + "range": [ + 121, + 126 + ] }, "directive": null, "loc": null, - "range": { - "start": 121, - "end": 127 - } + "range": [ + 121, + 127 + ] }, { "type": "ExpressionStatement", @@ -346,10 +346,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 138 - } + "range": [ + 132, + 138 + ] }, "arguments": [ { @@ -357,47 +357,47 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 140 - } + "range": [ + 139, + 140 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] } ], "loc": null, - "range": { - "start": 132, - "end": 144 - } + "range": [ + 132, + 144 + ] }, "directive": null, "loc": null, - "range": { - "start": 132, - "end": 145 - } + "range": [ + 132, + 145 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 149 - } + "range": [ + 78, + 149 + ] }, "loc": null, - "range": { - "start": 65, - "end": 149 - } + "range": [ + 65, + 149 + ] }, { "type": "ExpressionStatement", @@ -406,17 +406,17 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] }, "directive": null, "loc": null, - "range": { - "start": 152, - "end": 154 - } + "range": [ + 152, + 154 + ] }, { "type": "ExpressionStatement", @@ -425,17 +425,17 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "directive": null, "loc": null, - "range": { - "start": 157, - "end": 159 - } + "range": [ + 157, + 159 + ] }, { "type": "ExpressionStatement", @@ -444,17 +444,17 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 163 - } + "range": [ + 162, + 163 + ] }, "directive": null, "loc": null, - "range": { - "start": 162, - "end": 164 - } + "range": [ + 162, + 164 + ] }, { "type": "ReturnStatement", @@ -463,36 +463,36 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "loc": null, - "range": { - "start": 167, - "end": 176 - } + "range": [ + 167, + 176 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 178 - } + "range": [ + 19, + 178 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 178 - }, + "range": [ + 0, + 178 + ], "loc": null, - "range": { - "start": 0, - "end": 178 - } + "range": [ + 0, + 178 + ] }, { "type": "FunctionDeclaration", @@ -501,10 +501,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 189, - "end": 195 - } + "range": [ + 189, + 195 + ] }, "params": [ { @@ -512,49 +512,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 197 - } + "range": [ + 196, + 197 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 200 - } + "range": [ + 199, + 200 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 202, - "end": 204 - } + "range": [ + 202, + 204 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 180, - "end": 204 - }, + "range": [ + 180, + 204 + ], "loc": null, - "range": { - "start": 180, - "end": 204 - } + "range": [ + 180, + 204 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 204 - } + "range": [ + 0, + 204 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep-nested-scope.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep-nested-scope.js.snap index e3c1b619ca..18c2530a54 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep-nested-scope.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep-nested-scope.js.snap @@ -28,10 +28,10 @@ Output: "name": "AllocatingPrimitiveAsDepNested", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 232 - } + "range": [ + 202, + 232 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 233, - "end": 238 - } + "range": [ + 233, + 238 + ] } ], "body": { @@ -59,32 +59,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 248, - "end": 249 - } + "range": [ + 248, + 249 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 252, - "end": 254 - } + "range": [ + 252, + 254 + ] }, "loc": null, - "range": { - "start": 248, - "end": 254 - } + "range": [ + 248, + 254 + ] } ], "loc": null, - "range": { - "start": 244, - "end": 255 - } + "range": [ + 244, + 255 + ] }, { "type": "ExpressionStatement", @@ -95,10 +95,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 258, - "end": 264 - } + "range": [ + 258, + 264 + ] }, "arguments": [ { @@ -106,24 +106,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 266 - } + "range": [ + 265, + 266 + ] } ], "loc": null, - "range": { - "start": 258, - "end": 267 - } + "range": [ + 258, + 267 + ] }, "directive": null, "loc": null, - "range": { - "start": 258, - "end": 268 - } + "range": [ + 258, + 268 + ] }, { "type": "VariableDeclaration", @@ -136,10 +136,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 275, - "end": 276 - } + "range": [ + 275, + 276 + ] }, "init": { "type": "CallExpression", @@ -148,10 +148,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 279, - "end": 282 - } + "range": [ + 279, + 282 + ] }, "arguments": [ { @@ -163,10 +163,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 283, - "end": 286 - } + "range": [ + 283, + 286 + ] }, "arguments": [ { @@ -176,70 +176,70 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 287, - "end": 292 - } + "range": [ + 287, + 292 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 293, - "end": 294 - } + "range": [ + 293, + 294 + ] }, "computed": false, "loc": null, - "range": { - "start": 287, - "end": 294 - } + "range": [ + 287, + 294 + ] } ], "loc": null, - "range": { - "start": 283, - "end": 295 - } + "range": [ + 283, + 295 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 298, - "end": 299 - } + "range": [ + 298, + 299 + ] }, "loc": null, - "range": { - "start": 283, - "end": 299 - } + "range": [ + 283, + 299 + ] } ], "loc": null, - "range": { - "start": 279, - "end": 300 - } + "range": [ + 279, + 300 + ] }, "loc": null, - "range": { - "start": 275, - "end": 300 - } + "range": [ + 275, + 300 + ] } ], "loc": null, - "range": { - "start": 271, - "end": 301 - } + "range": [ + 271, + 301 + ] }, { "type": "ExpressionStatement", @@ -250,10 +250,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 304, - "end": 310 - } + "range": [ + 304, + 310 + ] }, "arguments": [ { @@ -261,10 +261,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 311, - "end": 312 - } + "range": [ + 311, + 312 + ] }, { "type": "MemberExpression", @@ -273,41 +273,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 314, - "end": 319 - } + "range": [ + 314, + 319 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 320, - "end": 321 - } + "range": [ + 320, + 321 + ] }, "computed": false, "loc": null, - "range": { - "start": 314, - "end": 321 - } + "range": [ + 314, + 321 + ] } ], "loc": null, - "range": { - "start": 304, - "end": 322 - } + "range": [ + 304, + 322 + ] }, "directive": null, "loc": null, - "range": { - "start": 304, - "end": 323 - } + "range": [ + 304, + 323 + ] }, { "type": "ReturnStatement", @@ -319,59 +319,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 334, - "end": 335 - } + "range": [ + 334, + 335 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 337, - "end": 338 - } + "range": [ + 337, + 338 + ] } ], "loc": null, - "range": { - "start": 333, - "end": 339 - } + "range": [ + 333, + 339 + ] }, "loc": null, - "range": { - "start": 326, - "end": 340 - } + "range": [ + 326, + 340 + ] } ], "loc": null, - "range": { - "start": 240, - "end": 342 - } + "range": [ + 240, + 342 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 193, - "end": 342 - }, + "range": [ + 193, + 342 + ], "loc": null, - "range": { - "start": 193, - "end": 342 - } + "range": [ + 193, + 342 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 193, - "end": 342 - } + "range": [ + 193, + 342 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep.js.snap index 3395b74e06..7c2b2e6f63 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allocating-primitive-as-dep.js.snap @@ -25,10 +25,10 @@ Output: "name": "AllocatingPrimitiveAsDep", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 226 - } + "range": [ + 202, + 226 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 227, - "end": 232 - } + "range": [ + 227, + 232 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 242, - "end": 243 - } + "range": [ + 242, + 243 + ] }, "init": { "type": "CallExpression", @@ -68,10 +68,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 246, - "end": 249 - } + "range": [ + 246, + 249 + ] }, "arguments": [ { @@ -85,10 +85,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 250, - "end": 253 - } + "range": [ + 250, + 253 + ] }, "arguments": [ { @@ -96,70 +96,70 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 259 - } + "range": [ + 254, + 259 + ] } ], "loc": null, - "range": { - "start": 250, - "end": 260 - } + "range": [ + 250, + 260 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 262 - } + "range": [ + 261, + 262 + ] }, "computed": false, "loc": null, - "range": { - "start": 250, - "end": 262 - } + "range": [ + 250, + 262 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 265, - "end": 266 - } + "range": [ + 265, + 266 + ] }, "loc": null, - "range": { - "start": 250, - "end": 266 - } + "range": [ + 250, + 266 + ] } ], "loc": null, - "range": { - "start": 246, - "end": 267 - } + "range": [ + 246, + 267 + ] }, "loc": null, - "range": { - "start": 242, - "end": 267 - } + "range": [ + 242, + 267 + ] } ], "loc": null, - "range": { - "start": 238, - "end": 268 - } + "range": [ + 238, + 268 + ] }, { "type": "ReturnStatement", @@ -168,42 +168,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 278, - "end": 279 - } + "range": [ + 278, + 279 + ] }, "loc": null, - "range": { - "start": 271, - "end": 280 - } + "range": [ + 271, + 280 + ] } ], "loc": null, - "range": { - "start": 234, - "end": 282 - } + "range": [ + 234, + 282 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 193, - "end": 282 - }, + "range": [ + 193, + 282 + ], "loc": null, - "range": { - "start": 193, - "end": 282 - } + "range": [ + 193, + 282 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 193, - "end": 282 - } + "range": [ + 193, + 282 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allow-passing-refs-as-props.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allow-passing-refs-as-props.js.snap index 2a664a77ff..09674306d1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allow-passing-refs-as-props.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@allow-passing-refs-as-props.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "init": { "type": "CallExpression", @@ -64,39 +64,39 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 48 - } + "range": [ + 42, + 48 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 54 - } + "range": [ + 42, + 54 + ] }, "loc": null, - "range": { - "start": 36, - "end": 54 - } + "range": [ + 36, + 54 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 55 - } + "range": [ + 30, + 55 + ] }, { "type": "ReturnStatement", @@ -108,10 +108,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 66, - "end": 69 - } + "range": [ + 66, + 69 + ] }, "attributes": [ { @@ -120,10 +120,10 @@ Output: "type": "JSXIdentifier", "name": "ref", "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "value": { "type": "JSXExpressionContainer", @@ -132,70 +132,70 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 78 - } + "range": [ + 75, + 78 + ] }, "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "loc": null, - "range": { - "start": 70, - "end": 79 - } + "range": [ + 70, + 79 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 65, - "end": 82 - } + "range": [ + 65, + 82 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 65, - "end": 82 - } + "range": [ + 65, + 82 + ] }, "loc": null, - "range": { - "start": 58, - "end": 83 - } + "range": [ + 58, + 83 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 85 - } + "range": [ + 26, + 85 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 85 - }, + "range": [ + 0, + 85 + ], "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-access-assignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-access-assignment.js.snap index 3bcd2997b4..738d07d989 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-access-assignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-access-assignment.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -36,30 +36,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -76,10 +76,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "init": { "type": "ArrayExpression", @@ -89,30 +89,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "loc": null, - "range": { - "start": 32, - "end": 39 - } + "range": [ + 32, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -125,10 +125,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "init": { "type": "ArrayExpression", @@ -136,40 +136,40 @@ Output: { "type": "NullLiteral", "loc": null, - "range": { - "start": 54, - "end": 58 - } + "range": [ + 54, + 58 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 62 - } + "range": [ + 53, + 62 + ] }, "loc": null, - "range": { - "start": 49, - "end": 62 - } + "range": [ + 49, + 62 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 63 - } + "range": [ + 43, + 63 + ] }, { "type": "VariableDeclaration", @@ -182,10 +182,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "init": { "type": "ArrayExpression", @@ -194,19 +194,19 @@ Output: "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 77, - "end": 79 - } + "range": [ + 77, + 79 + ] }, { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 81, - "end": 83 - } + "range": [ + 81, + 83 + ] }, { "type": "ArrayExpression", @@ -216,37 +216,37 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 88 - } + "range": [ + 85, + 88 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 89 - } + "range": [ + 76, + 89 + ] }, "loc": null, - "range": { - "start": 72, - "end": 89 - } + "range": [ + 72, + 89 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 90 - } + "range": [ + 66, + 90 + ] }, { "type": "ExpressionStatement", @@ -260,26 +260,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "computed": true, "loc": null, - "range": { - "start": 93, - "end": 97 - } + "range": [ + 93, + 97 + ] }, "right": { "type": "MemberExpression", @@ -288,39 +288,39 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "property": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "computed": true, "loc": null, - "range": { - "start": 100, - "end": 104 - } + "range": [ + 100, + 104 + ] }, "loc": null, - "range": { - "start": 93, - "end": 104 - } + "range": [ + 93, + 104 + ] }, "directive": null, "loc": null, - "range": { - "start": 93, - "end": 105 - } + "range": [ + 93, + 105 + ] }, { "type": "ExpressionStatement", @@ -336,42 +336,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "computed": true, "loc": null, - "range": { - "start": 108, - "end": 112 - } + "range": [ + 108, + 112 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "computed": true, "loc": null, - "range": { - "start": 108, - "end": 115 - } + "range": [ + 108, + 115 + ] }, "right": { "type": "MemberExpression", @@ -380,39 +380,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "computed": true, "loc": null, - "range": { - "start": 118, - "end": 122 - } + "range": [ + 118, + 122 + ] }, "loc": null, - "range": { - "start": 108, - "end": 122 - } + "range": [ + 108, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 108, - "end": 123 - } + "range": [ + 108, + 123 + ] }, { "type": "ReturnStatement", @@ -424,59 +424,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] }, { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] } ], "loc": null, - "range": { - "start": 133, - "end": 139 - } + "range": [ + 133, + 139 + ] }, "loc": null, - "range": { - "start": 126, - "end": 140 - } + "range": [ + 126, + 140 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 142 - } + "range": [ + 22, + 142 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 142 - }, + "range": [ + 0, + 142 + ], "loc": null, - "range": { - "start": 0, - "end": 142 - } + "range": [ + 0, + 142 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 142 - } + "range": [ + 0, + 142 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-closure.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-closure.js.snap index c52df5f49b..e986de40da 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-closure.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-closure.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -69,10 +69,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 43 - } + "range": [ + 40, + 43 + ] }, "arguments": [ { @@ -82,47 +82,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "computed": false, "loc": null, - "range": { - "start": 44, - "end": 51 - } + "range": [ + 44, + 51 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "VariableDeclaration", @@ -135,10 +135,10 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 64 - } + "range": [ + 62, + 64 + ] }, "init": { "type": "FunctionExpression", @@ -158,10 +158,10 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 94 - } + "range": [ + 91, + 94 + ] }, "init": { "type": "ArrayExpression", @@ -175,10 +175,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 104 - } + "range": [ + 101, + 104 + ] }, "arguments": [ { @@ -186,43 +186,43 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 110 - } + "range": [ + 105, + 110 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 111 - } + "range": [ + 101, + 111 + ] }, "loc": null, - "range": { - "start": 98, - "end": 111 - } + "range": [ + 98, + 111 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 112 - } + "range": [ + 97, + 112 + ] }, "loc": null, - "range": { - "start": 91, - "end": 112 - } + "range": [ + 91, + 112 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 113 - } + "range": [ + 85, + 113 + ] }, { "type": "ReturnStatement", @@ -235,27 +235,27 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 128 - } + "range": [ + 125, + 128 + ] }, "property": { "type": "Identifier", "name": "at", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 131 - } + "range": [ + 129, + 131 + ] }, "computed": false, "loc": null, - "range": { - "start": 125, - "end": 131 - } + "range": [ + 125, + 131 + ] }, "arguments": [ { @@ -263,56 +263,56 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] } ], "loc": null, - "range": { - "start": 125, - "end": 134 - } + "range": [ + 125, + 134 + ] }, "loc": null, - "range": { - "start": 118, - "end": 135 - } + "range": [ + 118, + 135 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 139 - } + "range": [ + 79, + 139 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 67, - "end": 139 - }, + "range": [ + 67, + 139 + ], "loc": null, - "range": { - "start": 67, - "end": 139 - } + "range": [ + 67, + 139 + ] }, "loc": null, - "range": { - "start": 62, - "end": 139 - } + "range": [ + 62, + 139 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 140 - } + "range": [ + 56, + 140 + ] }, { "type": "VariableDeclaration", @@ -325,10 +325,10 @@ Output: "name": "fnResult", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 157 - } + "range": [ + 149, + 157 + ] }, "init": { "type": "CallExpression", @@ -337,30 +337,30 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 162 - } + "range": [ + 160, + 162 + ] }, "arguments": [], "loc": null, - "range": { - "start": 160, - "end": 164 - } + "range": [ + 160, + 164 + ] }, "loc": null, - "range": { - "start": 149, - "end": 164 - } + "range": [ + 149, + 164 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 165 - } + "range": [ + 143, + 165 + ] }, { "type": "ReturnStatement", @@ -369,42 +369,42 @@ Output: "name": "fnResult", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 183 - } + "range": [ + 175, + 183 + ] }, "loc": null, - "range": { - "start": 168, - "end": 184 - } + "range": [ + 168, + 184 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 186 - } + "range": [ + 26, + 186 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 186 - }, + "range": [ + 0, + 186 + ], "loc": null, - "range": { - "start": 0, - "end": 186 - } + "range": [ + 0, + 186 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 186 - } + "range": [ + 0, + 186 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-effect.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-effect.js.snap index 27c32ab80d..74815ef8ff 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-effect.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-effect.js.snap @@ -26,10 +26,10 @@ Output: "name": "ArrayAtTest", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 140 - } + "range": [ + 129, + 140 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 146 - } + "range": [ + 141, + 146 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 161 - } + "range": [ + 158, + 161 + ] }, "init": { "type": "ArrayExpression", @@ -72,10 +72,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 168 - } + "range": [ + 165, + 168 + ] }, "arguments": [ { @@ -85,54 +85,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 174 - } + "range": [ + 169, + 174 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 176 - } + "range": [ + 175, + 176 + ] }, "computed": false, "loc": null, - "range": { - "start": 169, - "end": 176 - } + "range": [ + 169, + 176 + ] } ], "loc": null, - "range": { - "start": 165, - "end": 177 - } + "range": [ + 165, + 177 + ] } ], "loc": null, - "range": { - "start": 164, - "end": 178 - } + "range": [ + 164, + 178 + ] }, "loc": null, - "range": { - "start": 158, - "end": 178 - } + "range": [ + 158, + 178 + ] } ], "loc": null, - "range": { - "start": 152, - "end": 179 - } + "range": [ + 152, + 179 + ] }, { "type": "VariableDeclaration", @@ -145,10 +145,10 @@ Output: "name": "result", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 194 - } + "range": [ + 188, + 194 + ] }, "init": { "type": "CallExpression", @@ -159,27 +159,27 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 200 - } + "range": [ + 197, + 200 + ] }, "property": { "type": "Identifier", "name": "at", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 203 - } + "range": [ + 201, + 203 + ] }, "computed": false, "loc": null, - "range": { - "start": 197, - "end": 203 - } + "range": [ + 197, + 203 + ] }, "arguments": [ { @@ -189,10 +189,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 204, - "end": 207 - } + "range": [ + 204, + 207 + ] }, "arguments": [ { @@ -202,54 +202,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 208, - "end": 213 - } + "range": [ + 208, + 213 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 215 - } + "range": [ + 214, + 215 + ] }, "computed": false, "loc": null, - "range": { - "start": 208, - "end": 215 - } + "range": [ + 208, + 215 + ] } ], "loc": null, - "range": { - "start": 204, - "end": 216 - } + "range": [ + 204, + 216 + ] } ], "loc": null, - "range": { - "start": 197, - "end": 217 - } + "range": [ + 197, + 217 + ] }, "loc": null, - "range": { - "start": 188, - "end": 217 - } + "range": [ + 188, + 217 + ] } ], "loc": null, - "range": { - "start": 182, - "end": 218 - } + "range": [ + 182, + 218 + ] }, { "type": "ReturnStatement", @@ -258,42 +258,42 @@ Output: "name": "result", "typeAnnotation": null, "loc": null, - "range": { - "start": 228, - "end": 234 - } + "range": [ + 228, + 234 + ] }, "loc": null, - "range": { - "start": 221, - "end": 235 - } + "range": [ + 221, + 235 + ] } ], "loc": null, - "range": { - "start": 148, - "end": 237 - } + "range": [ + 148, + 237 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 120, - "end": 237 - }, + "range": [ + 120, + 237 + ], "loc": null, - "range": { - "start": 120, - "end": 237 - } + "range": [ + 120, + 237 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 120, - "end": 237 - } + "range": [ + 120, + 237 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-mutate-after-capture.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-mutate-after-capture.js.snap index 154bb9542b..6c23c3d70a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-mutate-after-capture.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-at-mutate-after-capture.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 69 - } + "range": [ + 60, + 69 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 75 - } + "range": [ + 70, + 75 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "init": { "type": "ArrayExpression", @@ -70,39 +70,39 @@ Output: "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 90, - "end": 92 - } + "range": [ + 90, + 92 + ] }, { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 94, - "end": 96 - } + "range": [ + 94, + 96 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 97 - } + "range": [ + 89, + 97 + ] }, "loc": null, - "range": { - "start": 85, - "end": 97 - } + "range": [ + 85, + 97 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 98 - } + "range": [ + 81, + 98 + ] }, { "type": "VariableDeclaration", @@ -115,10 +115,10 @@ Output: "name": "idx", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 110 - } + "range": [ + 107, + 110 + ] }, "init": { "type": "CallExpression", @@ -127,10 +127,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 116 - } + "range": [ + 113, + 116 + ] }, "arguments": [ { @@ -140,47 +140,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 122 - } + "range": [ + 117, + 122 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 124 - } + "range": [ + 123, + 124 + ] }, "computed": false, "loc": null, - "range": { - "start": 117, - "end": 124 - } + "range": [ + 117, + 124 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 125 - } + "range": [ + 113, + 125 + ] }, "loc": null, - "range": { - "start": 107, - "end": 125 - } + "range": [ + 107, + 125 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 126 - } + "range": [ + 101, + 126 + ] }, { "type": "VariableDeclaration", @@ -193,10 +193,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "init": { "type": "CallExpression", @@ -207,27 +207,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "property": { "type": "Identifier", "name": "at", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 141 - } + "range": [ + 139, + 141 + ] }, "computed": false, "loc": null, - "range": { - "start": 137, - "end": 141 - } + "range": [ + 137, + 141 + ] }, "arguments": [ { @@ -235,30 +235,30 @@ Output: "name": "idx", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 145 - } + "range": [ + 142, + 145 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 146 - } + "range": [ + 137, + 146 + ] }, "loc": null, - "range": { - "start": 133, - "end": 146 - } + "range": [ + 133, + 146 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 147 - } + "range": [ + 129, + 147 + ] }, { "type": "ExpressionStatement", @@ -269,10 +269,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 156 - } + "range": [ + 150, + 156 + ] }, "arguments": [ { @@ -280,24 +280,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] } ], "loc": null, - "range": { - "start": 150, - "end": 159 - } + "range": [ + 150, + 159 + ] }, "directive": null, "loc": null, - "range": { - "start": 150, - "end": 160 - } + "range": [ + 150, + 160 + ] }, { "type": "ReturnStatement", @@ -306,42 +306,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 172 - } + "range": [ + 171, + 172 + ] }, "loc": null, - "range": { - "start": 164, - "end": 173 - } + "range": [ + 164, + 173 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 175 - } + "range": [ + 77, + 175 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 51, - "end": 175 - }, + "range": [ + 51, + 175 + ], "loc": null, - "range": { - "start": 51, - "end": 175 - } + "range": [ + 51, + 175 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 51, - "end": 175 - } + "range": [ + 51, + 175 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-expression-spread.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-expression-spread.js.snap index db641af29d..b5985d6c73 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-expression-spread.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-expression-spread.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -64,10 +64,10 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, { "type": "SpreadElement", @@ -78,41 +78,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 52 - } + "range": [ + 47, + 52 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 47, - "end": 56 - } + "range": [ + 47, + 56 + ] }, "loc": null, - "range": { - "start": 44, - "end": 56 - } + "range": [ + 44, + 56 + ] }, { "type": "NullLiteral", "loc": null, - "range": { - "start": 58, - "end": 62 - } + "range": [ + 58, + 62 + ] }, { "type": "SpreadElement", @@ -123,62 +123,62 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 76 - } + "range": [ + 73, + 76 + ] }, "computed": false, "loc": null, - "range": { - "start": 67, - "end": 76 - } + "range": [ + 67, + 76 + ] }, "loc": null, - "range": { - "start": 64, - "end": 76 - } + "range": [ + 64, + 76 + ] }, { "type": "StringLiteral", "value": "z", "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 82 - } + "range": [ + 40, + 82 + ] }, "loc": null, - "range": { - "start": 36, - "end": 82 - } + "range": [ + 36, + 82 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 83 - } + "range": [ + 30, + 83 + ] }, { "type": "ReturnStatement", @@ -187,42 +187,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 97 - } + "range": [ + 26, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 97 - }, + "range": [ + 0, + 97 + ], "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-join.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-join.js.snap index 3237be0e7f..2c7995e527 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-join.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-join.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -66,19 +66,19 @@ Output: "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 41, - "end": 43 - } + "range": [ + 41, + 43 + ] }, { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 45, - "end": 47 - } + "range": [ + 45, + 47 + ] }, { "type": "MemberExpression", @@ -87,47 +87,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 54 - } + "range": [ + 49, + 54 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 60 - } + "range": [ + 55, + 60 + ] }, "computed": false, "loc": null, - "range": { - "start": 49, - "end": 60 - } + "range": [ + 49, + 60 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 61 - } + "range": [ + 40, + 61 + ] }, "loc": null, - "range": { - "start": 36, - "end": 61 - } + "range": [ + 36, + 61 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 62 - } + "range": [ + 30, + 62 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "init": { "type": "CallExpression", @@ -154,27 +154,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "property": { "type": "Identifier", "name": "join", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 81 - } + "range": [ + 77, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 81 - } + "range": [ + 75, + 81 + ] }, "arguments": [ { @@ -185,44 +185,44 @@ Output: "type": "StringLiteral", "value": "this closure gets stringified, not called", "loc": null, - "range": { - "start": 88, - "end": 131 - } + "range": [ + 88, + 131 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 82, - "end": 131 - }, + "range": [ + 82, + 131 + ], "expression": true, "loc": null, - "range": { - "start": 82, - "end": 131 - } + "range": [ + 82, + 131 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 132 - } + "range": [ + 75, + 132 + ] }, "loc": null, - "range": { - "start": 71, - "end": 132 - } + "range": [ + 71, + 132 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 133 - } + "range": [ + 65, + 133 + ] }, { "type": "ExpressionStatement", @@ -233,10 +233,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 139 - } + "range": [ + 136, + 139 + ] }, "arguments": [ { @@ -244,24 +244,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] } ], "loc": null, - "range": { - "start": 136, - "end": 142 - } + "range": [ + 136, + 142 + ] }, "directive": null, "loc": null, - "range": { - "start": 136, - "end": 143 - } + "range": [ + 136, + 143 + ] }, { "type": "ReturnStatement", @@ -273,59 +273,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] } ], "loc": null, - "range": { - "start": 153, - "end": 159 - } + "range": [ + 153, + 159 + ] }, "loc": null, - "range": { - "start": 146, - "end": 160 - } + "range": [ + 146, + 160 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 162 - } + "range": [ + 26, + 162 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 162 - }, + "range": [ + 0, + 162 + ], "loc": null, - "range": { - "start": 0, - "end": 162 - } + "range": [ + 0, + 162 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 162 - } + "range": [ + 0, + 162 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-map-frozen-array.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-map-frozen-array.js.snap index 378890c8f9..5513bddf0d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-map-frozen-array.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-map-frozen-array.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,32 +54,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "ExpressionStatement", @@ -91,18 +91,18 @@ Output: "type": "JSXIdentifier", "name": "dif", "loc": null, - "range": { - "start": 47, - "end": 50 - } + "range": [ + 47, + 50 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 46, - "end": 51 - } + "range": [ + 46, + 51 + ] }, "children": [ { @@ -112,16 +112,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] } ], "closingElement": { @@ -130,29 +130,29 @@ Output: "type": "JSXIdentifier", "name": "dif", "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "loc": null, - "range": { - "start": 54, - "end": 60 - } + "range": [ + 54, + 60 + ] }, "loc": null, - "range": { - "start": 46, - "end": 60 - } + "range": [ + 46, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 46, - "end": 61 - } + "range": [ + 46, + 61 + ] }, { "type": "VariableDeclaration", @@ -165,10 +165,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "init": { "type": "CallExpression", @@ -179,27 +179,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "arguments": [ { @@ -211,10 +211,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 85 - } + "range": [ + 81, + 85 + ] } ], "body": { @@ -222,44 +222,44 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 94 - } + "range": [ + 90, + 94 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 80, - "end": 94 - }, + "range": [ + 80, + 94 + ], "expression": true, "loc": null, - "range": { - "start": 80, - "end": 94 - } + "range": [ + 80, + 94 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 95 - } + "range": [ + 74, + 95 + ] }, "loc": null, - "range": { - "start": 70, - "end": 95 - } + "range": [ + 70, + 95 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 96 - } + "range": [ + 64, + 96 + ] }, { "type": "ReturnStatement", @@ -271,59 +271,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] } ], "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] }, "loc": null, - "range": { - "start": 99, - "end": 113 - } + "range": [ + 99, + 113 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 115 - } + "range": [ + 26, + 115 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 115 - }, + "range": [ + 0, + 115 + ], "loc": null, - "range": { - "start": 0, - "end": 115 - } + "range": [ + 0, + 115 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 115 - } + "range": [ + 0, + 115 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-map-mutable-array-mutating-lambda.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-map-mutable-array-mutating-lambda.js.snap index 1d70c8d5d3..5c20411dab 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-map-mutable-array-mutating-lambda.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-map-mutable-array-mutating-lambda.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,32 +56,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "VariableDeclaration", @@ -94,10 +94,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "CallExpression", @@ -108,27 +108,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 61 - } + "range": [ + 58, + 61 + ] }, "computed": false, "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] }, "arguments": [ { @@ -140,10 +140,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 67 - } + "range": [ + 63, + 67 + ] } ], "body": { @@ -161,49 +161,49 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 82 - } + "range": [ + 78, + 82 + ] }, "property": { "type": "Identifier", "name": "updated", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 90 - } + "range": [ + 83, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 90 - } + "range": [ + 78, + 90 + ] }, "right": { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 93, - "end": 97 - } + "range": [ + 93, + 97 + ] }, "loc": null, - "range": { - "start": 78, - "end": 97 - } + "range": [ + 78, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 98 - } + "range": [ + 78, + 98 + ] }, { "type": "ReturnStatement", @@ -212,57 +212,57 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 114 - } + "range": [ + 110, + 114 + ] }, "loc": null, - "range": { - "start": 103, - "end": 115 - } + "range": [ + 103, + 115 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 119 - } + "range": [ + 72, + 119 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 62, - "end": 119 - }, + "range": [ + 62, + 119 + ], "expression": false, "loc": null, - "range": { - "start": 62, - "end": 119 - } + "range": [ + 62, + 119 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 120 - } + "range": [ + 56, + 120 + ] }, "loc": null, - "range": { - "start": 52, - "end": 120 - } + "range": [ + 52, + 120 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 121 - } + "range": [ + 46, + 121 + ] }, { "type": "ReturnStatement", @@ -274,59 +274,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 137 - } + "range": [ + 131, + 137 + ] }, "loc": null, - "range": { - "start": 124, - "end": 138 - } + "range": [ + 124, + 138 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 140 - } + "range": [ + 26, + 140 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 140 - }, + "range": [ + 0, + 140 + ], "loc": null, - "range": { - "start": 0, - "end": 140 - } + "range": [ + 0, + 140 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 140 - } + "range": [ + 0, + 140 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-pattern-params.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-pattern-params.js.snap index 779c70cc64..f6086622ba 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-pattern-params.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-pattern-params.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,27 +36,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 20, - "end": 21 - } + "range": [ + 20, + 21 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 25 - } + "range": [ + 19, + 25 + ] } ], "body": { @@ -73,10 +73,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 35, - "end": 36 - } + "range": [ + 35, + 36 + ] }, "init": { "type": "ObjectExpression", @@ -88,50 +88,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 44 - } + "range": [ + 39, + 44 + ] }, "loc": null, - "range": { - "start": 35, - "end": 44 - } + "range": [ + 35, + 44 + ] } ], "loc": null, - "range": { - "start": 31, - "end": 45 - } + "range": [ + 31, + 45 + ] }, { "type": "VariableDeclaration", @@ -144,10 +144,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "ObjectExpression", @@ -159,50 +159,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] }, "loc": null, - "range": { - "start": 52, - "end": 61 - } + "range": [ + 52, + 61 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 62 - } + "range": [ + 48, + 62 + ] }, { "type": "ReturnStatement", @@ -214,59 +214,59 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 78 - } + "range": [ + 72, + 78 + ] }, "loc": null, - "range": { - "start": 65, - "end": 79 - } + "range": [ + 65, + 79 + ] } ], "loc": null, - "range": { - "start": 27, - "end": 81 - } + "range": [ + 27, + 81 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 81 - }, + "range": [ + 0, + 81 + ], "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-properties.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-properties.js.snap index c0332aebd3..88f877ecde 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-properties.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-properties.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -69,27 +69,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] }, { "type": "MemberExpression", @@ -98,56 +98,56 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 50, - "end": 57 - } + "range": [ + 50, + 57 + ] }, { "type": "StringLiteral", "value": "hello", "loc": null, - "range": { - "start": 59, - "end": 66 - } + "range": [ + 59, + 66 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 67 - } + "range": [ + 40, + 67 + ] }, "loc": null, - "range": { - "start": 36, - "end": 67 - } + "range": [ + 36, + 67 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 68 - } + "range": [ + 30, + 68 + ] }, { "type": "VariableDeclaration", @@ -160,10 +160,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "MemberExpression", @@ -172,40 +172,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 89 - } + "range": [ + 83, + 89 + ] }, "computed": false, "loc": null, - "range": { - "start": 81, - "end": 89 - } + "range": [ + 81, + 89 + ] }, "loc": null, - "range": { - "start": 77, - "end": 89 - } + "range": [ + 77, + 89 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 90 - } + "range": [ + 71, + 90 + ] }, { "type": "VariableDeclaration", @@ -218,10 +218,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "init": { "type": "MemberExpression", @@ -230,40 +230,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 109 - } + "range": [ + 105, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 103, - "end": 109 - } + "range": [ + 103, + 109 + ] }, "loc": null, - "range": { - "start": 99, - "end": 109 - } + "range": [ + 99, + 109 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 110 - } + "range": [ + 93, + 110 + ] }, { "type": "ReturnStatement", @@ -277,30 +277,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, { "type": "Property", @@ -309,30 +309,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, { "type": "Property", @@ -341,30 +341,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, { "type": "Property", @@ -373,10 +373,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 132 - } + "range": [ + 131, + 132 + ] }, "value": { "type": "MemberExpression", @@ -385,76 +385,76 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] }, "property": { "type": "Identifier", "name": "concat", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 142 - } + "range": [ + 136, + 142 + ] }, "computed": false, "loc": null, - "range": { - "start": 134, - "end": 142 - } + "range": [ + 134, + 142 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 131, - "end": 142 - } + "range": [ + 131, + 142 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 144 - } + "range": [ + 120, + 144 + ] }, "loc": null, - "range": { - "start": 113, - "end": 145 - } + "range": [ + 113, + 145 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 147 - } + "range": [ + 26, + 147 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 147 - }, + "range": [ + 0, + 147 + ], "loc": null, - "range": { - "start": 0, - "end": 147 - } + "range": [ + 0, + 147 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 147 - } + "range": [ + 0, + 147 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-property-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-property-call.js.snap index fa3a37df06..d00d3005c7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-property-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-property-call.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -70,27 +70,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] }, { "type": "MemberExpression", @@ -99,56 +99,56 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 50, - "end": 57 - } + "range": [ + 50, + 57 + ] }, { "type": "StringLiteral", "value": "hello", "loc": null, - "range": { - "start": 59, - "end": 66 - } + "range": [ + 59, + 66 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 67 - } + "range": [ + 40, + 67 + ] }, "loc": null, - "range": { - "start": 36, - "end": 67 - } + "range": [ + 36, + 67 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 68 - } + "range": [ + 30, + 68 + ] }, { "type": "VariableDeclaration", @@ -161,10 +161,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "CallExpression", @@ -175,57 +175,57 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 87 - } + "range": [ + 83, + 87 + ] }, "computed": false, "loc": null, - "range": { - "start": 81, - "end": 87 - } + "range": [ + 81, + 87 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 88, - "end": 90 - } + "range": [ + 88, + 90 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 91 - } + "range": [ + 81, + 91 + ] }, "loc": null, - "range": { - "start": 77, - "end": 91 - } + "range": [ + 77, + 91 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 92 - } + "range": [ + 71, + 92 + ] }, { "type": "VariableDeclaration", @@ -238,10 +238,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "init": { "type": "CallExpression", @@ -252,27 +252,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "property": { "type": "Identifier", "name": "at", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 109 - } + "range": [ + 107, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 105, - "end": 109 - } + "range": [ + 105, + 109 + ] }, "arguments": [ { @@ -282,47 +282,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 115 - } + "range": [ + 110, + 115 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "computed": false, "loc": null, - "range": { - "start": 110, - "end": 117 - } + "range": [ + 110, + 117 + ] } ], "loc": null, - "range": { - "start": 105, - "end": 118 - } + "range": [ + 105, + 118 + ] }, "loc": null, - "range": { - "start": 101, - "end": 118 - } + "range": [ + 101, + 118 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 119 - } + "range": [ + 95, + 119 + ] }, { "type": "ReturnStatement", @@ -336,30 +336,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, { "type": "Property", @@ -368,30 +368,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, { "type": "Property", @@ -400,69 +400,69 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 138, - "end": 139 - } + "range": [ + 138, + 139 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 138, - "end": 139 - } + "range": [ + 138, + 139 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 138, - "end": 139 - } + "range": [ + 138, + 139 + ] } ], "loc": null, - "range": { - "start": 130, - "end": 141 - } + "range": [ + 130, + 141 + ] }, "loc": null, - "range": { - "start": 123, - "end": 142 - } + "range": [ + 123, + 142 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 144 - } + "range": [ + 26, + 144 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 144 - }, + "range": [ + 0, + 144 + ], "loc": null, - "range": { - "start": 0, - "end": 144 - } + "range": [ + 0, + 144 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 144 - } + "range": [ + 0, + 144 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-push-effect.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-push-effect.js.snap index 635a954a63..1a9750308c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-push-effect.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@array-push-effect.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 140 - } + "range": [ + 131, + 140 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 146 - } + "range": [ + 141, + 146 + ] } ], "body": { @@ -59,10 +59,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 159 - } + "range": [ + 158, + 159 + ] }, "init": { "type": "CallExpression", @@ -71,10 +71,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 165 - } + "range": [ + 162, + 165 + ] }, "arguments": [ { @@ -84,47 +84,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 171 - } + "range": [ + 166, + 171 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 173 - } + "range": [ + 172, + 173 + ] }, "computed": false, "loc": null, - "range": { - "start": 166, - "end": 173 - } + "range": [ + 166, + 173 + ] } ], "loc": null, - "range": { - "start": 162, - "end": 174 - } + "range": [ + 162, + 174 + ] }, "loc": null, - "range": { - "start": 158, - "end": 174 - } + "range": [ + 158, + 174 + ] } ], "loc": null, - "range": { - "start": 152, - "end": 175 - } + "range": [ + 152, + 175 + ] }, { "type": "VariableDeclaration", @@ -137,10 +137,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, "init": { "type": "ObjectExpression", @@ -152,10 +152,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 191 - } + "range": [ + 190, + 191 + ] }, "value": { "type": "MemberExpression", @@ -164,57 +164,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 193, - "end": 198 - } + "range": [ + 193, + 198 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 200 - } + "range": [ + 199, + 200 + ] }, "computed": false, "loc": null, - "range": { - "start": 193, - "end": 200 - } + "range": [ + 193, + 200 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 190, - "end": 200 - } + "range": [ + 190, + 200 + ] } ], "loc": null, - "range": { - "start": 188, - "end": 202 - } + "range": [ + 188, + 202 + ] }, "loc": null, - "range": { - "start": 184, - "end": 202 - } + "range": [ + 184, + 202 + ] } ], "loc": null, - "range": { - "start": 178, - "end": 203 - } + "range": [ + 178, + 203 + ] }, { "type": "VariableDeclaration", @@ -227,32 +227,32 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 215 - } + "range": [ + 212, + 215 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 218, - "end": 220 - } + "range": [ + 218, + 220 + ] }, "loc": null, - "range": { - "start": 212, - "end": 220 - } + "range": [ + 212, + 220 + ] } ], "loc": null, - "range": { - "start": 206, - "end": 221 - } + "range": [ + 206, + 221 + ] }, { "type": "ExpressionStatement", @@ -265,51 +265,51 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 224, - "end": 227 - } + "range": [ + 224, + 227 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 228, - "end": 232 - } + "range": [ + 228, + 232 + ] }, "computed": false, "loc": null, - "range": { - "start": 224, - "end": 232 - } + "range": [ + 224, + 232 + ] }, "arguments": [ { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 233, - "end": 235 - } + "range": [ + 233, + 235 + ] } ], "loc": null, - "range": { - "start": 224, - "end": 236 - } + "range": [ + 224, + 236 + ] }, "directive": null, "loc": null, - "range": { - "start": 224, - "end": 237 - } + "range": [ + 224, + 237 + ] }, { "type": "ExpressionStatement", @@ -322,27 +322,27 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 240, - "end": 243 - } + "range": [ + 240, + 243 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 248 - } + "range": [ + 244, + 248 + ] }, "computed": false, "loc": null, - "range": { - "start": 240, - "end": 248 - } + "range": [ + 240, + 248 + ] }, "arguments": [ { @@ -350,34 +350,34 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 249, - "end": 250 - } + "range": [ + 249, + 250 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 252, - "end": 253 - } + "range": [ + 252, + 253 + ] } ], "loc": null, - "range": { - "start": 240, - "end": 254 - } + "range": [ + 240, + 254 + ] }, "directive": null, "loc": null, - "range": { - "start": 240, - "end": 255 - } + "range": [ + 240, + 255 + ] }, { "type": "ReturnStatement", @@ -386,42 +386,42 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 268 - } + "range": [ + 265, + 268 + ] }, "loc": null, - "range": { - "start": 258, - "end": 269 - } + "range": [ + 258, + 269 + ] } ], "loc": null, - "range": { - "start": 148, - "end": 271 - } + "range": [ + 148, + 271 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 122, - "end": 271 - }, + "range": [ + 122, + 271 + ], "loc": null, - "range": { - "start": 122, - "end": 271 - } + "range": [ + 122, + 271 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 122, - "end": 271 - } + "range": [ + 122, + 271 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@arrow-function-expr-gating-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@arrow-function-expr-gating-test.js.snap index 2f02e46591..6b6cc13929 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@arrow-function-expr-gating-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@arrow-function-expr-gating-test.js.snap @@ -25,10 +25,10 @@ Output: "name": "ErrorView", "typeAnnotation": null, "loc": null, - "range": { - "start": 17, - "end": 26 - } + "range": [ + 17, + 26 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -39,20 +39,20 @@ Output: "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] }, { "type": "Identifier", "name": "_retry", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 43 - } + "range": [ + 37, + 43 + ] } ], "body": { @@ -63,10 +63,10 @@ Output: "type": "JSXIdentifier", "name": "MessageBox", "loc": null, - "range": { - "start": 49, - "end": 59 - } + "range": [ + 49, + 59 + ] }, "attributes": [ { @@ -75,10 +75,10 @@ Output: "type": "JSXIdentifier", "name": "error", "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "value": { "type": "JSXExpressionContainer", @@ -87,30 +87,30 @@ Output: "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] }, "loc": null, - "range": { - "start": 60, - "end": 73 - } + "range": [ + 60, + 73 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 48, - "end": 74 - } + "range": [ + 48, + 74 + ] }, "children": [], "closingElement": { @@ -119,49 +119,49 @@ Output: "type": "JSXIdentifier", "name": "MessageBox", "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, "loc": null, - "range": { - "start": 74, - "end": 87 - } + "range": [ + 74, + 87 + ] }, "loc": null, - "range": { - "start": 48, - "end": 87 - } + "range": [ + 48, + 87 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 29, - "end": 87 - }, + "range": [ + 29, + 87 + ], "expression": true, "loc": null, - "range": { - "start": 29, - "end": 87 - } + "range": [ + 29, + 87 + ] }, "loc": null, - "range": { - "start": 17, - "end": 87 - } + "range": [ + 17, + 87 + ] } ], "loc": null, - "range": { - "start": 11, - "end": 88 - } + "range": [ + 11, + 88 + ] }, { "type": "ExportDefaultDeclaration", @@ -170,22 +170,22 @@ Output: "name": "ErrorView", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 114 - } + "range": [ + 105, + 114 + ] }, "loc": null, - "range": { - "start": 90, - "end": 115 - } + "range": [ + 90, + 115 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 11, - "end": 115 - } + "range": [ + 11, + 115 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-expression-computed.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-expression-computed.js.snap index eb3ed76620..fd12a7be64 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-expression-computed.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-expression-computed.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -70,47 +70,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "VariableDeclaration", @@ -123,32 +123,32 @@ Output: "name": "index", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "loc": null, - "range": { - "start": 59, - "end": 68 - } + "range": [ + 59, + 68 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 69 - } + "range": [ + 53, + 69 + ] }, { "type": "ExpressionStatement", @@ -162,49 +162,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "property": { "type": "Identifier", "name": "index", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "computed": true, "loc": null, - "range": { - "start": 72, - "end": 80 - } + "range": [ + 72, + 80 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 72, - "end": 85 - } + "range": [ + 72, + 85 + ] }, "directive": null, "loc": null, - "range": { - "start": 72, - "end": 86 - } + "range": [ + 72, + 86 + ] }, { "type": "ExpressionStatement", @@ -218,48 +218,48 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "property": { "type": "StringLiteral", "value": "0", "loc": null, - "range": { - "start": 91, - "end": 94 - } + "range": [ + 91, + 94 + ] }, "computed": true, "loc": null, - "range": { - "start": 89, - "end": 95 - } + "range": [ + 89, + 95 + ] }, "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": null, - "range": { - "start": 89, - "end": 100 - } + "range": [ + 89, + 100 + ] }, "directive": null, "loc": null, - "range": { - "start": 89, - "end": 101 - } + "range": [ + 89, + 101 + ] }, { "type": "ReturnStatement", @@ -268,42 +268,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "loc": null, - "range": { - "start": 104, - "end": 113 - } + "range": [ + 104, + 113 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 115 - } + "range": [ + 26, + 115 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 115 - }, + "range": [ + 0, + 115 + ], "loc": null, - "range": { - "start": 0, - "end": 115 - } + "range": [ + 0, + 115 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 115 - } + "range": [ + 0, + 115 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-expression-nested-path.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-expression-nested-path.js.snap index 5da3207e67..788a554a39 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-expression-nested-path.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-expression-nested-path.js.snap @@ -23,10 +23,10 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 16 - } + "range": [ + 11, + 16 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ObjectExpression", @@ -69,10 +69,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "value": { "type": "ObjectExpression", @@ -84,10 +84,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "MemberExpression", @@ -96,74 +96,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 47 - } + "range": [ + 42, + 47 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "computed": false, "loc": null, - "range": { - "start": 42, - "end": 49 - } + "range": [ + 42, + 49 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 49 - } + "range": [ + 39, + 49 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 51 - } + "range": [ + 37, + 51 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 34, - "end": 51 - } + "range": [ + 34, + 51 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 53 - } + "range": [ + 32, + 53 + ] }, "loc": null, - "range": { - "start": 28, - "end": 53 - } + "range": [ + 28, + 53 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 54 - } + "range": [ + 22, + 54 + ] }, { "type": "ExpressionStatement", @@ -179,44 +179,44 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "right": { "type": "BinaryExpression", @@ -229,73 +229,73 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 68 - } + "range": [ + 65, + 68 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 65, - "end": 74 - } + "range": [ + 65, + 74 + ] }, "loc": null, - "range": { - "start": 57, - "end": 74 - } + "range": [ + 57, + 74 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 75 - } + "range": [ + 57, + 75 + ] }, { "type": "ExpressionStatement", @@ -311,66 +311,66 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "loc": null, - "range": { - "start": 78, - "end": 88 - } + "range": [ + 78, + 88 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 89 - } + "range": [ + 78, + 89 + ] }, { "type": "ReturnStatement", @@ -379,42 +379,42 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] } ], "loc": null, - "range": { - "start": 18, - "end": 103 - } + "range": [ + 18, + 103 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 103 - }, + "range": [ + 0, + 103 + ], "loc": null, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-in-nested-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-in-nested-if.js.snap index 35b5946ff0..4c9db4ed2b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-in-nested-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-in-nested-if.js.snap @@ -28,10 +28,10 @@ Output: "name": "useBar", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 15 - } + "range": [ + 9, + 15 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 21 - } + "range": [ + 16, + 21 + ] } ], "body": { @@ -59,24 +59,24 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] } ], "loc": null, - "range": { - "start": 27, - "end": 33 - } + "range": [ + 27, + 33 + ] }, { "type": "IfStatement", @@ -87,27 +87,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] }, "consequent": { "type": "BlockStatement", @@ -121,27 +121,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "computed": false, "loc": null, - "range": { - "start": 60, - "end": 67 - } + "range": [ + 60, + 67 + ] }, "consequent": { "type": "BlockStatement", @@ -156,10 +156,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "right": { "type": "CallExpression", @@ -168,58 +168,58 @@ Output: "name": "baz", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "arguments": [], "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] }, "directive": null, "loc": null, - "range": { - "start": 77, - "end": 87 - } + "range": [ + 77, + 87 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 93 - } + "range": [ + 69, + 93 + ] }, "alternate": null, "loc": null, - "range": { - "start": 56, - "end": 93 - } + "range": [ + 56, + 93 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 97 - } + "range": [ + 50, + 97 + ] }, "alternate": null, "loc": null, - "range": { - "start": 37, - "end": 97 - } + "range": [ + 37, + 97 + ] }, { "type": "ReturnStatement", @@ -228,42 +228,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 112 - } + "range": [ + 23, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 112 - }, + "range": [ + 0, + 112 + ], "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue-array.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue-array.js.snap index e715b07f3f..468f8c1f28 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue-array.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue-array.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -43,10 +43,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ArrayExpression", @@ -58,37 +58,37 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 33 - } + "range": [ + 30, + 33 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 34 - } + "range": [ + 29, + 34 + ] }, "loc": null, - "range": { - "start": 25, - "end": 34 - } + "range": [ + 25, + 34 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 35 - } + "range": [ + 19, + 35 + ] }, { "type": "VariableDeclaration", @@ -101,10 +101,10 @@ Output: "name": "first", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "init": { "type": "CallExpression", @@ -115,57 +115,57 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "property": { "type": "Identifier", "name": "at", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 56 - } + "range": [ + 54, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 59 - } + "range": [ + 52, + 59 + ] }, "loc": null, - "range": { - "start": 44, - "end": 59 - } + "range": [ + 44, + 59 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 60 - } + "range": [ + 38, + 60 + ] }, { "type": "ExpressionStatement", @@ -178,60 +178,60 @@ Output: "name": "first", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "property": { "type": "Identifier", "name": "set", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 72 - } + "range": [ + 63, + 72 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 78 - } + "range": [ + 63, + 78 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 79 - } + "range": [ + 63, + 79 + ] }, { "type": "ReturnStatement", @@ -240,42 +240,42 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "loc": null, - "range": { - "start": 82, - "end": 91 - } + "range": [ + 82, + 91 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 93 - } + "range": [ + 15, + 93 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 93 - }, + "range": [ + 0, + 93 + ], "loc": null, - "range": { - "start": 0, - "end": 93 - } + "range": [ + 0, + 93 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 93 - } + "range": [ + 0, + 93 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue.js.snap index cd09a1788f..3f4aa437eb 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations-complex-lvalue.js.snap @@ -23,10 +23,10 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [], "body": { @@ -43,10 +43,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "ObjectExpression", @@ -58,10 +58,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "value": { "type": "ObjectExpression", @@ -73,66 +73,66 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "value": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 34, - "end": 38 - } + "range": [ + 34, + 38 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 40 - } + "range": [ + 32, + 40 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 29, - "end": 40 - } + "range": [ + 29, + 40 + ] } ], "loc": null, - "range": { - "start": 27, - "end": 42 - } + "range": [ + 27, + 42 + ] }, "loc": null, - "range": { - "start": 23, - "end": 42 - } + "range": [ + 23, + 42 + ] } ], "loc": null, - "range": { - "start": 17, - "end": 43 - } + "range": [ + 17, + 43 + ] }, { "type": "ExpressionStatement", @@ -148,44 +148,44 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "computed": false, "loc": null, - "range": { - "start": 46, - "end": 49 - } + "range": [ + 46, + 49 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "computed": false, "loc": null, - "range": { - "start": 46, - "end": 51 - } + "range": [ + 46, + 51 + ] }, "right": { "type": "BinaryExpression", @@ -198,73 +198,73 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 57 - } + "range": [ + 54, + 57 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "loc": null, - "range": { - "start": 54, - "end": 63 - } + "range": [ + 54, + 63 + ] }, "loc": null, - "range": { - "start": 46, - "end": 63 - } + "range": [ + 46, + 63 + ] }, "directive": null, "loc": null, - "range": { - "start": 46, - "end": 64 - } + "range": [ + 46, + 64 + ] }, { "type": "ExpressionStatement", @@ -280,66 +280,66 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "computed": false, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "loc": null, - "range": { - "start": 67, - "end": 77 - } + "range": [ + 67, + 77 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 78 - } + "range": [ + 67, + 78 + ] }, { "type": "ReturnStatement", @@ -348,42 +348,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "loc": null, - "range": { - "start": 81, - "end": 90 - } + "range": [ + 81, + 90 + ] } ], "loc": null, - "range": { - "start": 13, - "end": 92 - } + "range": [ + 13, + 92 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 92 - }, + "range": [ + 0, + 92 + ], "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations.js.snap index 9dc660408b..58c3c60a3d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@assignment-variations.js.snap @@ -24,10 +24,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 22 - } + "range": [ + 21, + 22 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "loc": null, - "range": { - "start": 21, - "end": 26 - } + "range": [ + 21, + 26 + ] } ], "loc": null, - "range": { - "start": 17, - "end": 27 - } + "range": [ + 17, + 27 + ] }, { "type": "ExpressionStatement", @@ -81,10 +81,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "right": { "type": "BinaryExpression", @@ -93,39 +93,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] }, "directive": null, "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "ExpressionStatement", @@ -137,32 +137,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "loc": null, - "range": { - "start": 43, - "end": 49 - } + "range": [ + 43, + 49 + ] }, "directive": null, "loc": null, - "range": { - "start": 43, - "end": 50 - } + "range": [ + 43, + 50 + ] }, { "type": "ExpressionStatement", @@ -174,32 +174,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "loc": null, - "range": { - "start": 53, - "end": 61 - } + "range": [ + 53, + 61 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 62 - } + "range": [ + 53, + 62 + ] }, { "type": "ReturnStatement", @@ -208,42 +208,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "loc": null, - "range": { - "start": 65, - "end": 74 - } + "range": [ + 65, + 74 + ] } ], "loc": null, - "range": { - "start": 13, - "end": 76 - } + "range": [ + 13, + 76 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 76 - }, + "range": [ + 0, + 76 + ], "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@await-side-effecting-promise.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@await-side-effecting-promise.js.snap index 929224abfb..87c01a9246 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@await-side-effecting-promise.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@await-side-effecting-promise.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 15, - "end": 24 - } + "range": [ + 15, + 24 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 30 - } + "range": [ + 25, + 30 + ] } ], "body": { @@ -53,32 +53,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 46, - "end": 48 - } + "range": [ + 46, + 48 + ] }, "loc": null, - "range": { - "start": 42, - "end": 48 - } + "range": [ + 42, + 48 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] }, { "type": "ExpressionStatement", @@ -91,10 +91,10 @@ Output: "name": "populateData", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 70 - } + "range": [ + 58, + 70 + ] }, "arguments": [ { @@ -104,57 +104,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 76 - } + "range": [ + 71, + 76 + ] }, "property": { "type": "Identifier", "name": "id", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 79 - } + "range": [ + 77, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 71, - "end": 79 - } + "range": [ + 71, + 79 + ] }, { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 83 - } + "range": [ + 58, + 83 + ] }, "loc": null, - "range": { - "start": 52, - "end": 83 - } + "range": [ + 52, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 52, - "end": 84 - } + "range": [ + 52, + 84 + ] }, { "type": "ReturnStatement", @@ -163,42 +163,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 98 - } + "range": [ + 32, + 98 + ] }, "generator": false, "async": true, "loc": null, - "range": { - "start": 0, - "end": 98 - }, + "range": [ + 0, + 98 + ], "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@await.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@await.js.snap index b4a7dc723b..ea8715031a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@await.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@await.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 15, - "end": 24 - } + "range": [ + 15, + 24 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 30 - } + "range": [ + 25, + 30 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 46 - } + "range": [ + 42, + 46 + ] }, "init": { "type": "AwaitExpression", @@ -66,10 +66,10 @@ Output: "name": "load", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 59 - } + "range": [ + 55, + 59 + ] }, "arguments": [ { @@ -79,53 +79,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "property": { "type": "Identifier", "name": "id", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 68 - } + "range": [ + 66, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 60, - "end": 68 - } + "range": [ + 60, + 68 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 69 - } + "range": [ + 55, + 69 + ] }, "loc": null, - "range": { - "start": 49, - "end": 69 - } + "range": [ + 49, + 69 + ] }, "loc": null, - "range": { - "start": 42, - "end": 69 - } + "range": [ + 42, + 69 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 70 - } + "range": [ + 36, + 70 + ] }, { "type": "ReturnStatement", @@ -137,18 +137,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "children": [ { @@ -160,33 +160,33 @@ Output: "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 90 - } + "range": [ + 86, + 90 + ] }, "property": { "type": "Identifier", "name": "name", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 95 - } + "range": [ + 91, + 95 + ] }, "computed": false, "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] }, "loc": null, - "range": { - "start": 85, - "end": 96 - } + "range": [ + 85, + 96 + ] } ], "closingElement": { @@ -195,54 +195,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "loc": null, - "range": { - "start": 96, - "end": 102 - } + "range": [ + 96, + 102 + ] }, "loc": null, - "range": { - "start": 80, - "end": 102 - } + "range": [ + 80, + 102 + ] }, "loc": null, - "range": { - "start": 73, - "end": 103 - } + "range": [ + 73, + 103 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 105 - } + "range": [ + 32, + 105 + ] }, "generator": false, "async": true, "loc": null, - "range": { - "start": 0, - "end": 105 - }, + "range": [ + 0, + 105 + ], "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-import.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-import.js.snap index 4c8a0b2119..0216c17f83 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-import.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-import.js.snap @@ -35,26 +35,26 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 17 - } + "range": [ + 9, + 17 + ] }, "local": { "type": "Identifier", "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 17 - } + "range": [ + 9, + 17 + ] }, "loc": null, - "range": { - "start": 9, - "end": 17 - } + "range": [ + 9, + 17 + ] }, { "type": "ImportSpecifier", @@ -63,42 +63,42 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 26 - } + "range": [ + 19, + 26 + ] }, "local": { "type": "Identifier", "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 26 - } + "range": [ + 19, + 26 + ] }, "loc": null, - "range": { - "start": 19, - "end": 26 - } + "range": [ + 19, + 26 + ] } ], "source": { "type": "StringLiteral", "value": "react", "loc": null, - "range": { - "start": 34, - "end": 41 - } + "range": [ + 34, + 41 + ] }, "loc": null, - "range": { - "start": 0, - "end": 42 - } + "range": [ + 0, + 42 + ] }, { "type": "FunctionDeclaration", @@ -107,10 +107,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 62 - } + "range": [ + 53, + 62 + ] }, "params": [ { @@ -118,10 +118,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] } ], "body": { @@ -141,17 +141,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] } ], "loc": null, - "range": { - "start": 80, - "end": 83 - } + "range": [ + 80, + 83 + ] }, "init": { "type": "CallExpression", @@ -160,40 +160,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 94 - } + "range": [ + 86, + 94 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 97 - } + "range": [ + 86, + 97 + ] }, "loc": null, - "range": { - "start": 80, - "end": 97 - } + "range": [ + 80, + 97 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 98 - } + "range": [ + 74, + 98 + ] }, { "type": "VariableDeclaration", @@ -206,10 +206,10 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 122 - } + "range": [ + 107, + 122 + ] }, "init": { "type": "CallExpression", @@ -218,10 +218,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 132 - } + "range": [ + 125, + 132 + ] }, "arguments": [ { @@ -235,10 +235,10 @@ Output: "name": "calculateExpensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 163 - } + "range": [ + 139, + 163 + ] }, "arguments": [ { @@ -246,31 +246,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 165 - } + "range": [ + 164, + 165 + ] } ], "loc": null, - "range": { - "start": 139, - "end": 166 - } + "range": [ + 139, + 166 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 133, - "end": 166 - }, + "range": [ + 133, + 166 + ], "expression": true, "loc": null, - "range": { - "start": 133, - "end": 166 - } + "range": [ + 133, + 166 + ] }, { "type": "ArrayExpression", @@ -280,37 +280,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 170 - } + "range": [ + 169, + 170 + ] } ], "loc": null, - "range": { - "start": 168, - "end": 171 - } + "range": [ + 168, + 171 + ] } ], "loc": null, - "range": { - "start": 125, - "end": 172 - } + "range": [ + 125, + 172 + ] }, "loc": null, - "range": { - "start": 107, - "end": 172 - } + "range": [ + 107, + 172 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 173 - } + "range": [ + 101, + 173 + ] }, { "type": "ReturnStatement", @@ -322,18 +322,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 185, - "end": 188 - } + "range": [ + 185, + 188 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 184, - "end": 189 - } + "range": [ + 184, + 189 + ] }, "children": [ { @@ -343,16 +343,16 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 205 - } + "range": [ + 190, + 205 + ] }, "loc": null, - "range": { - "start": 189, - "end": 206 - } + "range": [ + 189, + 206 + ] } ], "closingElement": { @@ -361,48 +361,48 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 208, - "end": 211 - } + "range": [ + 208, + 211 + ] }, "loc": null, - "range": { - "start": 206, - "end": 212 - } + "range": [ + 206, + 212 + ] }, "loc": null, - "range": { - "start": 184, - "end": 212 - } + "range": [ + 184, + 212 + ] }, "loc": null, - "range": { - "start": 177, - "end": 213 - } + "range": [ + 177, + 213 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 215 - } + "range": [ + 70, + 215 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 44, - "end": 215 - }, + "range": [ + 44, + 215 + ], "loc": null, - "range": { - "start": 44, - "end": 215 - } + "range": [ + 44, + 215 + ] }, { "type": "FunctionDeclaration", @@ -411,10 +411,10 @@ Output: "name": "Component2", "typeAnnotation": null, "loc": null, - "range": { - "start": 226, - "end": 236 - } + "range": [ + 226, + 236 + ] }, "params": [ { @@ -422,10 +422,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 237, - "end": 242 - } + "range": [ + 237, + 242 + ] } ], "body": { @@ -445,17 +445,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 256 - } + "range": [ + 255, + 256 + ] } ], "loc": null, - "range": { - "start": 254, - "end": 257 - } + "range": [ + 254, + 257 + ] }, "init": { "type": "CallExpression", @@ -464,40 +464,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 268 - } + "range": [ + 260, + 268 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 269, - "end": 270 - } + "range": [ + 269, + 270 + ] } ], "loc": null, - "range": { - "start": 260, - "end": 271 - } + "range": [ + 260, + 271 + ] }, "loc": null, - "range": { - "start": 254, - "end": 271 - } + "range": [ + 254, + 271 + ] } ], "loc": null, - "range": { - "start": 248, - "end": 272 - } + "range": [ + 248, + 272 + ] }, { "type": "VariableDeclaration", @@ -510,10 +510,10 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 281, - "end": 296 - } + "range": [ + 281, + 296 + ] }, "init": { "type": "CallExpression", @@ -522,10 +522,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 299, - "end": 306 - } + "range": [ + 299, + 306 + ] }, "arguments": [ { @@ -539,10 +539,10 @@ Output: "name": "calculateExpensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 313, - "end": 337 - } + "range": [ + 313, + 337 + ] }, "arguments": [ { @@ -550,31 +550,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 338, - "end": 339 - } + "range": [ + 338, + 339 + ] } ], "loc": null, - "range": { - "start": 313, - "end": 340 - } + "range": [ + 313, + 340 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 307, - "end": 340 - }, + "range": [ + 307, + 340 + ], "expression": true, "loc": null, - "range": { - "start": 307, - "end": 340 - } + "range": [ + 307, + 340 + ] }, { "type": "ArrayExpression", @@ -584,37 +584,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 343, - "end": 344 - } + "range": [ + 343, + 344 + ] } ], "loc": null, - "range": { - "start": 342, - "end": 345 - } + "range": [ + 342, + 345 + ] } ], "loc": null, - "range": { - "start": 299, - "end": 346 - } + "range": [ + 299, + 346 + ] }, "loc": null, - "range": { - "start": 281, - "end": 346 - } + "range": [ + 281, + 346 + ] } ], "loc": null, - "range": { - "start": 275, - "end": 347 - } + "range": [ + 275, + 347 + ] }, { "type": "ReturnStatement", @@ -626,18 +626,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 359, - "end": 362 - } + "range": [ + 359, + 362 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 358, - "end": 363 - } + "range": [ + 358, + 363 + ] }, "children": [ { @@ -647,16 +647,16 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 364, - "end": 379 - } + "range": [ + 364, + 379 + ] }, "loc": null, - "range": { - "start": 363, - "end": 380 - } + "range": [ + 363, + 380 + ] } ], "closingElement": { @@ -665,54 +665,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 382, - "end": 385 - } + "range": [ + 382, + 385 + ] }, "loc": null, - "range": { - "start": 380, - "end": 386 - } + "range": [ + 380, + 386 + ] }, "loc": null, - "range": { - "start": 358, - "end": 386 - } + "range": [ + 358, + 386 + ] }, "loc": null, - "range": { - "start": 351, - "end": 387 - } + "range": [ + 351, + 387 + ] } ], "loc": null, - "range": { - "start": 244, - "end": 389 - } + "range": [ + 244, + 389 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 217, - "end": 389 - }, + "range": [ + 217, + 389 + ], "loc": null, - "range": { - "start": 217, - "end": 389 - } + "range": [ + 217, + 389 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 389 - } + "range": [ + 0, + 389 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-kitchensink-import.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-kitchensink-import.js.snap index 3676d23017..420c359cac 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-kitchensink-import.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@babel-existing-react-kitchensink-import.js.snap @@ -36,32 +36,32 @@ Output: "name": "React", "typeAnnotation": null, "loc": null, - "range": { - "start": 12, - "end": 17 - } + "range": [ + 12, + 17 + ] }, "loc": null, - "range": { - "start": 7, - "end": 17 - } + "range": [ + 7, + 17 + ] } ], "source": { "type": "StringLiteral", "value": "react", "loc": null, - "range": { - "start": 23, - "end": 30 - } + "range": [ + 23, + 30 + ] }, "loc": null, - "range": { - "start": 0, - "end": 31 - } + "range": [ + 0, + 31 + ] }, { "type": "ImportDeclaration", @@ -73,26 +73,26 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 49 - } + "range": [ + 41, + 49 + ] }, "local": { "type": "Identifier", "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 49 - } + "range": [ + 41, + 49 + ] }, "loc": null, - "range": { - "start": 41, - "end": 49 - } + "range": [ + 41, + 49 + ] }, { "type": "ImportSpecifier", @@ -101,42 +101,42 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 58 - } + "range": [ + 51, + 58 + ] }, "local": { "type": "Identifier", "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 58 - } + "range": [ + 51, + 58 + ] }, "loc": null, - "range": { - "start": 51, - "end": 58 - } + "range": [ + 51, + 58 + ] } ], "source": { "type": "StringLiteral", "value": "react", "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] }, "loc": null, - "range": { - "start": 32, - "end": 74 - } + "range": [ + 32, + 74 + ] }, { "type": "FunctionDeclaration", @@ -145,10 +145,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 94 - } + "range": [ + 85, + 94 + ] }, "params": [ { @@ -156,10 +156,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 100 - } + "range": [ + 95, + 100 + ] } ], "body": { @@ -179,17 +179,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 115 - } + "range": [ + 112, + 115 + ] }, "init": { "type": "CallExpression", @@ -198,40 +198,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 126 - } + "range": [ + 118, + 126 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] } ], "loc": null, - "range": { - "start": 118, - "end": 129 - } + "range": [ + 118, + 129 + ] }, "loc": null, - "range": { - "start": 112, - "end": 129 - } + "range": [ + 112, + 129 + ] } ], "loc": null, - "range": { - "start": 106, - "end": 130 - } + "range": [ + 106, + 130 + ] }, { "type": "VariableDeclaration", @@ -244,10 +244,10 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 154 - } + "range": [ + 139, + 154 + ] }, "init": { "type": "CallExpression", @@ -256,10 +256,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 164 - } + "range": [ + 157, + 164 + ] }, "arguments": [ { @@ -273,10 +273,10 @@ Output: "name": "calculateExpensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 195 - } + "range": [ + 171, + 195 + ] }, "arguments": [ { @@ -284,31 +284,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 197 - } + "range": [ + 196, + 197 + ] } ], "loc": null, - "range": { - "start": 171, - "end": 198 - } + "range": [ + 171, + 198 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 165, - "end": 198 - }, + "range": [ + 165, + 198 + ], "expression": true, "loc": null, - "range": { - "start": 165, - "end": 198 - } + "range": [ + 165, + 198 + ] }, { "type": "ArrayExpression", @@ -318,37 +318,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] } ], "loc": null, - "range": { - "start": 200, - "end": 203 - } + "range": [ + 200, + 203 + ] } ], "loc": null, - "range": { - "start": 157, - "end": 204 - } + "range": [ + 157, + 204 + ] }, "loc": null, - "range": { - "start": 139, - "end": 204 - } + "range": [ + 139, + 204 + ] } ], "loc": null, - "range": { - "start": 133, - "end": 205 - } + "range": [ + 133, + 205 + ] }, { "type": "ReturnStatement", @@ -360,18 +360,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 217, - "end": 220 - } + "range": [ + 217, + 220 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 216, - "end": 221 - } + "range": [ + 216, + 221 + ] }, "children": [ { @@ -381,16 +381,16 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 222, - "end": 237 - } + "range": [ + 222, + 237 + ] }, "loc": null, - "range": { - "start": 221, - "end": 238 - } + "range": [ + 221, + 238 + ] } ], "closingElement": { @@ -399,48 +399,48 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 240, - "end": 243 - } + "range": [ + 240, + 243 + ] }, "loc": null, - "range": { - "start": 238, - "end": 244 - } + "range": [ + 238, + 244 + ] }, "loc": null, - "range": { - "start": 216, - "end": 244 - } + "range": [ + 216, + 244 + ] }, "loc": null, - "range": { - "start": 209, - "end": 245 - } + "range": [ + 209, + 245 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 247 - } + "range": [ + 102, + 247 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 76, - "end": 247 - }, + "range": [ + 76, + 247 + ], "loc": null, - "range": { - "start": 76, - "end": 247 - } + "range": [ + 76, + 247 + ] }, { "type": "FunctionDeclaration", @@ -449,10 +449,10 @@ Output: "name": "Component2", "typeAnnotation": null, "loc": null, - "range": { - "start": 258, - "end": 268 - } + "range": [ + 258, + 268 + ] }, "params": [ { @@ -460,10 +460,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 269, - "end": 274 - } + "range": [ + 269, + 274 + ] } ], "body": { @@ -483,17 +483,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 287, - "end": 288 - } + "range": [ + 287, + 288 + ] } ], "loc": null, - "range": { - "start": 286, - "end": 289 - } + "range": [ + 286, + 289 + ] }, "init": { "type": "CallExpression", @@ -502,40 +502,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 292, - "end": 300 - } + "range": [ + 292, + 300 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 301, - "end": 302 - } + "range": [ + 301, + 302 + ] } ], "loc": null, - "range": { - "start": 292, - "end": 303 - } + "range": [ + 292, + 303 + ] }, "loc": null, - "range": { - "start": 286, - "end": 303 - } + "range": [ + 286, + 303 + ] } ], "loc": null, - "range": { - "start": 280, - "end": 304 - } + "range": [ + 280, + 304 + ] }, { "type": "VariableDeclaration", @@ -548,10 +548,10 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 313, - "end": 328 - } + "range": [ + 313, + 328 + ] }, "init": { "type": "CallExpression", @@ -560,10 +560,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 331, - "end": 338 - } + "range": [ + 331, + 338 + ] }, "arguments": [ { @@ -577,10 +577,10 @@ Output: "name": "calculateExpensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 345, - "end": 369 - } + "range": [ + 345, + 369 + ] }, "arguments": [ { @@ -588,31 +588,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 370, - "end": 371 - } + "range": [ + 370, + 371 + ] } ], "loc": null, - "range": { - "start": 345, - "end": 372 - } + "range": [ + 345, + 372 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 339, - "end": 372 - }, + "range": [ + 339, + 372 + ], "expression": true, "loc": null, - "range": { - "start": 339, - "end": 372 - } + "range": [ + 339, + 372 + ] }, { "type": "ArrayExpression", @@ -622,37 +622,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 375, - "end": 376 - } + "range": [ + 375, + 376 + ] } ], "loc": null, - "range": { - "start": 374, - "end": 377 - } + "range": [ + 374, + 377 + ] } ], "loc": null, - "range": { - "start": 331, - "end": 378 - } + "range": [ + 331, + 378 + ] }, "loc": null, - "range": { - "start": 313, - "end": 378 - } + "range": [ + 313, + 378 + ] } ], "loc": null, - "range": { - "start": 307, - "end": 379 - } + "range": [ + 307, + 379 + ] }, { "type": "ReturnStatement", @@ -664,18 +664,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 391, - "end": 394 - } + "range": [ + 391, + 394 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 390, - "end": 395 - } + "range": [ + 390, + 395 + ] }, "children": [ { @@ -685,16 +685,16 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 396, - "end": 411 - } + "range": [ + 396, + 411 + ] }, "loc": null, - "range": { - "start": 395, - "end": 412 - } + "range": [ + 395, + 412 + ] } ], "closingElement": { @@ -703,54 +703,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 414, - "end": 417 - } + "range": [ + 414, + 417 + ] }, "loc": null, - "range": { - "start": 412, - "end": 418 - } + "range": [ + 412, + 418 + ] }, "loc": null, - "range": { - "start": 390, - "end": 418 - } + "range": [ + 390, + 418 + ] }, "loc": null, - "range": { - "start": 383, - "end": 419 - } + "range": [ + 383, + 419 + ] } ], "loc": null, - "range": { - "start": 276, - "end": 421 - } + "range": [ + 276, + 421 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 249, - "end": 421 - }, + "range": [ + 249, + 421 + ], "loc": null, - "range": { - "start": 249, - "end": 421 - } + "range": [ + 249, + 421 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 421 - } + "range": [ + 0, + 421 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug.useMemo-deps-array-not-cleared.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug.useMemo-deps-array-not-cleared.js.snap index f424178ef8..45f42687c0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug.useMemo-deps-array-not-cleared.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug.useMemo-deps-array-not-cleared.js.snap @@ -26,10 +26,10 @@ Output: "name": "App", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -42,30 +42,30 @@ Output: "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 15, - "end": 19 - } + "range": [ + 15, + 19 + ] }, "value": { "type": "Identifier", "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 15, - "end": 19 - } + "range": [ + 15, + 19 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 15, - "end": 19 - } + "range": [ + 15, + 19 + ] }, { "type": "Property", @@ -74,37 +74,37 @@ Output: "name": "hasDeps", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 28 - } + "range": [ + 21, + 28 + ] }, "value": { "type": "Identifier", "name": "hasDeps", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 28 - } + "range": [ + 21, + 28 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 21, - "end": 28 - } + "range": [ + 21, + 28 + ] } ], "loc": null, - "range": { - "start": 13, - "end": 30 - } + "range": [ + 13, + 30 + ] } ], "body": { @@ -121,10 +121,10 @@ Output: "name": "resolvedText", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 54 - } + "range": [ + 42, + 54 + ] }, "init": { "type": "CallExpression", @@ -133,10 +133,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 64 - } + "range": [ + 57, + 64 + ] }, "arguments": [ { @@ -157,61 +157,61 @@ Output: "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 95 - } + "range": [ + 91, + 95 + ] }, "property": { "type": "Identifier", "name": "toUpperCase", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 107 - } + "range": [ + 96, + 107 + ] }, "computed": false, "loc": null, - "range": { - "start": 91, - "end": 107 - } + "range": [ + 91, + 107 + ] }, "arguments": [], "loc": null, - "range": { - "start": 91, - "end": 109 - } + "range": [ + 91, + 109 + ] }, "loc": null, - "range": { - "start": 84, - "end": 110 - } + "range": [ + 84, + 110 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 116 - } + "range": [ + 76, + 116 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 70, - "end": 116 - }, + "range": [ + 70, + 116 + ], "expression": false, "loc": null, - "range": { - "start": 70, - "end": 116 - } + "range": [ + 70, + 116 + ] }, { "type": "ConditionalExpression", @@ -220,10 +220,10 @@ Output: "name": "hasDeps", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 129 - } + "range": [ + 122, + 129 + ] }, "alternate": { "type": "ArrayExpression", @@ -233,51 +233,51 @@ Output: "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 144 - } + "range": [ + 140, + 144 + ] } ], "loc": null, - "range": { - "start": 139, - "end": 145 - } + "range": [ + 139, + 145 + ] }, "consequent": { "type": "NullLiteral", "loc": null, - "range": { - "start": 132, - "end": 136 - } + "range": [ + 132, + 136 + ] }, "loc": null, - "range": { - "start": 122, - "end": 145 - } + "range": [ + 122, + 145 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 168 - } + "range": [ + 57, + 168 + ] }, "loc": null, - "range": { - "start": 42, - "end": 168 - } + "range": [ + 42, + 168 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 169 - } + "range": [ + 36, + 169 + ] }, { "type": "ReturnStatement", @@ -286,42 +286,42 @@ Output: "name": "resolvedText", "typeAnnotation": null, "loc": null, - "range": { - "start": 179, - "end": 191 - } + "range": [ + 179, + 191 + ] }, "loc": null, - "range": { - "start": 172, - "end": 192 - } + "range": [ + 172, + 192 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 194 - } + "range": [ + 32, + 194 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 194 - }, + "range": [ + 0, + 194 + ], "loc": null, - "range": { - "start": 0, - "end": 194 - } + "range": [ + 0, + 194 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 194 - } + "range": [ + 0, + 194 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug_object-pattern.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug_object-pattern.js.snap index 4bf52bf61c..af47345fba 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug_object-pattern.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@bug_object-pattern.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -58,60 +58,60 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] }, "init": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -124,10 +124,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ObjectExpression", @@ -139,50 +139,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "loc": null, - "range": { - "start": 47, - "end": 56 - } + "range": [ + 47, + 56 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 57 - } + "range": [ + 43, + 57 + ] }, { "type": "ReturnStatement", @@ -191,42 +191,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "loc": null, - "range": { - "start": 60, - "end": 69 - } + "range": [ + 60, + 69 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 71 - } + "range": [ + 22, + 71 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 71 - }, + "range": [ + 0, + 71 + ], "loc": null, - "range": { - "start": 0, - "end": 71 - } + "range": [ + 0, + 71 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 71 - } + "range": [ + 0, + 71 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@builtin-jsx-tag-lowered-between-mutations.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@builtin-jsx-tag-lowered-between-mutations.js.snap index e331f222da..0aae85c3e5 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@builtin-jsx-tag-lowered-between-mutations.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@builtin-jsx-tag-lowered-between-mutations.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] }, "init": { "type": "NewExpression", @@ -64,30 +64,30 @@ Output: "name": "MaybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "arguments": [], "loc": null, - "range": { - "start": 51, - "end": 69 - } + "range": [ + 51, + 69 + ] }, "loc": null, - "range": { - "start": 36, - "end": 69 - } + "range": [ + 36, + 69 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 70 - } + "range": [ + 30, + 70 + ] }, { "type": "ReturnStatement", @@ -99,18 +99,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "children": [ { @@ -122,10 +122,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 97 - } + "range": [ + 86, + 97 + ] }, "arguments": [ { @@ -133,23 +133,23 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 110 - } + "range": [ + 98, + 110 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 111 - } + "range": [ + 86, + 111 + ] }, "loc": null, - "range": { - "start": 85, - "end": 112 - } + "range": [ + 85, + 112 + ] } ], "closingElement": { @@ -158,54 +158,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 114, - "end": 117 - } + "range": [ + 114, + 117 + ] }, "loc": null, - "range": { - "start": 112, - "end": 118 - } + "range": [ + 112, + 118 + ] }, "loc": null, - "range": { - "start": 80, - "end": 118 - } + "range": [ + 80, + 118 + ] }, "loc": null, - "range": { - "start": 73, - "end": 119 - } + "range": [ + 73, + 119 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 121 - } + "range": [ + 26, + 121 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 121 - }, + "range": [ + 0, + 121 + ], "loc": null, - "range": { - "start": 0, - "end": 121 - } + "range": [ + 0, + 121 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 121 - } + "range": [ + 0, + 121 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-args-assignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-args-assignment.js.snap index 0533bca5bb..7f9667e58f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-args-assignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-args-assignment.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "CallExpression", @@ -65,30 +65,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 48 - } + "range": [ + 38, + 48 + ] }, "arguments": [], "loc": null, - "range": { - "start": 38, - "end": 50 - } + "range": [ + 38, + 50 + ] }, "loc": null, - "range": { - "start": 34, - "end": 50 - } + "range": [ + 34, + 50 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 51 - } + "range": [ + 30, + 51 + ] }, { "type": "ExpressionStatement", @@ -101,27 +101,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "arguments": [ { @@ -132,10 +132,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "right": { "type": "CallExpression", @@ -144,37 +144,37 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 75 - } + "range": [ + 65, + 75 + ] }, "arguments": [], "loc": null, - "range": { - "start": 65, - "end": 77 - } + "range": [ + 65, + 77 + ] }, "loc": null, - "range": { - "start": 61, - "end": 77 - } + "range": [ + 61, + 77 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 79 - } + "range": [ + 54, + 79 + ] }, "directive": null, "loc": null, - "range": { - "start": 54, - "end": 80 - } + "range": [ + 54, + 80 + ] }, { "type": "ReturnStatement", @@ -183,42 +183,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "loc": null, - "range": { - "start": 83, - "end": 92 - } + "range": [ + 83, + 92 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 94 - } + "range": [ + 26, + 94 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 94 - }, + "range": [ + 0, + 94 + ], "loc": null, - "range": { - "start": 0, - "end": 94 - } + "range": [ + 0, + 94 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 94 - } + "range": [ + 0, + 94 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-args-destructuring-assignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-args-destructuring-assignment.js.snap index c1912fd507..4109bca5b3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-args-destructuring-assignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-args-destructuring-assignment.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "CallExpression", @@ -65,30 +65,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 48 - } + "range": [ + 38, + 48 + ] }, "arguments": [], "loc": null, - "range": { - "start": 38, - "end": 50 - } + "range": [ + 38, + 50 + ] }, "loc": null, - "range": { - "start": 34, - "end": 50 - } + "range": [ + 34, + 50 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 51 - } + "range": [ + 30, + 51 + ] }, { "type": "ExpressionStatement", @@ -101,27 +101,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "arguments": [ { @@ -135,17 +135,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 64 - } + "range": [ + 61, + 64 + ] }, "right": { "type": "CallExpression", @@ -154,37 +154,37 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 77 - } + "range": [ + 67, + 77 + ] }, "arguments": [], "loc": null, - "range": { - "start": 67, - "end": 79 - } + "range": [ + 67, + 79 + ] }, "loc": null, - "range": { - "start": 61, - "end": 79 - } + "range": [ + 61, + 79 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 81 - } + "range": [ + 54, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 54, - "end": 82 - } + "range": [ + 54, + 82 + ] }, { "type": "ReturnStatement", @@ -193,42 +193,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "loc": null, - "range": { - "start": 85, - "end": 94 - } + "range": [ + 85, + 94 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 96 - } + "range": [ + 26, + 96 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 96 - }, + "range": [ + 0, + 96 + ], "loc": null, - "range": { - "start": 0, - "end": 96 - } + "range": [ + 0, + 96 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 96 - } + "range": [ + 0, + 96 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-spread.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-spread.js.snap index 09a7aa95a3..f658ccd981 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-spread.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-spread.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -64,10 +64,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 43 - } + "range": [ + 40, + 43 + ] }, "arguments": [ { @@ -79,41 +79,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 52 - } + "range": [ + 47, + 52 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 47, - "end": 54 - } + "range": [ + 47, + 54 + ] }, "loc": null, - "range": { - "start": 44, - "end": 54 - } + "range": [ + 44, + 54 + ] }, { "type": "NullLiteral", "loc": null, - "range": { - "start": 56, - "end": 60 - } + "range": [ + 56, + 60 + ] }, { "type": "SpreadElement", @@ -124,53 +124,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] }, "loc": null, - "range": { - "start": 62, - "end": 72 - } + "range": [ + 62, + 72 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 73 - } + "range": [ + 40, + 73 + ] }, "loc": null, - "range": { - "start": 36, - "end": 73 - } + "range": [ + 36, + 73 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 74 - } + "range": [ + 30, + 74 + ] }, { "type": "ReturnStatement", @@ -179,42 +179,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 88 - } + "range": [ + 26, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 88 - }, + "range": [ + 0, + 88 + ], "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-with-independently-memoizable-arg.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-with-independently-memoizable-arg.js.snap index 87e7d093c6..3837f8db16 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-with-independently-memoizable-arg.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call-with-independently-memoizable-arg.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -69,10 +69,10 @@ Output: "name": "makeFunction", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "arguments": [ { @@ -80,30 +80,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 58 - } + "range": [ + 53, + 58 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 59 - } + "range": [ + 40, + 59 + ] }, "loc": null, - "range": { - "start": 36, - "end": 59 - } + "range": [ + 36, + 59 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 60 - } + "range": [ + 30, + 60 + ] }, { "type": "VariableDeclaration", @@ -116,10 +116,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "init": { "type": "CallExpression", @@ -128,10 +128,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "arguments": [ { @@ -142,18 +142,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "children": [ { @@ -161,10 +161,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 85, - "end": 92 - } + "range": [ + 85, + 92 + ] }, { "type": "JSXElement", @@ -174,18 +174,18 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 93, - "end": 97 - } + "range": [ + 93, + 97 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 92, - "end": 98 - } + "range": [ + 92, + 98 + ] }, "children": [ { @@ -197,33 +197,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 104 - } + "range": [ + 99, + 104 + ] }, "property": { "type": "Identifier", "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 109 - } + "range": [ + 105, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 99, - "end": 109 - } + "range": [ + 99, + 109 + ] }, "loc": null, - "range": { - "start": 98, - "end": 110 - } + "range": [ + 98, + 110 + ] } ], "closingElement": { @@ -232,32 +232,32 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 112, - "end": 116 - } + "range": [ + 112, + 116 + ] }, "loc": null, - "range": { - "start": 110, - "end": 117 - } + "range": [ + 110, + 117 + ] }, "loc": null, - "range": { - "start": 92, - "end": 117 - } + "range": [ + 92, + 117 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 117, - "end": 122 - } + "range": [ + 117, + 122 + ] } ], "closingElement": { @@ -266,42 +266,42 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 124, - "end": 127 - } + "range": [ + 124, + 127 + ] }, "loc": null, - "range": { - "start": 122, - "end": 128 - } + "range": [ + 122, + 128 + ] }, "loc": null, - "range": { - "start": 80, - "end": 128 - } + "range": [ + 80, + 128 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 132 - } + "range": [ + 73, + 132 + ] }, "loc": null, - "range": { - "start": 69, - "end": 132 - } + "range": [ + 69, + 132 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 133 - } + "range": [ + 63, + 133 + ] }, { "type": "ReturnStatement", @@ -310,42 +310,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, "loc": null, - "range": { - "start": 136, - "end": 145 - } + "range": [ + 136, + 145 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 147 - } + "range": [ + 26, + 147 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 147 - }, + "range": [ + 0, + 147 + ], "loc": null, - "range": { - "start": 0, - "end": 147 - } + "range": [ + 0, + 147 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 147 - } + "range": [ + 0, + 147 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call.js.snap index 42ee470647..0dbe147781 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@call.js.snap @@ -27,33 +27,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 15, - "end": 17 - } + "range": [ + 15, + 17 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 17 - }, + "range": [ + 0, + 17 + ], "loc": null, - "range": { - "start": 0, - "end": 17 - } + "range": [ + 0, + 17 + ] }, { "type": "FunctionDeclaration", @@ -62,10 +62,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 37 - } + "range": [ + 28, + 37 + ] }, "params": [ { @@ -73,10 +73,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "body": { @@ -93,32 +93,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 59, - "end": 61 - } + "range": [ + 59, + 61 + ] }, "loc": null, - "range": { - "start": 55, - "end": 61 - } + "range": [ + 55, + 61 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 62 - } + "range": [ + 49, + 62 + ] }, { "type": "VariableDeclaration", @@ -131,32 +131,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 75, - "end": 77 - } + "range": [ + 75, + 77 + ] }, "loc": null, - "range": { - "start": 71, - "end": 77 - } + "range": [ + 71, + 77 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 78 - } + "range": [ + 65, + 78 + ] }, { "type": "ExpressionStatement", @@ -167,10 +167,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "arguments": [ { @@ -178,34 +178,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 90 - } + "range": [ + 81, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 91 - } + "range": [ + 81, + 91 + ] }, { "type": "VariableDeclaration", @@ -218,10 +218,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "init": { "type": "JSXElement", @@ -231,10 +231,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 103, - "end": 106 - } + "range": [ + 103, + 106 + ] }, "attributes": [ { @@ -243,10 +243,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "value": { "type": "JSXExpressionContainer", @@ -255,51 +255,51 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "loc": null, - "range": { - "start": 109, - "end": 112 - } + "range": [ + 109, + 112 + ] }, "loc": null, - "range": { - "start": 107, - "end": 112 - } + "range": [ + 107, + 112 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 102, - "end": 115 - } + "range": [ + 102, + 115 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 102, - "end": 115 - } + "range": [ + 102, + 115 + ] }, "loc": null, - "range": { - "start": 98, - "end": 115 - } + "range": [ + 98, + 115 + ] } ], "loc": null, - "range": { - "start": 94, - "end": 116 - } + "range": [ + 94, + 116 + ] }, { "type": "ExpressionStatement", @@ -310,10 +310,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 122 - } + "range": [ + 119, + 122 + ] }, "arguments": [ { @@ -321,24 +321,24 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 124 - } + "range": [ + 123, + 124 + ] } ], "loc": null, - "range": { - "start": 119, - "end": 125 - } + "range": [ + 119, + 125 + ] }, "directive": null, "loc": null, - "range": { - "start": 119, - "end": 126 - } + "range": [ + 119, + 126 + ] }, { "type": "ReturnStatement", @@ -350,10 +350,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 137, - "end": 140 - } + "range": [ + 137, + 140 + ] }, "attributes": [ { @@ -362,10 +362,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "value": { "type": "JSXExpressionContainer", @@ -374,22 +374,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 145 - } + "range": [ + 144, + 145 + ] }, "loc": null, - "range": { - "start": 143, - "end": 146 - } + "range": [ + 143, + 146 + ] }, "loc": null, - "range": { - "start": 141, - "end": 146 - } + "range": [ + 141, + 146 + ] }, { "type": "JSXAttribute", @@ -397,10 +397,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "value": { "type": "JSXExpressionContainer", @@ -409,70 +409,70 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "loc": null, - "range": { - "start": 149, - "end": 152 - } + "range": [ + 149, + 152 + ] }, "loc": null, - "range": { - "start": 147, - "end": 152 - } + "range": [ + 147, + 152 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 136, - "end": 155 - } + "range": [ + 136, + 155 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 136, - "end": 155 - } + "range": [ + 136, + 155 + ] }, "loc": null, - "range": { - "start": 129, - "end": 156 - } + "range": [ + 129, + 156 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 158 - } + "range": [ + 45, + 158 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 19, - "end": 158 - }, + "range": [ + 19, + 158 + ], "loc": null, - "range": { - "start": 19, - "end": 158 - } + "range": [ + 19, + 158 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 158 - } + "range": [ + 0, + 158 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture-indirect-mutate-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture-indirect-mutate-alias.js.snap index 9bd5e1a1a0..0fe0c899ee 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture-indirect-mutate-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture-indirect-mutate-alias.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -59,10 +59,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -74,50 +74,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "ExpressionStatement", @@ -141,33 +141,33 @@ Output: "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 72 - } + "range": [ + 62, + 72 + ] }, { "type": "ExpressionStatement", @@ -192,117 +192,117 @@ Output: "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "computed": false, "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "loc": null, - "range": { - "start": 98, - "end": 105 - } + "range": [ + 98, + 105 + ] }, "directive": null, "loc": null, - "range": { - "start": 98, - "end": 106 - } + "range": [ + 98, + 106 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 112 - } + "range": [ + 90, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 78, - "end": 112 - }, + "range": [ + 78, + 112 + ], "loc": null, - "range": { - "start": 78, - "end": 112 - } + "range": [ + 78, + 112 + ] }, "arguments": [], "loc": null, - "range": { - "start": 77, - "end": 115 - } + "range": [ + 77, + 115 + ] }, "directive": null, "loc": null, - "range": { - "start": 77, - "end": 116 - } + "range": [ + 77, + 116 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 120 - } + "range": [ + 56, + 120 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 44, - "end": 120 - }, + "range": [ + 44, + 120 + ], "loc": null, - "range": { - "start": 44, - "end": 120 - } + "range": [ + 44, + 120 + ] }, "arguments": [], "loc": null, - "range": { - "start": 43, - "end": 123 - } + "range": [ + 43, + 123 + ] }, "directive": null, "loc": null, - "range": { - "start": 43, - "end": 124 - } + "range": [ + 43, + 124 + ] }, { "type": "ReturnStatement", @@ -311,42 +311,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "loc": null, - "range": { - "start": 128, - "end": 137 - } + "range": [ + 128, + 137 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 139 - } + "range": [ + 22, + 139 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 139 - }, + "range": [ + 0, + 139 + ], "loc": null, - "range": { - "start": 0, - "end": 139 - } + "range": [ + 0, + 139 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 139 - } + "range": [ + 0, + 139 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture-param-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture-param-mutate.js.snap index 59ff32b3d6..b27ad22a70 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture-param-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture-param-mutate.js.snap @@ -54,10 +54,10 @@ Output: "name": "getNativeLogFunction", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 29 - } + "range": [ + 9, + 29 + ] }, "params": [ { @@ -65,10 +65,10 @@ Output: "name": "level", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] } ], "body": { @@ -94,24 +94,24 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "init": null, "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 74 - } + "range": [ + 66, + 74 + ] }, { "type": "IfStatement", @@ -127,43 +127,43 @@ Output: "name": "arguments", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 92 - } + "range": [ + 83, + 92 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "computed": false, "loc": null, - "range": { - "start": 83, - "end": 99 - } + "range": [ + 83, + 99 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "loc": null, - "range": { - "start": 83, - "end": 105 - } + "range": [ + 83, + 105 + ] }, "right": { "type": "BinaryExpression", @@ -178,54 +178,54 @@ Output: "name": "arguments", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 125 - } + "range": [ + 116, + 125 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "computed": true, "loc": null, - "range": { - "start": 116, - "end": 128 - } + "range": [ + 116, + 128 + ] }, "loc": null, - "range": { - "start": 109, - "end": 128 - } + "range": [ + 109, + 128 + ] }, "operator": "===", "right": { "type": "StringLiteral", "value": "string", "loc": null, - "range": { - "start": 133, - "end": 141 - } + "range": [ + 133, + 141 + ] }, "loc": null, - "range": { - "start": 109, - "end": 141 - } + "range": [ + 109, + 141 + ] }, "loc": null, - "range": { - "start": 83, - "end": 141 - } + "range": [ + 83, + 141 + ] }, "consequent": { "type": "BlockStatement", @@ -240,10 +240,10 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 154 - } + "range": [ + 151, + 154 + ] }, "right": { "type": "MemberExpression", @@ -252,46 +252,46 @@ Output: "name": "arguments", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 166 - } + "range": [ + 157, + 166 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 167, - "end": 168 - } + "range": [ + 167, + 168 + ] }, "computed": true, "loc": null, - "range": { - "start": 157, - "end": 169 - } + "range": [ + 157, + 169 + ] }, "loc": null, - "range": { - "start": 151, - "end": 169 - } + "range": [ + 151, + 169 + ] }, "directive": null, "loc": null, - "range": { - "start": 151, - "end": 170 - } + "range": [ + 151, + 170 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 176 - } + "range": [ + 143, + 176 + ] }, "alternate": { "type": "BlockStatement", @@ -306,10 +306,10 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 193 - } + "range": [ + 190, + 193 + ] }, "right": { "type": "CallExpression", @@ -328,61 +328,61 @@ Output: "name": "Array", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 201 - } + "range": [ + 196, + 201 + ] }, "property": { "type": "Identifier", "name": "prototype", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 211 - } + "range": [ + 202, + 211 + ] }, "computed": false, "loc": null, - "range": { - "start": 196, - "end": 211 - } + "range": [ + 196, + 211 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 215 - } + "range": [ + 212, + 215 + ] }, "computed": false, "loc": null, - "range": { - "start": 196, - "end": 215 - } + "range": [ + 196, + 215 + ] }, "property": { "type": "Identifier", "name": "call", "typeAnnotation": null, "loc": null, - "range": { - "start": 225, - "end": 229 - } + "range": [ + 225, + 229 + ] }, "computed": false, "loc": null, - "range": { - "start": 196, - "end": 229 - } + "range": [ + 196, + 229 + ] }, "arguments": [ { @@ -390,10 +390,10 @@ Output: "name": "arguments", "typeAnnotation": null, "loc": null, - "range": { - "start": 230, - "end": 239 - } + "range": [ + 230, + 239 + ] }, { "type": "FunctionExpression", @@ -404,10 +404,10 @@ Output: "name": "arg", "typeAnnotation": null, "loc": null, - "range": { - "start": 251, - "end": 254 - } + "range": [ + 251, + 254 + ] } ], "body": { @@ -422,10 +422,10 @@ Output: "name": "inspect", "typeAnnotation": null, "loc": null, - "range": { - "start": 275, - "end": 282 - } + "range": [ + 275, + 282 + ] }, "arguments": [ { @@ -433,10 +433,10 @@ Output: "name": "arg", "typeAnnotation": null, "loc": null, - "range": { - "start": 283, - "end": 286 - } + "range": [ + 283, + 286 + ] }, { "type": "ObjectExpression", @@ -448,136 +448,136 @@ Output: "name": "depth", "typeAnnotation": null, "loc": null, - "range": { - "start": 302, - "end": 307 - } + "range": [ + 302, + 307 + ] }, "value": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 309, - "end": 311 - } + "range": [ + 309, + 311 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 302, - "end": 311 - } + "range": [ + 302, + 311 + ] } ], "loc": null, - "range": { - "start": 288, - "end": 324 - } + "range": [ + 288, + 324 + ] } ], "loc": null, - "range": { - "start": 275, - "end": 325 - } + "range": [ + 275, + 325 + ] }, "loc": null, - "range": { - "start": 268, - "end": 326 - } + "range": [ + 268, + 326 + ] } ], "loc": null, - "range": { - "start": 256, - "end": 336 - } + "range": [ + 256, + 336 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 241, - "end": 336 - }, + "range": [ + 241, + 336 + ], "loc": null, - "range": { - "start": 241, - "end": 336 - } + "range": [ + 241, + 336 + ] } ], "loc": null, - "range": { - "start": 196, - "end": 337 - } + "range": [ + 196, + 337 + ] }, "property": { "type": "Identifier", "name": "join", "typeAnnotation": null, "loc": null, - "range": { - "start": 347, - "end": 351 - } + "range": [ + 347, + 351 + ] }, "computed": false, "loc": null, - "range": { - "start": 196, - "end": 351 - } + "range": [ + 196, + 351 + ] }, "arguments": [ { "type": "StringLiteral", "value": ", ", "loc": null, - "range": { - "start": 352, - "end": 356 - } + "range": [ + 352, + 356 + ] } ], "loc": null, - "range": { - "start": 196, - "end": 357 - } + "range": [ + 196, + 357 + ] }, "loc": null, - "range": { - "start": 190, - "end": 357 - } + "range": [ + 190, + 357 + ] }, "directive": null, "loc": null, - "range": { - "start": 190, - "end": 358 - } + "range": [ + 190, + 358 + ] } ], "loc": null, - "range": { - "start": 182, - "end": 364 - } + "range": [ + 182, + 364 + ] }, "loc": null, - "range": { - "start": 79, - "end": 364 - } + "range": [ + 79, + 364 + ] }, { "type": "VariableDeclaration", @@ -590,10 +590,10 @@ Output: "name": "firstArg", "typeAnnotation": null, "loc": null, - "range": { - "start": 375, - "end": 383 - } + "range": [ + 375, + 383 + ] }, "init": { "type": "MemberExpression", @@ -602,39 +602,39 @@ Output: "name": "arguments", "typeAnnotation": null, "loc": null, - "range": { - "start": 386, - "end": 395 - } + "range": [ + 386, + 395 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 396, - "end": 397 - } + "range": [ + 396, + 397 + ] }, "computed": true, "loc": null, - "range": { - "start": 386, - "end": 398 - } + "range": [ + 386, + 398 + ] }, "loc": null, - "range": { - "start": 375, - "end": 398 - } + "range": [ + 375, + 398 + ] } ], "loc": null, - "range": { - "start": 369, - "end": 399 - } + "range": [ + 369, + 399 + ] }, { "type": "VariableDeclaration", @@ -647,33 +647,33 @@ Output: "name": "logLevel", "typeAnnotation": null, "loc": null, - "range": { - "start": 408, - "end": 416 - } + "range": [ + 408, + 416 + ] }, "init": { "type": "Identifier", "name": "level", "typeAnnotation": null, "loc": null, - "range": { - "start": 419, - "end": 424 - } + "range": [ + 419, + 424 + ] }, "loc": null, - "range": { - "start": 408, - "end": 424 - } + "range": [ + 408, + 424 + ] } ], "loc": null, - "range": { - "start": 404, - "end": 425 - } + "range": [ + 404, + 425 + ] }, { "type": "IfStatement", @@ -694,32 +694,32 @@ Output: "name": "firstArg", "typeAnnotation": null, "loc": null, - "range": { - "start": 448, - "end": 456 - } + "range": [ + 448, + 456 + ] }, "loc": null, - "range": { - "start": 441, - "end": 456 - } + "range": [ + 441, + 456 + ] }, "operator": "===", "right": { "type": "StringLiteral", "value": "string", "loc": null, - "range": { - "start": 461, - "end": 469 - } + "range": [ + 461, + 469 + ] }, "loc": null, - "range": { - "start": 441, - "end": 469 - } + "range": [ + 441, + 469 + ] }, "right": { "type": "BinaryExpression", @@ -732,75 +732,75 @@ Output: "name": "firstArg", "typeAnnotation": null, "loc": null, - "range": { - "start": 479, - "end": 487 - } + "range": [ + 479, + 487 + ] }, "property": { "type": "Identifier", "name": "slice", "typeAnnotation": null, "loc": null, - "range": { - "start": 488, - "end": 493 - } + "range": [ + 488, + 493 + ] }, "computed": false, "loc": null, - "range": { - "start": 479, - "end": 493 - } + "range": [ + 479, + 493 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 494, - "end": 495 - } + "range": [ + 494, + 495 + ] }, { "type": "NumericLiteral", "value": 9.0, "loc": null, - "range": { - "start": 497, - "end": 498 - } + "range": [ + 497, + 498 + ] } ], "loc": null, - "range": { - "start": 479, - "end": 499 - } + "range": [ + 479, + 499 + ] }, "operator": "===", "right": { "type": "StringLiteral", "value": "Warning: ", "loc": null, - "range": { - "start": 504, - "end": 515 - } + "range": [ + 504, + 515 + ] }, "loc": null, - "range": { - "start": 479, - "end": 515 - } + "range": [ + 479, + 515 + ] }, "loc": null, - "range": { - "start": 441, - "end": 515 - } + "range": [ + 441, + 515 + ] }, "right": { "type": "BinaryExpression", @@ -809,10 +809,10 @@ Output: "name": "logLevel", "typeAnnotation": null, "loc": null, - "range": { - "start": 525, - "end": 533 - } + "range": [ + 525, + 533 + ] }, "operator": ">=", "right": { @@ -822,39 +822,39 @@ Output: "name": "LOG_LEVELS", "typeAnnotation": null, "loc": null, - "range": { - "start": 537, - "end": 547 - } + "range": [ + 537, + 547 + ] }, "property": { "type": "Identifier", "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 548, - "end": 553 - } + "range": [ + 548, + 553 + ] }, "computed": false, "loc": null, - "range": { - "start": 537, - "end": 553 - } + "range": [ + 537, + 553 + ] }, "loc": null, - "range": { - "start": 525, - "end": 553 - } + "range": [ + 525, + 553 + ] }, "loc": null, - "range": { - "start": 441, - "end": 553 - } + "range": [ + 441, + 553 + ] }, "consequent": { "type": "BlockStatement", @@ -869,10 +869,10 @@ Output: "name": "logLevel", "typeAnnotation": null, "loc": null, - "range": { - "start": 568, - "end": 576 - } + "range": [ + 568, + 576 + ] }, "right": { "type": "MemberExpression", @@ -881,54 +881,54 @@ Output: "name": "LOG_LEVELS", "typeAnnotation": null, "loc": null, - "range": { - "start": 579, - "end": 589 - } + "range": [ + 579, + 589 + ] }, "property": { "type": "Identifier", "name": "warn", "typeAnnotation": null, "loc": null, - "range": { - "start": 590, - "end": 594 - } + "range": [ + 590, + 594 + ] }, "computed": false, "loc": null, - "range": { - "start": 579, - "end": 594 - } + "range": [ + 579, + 594 + ] }, "loc": null, - "range": { - "start": 568, - "end": 594 - } + "range": [ + 568, + 594 + ] }, "directive": null, "loc": null, - "range": { - "start": 568, - "end": 595 - } + "range": [ + 568, + 595 + ] } ], "loc": null, - "range": { - "start": 560, - "end": 601 - } + "range": [ + 560, + 601 + ] }, "alternate": null, "loc": null, - "range": { - "start": 430, - "end": 601 - } + "range": [ + 430, + 601 + ] }, { "type": "IfStatement", @@ -939,27 +939,27 @@ Output: "name": "global", "typeAnnotation": null, "loc": null, - "range": { - "start": 610, - "end": 616 - } + "range": [ + 610, + 616 + ] }, "property": { "type": "Identifier", "name": "__inspectorLog", "typeAnnotation": null, "loc": null, - "range": { - "start": 617, - "end": 631 - } + "range": [ + 617, + 631 + ] }, "computed": false, "loc": null, - "range": { - "start": 610, - "end": 631 - } + "range": [ + 610, + 631 + ] }, "consequent": { "type": "BlockStatement", @@ -975,27 +975,27 @@ Output: "name": "global", "typeAnnotation": null, "loc": null, - "range": { - "start": 641, - "end": 647 - } + "range": [ + 641, + 647 + ] }, "property": { "type": "Identifier", "name": "__inspectorLog", "typeAnnotation": null, "loc": null, - "range": { - "start": 648, - "end": 662 - } + "range": [ + 648, + 662 + ] }, "computed": false, "loc": null, - "range": { - "start": 641, - "end": 662 - } + "range": [ + 641, + 662 + ] }, "arguments": [ { @@ -1005,37 +1005,37 @@ Output: "name": "INSPECTOR_LEVELS", "typeAnnotation": null, "loc": null, - "range": { - "start": 672, - "end": 688 - } + "range": [ + 672, + 688 + ] }, "property": { "type": "Identifier", "name": "logLevel", "typeAnnotation": null, "loc": null, - "range": { - "start": 689, - "end": 697 - } + "range": [ + 689, + 697 + ] }, "computed": true, "loc": null, - "range": { - "start": 672, - "end": 698 - } + "range": [ + 672, + 698 + ] }, { "type": "Identifier", "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 708, - "end": 711 - } + "range": [ + 708, + 711 + ] }, { "type": "CallExpression", @@ -1047,44 +1047,44 @@ Output: "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 721, - "end": 723 - } + "range": [ + 721, + 723 + ] }, "property": { "type": "Identifier", "name": "slice", "typeAnnotation": null, "loc": null, - "range": { - "start": 724, - "end": 729 - } + "range": [ + 724, + 729 + ] }, "computed": false, "loc": null, - "range": { - "start": 721, - "end": 729 - } + "range": [ + 721, + 729 + ] }, "property": { "type": "Identifier", "name": "call", "typeAnnotation": null, "loc": null, - "range": { - "start": 730, - "end": 734 - } + "range": [ + 730, + 734 + ] }, "computed": false, "loc": null, - "range": { - "start": 721, - "end": 734 - } + "range": [ + 721, + 734 + ] }, "arguments": [ { @@ -1092,55 +1092,55 @@ Output: "name": "arguments", "typeAnnotation": null, "loc": null, - "range": { - "start": 735, - "end": 744 - } + "range": [ + 735, + 744 + ] } ], "loc": null, - "range": { - "start": 721, - "end": 745 - } + "range": [ + 721, + 745 + ] }, { "type": "Identifier", "name": "INSPECTOR_FRAMES_TO_SKIP", "typeAnnotation": null, "loc": null, - "range": { - "start": 755, - "end": 779 - } + "range": [ + 755, + 779 + ] } ], "loc": null, - "range": { - "start": 641, - "end": 787 - } + "range": [ + 641, + 787 + ] }, "directive": null, "loc": null, - "range": { - "start": 641, - "end": 788 - } + "range": [ + 641, + 788 + ] } ], "loc": null, - "range": { - "start": 633, - "end": 794 - } + "range": [ + 633, + 794 + ] }, "alternate": null, "loc": null, - "range": { - "start": 606, - "end": 794 - } + "range": [ + 606, + 794 + ] }, { "type": "IfStatement", @@ -1151,27 +1151,27 @@ Output: "name": "groupStack", "typeAnnotation": null, "loc": null, - "range": { - "start": 803, - "end": 813 - } + "range": [ + 803, + 813 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 814, - "end": 820 - } + "range": [ + 814, + 820 + ] }, "computed": false, "loc": null, - "range": { - "start": 803, - "end": 820 - } + "range": [ + 803, + 820 + ] }, "consequent": { "type": "BlockStatement", @@ -1186,10 +1186,10 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 830, - "end": 833 - } + "range": [ + 830, + 833 + ] }, "right": { "type": "CallExpression", @@ -1198,64 +1198,64 @@ Output: "name": "groupFormat", "typeAnnotation": null, "loc": null, - "range": { - "start": 836, - "end": 847 - } + "range": [ + 836, + 847 + ] }, "arguments": [ { "type": "StringLiteral", "value": "", "loc": null, - "range": { - "start": 848, - "end": 850 - } + "range": [ + 848, + 850 + ] }, { "type": "Identifier", "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 852, - "end": 855 - } + "range": [ + 852, + 855 + ] } ], "loc": null, - "range": { - "start": 836, - "end": 856 - } + "range": [ + 836, + 856 + ] }, "loc": null, - "range": { - "start": 830, - "end": 856 - } + "range": [ + 830, + 856 + ] }, "directive": null, "loc": null, - "range": { - "start": 830, - "end": 857 - } + "range": [ + 830, + 857 + ] } ], "loc": null, - "range": { - "start": 822, - "end": 863 - } + "range": [ + 822, + 863 + ] }, "alternate": null, "loc": null, - "range": { - "start": 799, - "end": 863 - } + "range": [ + 799, + 863 + ] }, { "type": "ExpressionStatement", @@ -1268,27 +1268,27 @@ Output: "name": "global", "typeAnnotation": null, "loc": null, - "range": { - "start": 868, - "end": 874 - } + "range": [ + 868, + 874 + ] }, "property": { "type": "Identifier", "name": "nativeLoggingHook", "typeAnnotation": null, "loc": null, - "range": { - "start": 875, - "end": 892 - } + "range": [ + 875, + 892 + ] }, "computed": false, "loc": null, - "range": { - "start": 868, - "end": 892 - } + "range": [ + 868, + 892 + ] }, "arguments": [ { @@ -1296,86 +1296,86 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 893, - "end": 896 - } + "range": [ + 893, + 896 + ] }, { "type": "Identifier", "name": "logLevel", "typeAnnotation": null, "loc": null, - "range": { - "start": 898, - "end": 906 - } + "range": [ + 898, + 906 + ] } ], "loc": null, - "range": { - "start": 868, - "end": 907 - } + "range": [ + 868, + 907 + ] }, "directive": null, "loc": null, - "range": { - "start": 868, - "end": 908 - } + "range": [ + 868, + 908 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 912 - } + "range": [ + 60, + 912 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 912 - }, + "range": [ + 48, + 912 + ], "loc": null, - "range": { - "start": 48, - "end": 912 - } + "range": [ + 48, + 912 + ] }, "loc": null, - "range": { - "start": 41, - "end": 913 - } + "range": [ + 41, + 913 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 915 - } + "range": [ + 37, + 915 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 915 - }, + "range": [ + 0, + 915 + ], "loc": null, - "range": { - "start": 0, - "end": 915 - } + "range": [ + 0, + 915 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 915 - } + "range": [ + 0, + 915 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture_mutate-across-fns.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture_mutate-across-fns.js.snap index 6162792f9d..81dcc29ad4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture_mutate-across-fns.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capture_mutate-across-fns.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -72,50 +72,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "ExpressionStatement", @@ -151,117 +151,117 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 83, - "end": 86 - } + "range": [ + 83, + 86 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "loc": null, - "range": { - "start": 83, - "end": 90 - } + "range": [ + 83, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 83, - "end": 91 - } + "range": [ + 83, + 91 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 97 - } + "range": [ + 75, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 63, - "end": 97 - }, + "range": [ + 63, + 97 + ], "loc": null, - "range": { - "start": 63, - "end": 97 - } + "range": [ + 63, + 97 + ] }, "arguments": [], "loc": null, - "range": { - "start": 62, - "end": 100 - } + "range": [ + 62, + 100 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 101 - } + "range": [ + 62, + 101 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 105 - } + "range": [ + 56, + 105 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 44, - "end": 105 - }, + "range": [ + 44, + 105 + ], "loc": null, - "range": { - "start": 44, - "end": 105 - } + "range": [ + 44, + 105 + ] }, "arguments": [], "loc": null, - "range": { - "start": 43, - "end": 108 - } + "range": [ + 43, + 108 + ] }, "directive": null, "loc": null, - "range": { - "start": 43, - "end": 109 - } + "range": [ + 43, + 109 + ] }, { "type": "ReturnStatement", @@ -270,42 +270,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "loc": null, - "range": { - "start": 112, - "end": 121 - } + "range": [ + 112, + 121 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 123 - } + "range": [ + 22, + 123 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 123 - }, + "range": [ + 0, + 123 + ], "loc": null, - "range": { - "start": 0, - "end": 123 - } + "range": [ + 0, + 123 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 123 - } + "range": [ + 0, + 123 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-arrow-function-1.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-arrow-function-1.js.snap index eac4cfeed5..042efeccbe 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-arrow-function-1.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-arrow-function-1.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -70,50 +70,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -126,10 +126,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -149,27 +149,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 70 - } + "range": [ + 63, + 70 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 74 - } + "range": [ + 71, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 74 - } + "range": [ + 63, + 74 + ] }, "arguments": [ { @@ -177,58 +177,58 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 77 - } + "range": [ + 63, + 77 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 78 - } + "range": [ + 63, + 78 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 82 - } + "range": [ + 57, + 82 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 51, - "end": 82 - }, + "range": [ + 51, + 82 + ], "expression": false, "loc": null, - "range": { - "start": 51, - "end": 82 - } + "range": [ + 51, + 82 + ] }, "loc": null, - "range": { - "start": 47, - "end": 82 - } + "range": [ + 47, + 82 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 83 - } + "range": [ + 43, + 83 + ] }, { "type": "ReturnStatement", @@ -237,42 +237,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 97 - } + "range": [ + 22, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 97 - }, + "range": [ + 0, + 97 + ], "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-fun-alias-captured-mutate-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-fun-alias-captured-mutate-2.js.snap index c8649f5a3d..979d2f7484 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-fun-alias-captured-mutate-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-fun-alias-captured-mutate-2.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 22 - } + "range": [ + 19, + 22 + ] }, { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 27 - } + "range": [ + 24, + 27 + ] } ], "body": { @@ -69,10 +69,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "init": { "type": "ObjectExpression", @@ -84,50 +84,50 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "value": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] }, "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 49 - } + "range": [ + 33, + 49 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "init": { "type": "ObjectExpression", @@ -155,50 +155,50 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "value": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 67 - } + "range": [ + 60, + 67 + ] }, "loc": null, - "range": { - "start": 56, - "end": 67 - } + "range": [ + 56, + 67 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 68 - } + "range": [ + 52, + 68 + ] }, { "type": "ExpressionStatement", @@ -222,10 +222,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "ObjectExpression", @@ -237,50 +237,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 103 - } + "range": [ + 98, + 103 + ] }, "loc": null, - "range": { - "start": 94, - "end": 103 - } + "range": [ + 94, + 103 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 104 - } + "range": [ + 90, + 104 + ] }, { "type": "VariableDeclaration", @@ -293,33 +293,33 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "loc": null, - "range": { - "start": 113, - "end": 118 - } + "range": [ + 113, + 118 + ] } ], "loc": null, - "range": { - "start": 109, - "end": 119 - } + "range": [ + 109, + 119 + ] }, { "type": "ExpressionStatement", @@ -333,84 +333,84 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "computed": false, "loc": null, - "range": { - "start": 124, - "end": 127 - } + "range": [ + 124, + 127 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "loc": null, - "range": { - "start": 124, - "end": 131 - } + "range": [ + 124, + 131 + ] }, "directive": null, "loc": null, - "range": { - "start": 124, - "end": 132 - } + "range": [ + 124, + 132 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 136 - } + "range": [ + 84, + 136 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 72, - "end": 136 - }, + "range": [ + 72, + 136 + ], "loc": null, - "range": { - "start": 72, - "end": 136 - } + "range": [ + 72, + 136 + ] }, "arguments": [], "loc": null, - "range": { - "start": 71, - "end": 139 - } + "range": [ + 71, + 139 + ] }, "directive": null, "loc": null, - "range": { - "start": 71, - "end": 140 - } + "range": [ + 71, + 140 + ] }, { "type": "ExpressionStatement", @@ -421,10 +421,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 149 - } + "range": [ + 143, + 149 + ] }, "arguments": [ { @@ -432,24 +432,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 152 - } + "range": [ + 143, + 152 + ] }, "directive": null, "loc": null, - "range": { - "start": 143, - "end": 153 - } + "range": [ + 143, + 153 + ] }, { "type": "ReturnStatement", @@ -458,42 +458,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 164 - } + "range": [ + 163, + 164 + ] }, "loc": null, - "range": { - "start": 156, - "end": 165 - } + "range": [ + 156, + 165 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 167 - } + "range": [ + 29, + 167 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 167 - }, + "range": [ + 0, + 167 + ], "loc": null, - "range": { - "start": 0, - "end": 167 - } + "range": [ + 0, + 167 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 167 - } + "range": [ + 0, + 167 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-fun-alias-captured-mutate-arr-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-fun-alias-captured-mutate-arr-2.js.snap index 84005b89d1..197b3650e0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-fun-alias-captured-mutate-arr-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-fun-alias-captured-mutate-arr-2.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 22 - } + "range": [ + 19, + 22 + ] }, { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 27 - } + "range": [ + 24, + 27 + ] } ], "body": { @@ -69,10 +69,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "init": { "type": "ObjectExpression", @@ -84,50 +84,50 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "value": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] }, "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 49 - } + "range": [ + 33, + 49 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "init": { "type": "ObjectExpression", @@ -155,50 +155,50 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "value": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 67 - } + "range": [ + 60, + 67 + ] }, "loc": null, - "range": { - "start": 56, - "end": 67 - } + "range": [ + 56, + 67 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 68 - } + "range": [ + 52, + 68 + ] }, { "type": "ExpressionStatement", @@ -222,10 +222,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "ArrayExpression", @@ -235,30 +235,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "loc": null, - "range": { - "start": 94, - "end": 101 - } + "range": [ + 94, + 101 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 102 - } + "range": [ + 90, + 102 + ] }, { "type": "VariableDeclaration", @@ -271,33 +271,33 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] } ], "loc": null, - "range": { - "start": 107, - "end": 117 - } + "range": [ + 107, + 117 + ] }, { "type": "ExpressionStatement", @@ -311,84 +311,84 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "computed": false, "loc": null, - "range": { - "start": 122, - "end": 125 - } + "range": [ + 122, + 125 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "loc": null, - "range": { - "start": 122, - "end": 129 - } + "range": [ + 122, + 129 + ] }, "directive": null, "loc": null, - "range": { - "start": 122, - "end": 130 - } + "range": [ + 122, + 130 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 134 - } + "range": [ + 84, + 134 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 72, - "end": 134 - }, + "range": [ + 72, + 134 + ], "loc": null, - "range": { - "start": 72, - "end": 134 - } + "range": [ + 72, + 134 + ] }, "arguments": [], "loc": null, - "range": { - "start": 71, - "end": 137 - } + "range": [ + 71, + 137 + ] }, "directive": null, "loc": null, - "range": { - "start": 71, - "end": 138 - } + "range": [ + 71, + 138 + ] }, { "type": "ExpressionStatement", @@ -399,10 +399,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 147 - } + "range": [ + 141, + 147 + ] }, "arguments": [ { @@ -410,24 +410,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 149 - } + "range": [ + 148, + 149 + ] } ], "loc": null, - "range": { - "start": 141, - "end": 150 - } + "range": [ + 141, + 150 + ] }, "directive": null, "loc": null, - "range": { - "start": 141, - "end": 151 - } + "range": [ + 141, + 151 + ] }, { "type": "ReturnStatement", @@ -436,42 +436,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "loc": null, - "range": { - "start": 154, - "end": 163 - } + "range": [ + 154, + 163 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 165 - } + "range": [ + 29, + 165 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 165 - }, + "range": [ + 0, + 165 + ], "loc": null, - "range": { - "start": 0, - "end": 165 - } + "range": [ + 0, + 165 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 165 - } + "range": [ + 0, + 165 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-captured-mutate-arr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-captured-mutate-arr.js.snap index 9e391489fd..ae1bd89254 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-captured-mutate-arr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-captured-mutate-arr.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 22 - } + "range": [ + 19, + 22 + ] }, { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 27 - } + "range": [ + 24, + 27 + ] } ], "body": { @@ -69,10 +69,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "init": { "type": "ObjectExpression", @@ -84,50 +84,50 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "value": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] }, "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 49 - } + "range": [ + 33, + 49 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "init": { "type": "ObjectExpression", @@ -155,50 +155,50 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "value": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 67 - } + "range": [ + 60, + 67 + ] }, "loc": null, - "range": { - "start": 56, - "end": 67 - } + "range": [ + 56, + 67 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 68 - } + "range": [ + 52, + 68 + ] }, { "type": "ExpressionStatement", @@ -222,10 +222,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "ArrayExpression", @@ -235,30 +235,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "loc": null, - "range": { - "start": 94, - "end": 101 - } + "range": [ + 94, + 101 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 102 - } + "range": [ + 90, + 102 + ] }, { "type": "VariableDeclaration", @@ -271,33 +271,33 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] } ], "loc": null, - "range": { - "start": 107, - "end": 117 - } + "range": [ + 107, + 117 + ] }, { "type": "ExpressionStatement", @@ -311,84 +311,84 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "computed": false, "loc": null, - "range": { - "start": 122, - "end": 125 - } + "range": [ + 122, + 125 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "loc": null, - "range": { - "start": 122, - "end": 129 - } + "range": [ + 122, + 129 + ] }, "directive": null, "loc": null, - "range": { - "start": 122, - "end": 130 - } + "range": [ + 122, + 130 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 134 - } + "range": [ + 84, + 134 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 72, - "end": 134 - }, + "range": [ + 72, + 134 + ], "loc": null, - "range": { - "start": 72, - "end": 134 - } + "range": [ + 72, + 134 + ] }, "arguments": [], "loc": null, - "range": { - "start": 71, - "end": 137 - } + "range": [ + 71, + 137 + ] }, "directive": null, "loc": null, - "range": { - "start": 71, - "end": 138 - } + "range": [ + 71, + 138 + ] }, { "type": "ExpressionStatement", @@ -399,10 +399,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 147 - } + "range": [ + 141, + 147 + ] }, "arguments": [ { @@ -410,24 +410,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 149 - } + "range": [ + 148, + 149 + ] } ], "loc": null, - "range": { - "start": 141, - "end": 150 - } + "range": [ + 141, + 150 + ] }, "directive": null, "loc": null, - "range": { - "start": 141, - "end": 151 - } + "range": [ + 141, + 151 + ] }, { "type": "ReturnStatement", @@ -436,42 +436,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "loc": null, - "range": { - "start": 154, - "end": 163 - } + "range": [ + 154, + 163 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 165 - } + "range": [ + 29, + 165 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 165 - }, + "range": [ + 0, + 165 + ], "loc": null, - "range": { - "start": 0, - "end": 165 - } + "range": [ + 0, + 165 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 165 - } + "range": [ + 0, + 165 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-captured-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-captured-mutate.js.snap index 3be6cbc4c4..e1f1af4b8d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-captured-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-captured-mutate.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 22 - } + "range": [ + 19, + 22 + ] }, { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 27 - } + "range": [ + 24, + 27 + ] } ], "body": { @@ -69,10 +69,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "init": { "type": "ObjectExpression", @@ -84,50 +84,50 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "value": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] }, "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 49 - } + "range": [ + 33, + 49 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "init": { "type": "ObjectExpression", @@ -155,50 +155,50 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "value": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 67 - } + "range": [ + 60, + 67 + ] }, "loc": null, - "range": { - "start": 56, - "end": 67 - } + "range": [ + 56, + 67 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 68 - } + "range": [ + 52, + 68 + ] }, { "type": "ExpressionStatement", @@ -222,10 +222,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "ObjectExpression", @@ -237,50 +237,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 103 - } + "range": [ + 98, + 103 + ] }, "loc": null, - "range": { - "start": 94, - "end": 103 - } + "range": [ + 94, + 103 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 104 - } + "range": [ + 90, + 104 + ] }, { "type": "VariableDeclaration", @@ -293,33 +293,33 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "loc": null, - "range": { - "start": 113, - "end": 118 - } + "range": [ + 113, + 118 + ] } ], "loc": null, - "range": { - "start": 109, - "end": 119 - } + "range": [ + 109, + 119 + ] }, { "type": "ExpressionStatement", @@ -333,84 +333,84 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "computed": false, "loc": null, - "range": { - "start": 124, - "end": 127 - } + "range": [ + 124, + 127 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "loc": null, - "range": { - "start": 124, - "end": 131 - } + "range": [ + 124, + 131 + ] }, "directive": null, "loc": null, - "range": { - "start": 124, - "end": 132 - } + "range": [ + 124, + 132 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 136 - } + "range": [ + 84, + 136 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 72, - "end": 136 - }, + "range": [ + 72, + 136 + ], "loc": null, - "range": { - "start": 72, - "end": 136 - } + "range": [ + 72, + 136 + ] }, "arguments": [], "loc": null, - "range": { - "start": 71, - "end": 139 - } + "range": [ + 71, + 139 + ] }, "directive": null, "loc": null, - "range": { - "start": 71, - "end": 140 - } + "range": [ + 71, + 140 + ] }, { "type": "ExpressionStatement", @@ -421,10 +421,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 149 - } + "range": [ + 143, + 149 + ] }, "arguments": [ { @@ -432,24 +432,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 152 - } + "range": [ + 143, + 152 + ] }, "directive": null, "loc": null, - "range": { - "start": 143, - "end": 153 - } + "range": [ + 143, + 153 + ] }, { "type": "ReturnStatement", @@ -458,42 +458,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 164 - } + "range": [ + 163, + 164 + ] }, "loc": null, - "range": { - "start": 156, - "end": 165 - } + "range": [ + 156, + 165 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 167 - } + "range": [ + 29, + 167 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 167 - }, + "range": [ + 0, + 167 + ], "loc": null, - "range": { - "start": 0, - "end": 167 - } + "range": [ + 0, + 167 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 167 - } + "range": [ + 0, + 167 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-computed-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-computed-mutate.js.snap index cca2addf48..b847b7e4fd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-computed-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-computed-mutate.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -72,50 +72,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -128,32 +128,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 51, - "end": 53 - } + "range": [ + 51, + 53 + ] }, "loc": null, - "range": { - "start": 47, - "end": 53 - } + "range": [ + 47, + 53 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, { "type": "ExpressionStatement", @@ -178,83 +178,83 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "property": { "type": "StringLiteral", "value": "x", "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "computed": true, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 87 - } + "range": [ + 76, + 87 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 91 - } + "range": [ + 70, + 91 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 91 - }, + "range": [ + 58, + 91 + ], "loc": null, - "range": { - "start": 58, - "end": 91 - } + "range": [ + 58, + 91 + ] }, "arguments": [], "loc": null, - "range": { - "start": 57, - "end": 94 - } + "range": [ + 57, + 94 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 95 - } + "range": [ + 57, + 95 + ] }, { "type": "ExpressionStatement", @@ -265,10 +265,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 104 - } + "range": [ + 98, + 104 + ] }, "arguments": [ { @@ -276,24 +276,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 107 - } + "range": [ + 98, + 107 + ] }, "directive": null, "loc": null, - "range": { - "start": 98, - "end": 108 - } + "range": [ + 98, + 108 + ] }, { "type": "ReturnStatement", @@ -302,42 +302,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "loc": null, - "range": { - "start": 111, - "end": 120 - } + "range": [ + 111, + 120 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 122 - } + "range": [ + 22, + 122 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 122 - }, + "range": [ + 0, + 122 + ], "loc": null, - "range": { - "start": 0, - "end": 122 - } + "range": [ + 0, + 122 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 122 - } + "range": [ + 0, + 122 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-mutate.js.snap index 2dcbc14f9b..41973c8622 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-mutate.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -72,50 +72,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -128,32 +128,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 51, - "end": 53 - } + "range": [ + 51, + 53 + ] }, "loc": null, - "range": { - "start": 47, - "end": 53 - } + "range": [ + 47, + 53 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, { "type": "ExpressionStatement", @@ -178,84 +178,84 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "loc": null, - "range": { - "start": 76, - "end": 83 - } + "range": [ + 76, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 84 - } + "range": [ + 76, + 84 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 88 - } + "range": [ + 70, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 88 - }, + "range": [ + 58, + 88 + ], "loc": null, - "range": { - "start": 58, - "end": 88 - } + "range": [ + 58, + 88 + ] }, "arguments": [], "loc": null, - "range": { - "start": 57, - "end": 91 - } + "range": [ + 57, + 91 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 92 - } + "range": [ + 57, + 92 + ] }, { "type": "ExpressionStatement", @@ -266,10 +266,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 101 - } + "range": [ + 95, + 101 + ] }, "arguments": [ { @@ -277,24 +277,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 104 - } + "range": [ + 95, + 104 + ] }, "directive": null, "loc": null, - "range": { - "start": 95, - "end": 105 - } + "range": [ + 95, + 105 + ] }, { "type": "ReturnStatement", @@ -303,42 +303,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "loc": null, - "range": { - "start": 108, - "end": 117 - } + "range": [ + 108, + 117 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 119 - } + "range": [ + 22, + 119 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 119 - }, + "range": [ + 0, + 119 + ], "loc": null, - "range": { - "start": 0, - "end": 119 - } + "range": [ + 0, + 119 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 119 - } + "range": [ + 0, + 119 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-receiver-computed-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-receiver-computed-mutate.js.snap index 92ab18ba18..de04813155 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-receiver-computed-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-receiver-computed-mutate.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -73,50 +73,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -129,32 +129,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 51, - "end": 53 - } + "range": [ + 51, + 53 + ] }, "loc": null, - "range": { - "start": 47, - "end": 53 - } + "range": [ + 47, + 53 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, { "type": "ExpressionStatement", @@ -178,33 +178,33 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "init": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, { "type": "ExpressionStatement", @@ -218,83 +218,83 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "property": { "type": "StringLiteral", "value": "x", "loc": null, - "range": { - "start": 93, - "end": 96 - } + "range": [ + 93, + 96 + ] }, "computed": true, "loc": null, - "range": { - "start": 91, - "end": 97 - } + "range": [ + 91, + 97 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "loc": null, - "range": { - "start": 91, - "end": 101 - } + "range": [ + 91, + 101 + ] }, "directive": null, "loc": null, - "range": { - "start": 91, - "end": 102 - } + "range": [ + 91, + 102 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 106 - } + "range": [ + 70, + 106 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 106 - }, + "range": [ + 58, + 106 + ], "loc": null, - "range": { - "start": 58, - "end": 106 - } + "range": [ + 58, + 106 + ] }, "arguments": [], "loc": null, - "range": { - "start": 57, - "end": 109 - } + "range": [ + 57, + 109 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 110 - } + "range": [ + 57, + 110 + ] }, { "type": "ExpressionStatement", @@ -305,10 +305,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 119 - } + "range": [ + 113, + 119 + ] }, "arguments": [ { @@ -316,24 +316,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 122 - } + "range": [ + 113, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 113, - "end": 123 - } + "range": [ + 113, + 123 + ] }, { "type": "ReturnStatement", @@ -342,42 +342,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "loc": null, - "range": { - "start": 126, - "end": 135 - } + "range": [ + 126, + 135 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 137 - } + "range": [ + 22, + 137 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 137 - }, + "range": [ + 0, + 137 + ], "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-receiver-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-receiver-mutate.js.snap index 3cd52a5678..a3197cc16d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-receiver-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-alias-receiver-mutate.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -73,50 +73,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -129,32 +129,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 51, - "end": 53 - } + "range": [ + 51, + 53 + ] }, "loc": null, - "range": { - "start": 47, - "end": 53 - } + "range": [ + 47, + 53 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, { "type": "ExpressionStatement", @@ -178,33 +178,33 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "init": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, { "type": "ExpressionStatement", @@ -218,84 +218,84 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "computed": false, "loc": null, - "range": { - "start": 91, - "end": 94 - } + "range": [ + 91, + 94 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "loc": null, - "range": { - "start": 91, - "end": 98 - } + "range": [ + 91, + 98 + ] }, "directive": null, "loc": null, - "range": { - "start": 91, - "end": 99 - } + "range": [ + 91, + 99 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 103 - } + "range": [ + 70, + 103 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 103 - }, + "range": [ + 58, + 103 + ], "loc": null, - "range": { - "start": 58, - "end": 103 - } + "range": [ + 58, + 103 + ] }, "arguments": [], "loc": null, - "range": { - "start": 57, - "end": 106 - } + "range": [ + 57, + 106 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 107 - } + "range": [ + 57, + 107 + ] }, { "type": "ExpressionStatement", @@ -306,10 +306,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] }, "arguments": [ { @@ -317,24 +317,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] } ], "loc": null, - "range": { - "start": 110, - "end": 119 - } + "range": [ + 110, + 119 + ] }, "directive": null, "loc": null, - "range": { - "start": 110, - "end": 120 - } + "range": [ + 110, + 120 + ] }, { "type": "ReturnStatement", @@ -343,42 +343,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "loc": null, - "range": { - "start": 123, - "end": 132 - } + "range": [ + 123, + 132 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 134 - } + "range": [ + 22, + 134 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 134 - }, + "range": [ + 0, + 134 + ], "loc": null, - "range": { - "start": 0, - "end": 134 - } + "range": [ + 0, + 134 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 134 - } + "range": [ + 0, + 134 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-2.js.snap index 0c7a49fd70..0b0400adcb 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-2.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,20 +38,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -68,10 +68,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -83,50 +83,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 43 - } + "range": [ + 29, + 43 + ] }, { "type": "VariableDeclaration", @@ -139,10 +139,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "init": { "type": "ObjectExpression", @@ -154,50 +154,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "loc": null, - "range": { - "start": 50, - "end": 59 - } + "range": [ + 50, + 59 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 60 - } + "range": [ + 46, + 60 + ] }, { "type": "VariableDeclaration", @@ -210,10 +210,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "init": { "type": "FunctionExpression", @@ -234,49 +234,49 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "loc": null, - "range": { - "start": 89, - "end": 96 - } + "range": [ + 89, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 89, - "end": 97 - } + "range": [ + 89, + 97 + ] }, { "type": "ExpressionStatement", @@ -287,67 +287,67 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "computed": false, "loc": null, - "range": { - "start": 102, - "end": 105 - } + "range": [ + 102, + 105 + ] }, "directive": null, "loc": null, - "range": { - "start": 102, - "end": 106 - } + "range": [ + 102, + 106 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 110 - } + "range": [ + 83, + 110 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 71, - "end": 110 - }, + "range": [ + 71, + 110 + ], "loc": null, - "range": { - "start": 71, - "end": 110 - } + "range": [ + 71, + 110 + ] }, "loc": null, - "range": { - "start": 67, - "end": 110 - } + "range": [ + 67, + 110 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 111 - } + "range": [ + 63, + 111 + ] }, { "type": "ExpressionStatement", @@ -358,24 +358,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "arguments": [], "loc": null, - "range": { - "start": 114, - "end": 117 - } + "range": [ + 114, + 117 + ] }, "directive": null, "loc": null, - "range": { - "start": 114, - "end": 118 - } + "range": [ + 114, + 118 + ] }, { "type": "ReturnStatement", @@ -384,42 +384,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "loc": null, - "range": { - "start": 121, - "end": 130 - } + "range": [ + 121, + 130 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 132 - } + "range": [ + 25, + 132 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 132 - }, + "range": [ + 0, + 132 + ], "loc": null, - "range": { - "start": 0, - "end": 132 - } + "range": [ + 0, + 132 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 132 - } + "range": [ + 0, + 132 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-3.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-3.js.snap index b270f8a966..30571ce805 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-3.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-3.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,20 +37,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -67,10 +67,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -82,50 +82,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 43 - } + "range": [ + 29, + 43 + ] }, { "type": "VariableDeclaration", @@ -138,10 +138,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "init": { "type": "ObjectExpression", @@ -153,50 +153,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "loc": null, - "range": { - "start": 50, - "end": 59 - } + "range": [ + 50, + 59 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 60 - } + "range": [ + 46, + 60 + ] }, { "type": "VariableDeclaration", @@ -209,10 +209,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "init": { "type": "FunctionExpression", @@ -233,49 +233,49 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "loc": null, - "range": { - "start": 89, - "end": 96 - } + "range": [ + 89, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 89, - "end": 97 - } + "range": [ + 89, + 97 + ] }, { "type": "ExpressionStatement", @@ -286,67 +286,67 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "computed": false, "loc": null, - "range": { - "start": 102, - "end": 105 - } + "range": [ + 102, + 105 + ] }, "directive": null, "loc": null, - "range": { - "start": 102, - "end": 106 - } + "range": [ + 102, + 106 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 110 - } + "range": [ + 83, + 110 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 71, - "end": 110 - }, + "range": [ + 71, + 110 + ], "loc": null, - "range": { - "start": 71, - "end": 110 - } + "range": [ + 71, + 110 + ] }, "loc": null, - "range": { - "start": 67, - "end": 110 - } + "range": [ + 67, + 110 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 111 - } + "range": [ + 63, + 111 + ] }, { "type": "ReturnStatement", @@ -355,42 +355,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "loc": null, - "range": { - "start": 114, - "end": 123 - } + "range": [ + 114, + 123 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 125 - } + "range": [ + 25, + 125 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 125 - }, + "range": [ + 0, + 125 + ], "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-nested.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-nested.js.snap index 7b61f0f00f..c7f4c728c2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-nested.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate-nested.js.snap @@ -25,10 +25,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -71,10 +71,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "ObjectExpression", @@ -86,67 +86,67 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 44 - } + "range": [ + 39, + 44 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 46 - } + "range": [ + 34, + 46 + ] }, "loc": null, - "range": { - "start": 30, - "end": 46 - } + "range": [ + 30, + 46 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 47 - } + "range": [ + 26, + 47 + ] }, { "type": "VariableDeclaration", @@ -159,10 +159,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "init": { "type": "FunctionExpression", @@ -185,99 +185,99 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 81 - } + "range": [ + 76, + 81 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 76, - "end": 85 - } + "range": [ + 76, + 85 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 90 - } + "range": [ + 70, + 90 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 90 - }, + "range": [ + 58, + 90 + ], "loc": null, - "range": { - "start": 58, - "end": 90 - } + "range": [ + 58, + 90 + ] }, "loc": null, - "range": { - "start": 54, - "end": 90 - } + "range": [ + 54, + 90 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 91 - } + "range": [ + 50, + 91 + ] }, { "type": "ExpressionStatement", @@ -288,24 +288,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "arguments": [], "loc": null, - "range": { - "start": 94, - "end": 97 - } + "range": [ + 94, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 94, - "end": 98 - } + "range": [ + 94, + 98 + ] }, { "type": "ReturnStatement", @@ -314,42 +314,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 112 - } + "range": [ + 22, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 112 - }, + "range": [ + 0, + 112 + ], "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate.js.snap index 3139aa7529..4792056078 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-mutate.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,20 +38,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -68,10 +68,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -83,50 +83,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 43 - } + "range": [ + 29, + 43 + ] }, { "type": "VariableDeclaration", @@ -139,10 +139,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "init": { "type": "ObjectExpression", @@ -154,50 +154,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "loc": null, - "range": { - "start": 50, - "end": 59 - } + "range": [ + 50, + 59 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 60 - } + "range": [ + 46, + 60 + ] }, { "type": "VariableDeclaration", @@ -210,10 +210,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "init": { "type": "FunctionExpression", @@ -234,49 +234,49 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "loc": null, - "range": { - "start": 89, - "end": 96 - } + "range": [ + 89, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 89, - "end": 97 - } + "range": [ + 89, + 97 + ] }, { "type": "ExpressionStatement", @@ -289,27 +289,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 109 - } + "range": [ + 102, + 109 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 113 - } + "range": [ + 110, + 113 + ] }, "computed": false, "loc": null, - "range": { - "start": 102, - "end": 113 - } + "range": [ + 102, + 113 + ] }, "arguments": [ { @@ -319,74 +319,74 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "computed": false, "loc": null, - "range": { - "start": 114, - "end": 117 - } + "range": [ + 114, + 117 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 118 - } + "range": [ + 102, + 118 + ] }, "directive": null, "loc": null, - "range": { - "start": 102, - "end": 119 - } + "range": [ + 102, + 119 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 123 - } + "range": [ + 83, + 123 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 71, - "end": 123 - }, + "range": [ + 71, + 123 + ], "loc": null, - "range": { - "start": 71, - "end": 123 - } + "range": [ + 71, + 123 + ] }, "loc": null, - "range": { - "start": 67, - "end": 123 - } + "range": [ + 67, + 123 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 124 - } + "range": [ + 63, + 124 + ] }, { "type": "ExpressionStatement", @@ -397,24 +397,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "arguments": [], "loc": null, - "range": { - "start": 127, - "end": 130 - } + "range": [ + 127, + 130 + ] }, "directive": null, "loc": null, - "range": { - "start": 127, - "end": 131 - } + "range": [ + 127, + 131 + ] }, { "type": "ReturnStatement", @@ -423,42 +423,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "loc": null, - "range": { - "start": 134, - "end": 143 - } + "range": [ + 134, + 143 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 145 - } + "range": [ + 25, + 145 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 145 - }, + "range": [ + 0, + 145 + ], "loc": null, - "range": { - "start": 0, - "end": 145 - } + "range": [ + 0, + 145 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 145 - } + "range": [ + 0, + 145 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-simple-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-simple-alias.js.snap index eaf6b8739e..308216b334 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-simple-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-func-simple-alias.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -72,50 +72,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -128,32 +128,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 51, - "end": 53 - } + "range": [ + 51, + 53 + ] }, "loc": null, - "range": { - "start": 47, - "end": 53 - } + "range": [ + 47, + 53 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, { "type": "ExpressionStatement", @@ -176,67 +176,67 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "loc": null, - "range": { - "start": 76, - "end": 81 - } + "range": [ + 76, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 86 - } + "range": [ + 70, + 86 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 86 - }, + "range": [ + 58, + 86 + ], "loc": null, - "range": { - "start": 58, - "end": 86 - } + "range": [ + 58, + 86 + ] }, "arguments": [], "loc": null, - "range": { - "start": 57, - "end": 89 - } + "range": [ + 57, + 89 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 90 - } + "range": [ + 57, + 90 + ] }, { "type": "ExpressionStatement", @@ -247,10 +247,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "arguments": [ { @@ -258,24 +258,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 102 - } + "range": [ + 93, + 102 + ] }, "directive": null, "loc": null, - "range": { - "start": 93, - "end": 103 - } + "range": [ + 93, + 103 + ] }, { "type": "ReturnStatement", @@ -284,42 +284,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 117 - } + "range": [ + 22, + 117 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 117 - }, + "range": [ + 0, + 117 + ], "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-1.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-1.js.snap index bc1d6b20ff..d1cf477cc8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-1.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-1.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -70,50 +70,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -126,10 +126,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "FunctionExpression", @@ -149,27 +149,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 76 - } + "range": [ + 69, + 76 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 80 - } + "range": [ + 77, + 80 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 80 - } + "range": [ + 69, + 80 + ] }, "arguments": [ { @@ -177,57 +177,57 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 83 - } + "range": [ + 69, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 69, - "end": 84 - } + "range": [ + 69, + 84 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 88 - } + "range": [ + 63, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 51, - "end": 88 - }, + "range": [ + 51, + 88 + ], "loc": null, - "range": { - "start": 51, - "end": 88 - } + "range": [ + 51, + 88 + ] }, "loc": null, - "range": { - "start": 47, - "end": 88 - } + "range": [ + 47, + 88 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 89 - } + "range": [ + 43, + 89 + ] }, { "type": "ReturnStatement", @@ -236,42 +236,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 103 - } + "range": [ + 22, + 103 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 103 - }, + "range": [ + 0, + 103 + ], "loc": null, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-2.js.snap index 89e67640f4..48b74410de 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-2.js.snap @@ -26,10 +26,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] }, "init": { "type": "ArrayExpression", @@ -70,30 +70,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 31 - } + "range": [ + 28, + 31 + ] }, "loc": null, - "range": { - "start": 24, - "end": 31 - } + "range": [ + 24, + 31 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 32 - } + "range": [ + 20, + 32 + ] }, { "type": "VariableDeclaration", @@ -106,32 +106,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 43, - "end": 45 - } + "range": [ + 43, + 45 + ] }, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 46 - } + "range": [ + 35, + 46 + ] }, { "type": "ExpressionStatement", @@ -154,10 +154,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "right": { "type": "MemberExpression", @@ -168,89 +168,89 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "computed": true, "loc": null, - "range": { - "start": 72, - "end": 76 - } + "range": [ + 72, + 76 + ] }, "property": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "computed": true, "loc": null, - "range": { - "start": 72, - "end": 79 - } + "range": [ + 72, + 79 + ] }, "loc": null, - "range": { - "start": 68, - "end": 79 - } + "range": [ + 68, + 79 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 80 - } + "range": [ + 68, + 80 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 84 - } + "range": [ + 62, + 84 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 50, - "end": 84 - }, + "range": [ + 50, + 84 + ], "loc": null, - "range": { - "start": 50, - "end": 84 - } + "range": [ + 50, + 84 + ] }, "arguments": [], "loc": null, - "range": { - "start": 49, - "end": 87 - } + "range": [ + 49, + 87 + ] }, "directive": null, "loc": null, - "range": { - "start": 49, - "end": 88 - } + "range": [ + 49, + 88 + ] }, { "type": "ReturnStatement", @@ -259,42 +259,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 103 - } + "range": [ + 16, + 103 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 103 - }, + "range": [ + 0, + 103 + ], "loc": null, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-3.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-3.js.snap index 856bb453fd..c369b269a1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-3.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-3.js.snap @@ -28,10 +28,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -69,10 +69,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "init": { "type": "ArrayExpression", @@ -82,40 +82,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 35, - "end": 36 - } + "range": [ + 35, + 36 + ] } ], "loc": null, - "range": { - "start": 31, - "end": 37 - } + "range": [ + 31, + 37 + ] }, "loc": null, - "range": { - "start": 27, - "end": 37 - } + "range": [ + 27, + 37 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 38 - } + "range": [ + 23, + 38 + ] }, { "type": "VariableDeclaration", @@ -128,32 +128,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 49, - "end": 51 - } + "range": [ + 49, + 51 + ] }, "loc": null, - "range": { - "start": 45, - "end": 51 - } + "range": [ + 45, + 51 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 52 - } + "range": [ + 41, + 52 + ] }, { "type": "VariableDeclaration", @@ -166,32 +166,32 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 63, - "end": 65 - } + "range": [ + 63, + 65 + ] }, "loc": null, - "range": { - "start": 59, - "end": 65 - } + "range": [ + 59, + 65 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 66 - } + "range": [ + 55, + 66 + ] }, { "type": "ExpressionStatement", @@ -214,10 +214,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "right": { "type": "MemberExpression", @@ -228,55 +228,55 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "computed": true, "loc": null, - "range": { - "start": 92, - "end": 96 - } + "range": [ + 92, + 96 + ] }, "property": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "computed": true, "loc": null, - "range": { - "start": 92, - "end": 99 - } + "range": [ + 92, + 99 + ] }, "loc": null, - "range": { - "start": 88, - "end": 99 - } + "range": [ + 88, + 99 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 100 - } + "range": [ + 88, + 100 + ] }, { "type": "ExpressionStatement", @@ -288,10 +288,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "right": { "type": "MemberExpression", @@ -302,89 +302,89 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "property": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "computed": true, "loc": null, - "range": { - "start": 109, - "end": 113 - } + "range": [ + 109, + 113 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "computed": true, "loc": null, - "range": { - "start": 109, - "end": 116 - } + "range": [ + 109, + 116 + ] }, "loc": null, - "range": { - "start": 105, - "end": 116 - } + "range": [ + 105, + 116 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 117 - } + "range": [ + 105, + 117 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 121 - } + "range": [ + 82, + 121 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 70, - "end": 121 - }, + "range": [ + 70, + 121 + ], "loc": null, - "range": { - "start": 70, - "end": 121 - } + "range": [ + 70, + 121 + ] }, "arguments": [], "loc": null, - "range": { - "start": 69, - "end": 124 - } + "range": [ + 69, + 124 + ] }, "directive": null, "loc": null, - "range": { - "start": 69, - "end": 125 - } + "range": [ + 69, + 125 + ] }, { "type": "ReturnStatement", @@ -393,42 +393,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 137 - } + "range": [ + 136, + 137 + ] }, "loc": null, - "range": { - "start": 129, - "end": 138 - } + "range": [ + 129, + 138 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 140 - } + "range": [ + 19, + 140 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 140 - }, + "range": [ + 0, + 140 + ], "loc": null, - "range": { - "start": 0, - "end": 140 - } + "range": [ + 0, + 140 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 140 - } + "range": [ + 0, + 140 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-4.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-4.js.snap index b2098fc5c0..b665e617dc 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-4.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load-4.js.snap @@ -26,10 +26,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] }, "init": { "type": "ArrayExpression", @@ -70,30 +70,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 31 - } + "range": [ + 28, + 31 + ] }, "loc": null, - "range": { - "start": 24, - "end": 31 - } + "range": [ + 24, + 31 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 32 - } + "range": [ + 20, + 32 + ] }, { "type": "VariableDeclaration", @@ -106,32 +106,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 43, - "end": 45 - } + "range": [ + 43, + 45 + ] }, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 46 - } + "range": [ + 35, + 46 + ] }, { "type": "ExpressionStatement", @@ -154,10 +154,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "right": { "type": "MemberExpression", @@ -170,106 +170,106 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "computed": true, "loc": null, - "range": { - "start": 72, - "end": 76 - } + "range": [ + 72, + 76 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "computed": false, "loc": null, - "range": { - "start": 72, - "end": 78 - } + "range": [ + 72, + 78 + ] }, "property": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "computed": true, "loc": null, - "range": { - "start": 72, - "end": 81 - } + "range": [ + 72, + 81 + ] }, "loc": null, - "range": { - "start": 68, - "end": 81 - } + "range": [ + 68, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 82 - } + "range": [ + 68, + 82 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 86 - } + "range": [ + 62, + 86 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 50, - "end": 86 - }, + "range": [ + 50, + 86 + ], "loc": null, - "range": { - "start": 50, - "end": 86 - } + "range": [ + 50, + 86 + ] }, "arguments": [], "loc": null, - "range": { - "start": 49, - "end": 89 - } + "range": [ + 49, + 89 + ] }, "directive": null, "loc": null, - "range": { - "start": 49, - "end": 90 - } + "range": [ + 49, + 90 + ] }, { "type": "ReturnStatement", @@ -278,42 +278,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "loc": null, - "range": { - "start": 94, - "end": 103 - } + "range": [ + 94, + 103 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 105 - } + "range": [ + 16, + 105 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 105 - }, + "range": [ + 0, + 105 + ], "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load.js.snap index 9650684e53..2b8d0e04e8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-alias-computed-load.js.snap @@ -26,10 +26,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] }, "init": { "type": "ArrayExpression", @@ -70,30 +70,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 31 - } + "range": [ + 28, + 31 + ] }, "loc": null, - "range": { - "start": 24, - "end": 31 - } + "range": [ + 24, + 31 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 32 - } + "range": [ + 20, + 32 + ] }, { "type": "VariableDeclaration", @@ -106,32 +106,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 43, - "end": 45 - } + "range": [ + 43, + 45 + ] }, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 46 - } + "range": [ + 35, + 46 + ] }, { "type": "ExpressionStatement", @@ -154,10 +154,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "right": { "type": "MemberExpression", @@ -166,73 +166,73 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "computed": true, "loc": null, - "range": { - "start": 72, - "end": 76 - } + "range": [ + 72, + 76 + ] }, "loc": null, - "range": { - "start": 68, - "end": 76 - } + "range": [ + 68, + 76 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 77 - } + "range": [ + 68, + 77 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 81 - } + "range": [ + 62, + 81 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 50, - "end": 81 - }, + "range": [ + 50, + 81 + ], "loc": null, - "range": { - "start": 50, - "end": 81 - } + "range": [ + 50, + 81 + ] }, "arguments": [], "loc": null, - "range": { - "start": 49, - "end": 84 - } + "range": [ + 49, + 84 + ] }, "directive": null, "loc": null, - "range": { - "start": 49, - "end": 85 - } + "range": [ + 49, + 85 + ] }, { "type": "ReturnStatement", @@ -241,42 +241,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] }, "loc": null, - "range": { - "start": 89, - "end": 98 - } + "range": [ + 89, + 98 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 100 - } + "range": [ + 16, + 100 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 100 - }, + "range": [ + 0, + 100 + ], "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-capture-ref-before-rename.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-capture-ref-before-rename.js.snap index 87cac443c4..dd54d26b16 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-capture-ref-before-rename.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-capture-ref-before-rename.js.snap @@ -31,10 +31,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -42,20 +42,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -72,10 +72,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -87,50 +87,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 43 - } + "range": [ + 29, + 43 + ] }, { "type": "ExpressionStatement", @@ -152,10 +152,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 71 - } + "range": [ + 65, + 71 + ] }, "arguments": [ { @@ -163,58 +163,58 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 74 - } + "range": [ + 65, + 74 + ] }, "directive": null, "loc": null, - "range": { - "start": 65, - "end": 75 - } + "range": [ + 65, + 75 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 79 - } + "range": [ + 59, + 79 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 47, - "end": 79 - }, + "range": [ + 47, + 79 + ], "loc": null, - "range": { - "start": 47, - "end": 79 - } + "range": [ + 47, + 79 + ] }, "arguments": [], "loc": null, - "range": { - "start": 46, - "end": 82 - } + "range": [ + 46, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 46, - "end": 83 - } + "range": [ + 46, + 83 + ] }, { "type": "VariableDeclaration", @@ -227,33 +227,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "init": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 96 - } + "range": [ + 86, + 96 + ] }, { "type": "BlockStatement", @@ -269,10 +269,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 172 - } + "range": [ + 171, + 172 + ] }, "init": { "type": "ObjectExpression", @@ -284,50 +284,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 178 - } + "range": [ + 177, + 178 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 178 - } + "range": [ + 177, + 178 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 177, - "end": 178 - } + "range": [ + 177, + 178 + ] } ], "loc": null, - "range": { - "start": 175, - "end": 180 - } + "range": [ + 175, + 180 + ] }, "loc": null, - "range": { - "start": 171, - "end": 180 - } + "range": [ + 171, + 180 + ] } ], "loc": null, - "range": { - "start": 167, - "end": 181 - } + "range": [ + 167, + 181 + ] }, { "type": "ExpressionStatement", @@ -339,10 +339,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 186, - "end": 187 - } + "range": [ + 186, + 187 + ] }, "right": { "type": "ObjectExpression", @@ -354,30 +354,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, { "type": "Property", @@ -386,57 +386,57 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "value": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] } ], "loc": null, - "range": { - "start": 190, - "end": 198 - } + "range": [ + 190, + 198 + ] }, "loc": null, - "range": { - "start": 186, - "end": 198 - } + "range": [ + 186, + 198 + ] }, "directive": null, "loc": null, - "range": { - "start": 186, - "end": 199 - } + "range": [ + 186, + 199 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 203 - } + "range": [ + 100, + 203 + ] }, { "type": "ReturnStatement", @@ -445,42 +445,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 213, - "end": 214 - } + "range": [ + 213, + 214 + ] }, "loc": null, - "range": { - "start": 206, - "end": 215 - } + "range": [ + 206, + 215 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 217 - } + "range": [ + 25, + 217 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 217 - }, + "range": [ + 0, + 217 + ], "loc": null, - "range": { - "start": 0, - "end": 217 - } + "range": [ + 0, + 217 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 217 - } + "range": [ + 0, + 217 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-conditional-capture-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-conditional-capture-mutate.js.snap index d6c5f8a065..ad38f5b2dc 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-conditional-capture-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-conditional-capture-mutate.js.snap @@ -31,10 +31,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 28 - } + "range": [ + 19, + 28 + ] }, "params": [ { @@ -42,20 +42,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] } ], "body": { @@ -72,10 +72,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "init": { "type": "ObjectExpression", @@ -87,50 +87,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 52 - } + "range": [ + 47, + 52 + ] }, "loc": null, - "range": { - "start": 43, - "end": 52 - } + "range": [ + 43, + 52 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 53 - } + "range": [ + 39, + 53 + ] }, { "type": "VariableDeclaration", @@ -143,33 +143,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "init": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 66 - } + "range": [ + 56, + 66 + ] }, { "type": "VariableDeclaration", @@ -182,10 +182,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "init": { "type": "FunctionExpression", @@ -201,10 +201,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "consequent": { "type": "BlockStatement", @@ -218,10 +218,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 262, - "end": 273 - } + "range": [ + 262, + 273 + ] }, "arguments": [ { @@ -229,71 +229,71 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 274, - "end": 275 - } + "range": [ + 274, + 275 + ] } ], "loc": null, - "range": { - "start": 262, - "end": 276 - } + "range": [ + 262, + 276 + ] }, "directive": null, "loc": null, - "range": { - "start": 262, - "end": 277 - } + "range": [ + 262, + 277 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 283 - } + "range": [ + 102, + 283 + ] }, "alternate": null, "loc": null, - "range": { - "start": 95, - "end": 283 - } + "range": [ + 95, + 283 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 287 - } + "range": [ + 89, + 287 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 77, - "end": 287 - }, + "range": [ + 77, + 287 + ], "loc": null, - "range": { - "start": 77, - "end": 287 - } + "range": [ + 77, + 287 + ] }, "loc": null, - "range": { - "start": 73, - "end": 287 - } + "range": [ + 73, + 287 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 288 - } + "range": [ + 69, + 288 + ] }, { "type": "ReturnStatement", @@ -302,42 +302,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 298, - "end": 299 - } + "range": [ + 298, + 299 + ] }, "loc": null, - "range": { - "start": 291, - "end": 300 - } + "range": [ + 291, + 300 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 302 - } + "range": [ + 35, + 302 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 10, - "end": 302 - }, + "range": [ + 10, + 302 + ], "loc": null, - "range": { - "start": 10, - "end": 302 - } + "range": [ + 10, + 302 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 10, - "end": 302 - } + "range": [ + 10, + 302 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-decl.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-decl.js.snap index 502fc5cfdc..02bfd64abd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-decl.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-decl.js.snap @@ -25,10 +25,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -71,50 +71,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "FunctionDeclaration", @@ -123,10 +123,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "params": [], "body": { @@ -143,61 +143,61 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 67 - } + "range": [ + 64, + 67 + ] }, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "arguments": [], "loc": null, - "range": { - "start": 62, - "end": 69 - } + "range": [ + 62, + 69 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 70 - } + "range": [ + 62, + 70 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 74 - } + "range": [ + 56, + 74 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 43, - "end": 74 - }, + "range": [ + 43, + 74 + ], "loc": null, - "range": { - "start": 43, - "end": 74 - } + "range": [ + 43, + 74 + ] }, { "type": "ExpressionStatement", @@ -208,10 +208,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "arguments": [ { @@ -219,24 +219,24 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 81 - } + "range": [ + 77, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 77, - "end": 82 - } + "range": [ + 77, + 82 + ] }, { "type": "ReturnStatement", @@ -245,42 +245,42 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "loc": null, - "range": { - "start": 85, - "end": 94 - } + "range": [ + 85, + 94 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 96 - } + "range": [ + 22, + 96 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 96 - }, + "range": [ + 0, + 96 + ], "loc": null, - "range": { - "start": 0, - "end": 96 - } + "range": [ + 0, + 96 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 96 - } + "range": [ + 0, + 96 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-arguments.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-arguments.js.snap index 98810b983a..811b9d7dc2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-arguments.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-arguments.js.snap @@ -27,10 +27,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "onFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] }, "init": { "type": "CallExpression", @@ -70,10 +70,10 @@ Output: "name": "useCallback", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 49 - } + "range": [ + 38, + 49 + ] }, "arguments": [ { @@ -85,10 +85,10 @@ Output: "name": "reason", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 62 - } + "range": [ + 56, + 62 + ] } ], "body": { @@ -103,10 +103,10 @@ Output: "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 78 - } + "range": [ + 75, + 78 + ] }, "arguments": [ { @@ -118,79 +118,79 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "property": { "type": "Identifier", "name": "router", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 91 - } + "range": [ + 85, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 91 - } + "range": [ + 79, + 91 + ] }, "property": { "type": "Identifier", "name": "location", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 100 - } + "range": [ + 92, + 100 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 100 - } + "range": [ + 79, + 100 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 101 - } + "range": [ + 75, + 101 + ] }, "directive": null, "loc": null, - "range": { - "start": 75, - "end": 102 - } + "range": [ + 75, + 102 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 108 - } + "range": [ + 67, + 108 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 55, - "end": 108 - }, + "range": [ + 55, + 108 + ], "expression": false, "loc": null, - "range": { - "start": 55, - "end": 108 - } + "range": [ + 55, + 108 + ] }, { "type": "ArrayExpression", @@ -204,71 +204,71 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "property": { "type": "Identifier", "name": "router", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 127 - } + "range": [ + 121, + 127 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 127 - } + "range": [ + 115, + 127 + ] }, "property": { "type": "Identifier", "name": "location", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 136 - } + "range": [ + 128, + 136 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 136 - } + "range": [ + 115, + 136 + ] } ], "loc": null, - "range": { - "start": 114, - "end": 137 - } + "range": [ + 114, + 137 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 141 - } + "range": [ + 38, + 141 + ] }, "loc": null, - "range": { - "start": 30, - "end": 141 - } + "range": [ + 30, + 141 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 142 - } + "range": [ + 24, + 142 + ] }, { "type": "ReturnStatement", @@ -277,42 +277,42 @@ Output: "name": "onFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 158 - } + "range": [ + 153, + 158 + ] }, "loc": null, - "range": { - "start": 146, - "end": 159 - } + "range": [ + 146, + 159 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 161 - } + "range": [ + 20, + 161 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 161 - }, + "range": [ + 0, + 161 + ], "loc": null, - "range": { - "start": 0, - "end": 161 - } + "range": [ + 0, + 161 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 161 - } + "range": [ + 0, + 161 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-call.js.snap index 198e07ff3b..6b5443ad74 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-member-expr-call.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -44,37 +44,37 @@ Output: "name": "mutator", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 28 - } + "range": [ + 21, + 28 + ] }, "value": { "type": "Identifier", "name": "mutator", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 28 - } + "range": [ + 21, + 28 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 21, - "end": 28 - } + "range": [ + 21, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 30 - } + "range": [ + 19, + 30 + ] } ], "body": { @@ -91,10 +91,10 @@ Output: "name": "poke", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 46 - } + "range": [ + 42, + 46 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -114,75 +114,75 @@ Output: "name": "mutator", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 68 - } + "range": [ + 61, + 68 + ] }, "property": { "type": "Identifier", "name": "poke", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 73 - } + "range": [ + 69, + 73 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 73 - } + "range": [ + 61, + 73 + ] }, "arguments": [], "loc": null, - "range": { - "start": 61, - "end": 75 - } + "range": [ + 61, + 75 + ] }, "directive": null, "loc": null, - "range": { - "start": 61, - "end": 76 - } + "range": [ + 61, + 76 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 80 - } + "range": [ + 55, + 80 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 49, - "end": 80 - }, + "range": [ + 49, + 80 + ], "expression": false, "loc": null, - "range": { - "start": 49, - "end": 80 - } + "range": [ + 49, + 80 + ] }, "loc": null, - "range": { - "start": 42, - "end": 80 - } + "range": [ + 42, + 80 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 81 - } + "range": [ + 36, + 81 + ] }, { "type": "VariableDeclaration", @@ -195,10 +195,10 @@ Output: "name": "hide", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 95 - } + "range": [ + 91, + 95 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -220,92 +220,92 @@ Output: "name": "mutator", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 117 - } + "range": [ + 110, + 117 + ] }, "property": { "type": "Identifier", "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 122 - } + "range": [ + 118, + 122 + ] }, "computed": false, "loc": null, - "range": { - "start": 110, - "end": 122 - } + "range": [ + 110, + 122 + ] }, "property": { "type": "Identifier", "name": "hide", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 127 - } + "range": [ + 123, + 127 + ] }, "computed": false, "loc": null, - "range": { - "start": 110, - "end": 127 - } + "range": [ + 110, + 127 + ] }, "arguments": [], "loc": null, - "range": { - "start": 110, - "end": 129 - } + "range": [ + 110, + 129 + ] }, "directive": null, "loc": null, - "range": { - "start": 110, - "end": 130 - } + "range": [ + 110, + 130 + ] } ], "loc": null, - "range": { - "start": 104, - "end": 134 - } + "range": [ + 104, + 134 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 98, - "end": 134 - }, + "range": [ + 98, + 134 + ], "expression": false, "loc": null, - "range": { - "start": 98, - "end": 134 - } + "range": [ + 98, + 134 + ] }, "loc": null, - "range": { - "start": 91, - "end": 134 - } + "range": [ + 91, + 134 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 135 - } + "range": [ + 85, + 135 + ] }, { "type": "ReturnStatement", @@ -317,10 +317,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 147, - "end": 150 - } + "range": [ + 147, + 150 + ] }, "attributes": [ { @@ -329,10 +329,10 @@ Output: "type": "JSXIdentifier", "name": "poke", "loc": null, - "range": { - "start": 151, - "end": 155 - } + "range": [ + 151, + 155 + ] }, "value": { "type": "JSXExpressionContainer", @@ -341,22 +341,22 @@ Output: "name": "poke", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 161 - } + "range": [ + 157, + 161 + ] }, "loc": null, - "range": { - "start": 156, - "end": 162 - } + "range": [ + 156, + 162 + ] }, "loc": null, - "range": { - "start": 151, - "end": 162 - } + "range": [ + 151, + 162 + ] }, { "type": "JSXAttribute", @@ -364,10 +364,10 @@ Output: "type": "JSXIdentifier", "name": "hide", "loc": null, - "range": { - "start": 163, - "end": 167 - } + "range": [ + 163, + 167 + ] }, "value": { "type": "JSXExpressionContainer", @@ -376,30 +376,30 @@ Output: "name": "hide", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 173 - } + "range": [ + 169, + 173 + ] }, "loc": null, - "range": { - "start": 168, - "end": 174 - } + "range": [ + 168, + 174 + ] }, "loc": null, - "range": { - "start": 163, - "end": 174 - } + "range": [ + 163, + 174 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 146, - "end": 175 - } + "range": [ + 146, + 175 + ] }, "children": [], "closingElement": { @@ -408,54 +408,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 177, - "end": 180 - } + "range": [ + 177, + 180 + ] }, "loc": null, - "range": { - "start": 175, - "end": 181 - } + "range": [ + 175, + 181 + ] }, "loc": null, - "range": { - "start": 146, - "end": 181 - } + "range": [ + 146, + 181 + ] }, "loc": null, - "range": { - "start": 139, - "end": 182 - } + "range": [ + 139, + 182 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 184 - } + "range": [ + 32, + 184 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 184 - }, + "range": [ + 0, + 184 + ], "loc": null, - "range": { - "start": 0, - "end": 184 - } + "range": [ + 0, + 184 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 184 - } + "range": [ + 0, + 184 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-renamed-ref.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-renamed-ref.js.snap index c20add2631..b79d8aa1cd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-renamed-ref.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-renamed-ref.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,20 +38,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -68,10 +68,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -83,50 +83,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 43 - } + "range": [ + 29, + 43 + ] }, { "type": "BlockStatement", @@ -142,10 +142,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "init": { "type": "ObjectExpression", @@ -157,50 +157,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "loc": null, - "range": { - "start": 56, - "end": 65 - } + "range": [ + 56, + 65 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 66 - } + "range": [ + 52, + 66 + ] }, { "type": "ExpressionStatement", @@ -222,10 +222,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 98 - } + "range": [ + 92, + 98 + ] }, "arguments": [ { @@ -233,65 +233,65 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] }, "directive": null, "loc": null, - "range": { - "start": 92, - "end": 102 - } + "range": [ + 92, + 102 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 108 - } + "range": [ + 84, + 108 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 72, - "end": 108 - }, + "range": [ + 72, + 108 + ], "loc": null, - "range": { - "start": 72, - "end": 108 - } + "range": [ + 72, + 108 + ] }, "arguments": [], "loc": null, - "range": { - "start": 71, - "end": 111 - } + "range": [ + 71, + 111 + ] }, "directive": null, "loc": null, - "range": { - "start": 71, - "end": 112 - } + "range": [ + 71, + 112 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 116 - } + "range": [ + 46, + 116 + ] }, { "type": "ReturnStatement", @@ -300,42 +300,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "loc": null, - "range": { - "start": 119, - "end": 128 - } + "range": [ + 119, + 128 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 130 - } + "range": [ + 25, + 130 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 130 - }, + "range": [ + 0, + 130 + ], "loc": null, - "range": { - "start": 0, - "end": 130 - } + "range": [ + 0, + 130 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 130 - } + "range": [ + 0, + 130 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-runs-inference.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-runs-inference.js.snap index c8e7a4d1a8..b55865ea17 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-runs-inference.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-runs-inference.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,20 +33,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -63,10 +63,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -78,50 +78,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 43 - } + "range": [ + 29, + 43 + ] }, { "type": "VariableDeclaration", @@ -134,10 +134,10 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -151,18 +151,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 61, - "end": 64 - } + "range": [ + 61, + 64 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "children": [ { @@ -172,16 +172,16 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "loc": null, - "range": { - "start": 65, - "end": 68 - } + "range": [ + 65, + 68 + ] } ], "closingElement": { @@ -190,49 +190,49 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "loc": null, - "range": { - "start": 68, - "end": 74 - } + "range": [ + 68, + 74 + ] }, "loc": null, - "range": { - "start": 60, - "end": 74 - } + "range": [ + 60, + 74 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 54, - "end": 74 - }, + "range": [ + 54, + 74 + ], "expression": true, "loc": null, - "range": { - "start": 54, - "end": 74 - } + "range": [ + 54, + 74 + ] }, "loc": null, - "range": { - "start": 50, - "end": 74 - } + "range": [ + 50, + 74 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 75 - } + "range": [ + 46, + 75 + ] }, { "type": "ReturnStatement", @@ -243,49 +243,49 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "arguments": [], "loc": null, - "range": { - "start": 85, - "end": 88 - } + "range": [ + 85, + 88 + ] }, "loc": null, - "range": { - "start": 78, - "end": 89 - } + "range": [ + 78, + 89 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 91 - } + "range": [ + 25, + 91 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 91 - }, + "range": [ + 0, + 91 + ], "loc": null, - "range": { - "start": 0, - "end": 91 - } + "range": [ + 0, + 91 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 91 - } + "range": [ + 0, + 91 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-shadow-captured.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-shadow-captured.js.snap index bc4e8c8268..34af175c64 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-shadow-captured.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-shadow-captured.js.snap @@ -25,10 +25,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -71,50 +71,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -127,10 +127,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "FunctionExpression", @@ -150,24 +150,24 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "init": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 75 - } + "range": [ + 69, + 75 + ] }, { "type": "ExpressionStatement", @@ -178,10 +178,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 86 - } + "range": [ + 80, + 86 + ] }, "arguments": [ { @@ -189,57 +189,57 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] } ], "loc": null, - "range": { - "start": 80, - "end": 89 - } + "range": [ + 80, + 89 + ] }, "directive": null, "loc": null, - "range": { - "start": 80, - "end": 90 - } + "range": [ + 80, + 90 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 94 - } + "range": [ + 63, + 94 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 51, - "end": 94 - }, + "range": [ + 51, + 94 + ], "loc": null, - "range": { - "start": 51, - "end": 94 - } + "range": [ + 51, + 94 + ] }, "loc": null, - "range": { - "start": 47, - "end": 94 - } + "range": [ + 47, + 94 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 95 - } + "range": [ + 43, + 95 + ] }, { "type": "ReturnStatement", @@ -248,42 +248,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "loc": null, - "range": { - "start": 98, - "end": 107 - } + "range": [ + 98, + 107 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 109 - } + "range": [ + 22, + 109 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 109 - }, + "range": [ + 0, + 109 + ], "loc": null, - "range": { - "start": 0, - "end": 109 - } + "range": [ + 0, + 109 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 109 - } + "range": [ + 0, + 109 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-skip-computed-path.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-skip-computed-path.js.snap index a9e5028745..f2d223bdaa 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-skip-computed-path.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-skip-computed-path.js.snap @@ -21,10 +21,10 @@ Output: "name": "StoreLandingUnseenGiftModalContainer", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 45 - } + "range": [ + 9, + 45 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "giftsSeen", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 68 - } + "range": [ + 59, + 68 + ] }, "init": { "type": "ObjectExpression", @@ -67,50 +67,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 76 - } + "range": [ + 71, + 76 + ] }, "loc": null, - "range": { - "start": 59, - "end": 76 - } + "range": [ + 59, + 76 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 77 - } + "range": [ + 53, + 77 + ] }, { "type": "ReturnStatement", @@ -125,10 +125,10 @@ Output: "name": "gift", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 93 - } + "range": [ + 89, + 93 + ] } ], "body": { @@ -140,36 +140,36 @@ Output: "name": "gift", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 103 - } + "range": [ + 99, + 103 + ] }, "property": { "type": "Identifier", "name": "id", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 106 - } + "range": [ + 104, + 106 + ] }, "computed": false, "loc": null, - "range": { - "start": 99, - "end": 106 - } + "range": [ + 99, + 106 + ] }, "alternate": { "type": "BooleanLiteral", "value": false, "loc": null, - "range": { - "start": 130, - "end": 135 - } + "range": [ + 130, + 135 + ] }, "consequent": { "type": "MemberExpression", @@ -178,10 +178,10 @@ Output: "name": "giftsSeen", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 118 - } + "range": [ + 109, + 118 + ] }, "property": { "type": "MemberExpression", @@ -190,93 +190,93 @@ Output: "name": "gift", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 123 - } + "range": [ + 119, + 123 + ] }, "property": { "type": "Identifier", "name": "id", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 126 - } + "range": [ + 124, + 126 + ] }, "computed": false, "loc": null, - "range": { - "start": 119, - "end": 126 - } + "range": [ + 119, + 126 + ] }, "computed": true, "loc": null, - "range": { - "start": 109, - "end": 127 - } + "range": [ + 109, + 127 + ] }, "loc": null, - "range": { - "start": 99, - "end": 135 - } + "range": [ + 99, + 135 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 88, - "end": 136 - }, + "range": [ + 88, + 136 + ], "expression": true, "loc": null, - "range": { - "start": 88, - "end": 136 - } + "range": [ + 88, + 136 + ] }, "arguments": [], "loc": null, - "range": { - "start": 87, - "end": 139 - } + "range": [ + 87, + 139 + ] }, "loc": null, - "range": { - "start": 80, - "end": 140 - } + "range": [ + 80, + 140 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 142 - } + "range": [ + 49, + 142 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 142 - }, + "range": [ + 0, + 142 + ], "loc": null, - "range": { - "start": 0, - "end": 142 - } + "range": [ + 0, + 142 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 142 - } + "range": [ + 0, + 142 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-within-block.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-within-block.js.snap index 27c8b302fb..3ec5a8c3f8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-within-block.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-function-within-block.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -73,50 +73,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -129,24 +129,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 49 - } + "range": [ + 43, + 49 + ] }, { "type": "BlockStatement", @@ -161,10 +161,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "right": { "type": "FunctionExpression", @@ -184,27 +184,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 89 - } + "range": [ + 82, + 89 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 93 - } + "range": [ + 90, + 93 + ] }, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 93 - } + "range": [ + 82, + 93 + ] }, "arguments": [ { @@ -212,64 +212,64 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 96 - } + "range": [ + 82, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 82, - "end": 97 - } + "range": [ + 82, + 97 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 103 - } + "range": [ + 74, + 103 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 62, - "end": 103 - }, + "range": [ + 62, + 103 + ], "loc": null, - "range": { - "start": 62, - "end": 103 - } + "range": [ + 62, + 103 + ] }, "loc": null, - "range": { - "start": 58, - "end": 103 - } + "range": [ + 58, + 103 + ] }, "directive": null, "loc": null, - "range": { - "start": 58, - "end": 104 - } + "range": [ + 58, + 104 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 108 - } + "range": [ + 52, + 108 + ] }, { "type": "ReturnStatement", @@ -278,42 +278,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "loc": null, - "range": { - "start": 111, - "end": 120 - } + "range": [ + 111, + 120 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 122 - } + "range": [ + 22, + 122 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 122 - }, + "range": [ + 0, + 122 + ], "loc": null, - "range": { - "start": 0, - "end": 122 - } + "range": [ + 0, + 122 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 122 - } + "range": [ + 0, + 122 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-member-expr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-member-expr.js.snap index 4dc0a5ab0d..2d25273b7c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-member-expr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-member-expr.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -70,50 +70,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -126,10 +126,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "FunctionExpression", @@ -149,27 +149,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 76 - } + "range": [ + 69, + 76 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 80 - } + "range": [ + 77, + 80 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 80 - } + "range": [ + 69, + 80 + ] }, "arguments": [ { @@ -179,74 +179,74 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] }, "computed": false, "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 85 - } + "range": [ + 69, + 85 + ] }, "directive": null, "loc": null, - "range": { - "start": 69, - "end": 86 - } + "range": [ + 69, + 86 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 90 - } + "range": [ + 63, + 90 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 51, - "end": 90 - }, + "range": [ + 51, + 90 + ], "loc": null, - "range": { - "start": 51, - "end": 90 - } + "range": [ + 51, + 90 + ] }, "loc": null, - "range": { - "start": 47, - "end": 90 - } + "range": [ + 47, + 90 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 91 - } + "range": [ + 43, + 91 + ] }, { "type": "ReturnStatement", @@ -255,42 +255,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "loc": null, - "range": { - "start": 94, - "end": 103 - } + "range": [ + 94, + 103 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 105 - } + "range": [ + 22, + 105 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 105 - }, + "range": [ + 0, + 105 + ], "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-call.js.snap index 89cc8d685c..76dacb2eea 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-call.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -70,10 +70,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "ObjectExpression", @@ -85,67 +85,67 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 44 - } + "range": [ + 39, + 44 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 46 - } + "range": [ + 34, + 46 + ] }, "loc": null, - "range": { - "start": 30, - "end": 46 - } + "range": [ + 30, + 46 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 47 - } + "range": [ + 26, + 47 + ] }, { "type": "VariableDeclaration", @@ -158,10 +158,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "init": { "type": "FunctionExpression", @@ -183,91 +183,91 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 81 - } + "range": [ + 76, + 81 + ] }, "arguments": [], "loc": null, - "range": { - "start": 76, - "end": 83 - } + "range": [ + 76, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 84 - } + "range": [ + 76, + 84 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 88 - } + "range": [ + 70, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 88 - }, + "range": [ + 58, + 88 + ], "loc": null, - "range": { - "start": 58, - "end": 88 - } + "range": [ + 58, + 88 + ] }, "loc": null, - "range": { - "start": 54, - "end": 88 - } + "range": [ + 54, + 88 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 89 - } + "range": [ + 50, + 89 + ] }, { "type": "ReturnStatement", @@ -276,42 +276,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 103 - } + "range": [ + 22, + 103 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 103 - }, + "range": [ + 0, + 103 + ], "loc": null, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 103 - } + "range": [ + 0, + 103 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-expr-in-nested-func.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-expr-in-nested-func.js.snap index 9a4c7771aa..3d90d300c2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-expr-in-nested-func.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-expr-in-nested-func.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -72,10 +72,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "ObjectExpression", @@ -87,67 +87,67 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 44 - } + "range": [ + 39, + 44 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 46 - } + "range": [ + 34, + 46 + ] }, "loc": null, - "range": { - "start": 30, - "end": 46 - } + "range": [ + 30, + 46 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 47 - } + "range": [ + 26, + 47 + ] }, { "type": "VariableDeclaration", @@ -160,10 +160,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "init": { "type": "FunctionExpression", @@ -194,27 +194,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 104 - } + "range": [ + 97, + 104 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 108 - } + "range": [ + 105, + 108 + ] }, "computed": false, "loc": null, - "range": { - "start": 97, - "end": 108 - } + "range": [ + 97, + 108 + ] }, "arguments": [ { @@ -226,125 +226,125 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 112 - } + "range": [ + 109, + 112 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 114 - } + "range": [ + 109, + 114 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 115 - } + "range": [ + 97, + 115 + ] }, "directive": null, "loc": null, - "range": { - "start": 97, - "end": 116 - } + "range": [ + 97, + 116 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 122 - } + "range": [ + 89, + 122 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 77, - "end": 122 - }, + "range": [ + 77, + 122 + ], "loc": null, - "range": { - "start": 77, - "end": 122 - } + "range": [ + 77, + 122 + ] }, "arguments": [], "loc": null, - "range": { - "start": 76, - "end": 125 - } + "range": [ + 76, + 125 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 126 - } + "range": [ + 76, + 126 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 130 - } + "range": [ + 70, + 130 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 130 - }, + "range": [ + 58, + 130 + ], "loc": null, - "range": { - "start": 58, - "end": 130 - } + "range": [ + 58, + 130 + ] }, "loc": null, - "range": { - "start": 54, - "end": 130 - } + "range": [ + 54, + 130 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 131 - } + "range": [ + 50, + 131 + ] }, { "type": "ReturnStatement", @@ -353,42 +353,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "loc": null, - "range": { - "start": 134, - "end": 143 - } + "range": [ + 134, + 143 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 145 - } + "range": [ + 22, + 145 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 145 - }, + "range": [ + 0, + 145 + ], "loc": null, - "range": { - "start": 0, - "end": 145 - } + "range": [ + 0, + 145 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 145 - } + "range": [ + 0, + 145 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-expr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-expr.js.snap index baa9d56ba3..f9f92dfa9c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-expr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-nested-member-expr.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -70,10 +70,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "ObjectExpression", @@ -85,67 +85,67 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 44 - } + "range": [ + 39, + 44 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 46 - } + "range": [ + 34, + 46 + ] }, "loc": null, - "range": { - "start": 30, - "end": 46 - } + "range": [ + 30, + 46 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 47 - } + "range": [ + 26, + 47 + ] }, { "type": "VariableDeclaration", @@ -158,10 +158,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "init": { "type": "FunctionExpression", @@ -181,27 +181,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 83 - } + "range": [ + 76, + 83 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 87 - } + "range": [ + 84, + 87 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 87 - } + "range": [ + 76, + 87 + ] }, "arguments": [ { @@ -213,91 +213,91 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 91 - } + "range": [ + 88, + 91 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 94 - } + "range": [ + 76, + 94 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 95 - } + "range": [ + 76, + 95 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 99 - } + "range": [ + 70, + 99 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 58, - "end": 99 - }, + "range": [ + 58, + 99 + ], "loc": null, - "range": { - "start": 58, - "end": 99 - } + "range": [ + 58, + 99 + ] }, "loc": null, - "range": { - "start": 54, - "end": 99 - } + "range": [ + 54, + 99 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 100 - } + "range": [ + 50, + 100 + ] }, { "type": "ReturnStatement", @@ -306,42 +306,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "loc": null, - "range": { - "start": 103, - "end": 112 - } + "range": [ + 103, + 112 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 114 - } + "range": [ + 22, + 114 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 114 - }, + "range": [ + 0, + 114 + ], "loc": null, - "range": { - "start": 0, - "end": 114 - } + "range": [ + 0, + 114 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 114 - } + "range": [ + 0, + 114 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-reference-changes-type.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-reference-changes-type.js.snap index 2259333c78..63b8a43a47 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-reference-changes-type.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-reference-changes-type.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -72,50 +72,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -128,32 +128,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "loc": null, - "range": { - "start": 47, - "end": 52 - } + "range": [ + 47, + 52 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 53 - } + "range": [ + 43, + 53 + ] }, { "type": "ExpressionStatement", @@ -176,67 +176,67 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "loc": null, - "range": { - "start": 75, - "end": 80 - } + "range": [ + 75, + 80 + ] }, "directive": null, "loc": null, - "range": { - "start": 75, - "end": 81 - } + "range": [ + 75, + 81 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 85 - } + "range": [ + 69, + 85 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 57, - "end": 85 - }, + "range": [ + 57, + 85 + ], "loc": null, - "range": { - "start": 57, - "end": 85 - } + "range": [ + 57, + 85 + ] }, "arguments": [], "loc": null, - "range": { - "start": 56, - "end": 88 - } + "range": [ + 56, + 88 + ] }, "directive": null, "loc": null, - "range": { - "start": 56, - "end": 89 - } + "range": [ + 56, + 89 + ] }, { "type": "ExpressionStatement", @@ -247,10 +247,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 98 - } + "range": [ + 92, + 98 + ] }, "arguments": [ { @@ -258,24 +258,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] }, "directive": null, "loc": null, - "range": { - "start": 92, - "end": 102 - } + "range": [ + 92, + 102 + ] }, { "type": "ReturnStatement", @@ -284,42 +284,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "loc": null, - "range": { - "start": 105, - "end": 114 - } + "range": [ + 105, + 114 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 116 - } + "range": [ + 22, + 116 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 116 - }, + "range": [ + 0, + 116 + ], "loc": null, - "range": { - "start": 0, - "end": 116 - } + "range": [ + 0, + 116 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 116 - } + "range": [ + 0, + 116 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-variable-in-nested-block.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-variable-in-nested-block.js.snap index 25a34f0f78..ca60c43949 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-variable-in-nested-block.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-variable-in-nested-block.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -72,50 +72,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -128,10 +128,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "FunctionExpression", @@ -154,27 +154,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 84 - } + "range": [ + 77, + 84 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 88 - } + "range": [ + 85, + 88 + ] }, "computed": false, "loc": null, - "range": { - "start": 77, - "end": 88 - } + "range": [ + 77, + 88 + ] }, "arguments": [ { @@ -182,64 +182,64 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 91 - } + "range": [ + 77, + 91 + ] }, "directive": null, "loc": null, - "range": { - "start": 77, - "end": 92 - } + "range": [ + 77, + 92 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 98 - } + "range": [ + 69, + 98 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 102 - } + "range": [ + 63, + 102 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 51, - "end": 102 - }, + "range": [ + 51, + 102 + ], "loc": null, - "range": { - "start": 51, - "end": 102 - } + "range": [ + 51, + 102 + ] }, "loc": null, - "range": { - "start": 47, - "end": 102 - } + "range": [ + 47, + 102 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 103 - } + "range": [ + 43, + 103 + ] }, { "type": "ReturnStatement", @@ -248,42 +248,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 117 - } + "range": [ + 22, + 117 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 117 - }, + "range": [ + 0, + 117 + ], "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-variable-in-nested-function.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-variable-in-nested-function.js.snap index 421fad428a..d7b5d6d8ac 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-variable-in-nested-function.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@capturing-variable-in-nested-function.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -72,50 +72,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -128,10 +128,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "FunctionExpression", @@ -162,27 +162,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 97 - } + "range": [ + 90, + 97 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "computed": false, "loc": null, - "range": { - "start": 90, - "end": 101 - } + "range": [ + 90, + 101 + ] }, "arguments": [ { @@ -190,91 +190,91 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 104 - } + "range": [ + 90, + 104 + ] }, "directive": null, "loc": null, - "range": { - "start": 90, - "end": 105 - } + "range": [ + 90, + 105 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 111 - } + "range": [ + 82, + 111 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 70, - "end": 111 - }, + "range": [ + 70, + 111 + ], "loc": null, - "range": { - "start": 70, - "end": 111 - } + "range": [ + 70, + 111 + ] }, "arguments": [], "loc": null, - "range": { - "start": 69, - "end": 114 - } + "range": [ + 69, + 114 + ] }, "directive": null, "loc": null, - "range": { - "start": 69, - "end": 115 - } + "range": [ + 69, + 115 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 119 - } + "range": [ + 63, + 119 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 51, - "end": 119 - }, + "range": [ + 51, + 119 + ], "loc": null, - "range": { - "start": 51, - "end": 119 - } + "range": [ + 51, + 119 + ] }, "loc": null, - "range": { - "start": 47, - "end": 119 - } + "range": [ + 47, + 119 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 120 - } + "range": [ + 43, + 120 + ] }, { "type": "ReturnStatement", @@ -283,42 +283,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "loc": null, - "range": { - "start": 123, - "end": 132 - } + "range": [ + 123, + 132 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 134 - } + "range": [ + 22, + 134 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 134 - }, + "range": [ + 0, + 134 + ], "loc": null, - "range": { - "start": 0, - "end": 134 - } + "range": [ + 0, + 134 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 134 - } + "range": [ + 0, + 134 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@chained-assignment-context-variable.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@chained-assignment-context-variable.js.snap index 878b8a04bf..fa58d6c897 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@chained-assignment-context-variable.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@chained-assignment-context-variable.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -46,17 +46,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, { "type": "VariableDeclarator", @@ -65,10 +65,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "AssignmentExpression", @@ -78,38 +78,38 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 45, - "end": 47 - } + "range": [ + 45, + 47 + ] }, "loc": null, - "range": { - "start": 41, - "end": 47 - } + "range": [ + 41, + 47 + ] }, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 49 - } + "range": [ + 25, + 49 + ] }, { "type": "VariableDeclaration", @@ -122,10 +122,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 61 - } + "range": [ + 58, + 61 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -144,10 +144,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "right": { "type": "CallExpression", @@ -156,64 +156,64 @@ Output: "name": "getObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 89 - } + "range": [ + 80, + 89 + ] }, "arguments": [], "loc": null, - "range": { - "start": 80, - "end": 91 - } + "range": [ + 80, + 91 + ] }, "loc": null, - "range": { - "start": 76, - "end": 91 - } + "range": [ + 76, + 91 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 92 - } + "range": [ + 76, + 92 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 96 - } + "range": [ + 70, + 96 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 64, - "end": 96 - }, + "range": [ + 64, + 96 + ], "expression": false, "loc": null, - "range": { - "start": 64, - "end": 96 - } + "range": [ + 64, + 96 + ] }, "loc": null, - "range": { - "start": 58, - "end": 96 - } + "range": [ + 58, + 96 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 97 - } + "range": [ + 52, + 97 + ] }, { "type": "ExpressionStatement", @@ -224,24 +224,24 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 103 - } + "range": [ + 100, + 103 + ] }, "arguments": [], "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "directive": null, "loc": null, - "range": { - "start": 100, - "end": 106 - } + "range": [ + 100, + 106 + ] }, { "type": "ReturnStatement", @@ -253,59 +253,59 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] } ], "loc": null, - "range": { - "start": 116, - "end": 122 - } + "range": [ + 116, + 122 + ] }, "loc": null, - "range": { - "start": 109, - "end": 123 - } + "range": [ + 109, + 123 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 125 - } + "range": [ + 21, + 125 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 125 - }, + "range": [ + 0, + 125 + ], "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@chained-assignment-expressions.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@chained-assignment-expressions.js.snap index 1e2fa8d287..57bb3fe92f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@chained-assignment-expressions.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@chained-assignment-expressions.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -45,10 +45,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ObjectExpression", @@ -60,49 +60,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "value": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 31, - "end": 35 - } + "range": [ + 31, + 35 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 37 - } + "range": [ + 29, + 37 + ] }, "loc": null, - "range": { - "start": 25, - "end": 37 - } + "range": [ + 25, + 37 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 38 - } + "range": [ + 19, + 38 + ] }, { "type": "VariableDeclaration", @@ -115,10 +115,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ObjectExpression", @@ -130,49 +130,49 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "value": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 57 - } + "range": [ + 53, + 57 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 59 - } + "range": [ + 51, + 59 + ] }, "loc": null, - "range": { - "start": 47, - "end": 59 - } + "range": [ + 47, + 59 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 60 - } + "range": [ + 41, + 60 + ] }, { "type": "VariableDeclaration", @@ -185,10 +185,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "init": { "type": "ObjectExpression", @@ -200,49 +200,49 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "value": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 81 - } + "range": [ + 73, + 81 + ] }, "loc": null, - "range": { - "start": 69, - "end": 81 - } + "range": [ + 69, + 81 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 82 - } + "range": [ + 63, + 82 + ] }, { "type": "ExpressionStatement", @@ -256,27 +256,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "computed": false, "loc": null, - "range": { - "start": 85, - "end": 88 - } + "range": [ + 85, + 88 + ] }, "right": { "type": "AssignmentExpression", @@ -288,55 +288,55 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "computed": false, "loc": null, - "range": { - "start": 92, - "end": 95 - } + "range": [ + 92, + 95 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": null, - "range": { - "start": 92, - "end": 100 - } + "range": [ + 92, + 100 + ] }, "loc": null, - "range": { - "start": 85, - "end": 100 - } + "range": [ + 85, + 100 + ] }, "directive": null, "loc": null, - "range": { - "start": 85, - "end": 101 - } + "range": [ + 85, + 101 + ] }, { "type": "ExpressionStatement", @@ -350,27 +350,27 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "computed": false, "loc": null, - "range": { - "start": 104, - "end": 107 - } + "range": [ + 104, + 107 + ] }, "right": { "type": "AssignmentExpression", @@ -382,27 +382,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "computed": false, "loc": null, - "range": { - "start": 111, - "end": 114 - } + "range": [ + 111, + 114 + ] }, "right": { "type": "AssignmentExpression", @@ -414,61 +414,61 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "computed": false, "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "loc": null, - "range": { - "start": 118, - "end": 126 - } + "range": [ + 118, + 126 + ] }, "loc": null, - "range": { - "start": 111, - "end": 126 - } + "range": [ + 111, + 126 + ] }, "loc": null, - "range": { - "start": 104, - "end": 126 - } + "range": [ + 104, + 126 + ] }, "directive": null, "loc": null, - "range": { - "start": 104, - "end": 127 - } + "range": [ + 104, + 127 + ] }, { "type": "ReturnStatement", @@ -477,42 +477,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "loc": null, - "range": { - "start": 130, - "end": 139 - } + "range": [ + 130, + 139 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 141 - } + "range": [ + 15, + 141 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 141 - }, + "range": [ + 0, + 141 + ], "loc": null, - "range": { - "start": 0, - "end": 141 - } + "range": [ + 0, + 141 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 141 - } + "range": [ + 0, + 141 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-emit-imports-same-source.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-emit-imports-same-source.js.snap index 22d44f2b6e..f1212a77ac 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-emit-imports-same-source.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-emit-imports-same-source.js.snap @@ -22,10 +22,10 @@ Output: "name": "useFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 55 - } + "range": [ + 49, + 55 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] } ], "body": { @@ -51,10 +51,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 77 - } + "range": [ + 74, + 77 + ] }, "arguments": [ { @@ -64,66 +64,66 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 85 - } + "range": [ + 78, + 85 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 86 - } + "range": [ + 74, + 86 + ] }, "loc": null, - "range": { - "start": 67, - "end": 87 - } + "range": [ + 67, + 87 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 89 - } + "range": [ + 63, + 89 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 40, - "end": 89 - }, + "range": [ + 40, + 89 + ], "loc": null, - "range": { - "start": 40, - "end": 89 - } + "range": [ + 40, + 89 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 40, - "end": 89 - } + "range": [ + 40, + 89 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-emit-make-read-only.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-emit-make-read-only.js.snap index 2edf66a74e..774533658b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-emit-make-read-only.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-emit-make-read-only.js.snap @@ -28,10 +28,10 @@ Output: "name": "MyComponentName", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 51 - } + "range": [ + 36, + 51 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] } ], "body": { @@ -59,32 +59,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 71, - "end": 73 - } + "range": [ + 71, + 73 + ] }, "loc": null, - "range": { - "start": 67, - "end": 73 - } + "range": [ + 67, + 73 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 74 - } + "range": [ + 63, + 74 + ] }, { "type": "ExpressionStatement", @@ -95,10 +95,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 80 - } + "range": [ + 77, + 80 + ] }, "arguments": [ { @@ -106,10 +106,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, { "type": "MemberExpression", @@ -118,41 +118,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 89 - } + "range": [ + 84, + 89 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 84, - "end": 91 - } + "range": [ + 84, + 91 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 92 - } + "range": [ + 77, + 92 + ] }, "directive": null, "loc": null, - "range": { - "start": 77, - "end": 93 - } + "range": [ + 77, + 93 + ] }, { "type": "ExpressionStatement", @@ -163,10 +163,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 99 - } + "range": [ + 96, + 99 + ] }, "arguments": [ { @@ -174,10 +174,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, { "type": "MemberExpression", @@ -186,41 +186,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "computed": false, "loc": null, - "range": { - "start": 103, - "end": 110 - } + "range": [ + 103, + 110 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 111 - } + "range": [ + 96, + 111 + ] }, "directive": null, "loc": null, - "range": { - "start": 96, - "end": 112 - } + "range": [ + 96, + 112 + ] }, { "type": "VariableDeclaration", @@ -233,32 +233,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 124, - "end": 126 - } + "range": [ + 124, + 126 + ] }, "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] } ], "loc": null, - "range": { - "start": 116, - "end": 127 - } + "range": [ + 116, + 127 + ] }, { "type": "ExpressionStatement", @@ -271,27 +271,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 136 - } + "range": [ + 132, + 136 + ] }, "computed": false, "loc": null, - "range": { - "start": 130, - "end": 136 - } + "range": [ + 130, + 136 + ] }, "arguments": [ { @@ -299,24 +299,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] } ], "loc": null, - "range": { - "start": 130, - "end": 139 - } + "range": [ + 130, + 139 + ] }, "directive": null, "loc": null, - "range": { - "start": 130, - "end": 140 - } + "range": [ + 130, + 140 + ] }, { "type": "ReturnStatement", @@ -325,42 +325,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "loc": null, - "range": { - "start": 143, - "end": 152 - } + "range": [ + 143, + 152 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 154 - } + "range": [ + 59, + 154 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 27, - "end": 154 - }, + "range": [ + 27, + 154 + ], "loc": null, - "range": { - "start": 27, - "end": 154 - } + "range": [ + 27, + 154 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 27, - "end": 154 - } + "range": [ + 27, + 154 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-instrument-forget-gating-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-instrument-forget-gating-test.js.snap index c76a4150ac..5508a16fd9 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-instrument-forget-gating-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-instrument-forget-gating-test.js.snap @@ -32,10 +32,10 @@ Output: "name": "Bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "params": [ { @@ -43,10 +43,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] } ], "body": { @@ -58,17 +58,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 71, - "end": 83 - } + "range": [ + 71, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 71, - "end": 84 - } + "range": [ + 71, + 84 + ] }, { "type": "ReturnStatement", @@ -80,18 +80,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 95, - "end": 98 - } + "range": [ + 95, + 98 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 94, - "end": 99 - } + "range": [ + 94, + 99 + ] }, "children": [ { @@ -103,33 +103,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 109 - } + "range": [ + 106, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 109 - } + "range": [ + 100, + 109 + ] }, "loc": null, - "range": { - "start": 99, - "end": 110 - } + "range": [ + 99, + 110 + ] } ], "closingElement": { @@ -138,48 +138,48 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 112, - "end": 115 - } + "range": [ + 112, + 115 + ] }, "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] }, "loc": null, - "range": { - "start": 94, - "end": 116 - } + "range": [ + 94, + 116 + ] }, "loc": null, - "range": { - "start": 87, - "end": 117 - } + "range": [ + 87, + 117 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 119 - } + "range": [ + 67, + 119 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 47, - "end": 119 - }, + "range": [ + 47, + 119 + ], "loc": null, - "range": { - "start": 47, - "end": 119 - } + "range": [ + 47, + 119 + ] }, { "type": "FunctionDeclaration", @@ -188,10 +188,10 @@ Output: "name": "NoForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 138 - } + "range": [ + 130, + 138 + ] }, "params": [ { @@ -199,10 +199,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 144 - } + "range": [ + 139, + 144 + ] } ], "body": { @@ -218,18 +218,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 158, - "end": 161 - } + "range": [ + 158, + 161 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 157, - "end": 162 - } + "range": [ + 157, + 162 + ] }, "children": [ { @@ -241,33 +241,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 168 - } + "range": [ + 163, + 168 + ] }, "property": { "type": "Identifier", "name": "noForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 177 - } + "range": [ + 169, + 177 + ] }, "computed": false, "loc": null, - "range": { - "start": 163, - "end": 177 - } + "range": [ + 163, + 177 + ] }, "loc": null, - "range": { - "start": 162, - "end": 178 - } + "range": [ + 162, + 178 + ] } ], "closingElement": { @@ -276,48 +276,48 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 180, - "end": 183 - } + "range": [ + 180, + 183 + ] }, "loc": null, - "range": { - "start": 178, - "end": 184 - } + "range": [ + 178, + 184 + ] }, "loc": null, - "range": { - "start": 157, - "end": 184 - } + "range": [ + 157, + 184 + ] }, "loc": null, - "range": { - "start": 150, - "end": 185 - } + "range": [ + 150, + 185 + ] } ], "loc": null, - "range": { - "start": 146, - "end": 187 - } + "range": [ + 146, + 187 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 121, - "end": 187 - }, + "range": [ + 121, + 187 + ], "loc": null, - "range": { - "start": 121, - "end": 187 - } + "range": [ + 121, + 187 + ] }, { "type": "FunctionDeclaration", @@ -326,10 +326,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 201 - } + "range": [ + 198, + 201 + ] }, "params": [ { @@ -337,10 +337,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 207 - } + "range": [ + 202, + 207 + ] } ], "body": { @@ -352,17 +352,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 213, - "end": 225 - } + "range": [ + 213, + 225 + ] }, "directive": null, "loc": null, - "range": { - "start": 213, - "end": 226 - } + "range": [ + 213, + 226 + ] }, { "type": "ReturnStatement", @@ -374,18 +374,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 237, - "end": 240 - } + "range": [ + 237, + 240 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 236, - "end": 241 - } + "range": [ + 236, + 241 + ] }, "children": [ { @@ -397,33 +397,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 242, - "end": 247 - } + "range": [ + 242, + 247 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 248, - "end": 251 - } + "range": [ + 248, + 251 + ] }, "computed": false, "loc": null, - "range": { - "start": 242, - "end": 251 - } + "range": [ + 242, + 251 + ] }, "loc": null, - "range": { - "start": 241, - "end": 252 - } + "range": [ + 241, + 252 + ] } ], "closingElement": { @@ -432,54 +432,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 254, - "end": 257 - } + "range": [ + 254, + 257 + ] }, "loc": null, - "range": { - "start": 252, - "end": 258 - } + "range": [ + 252, + 258 + ] }, "loc": null, - "range": { - "start": 236, - "end": 258 - } + "range": [ + 236, + 258 + ] }, "loc": null, - "range": { - "start": 229, - "end": 259 - } + "range": [ + 229, + 259 + ] } ], "loc": null, - "range": { - "start": 209, - "end": 261 - } + "range": [ + 209, + 261 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 189, - "end": 261 - }, + "range": [ + 189, + 261 + ], "loc": null, - "range": { - "start": 189, - "end": 261 - } + "range": [ + 189, + 261 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 47, - "end": 261 - } + "range": [ + 47, + 261 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-instrument-forget-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-instrument-forget-test.js.snap index 6dc8eda3dd..eb41519908 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-instrument-forget-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@codegen-instrument-forget-test.js.snap @@ -32,10 +32,10 @@ Output: "name": "Bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 51 - } + "range": [ + 48, + 51 + ] }, "params": [ { @@ -43,10 +43,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] } ], "body": { @@ -58,17 +58,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 63, - "end": 75 - } + "range": [ + 63, + 75 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 76 - } + "range": [ + 63, + 76 + ] }, { "type": "ReturnStatement", @@ -80,18 +80,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 87, - "end": 90 - } + "range": [ + 87, + 90 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 86, - "end": 91 - } + "range": [ + 86, + 91 + ] }, "children": [ { @@ -103,33 +103,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 97 - } + "range": [ + 92, + 97 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "computed": false, "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] }, "loc": null, - "range": { - "start": 91, - "end": 102 - } + "range": [ + 91, + 102 + ] } ], "closingElement": { @@ -138,48 +138,48 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 104, - "end": 107 - } + "range": [ + 104, + 107 + ] }, "loc": null, - "range": { - "start": 102, - "end": 108 - } + "range": [ + 102, + 108 + ] }, "loc": null, - "range": { - "start": 86, - "end": 108 - } + "range": [ + 86, + 108 + ] }, "loc": null, - "range": { - "start": 79, - "end": 109 - } + "range": [ + 79, + 109 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 111 - } + "range": [ + 59, + 111 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 39, - "end": 111 - }, + "range": [ + 39, + 111 + ], "loc": null, - "range": { - "start": 39, - "end": 111 - } + "range": [ + 39, + 111 + ] }, { "type": "FunctionDeclaration", @@ -188,10 +188,10 @@ Output: "name": "NoForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 130 - } + "range": [ + 122, + 130 + ] }, "params": [ { @@ -199,10 +199,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] } ], "body": { @@ -218,18 +218,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 150, - "end": 153 - } + "range": [ + 150, + 153 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 149, - "end": 154 - } + "range": [ + 149, + 154 + ] }, "children": [ { @@ -241,33 +241,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 160 - } + "range": [ + 155, + 160 + ] }, "property": { "type": "Identifier", "name": "noForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 169 - } + "range": [ + 161, + 169 + ] }, "computed": false, "loc": null, - "range": { - "start": 155, - "end": 169 - } + "range": [ + 155, + 169 + ] }, "loc": null, - "range": { - "start": 154, - "end": 170 - } + "range": [ + 154, + 170 + ] } ], "closingElement": { @@ -276,48 +276,48 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 172, - "end": 175 - } + "range": [ + 172, + 175 + ] }, "loc": null, - "range": { - "start": 170, - "end": 176 - } + "range": [ + 170, + 176 + ] }, "loc": null, - "range": { - "start": 149, - "end": 176 - } + "range": [ + 149, + 176 + ] }, "loc": null, - "range": { - "start": 142, - "end": 177 - } + "range": [ + 142, + 177 + ] } ], "loc": null, - "range": { - "start": 138, - "end": 179 - } + "range": [ + 138, + 179 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 113, - "end": 179 - }, + "range": [ + 113, + 179 + ], "loc": null, - "range": { - "start": 113, - "end": 179 - } + "range": [ + 113, + 179 + ] }, { "type": "FunctionDeclaration", @@ -326,10 +326,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 193 - } + "range": [ + 190, + 193 + ] }, "params": [ { @@ -337,10 +337,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 199 - } + "range": [ + 194, + 199 + ] } ], "body": { @@ -352,17 +352,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 205, - "end": 217 - } + "range": [ + 205, + 217 + ] }, "directive": null, "loc": null, - "range": { - "start": 205, - "end": 218 - } + "range": [ + 205, + 218 + ] }, { "type": "ReturnStatement", @@ -374,18 +374,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 229, - "end": 232 - } + "range": [ + 229, + 232 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 228, - "end": 233 - } + "range": [ + 228, + 233 + ] }, "children": [ { @@ -397,33 +397,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 234, - "end": 239 - } + "range": [ + 234, + 239 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 240, - "end": 243 - } + "range": [ + 240, + 243 + ] }, "computed": false, "loc": null, - "range": { - "start": 234, - "end": 243 - } + "range": [ + 234, + 243 + ] }, "loc": null, - "range": { - "start": 233, - "end": 244 - } + "range": [ + 233, + 244 + ] } ], "closingElement": { @@ -432,54 +432,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 246, - "end": 249 - } + "range": [ + 246, + 249 + ] }, "loc": null, - "range": { - "start": 244, - "end": 250 - } + "range": [ + 244, + 250 + ] }, "loc": null, - "range": { - "start": 228, - "end": 250 - } + "range": [ + 228, + 250 + ] }, "loc": null, - "range": { - "start": 221, - "end": 251 - } + "range": [ + 221, + 251 + ] } ], "loc": null, - "range": { - "start": 201, - "end": 253 - } + "range": [ + 201, + 253 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 181, - "end": 253 - }, + "range": [ + 181, + 253 + ], "loc": null, - "range": { - "start": 181, - "end": 253 - } + "range": [ + 181, + 253 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 39, - "end": 253 - } + "range": [ + 39, + 253 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@complex-while.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@complex-while.js.snap index 67fd5b5188..ce3d6f06e2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@complex-while.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@complex-while.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,30 +38,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -74,10 +74,10 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 31 - } + "range": [ + 26, + 31 + ] }, "body": { "type": "IfStatement", @@ -86,10 +86,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "consequent": { "type": "BlockStatement", @@ -101,10 +101,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "body": { "type": "BlockStatement", @@ -116,10 +116,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "consequent": { "type": "BlockStatement", @@ -131,63 +131,63 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 92 - } + "range": [ + 87, + 92 + ] }, "loc": null, - "range": { - "start": 81, - "end": 93 - } + "range": [ + 81, + 93 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 101 - } + "range": [ + 71, + 101 + ] }, "alternate": null, "loc": null, - "range": { - "start": 64, - "end": 101 - } + "range": [ + 64, + 101 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 107 - } + "range": [ + 56, + 107 + ] }, "loc": null, - "range": { - "start": 46, - "end": 107 - } + "range": [ + 46, + 107 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 111 - } + "range": [ + 40, + 111 + ] }, "alternate": null, "loc": null, - "range": { - "start": 33, - "end": 111 - } + "range": [ + 33, + 111 + ] }, "loc": null, - "range": { - "start": 26, - "end": 111 - } + "range": [ + 26, + 111 + ] }, { "type": "ReturnStatement", @@ -196,42 +196,42 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "loc": null, - "range": { - "start": 114, - "end": 123 - } + "range": [ + 114, + 123 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 125 - } + "range": [ + 22, + 125 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 125 - }, + "range": [ + 0, + 125 + ], "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@component.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@component.js.snap index cdbf2a7a93..d47e7cc1ad 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@component.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@component.js.snap @@ -43,10 +43,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -54,10 +54,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -74,10 +74,10 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] }, "init": { "type": "MemberExpression", @@ -86,40 +86,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "computed": false, "loc": null, - "range": { - "start": 44, - "end": 55 - } + "range": [ + 44, + 55 + ] }, "loc": null, - "range": { - "start": 36, - "end": 55 - } + "range": [ + 36, + 55 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 56 - } + "range": [ + 30, + 56 + ] }, { "type": "VariableDeclaration", @@ -132,10 +132,10 @@ Output: "name": "maxItems", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 73 - } + "range": [ + 65, + 73 + ] }, "init": { "type": "MemberExpression", @@ -144,40 +144,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 81 - } + "range": [ + 76, + 81 + ] }, "property": { "type": "Identifier", "name": "maxItems", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 90 - } + "range": [ + 82, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 90 - } + "range": [ + 76, + 90 + ] }, "loc": null, - "range": { - "start": 65, - "end": 90 - } + "range": [ + 65, + 90 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 91 - } + "range": [ + 59, + 91 + ] }, { "type": "VariableDeclaration", @@ -190,32 +190,32 @@ Output: "name": "renderedItems", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 114 - } + "range": [ + 101, + 114 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 117, - "end": 119 - } + "range": [ + 117, + 119 + ] }, "loc": null, - "range": { - "start": 101, - "end": 119 - } + "range": [ + 101, + 119 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 120 - } + "range": [ + 95, + 120 + ] }, { "type": "VariableDeclaration", @@ -228,10 +228,10 @@ Output: "name": "seen", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 133 - } + "range": [ + 129, + 133 + ] }, "init": { "type": "NewExpression", @@ -240,30 +240,30 @@ Output: "name": "Set", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 143 - } + "range": [ + 140, + 143 + ] }, "arguments": [], "loc": null, - "range": { - "start": 136, - "end": 145 - } + "range": [ + 136, + 145 + ] }, "loc": null, - "range": { - "start": 129, - "end": 145 - } + "range": [ + 129, + 145 + ] } ], "loc": null, - "range": { - "start": 123, - "end": 146 - } + "range": [ + 123, + 146 + ] }, { "type": "VariableDeclaration", @@ -276,10 +276,10 @@ Output: "name": "max", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 158 - } + "range": [ + 155, + 158 + ] }, "init": { "type": "CallExpression", @@ -290,67 +290,67 @@ Output: "name": "Math", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 165 - } + "range": [ + 161, + 165 + ] }, "property": { "type": "Identifier", "name": "max", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 169 - } + "range": [ + 166, + 169 + ] }, "computed": false, "loc": null, - "range": { - "start": 161, - "end": 169 - } + "range": [ + 161, + 169 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 170, - "end": 171 - } + "range": [ + 170, + 171 + ] }, { "type": "Identifier", "name": "maxItems", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 181 - } + "range": [ + 173, + 181 + ] } ], "loc": null, - "range": { - "start": 161, - "end": 182 - } + "range": [ + 161, + 182 + ] }, "loc": null, - "range": { - "start": 155, - "end": 182 - } + "range": [ + 155, + 182 + ] } ], "loc": null, - "range": { - "start": 149, - "end": 183 - } + "range": [ + 149, + 183 + ] }, { "type": "ForStatement", @@ -365,32 +365,32 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 199, - "end": 200 - } + "range": [ + 199, + 200 + ] }, "loc": null, - "range": { - "start": 195, - "end": 200 - } + "range": [ + 195, + 200 + ] } ], "loc": null, - "range": { - "start": 191, - "end": 200 - } + "range": [ + 191, + 200 + ] }, "test": { "type": "BinaryExpression", @@ -399,10 +399,10 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 203 - } + "range": [ + 202, + 203 + ] }, "operator": "<", "right": { @@ -412,33 +412,33 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 211 - } + "range": [ + 206, + 211 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 218 - } + "range": [ + 212, + 218 + ] }, "computed": false, "loc": null, - "range": { - "start": 206, - "end": 218 - } + "range": [ + 206, + 218 + ] }, "loc": null, - "range": { - "start": 202, - "end": 218 - } + "range": [ + 202, + 218 + ] }, "update": { "type": "AssignmentExpression", @@ -448,25 +448,25 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 220, - "end": 221 - } + "range": [ + 220, + 221 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 225, - "end": 226 - } + "range": [ + 225, + 226 + ] }, "loc": null, - "range": { - "start": 220, - "end": 226 - } + "range": [ + 220, + 226 + ] }, "body": { "type": "BlockStatement", @@ -482,10 +482,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 240, - "end": 244 - } + "range": [ + 240, + 244 + ] }, "init": { "type": "CallExpression", @@ -496,27 +496,27 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 247, - "end": 252 - } + "range": [ + 247, + 252 + ] }, "property": { "type": "Identifier", "name": "at", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 255 - } + "range": [ + 253, + 255 + ] }, "computed": false, "loc": null, - "range": { - "start": 247, - "end": 255 - } + "range": [ + 247, + 255 + ] }, "arguments": [ { @@ -524,30 +524,30 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 256, - "end": 257 - } + "range": [ + 256, + 257 + ] } ], "loc": null, - "range": { - "start": 247, - "end": 258 - } + "range": [ + 247, + 258 + ] }, "loc": null, - "range": { - "start": 240, - "end": 258 - } + "range": [ + 240, + 258 + ] } ], "loc": null, - "range": { - "start": 234, - "end": 259 - } + "range": [ + 234, + 259 + ] }, { "type": "IfStatement", @@ -561,25 +561,25 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 268, - "end": 272 - } + "range": [ + 268, + 272 + ] }, "operator": "==", "right": { "type": "NullLiteral", "loc": null, - "range": { - "start": 276, - "end": 280 - } + "range": [ + 276, + 280 + ] }, "loc": null, - "range": { - "start": 268, - "end": 280 - } + "range": [ + 268, + 280 + ] }, "right": { "type": "CallExpression", @@ -590,27 +590,27 @@ Output: "name": "seen", "typeAnnotation": null, "loc": null, - "range": { - "start": 284, - "end": 288 - } + "range": [ + 284, + 288 + ] }, "property": { "type": "Identifier", "name": "has", "typeAnnotation": null, "loc": null, - "range": { - "start": 289, - "end": 292 - } + "range": [ + 289, + 292 + ] }, "computed": false, "loc": null, - "range": { - "start": 284, - "end": 292 - } + "range": [ + 284, + 292 + ] }, "arguments": [ { @@ -618,23 +618,23 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 293, - "end": 297 - } + "range": [ + 293, + 297 + ] } ], "loc": null, - "range": { - "start": 284, - "end": 298 - } + "range": [ + 284, + 298 + ] }, "loc": null, - "range": { - "start": 268, - "end": 298 - } + "range": [ + 268, + 298 + ] }, "consequent": { "type": "BlockStatement", @@ -643,24 +643,24 @@ Output: "type": "ContinueStatement", "label": null, "loc": null, - "range": { - "start": 308, - "end": 317 - } + "range": [ + 308, + 317 + ] } ], "loc": null, - "range": { - "start": 300, - "end": 323 - } + "range": [ + 300, + 323 + ] }, "alternate": null, "loc": null, - "range": { - "start": 264, - "end": 323 - } + "range": [ + 264, + 323 + ] }, { "type": "ExpressionStatement", @@ -673,27 +673,27 @@ Output: "name": "seen", "typeAnnotation": null, "loc": null, - "range": { - "start": 328, - "end": 332 - } + "range": [ + 328, + 332 + ] }, "property": { "type": "Identifier", "name": "add", "typeAnnotation": null, "loc": null, - "range": { - "start": 333, - "end": 336 - } + "range": [ + 333, + 336 + ] }, "computed": false, "loc": null, - "range": { - "start": 328, - "end": 336 - } + "range": [ + 328, + 336 + ] }, "arguments": [ { @@ -701,24 +701,24 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 337, - "end": 341 - } + "range": [ + 337, + 341 + ] } ], "loc": null, - "range": { - "start": 328, - "end": 342 - } + "range": [ + 328, + 342 + ] }, "directive": null, "loc": null, - "range": { - "start": 328, - "end": 343 - } + "range": [ + 328, + 343 + ] }, { "type": "ExpressionStatement", @@ -731,27 +731,27 @@ Output: "name": "renderedItems", "typeAnnotation": null, "loc": null, - "range": { - "start": 348, - "end": 361 - } + "range": [ + 348, + 361 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 362, - "end": 366 - } + "range": [ + 362, + 366 + ] }, "computed": false, "loc": null, - "range": { - "start": 348, - "end": 366 - } + "range": [ + 348, + 366 + ] }, "arguments": [ { @@ -762,18 +762,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 368, - "end": 371 - } + "range": [ + 368, + 371 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 367, - "end": 372 - } + "range": [ + 367, + 372 + ] }, "children": [ { @@ -783,16 +783,16 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 373, - "end": 377 - } + "range": [ + 373, + 377 + ] }, "loc": null, - "range": { - "start": 372, - "end": 378 - } + "range": [ + 372, + 378 + ] } ], "closingElement": { @@ -801,36 +801,36 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 380, - "end": 383 - } + "range": [ + 380, + 383 + ] }, "loc": null, - "range": { - "start": 378, - "end": 384 - } + "range": [ + 378, + 384 + ] }, "loc": null, - "range": { - "start": 367, - "end": 384 - } + "range": [ + 367, + 384 + ] } ], "loc": null, - "range": { - "start": 348, - "end": 385 - } + "range": [ + 348, + 385 + ] }, "directive": null, "loc": null, - "range": { - "start": 348, - "end": 386 - } + "range": [ + 348, + 386 + ] }, { "type": "IfStatement", @@ -843,27 +843,27 @@ Output: "name": "renderedItems", "typeAnnotation": null, "loc": null, - "range": { - "start": 395, - "end": 408 - } + "range": [ + 395, + 408 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 409, - "end": 415 - } + "range": [ + 409, + 415 + ] }, "computed": false, "loc": null, - "range": { - "start": 395, - "end": 415 - } + "range": [ + 395, + 415 + ] }, "operator": ">=", "right": { @@ -871,16 +871,16 @@ Output: "name": "max", "typeAnnotation": null, "loc": null, - "range": { - "start": 419, - "end": 422 - } + "range": [ + 419, + 422 + ] }, "loc": null, - "range": { - "start": 395, - "end": 422 - } + "range": [ + 395, + 422 + ] }, "consequent": { "type": "BlockStatement", @@ -889,37 +889,37 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 432, - "end": 438 - } + "range": [ + 432, + 438 + ] } ], "loc": null, - "range": { - "start": 424, - "end": 444 - } + "range": [ + 424, + 444 + ] }, "alternate": null, "loc": null, - "range": { - "start": 391, - "end": 444 - } + "range": [ + 391, + 444 + ] } ], "loc": null, - "range": { - "start": 228, - "end": 448 - } + "range": [ + 228, + 448 + ] }, "loc": null, - "range": { - "start": 186, - "end": 448 - } + "range": [ + 186, + 448 + ] }, { "type": "VariableDeclaration", @@ -932,10 +932,10 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 457, - "end": 462 - } + "range": [ + 457, + 462 + ] }, "init": { "type": "MemberExpression", @@ -944,40 +944,40 @@ Output: "name": "renderedItems", "typeAnnotation": null, "loc": null, - "range": { - "start": 465, - "end": 478 - } + "range": [ + 465, + 478 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 479, - "end": 485 - } + "range": [ + 479, + 485 + ] }, "computed": false, "loc": null, - "range": { - "start": 465, - "end": 485 - } + "range": [ + 465, + 485 + ] }, "loc": null, - "range": { - "start": 457, - "end": 485 - } + "range": [ + 457, + 485 + ] } ], "loc": null, - "range": { - "start": 451, - "end": 486 - } + "range": [ + 451, + 486 + ] }, { "type": "ReturnStatement", @@ -989,18 +989,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 503, - "end": 506 - } + "range": [ + 503, + 506 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 502, - "end": 507 - } + "range": [ + 502, + 507 + ] }, "children": [ { @@ -1008,10 +1008,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 507, - "end": 514 - } + "range": [ + 507, + 514 + ] }, { "type": "JSXElement", @@ -1021,18 +1021,18 @@ Output: "type": "JSXIdentifier", "name": "h1", "loc": null, - "range": { - "start": 515, - "end": 517 - } + "range": [ + 515, + 517 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 514, - "end": 518 - } + "range": [ + 514, + 518 + ] }, "children": [ { @@ -1042,26 +1042,26 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 519, - "end": 524 - } + "range": [ + 519, + 524 + ] }, "loc": null, - "range": { - "start": 518, - "end": 525 - } + "range": [ + 518, + 525 + ] }, { "type": "JSXText", "value": " Items", "raw": " Items", "loc": null, - "range": { - "start": 525, - "end": 531 - } + "range": [ + 525, + 531 + ] } ], "closingElement": { @@ -1070,32 +1070,32 @@ Output: "type": "JSXIdentifier", "name": "h1", "loc": null, - "range": { - "start": 533, - "end": 535 - } + "range": [ + 533, + 535 + ] }, "loc": null, - "range": { - "start": 531, - "end": 536 - } + "range": [ + 531, + 536 + ] }, "loc": null, - "range": { - "start": 514, - "end": 536 - } + "range": [ + 514, + 536 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 536, - "end": 543 - } + "range": [ + 536, + 543 + ] }, { "type": "JSXExpressionContainer", @@ -1104,26 +1104,26 @@ Output: "name": "renderedItems", "typeAnnotation": null, "loc": null, - "range": { - "start": 544, - "end": 557 - } + "range": [ + 544, + 557 + ] }, "loc": null, - "range": { - "start": 543, - "end": 558 - } + "range": [ + 543, + 558 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 558, - "end": 563 - } + "range": [ + 558, + 563 + ] } ], "closingElement": { @@ -1132,54 +1132,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 565, - "end": 568 - } + "range": [ + 565, + 568 + ] }, "loc": null, - "range": { - "start": 563, - "end": 569 - } + "range": [ + 563, + 569 + ] }, "loc": null, - "range": { - "start": 502, - "end": 569 - } + "range": [ + 502, + 569 + ] }, "loc": null, - "range": { - "start": 489, - "end": 574 - } + "range": [ + 489, + 574 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 576 - } + "range": [ + 26, + 576 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 576 - }, + "range": [ + 0, + 576 + ], "loc": null, - "range": { - "start": 0, - "end": 576 - } + "range": [ + 0, + 576 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 576 - } + "range": [ + 0, + 576 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-call-evaluation-order.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-call-evaluation-order.js.snap index e93b079341..001e0f8f36 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-call-evaluation-order.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-call-evaluation-order.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] }, "params": [], "body": { @@ -51,10 +51,10 @@ Output: "name": "changeF", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 74 - } + "range": [ + 67, + 74 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -65,10 +65,10 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] } ], "body": { @@ -86,27 +86,27 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "computed": false, "loc": null, - "range": { - "start": 90, - "end": 93 - } + "range": [ + 90, + 93 + ] }, "right": { "type": "ArrowFunctionExpression", @@ -121,105 +121,105 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 109 - } + "range": [ + 102, + 109 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 113 - } + "range": [ + 110, + 113 + ] }, "computed": false, "loc": null, - "range": { - "start": 102, - "end": 113 - } + "range": [ + 102, + 113 + ] }, "arguments": [ { "type": "StringLiteral", "value": "new", "loc": null, - "range": { - "start": 114, - "end": 119 - } + "range": [ + 114, + 119 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 120 - } + "range": [ + 102, + 120 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 96, - "end": 120 - }, + "range": [ + 96, + 120 + ], "expression": true, "loc": null, - "range": { - "start": 96, - "end": 120 - } + "range": [ + 96, + 120 + ] }, "loc": null, - "range": { - "start": 90, - "end": 120 - } + "range": [ + 90, + 120 + ] }, "directive": null, "loc": null, - "range": { - "start": 90, - "end": 121 - } + "range": [ + 90, + 121 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 125 - } + "range": [ + 84, + 125 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 77, - "end": 125 - }, + "range": [ + 77, + 125 + ], "expression": false, "loc": null, - "range": { - "start": 77, - "end": 125 - } + "range": [ + 77, + 125 + ] }, "loc": null, - "range": { - "start": 67, - "end": 125 - } + "range": [ + 67, + 125 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 126 - } + "range": [ + 61, + 126 + ] }, { "type": "VariableDeclaration", @@ -232,10 +232,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "init": { "type": "ObjectExpression", @@ -247,10 +247,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "value": { "type": "ArrowFunctionExpression", @@ -265,88 +265,88 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 161 - } + "range": [ + 154, + 161 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 165 - } + "range": [ + 162, + 165 + ] }, "computed": false, "loc": null, - "range": { - "start": 154, - "end": 165 - } + "range": [ + 154, + 165 + ] }, "arguments": [ { "type": "StringLiteral", "value": "original", "loc": null, - "range": { - "start": 166, - "end": 176 - } + "range": [ + 166, + 176 + ] } ], "loc": null, - "range": { - "start": 154, - "end": 177 - } + "range": [ + 154, + 177 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 148, - "end": 177 - }, + "range": [ + 148, + 177 + ], "expression": true, "loc": null, - "range": { - "start": 148, - "end": 177 - } + "range": [ + 148, + 177 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 145, - "end": 177 - } + "range": [ + 145, + 177 + ] } ], "loc": null, - "range": { - "start": 139, - "end": 182 - } + "range": [ + 139, + 182 + ] }, "loc": null, - "range": { - "start": 135, - "end": 182 - } + "range": [ + 135, + 182 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 183 - } + "range": [ + 129, + 183 + ] }, { "type": "ExpressionStatement", @@ -366,61 +366,61 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 195 - } + "range": [ + 188, + 195 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 199 - } + "range": [ + 196, + 199 + ] }, "computed": false, "loc": null, - "range": { - "start": 188, - "end": 199 - } + "range": [ + 188, + 199 + ] }, "arguments": [ { "type": "StringLiteral", "value": "A", "loc": null, - "range": { - "start": 200, - "end": 203 - } + "range": [ + 200, + 203 + ] } ], "loc": null, - "range": { - "start": 188, - "end": 204 - } + "range": [ + 188, + 204 + ] }, { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 207 - } + "range": [ + 206, + 207 + ] } ], "loc": null, - "range": { - "start": 188, - "end": 207 - } + "range": [ + 188, + 207 + ] }, "property": { "type": "SequenceExpression", @@ -434,67 +434,67 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 217 - } + "range": [ + 210, + 217 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 221 - } + "range": [ + 218, + 221 + ] }, "computed": false, "loc": null, - "range": { - "start": 210, - "end": 221 - } + "range": [ + 210, + 221 + ] }, "arguments": [ { "type": "StringLiteral", "value": "B", "loc": null, - "range": { - "start": 222, - "end": 225 - } + "range": [ + 222, + 225 + ] } ], "loc": null, - "range": { - "start": 210, - "end": 226 - } + "range": [ + 210, + 226 + ] }, { "type": "StringLiteral", "value": "f", "loc": null, - "range": { - "start": 228, - "end": 231 - } + "range": [ + 228, + 231 + ] } ], "loc": null, - "range": { - "start": 210, - "end": 231 - } + "range": [ + 210, + 231 + ] }, "computed": true, "loc": null, - "range": { - "start": 187, - "end": 233 - } + "range": [ + 187, + 233 + ] }, "arguments": [ { @@ -507,10 +507,10 @@ Output: "name": "changeF", "typeAnnotation": null, "loc": null, - "range": { - "start": 240, - "end": 247 - } + "range": [ + 240, + 247 + ] }, "arguments": [ { @@ -518,17 +518,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 248, - "end": 249 - } + "range": [ + 248, + 249 + ] } ], "loc": null, - "range": { - "start": 240, - "end": 250 - } + "range": [ + 240, + 250 + ] }, { "type": "CallExpression", @@ -539,74 +539,74 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 252, - "end": 259 - } + "range": [ + 252, + 259 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 263 - } + "range": [ + 260, + 263 + ] }, "computed": false, "loc": null, - "range": { - "start": 252, - "end": 263 - } + "range": [ + 252, + 263 + ] }, "arguments": [ { "type": "StringLiteral", "value": "arg", "loc": null, - "range": { - "start": 264, - "end": 269 - } + "range": [ + 264, + 269 + ] } ], "loc": null, - "range": { - "start": 252, - "end": 270 - } + "range": [ + 252, + 270 + ] }, { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 272, - "end": 273 - } + "range": [ + 272, + 273 + ] } ], "loc": null, - "range": { - "start": 240, - "end": 273 - } + "range": [ + 240, + 273 + ] } ], "loc": null, - "range": { - "start": 187, - "end": 278 - } + "range": [ + 187, + 278 + ] }, "directive": null, "loc": null, - "range": { - "start": 187, - "end": 279 - } + "range": [ + 187, + 279 + ] }, { "type": "ReturnStatement", @@ -615,42 +615,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 289, - "end": 290 - } + "range": [ + 289, + 290 + ] }, "loc": null, - "range": { - "start": 282, - "end": 291 - } + "range": [ + 282, + 291 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 293 - } + "range": [ + 57, + 293 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 36, - "end": 293 - }, + "range": [ + 36, + 293 + ], "loc": null, - "range": { - "start": 36, - "end": 293 - } + "range": [ + 36, + 293 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 36, - "end": 293 - } + "range": [ + 36, + 293 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-call-spread.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-call-spread.js.snap index 86ece81fed..06d81ee0b4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-call-spread.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-call-spread.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -66,10 +66,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 43 - } + "range": [ + 40, + 43 + ] }, "property": { "type": "MemberExpression", @@ -78,34 +78,34 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "property": { "type": "Identifier", "name": "method", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 56 - } + "range": [ + 50, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 44, - "end": 56 - } + "range": [ + 44, + 56 + ] }, "computed": true, "loc": null, - "range": { - "start": 40, - "end": 57 - } + "range": [ + 40, + 57 + ] }, "arguments": [ { @@ -117,41 +117,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 68 - } + "range": [ + 61, + 68 + ] }, "loc": null, - "range": { - "start": 58, - "end": 68 - } + "range": [ + 58, + 68 + ] }, { "type": "NullLiteral", "loc": null, - "range": { - "start": 70, - "end": 74 - } + "range": [ + 70, + 74 + ] }, { "type": "SpreadElement", @@ -162,53 +162,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 86 - } + "range": [ + 79, + 86 + ] }, "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 87 - } + "range": [ + 40, + 87 + ] }, "loc": null, - "range": { - "start": 36, - "end": 87 - } + "range": [ + 36, + 87 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 88 - } + "range": [ + 30, + 88 + ] }, { "type": "ReturnStatement", @@ -217,42 +217,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "loc": null, - "range": { - "start": 91, - "end": 100 - } + "range": [ + 91, + 100 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 102 - } + "range": [ + 26, + 102 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 102 - }, + "range": [ + 0, + 102 + ], "loc": null, - "range": { - "start": 0, - "end": 102 - } + "range": [ + 0, + 102 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 102 - } + "range": [ + 0, + 102 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-load-primitive-as-dependency.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-load-primitive-as-dependency.js.snap index d4ba1a81cd..b16c9d1d78 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-load-primitive-as-dependency.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-load-primitive-as-dependency.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "CallExpression", @@ -69,30 +69,30 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 41 - } + "range": [ + 38, + 41 + ] }, "arguments": [], "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] }, "loc": null, - "range": { - "start": 34, - "end": 43 - } + "range": [ + 34, + 43 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 44 - } + "range": [ + 30, + 44 + ] }, { "type": "ExpressionStatement", @@ -104,18 +104,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 106, - "end": 109 - } + "range": [ + 106, + 109 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 105, - "end": 110 - } + "range": [ + 105, + 110 + ] }, "children": [ { @@ -125,16 +125,16 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "loc": null, - "range": { - "start": 110, - "end": 113 - } + "range": [ + 110, + 113 + ] } ], "closingElement": { @@ -143,29 +143,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 115, - "end": 118 - } + "range": [ + 115, + 118 + ] }, "loc": null, - "range": { - "start": 113, - "end": 119 - } + "range": [ + 113, + 119 + ] }, "loc": null, - "range": { - "start": 105, - "end": 119 - } + "range": [ + 105, + 119 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 120 - } + "range": [ + 105, + 120 + ] }, { "type": "VariableDeclaration", @@ -178,10 +178,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] }, "init": { "type": "CallExpression", @@ -190,10 +190,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 175 - } + "range": [ + 172, + 175 + ] }, "arguments": [ { @@ -205,10 +205,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 176, - "end": 177 - } + "range": [ + 176, + 177 + ] }, "property": { "type": "MemberExpression", @@ -217,70 +217,70 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 178, - "end": 183 - } + "range": [ + 178, + 183 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, "computed": false, "loc": null, - "range": { - "start": 178, - "end": 185 - } + "range": [ + 178, + 185 + ] }, "computed": true, "loc": null, - "range": { - "start": 176, - "end": 186 - } + "range": [ + 176, + 186 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 189, - "end": 190 - } + "range": [ + 189, + 190 + ] }, "loc": null, - "range": { - "start": 176, - "end": 190 - } + "range": [ + 176, + 190 + ] } ], "loc": null, - "range": { - "start": 172, - "end": 191 - } + "range": [ + 172, + 191 + ] }, "loc": null, - "range": { - "start": 168, - "end": 191 - } + "range": [ + 168, + 191 + ] } ], "loc": null, - "range": { - "start": 164, - "end": 192 - } + "range": [ + 164, + 192 + ] }, { "type": "ReturnStatement", @@ -289,42 +289,42 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 203 - } + "range": [ + 202, + 203 + ] }, "loc": null, - "range": { - "start": 195, - "end": 204 - } + "range": [ + 195, + 204 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 206 - } + "range": [ + 26, + 206 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 206 - }, + "range": [ + 0, + 206 + ], "loc": null, - "range": { - "start": 0, - "end": 206 - } + "range": [ + 0, + 206 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 206 - } + "range": [ + 0, + 206 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-store-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-store-alias.js.snap index a49ea11a00..252d30dc86 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-store-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@computed-store-alias.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,20 +35,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -65,10 +65,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -80,50 +80,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 43 - } + "range": [ + 29, + 43 + ] }, { "type": "VariableDeclaration", @@ -136,10 +136,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "init": { "type": "ObjectExpression", @@ -151,50 +151,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "loc": null, - "range": { - "start": 50, - "end": 59 - } + "range": [ + 50, + 59 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 60 - } + "range": [ + 46, + 60 + ] }, { "type": "ExpressionStatement", @@ -208,49 +208,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "property": { "type": "StringLiteral", "value": "y", "loc": null, - "range": { - "start": 65, - "end": 68 - } + "range": [ + 65, + 68 + ] }, "computed": true, "loc": null, - "range": { - "start": 63, - "end": 69 - } + "range": [ + 63, + 69 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "loc": null, - "range": { - "start": 63, - "end": 73 - } + "range": [ + 63, + 73 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 74 - } + "range": [ + 63, + 74 + ] }, { "type": "ExpressionStatement", @@ -261,10 +261,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 83 - } + "range": [ + 77, + 83 + ] }, "arguments": [ { @@ -272,24 +272,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] }, "directive": null, "loc": null, - "range": { - "start": 77, - "end": 87 - } + "range": [ + 77, + 87 + ] }, { "type": "ReturnStatement", @@ -298,42 +298,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "loc": null, - "range": { - "start": 90, - "end": 99 - } + "range": [ + 90, + 99 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 101 - } + "range": [ + 25, + 101 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 101 - }, + "range": [ + 0, + 101 + ], "loc": null, - "range": { - "start": 0, - "end": 101 - } + "range": [ + 0, + 101 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 101 - } + "range": [ + 0, + 101 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@concise-arrow-expr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@concise-arrow-expr.js.snap index 2926c9331b..eeb391b4f0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@concise-arrow-expr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@concise-arrow-expr.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -45,27 +45,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 37 - } + "range": [ + 33, + 37 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 38 - } + "range": [ + 29, + 38 + ] }, "init": { "type": "CallExpression", @@ -74,40 +74,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 49 - } + "range": [ + 41, + 49 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 52 - } + "range": [ + 41, + 52 + ] }, "loc": null, - "range": { - "start": 29, - "end": 52 - } + "range": [ + 29, + 52 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 53 - } + "range": [ + 25, + 53 + ] }, { "type": "VariableDeclaration", @@ -120,10 +120,10 @@ Output: "name": "handler", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 69 - } + "range": [ + 62, + 69 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -134,10 +134,10 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] } ], "body": { @@ -147,10 +147,10 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 83 - } + "range": [ + 79, + 83 + ] }, "arguments": [ { @@ -158,44 +158,44 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 86 - } + "range": [ + 79, + 86 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 72, - "end": 86 - }, + "range": [ + 72, + 86 + ], "expression": true, "loc": null, - "range": { - "start": 72, - "end": 86 - } + "range": [ + 72, + 86 + ] }, "loc": null, - "range": { - "start": 62, - "end": 86 - } + "range": [ + 62, + 86 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 87 - } + "range": [ + 56, + 87 + ] }, { "type": "ReturnStatement", @@ -207,10 +207,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "attributes": [ { @@ -219,10 +219,10 @@ Output: "type": "JSXIdentifier", "name": "handler", "loc": null, - "range": { - "start": 102, - "end": 109 - } + "range": [ + 102, + 109 + ] }, "value": { "type": "JSXExpressionContainer", @@ -231,30 +231,30 @@ Output: "name": "handler", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 118 - } + "range": [ + 111, + 118 + ] }, "loc": null, - "range": { - "start": 110, - "end": 119 - } + "range": [ + 110, + 119 + ] }, "loc": null, - "range": { - "start": 102, - "end": 119 - } + "range": [ + 102, + 119 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 97, - "end": 120 - } + "range": [ + 97, + 120 + ] }, "children": [], "closingElement": { @@ -263,54 +263,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 122, - "end": 125 - } + "range": [ + 122, + 125 + ] }, "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] }, "loc": null, - "range": { - "start": 97, - "end": 126 - } + "range": [ + 97, + 126 + ] }, "loc": null, - "range": { - "start": 90, - "end": 127 - } + "range": [ + 90, + 127 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 129 - } + "range": [ + 21, + 129 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 129 - }, + "range": [ + 0, + 129 + ], "loc": null, - "range": { - "start": 0, - "end": 129 - } + "range": [ + 0, + 129 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 129 - } + "range": [ + 0, + 129 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@cond-deps-conditional-member-expr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@cond-deps-conditional-member-expr.js.snap index 44d7e43d08..c18c4aa672 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@cond-deps-conditional-member-expr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@cond-deps-conditional-member-expr.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 213, - "end": 222 - } + "range": [ + 213, + 222 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 228 - } + "range": [ + 223, + 228 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 239 - } + "range": [ + 238, + 239 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 242, - "end": 244 - } + "range": [ + 242, + 244 + ] }, "loc": null, - "range": { - "start": 238, - "end": 244 - } + "range": [ + 238, + 244 + ] } ], "loc": null, - "range": { - "start": 234, - "end": 245 - } + "range": [ + 234, + 245 + ] }, { "type": "ExpressionStatement", @@ -95,27 +95,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 248, - "end": 249 - } + "range": [ + 248, + 249 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 250, - "end": 254 - } + "range": [ + 250, + 254 + ] }, "computed": false, "loc": null, - "range": { - "start": 248, - "end": 254 - } + "range": [ + 248, + 254 + ] }, "arguments": [ { @@ -127,59 +127,59 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 260 - } + "range": [ + 255, + 260 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 262 - } + "range": [ + 261, + 262 + ] }, "computed": false, "loc": null, - "range": { - "start": 255, - "end": 262 - } + "range": [ + 255, + 262 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 265 - } + "range": [ + 264, + 265 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 255, - "end": 265 - } + "range": [ + 255, + 265 + ] } ], "loc": null, - "range": { - "start": 248, - "end": 266 - } + "range": [ + 248, + 266 + ] }, "directive": null, "loc": null, - "range": { - "start": 248, - "end": 267 - } + "range": [ + 248, + 267 + ] }, { "type": "ReturnStatement", @@ -188,42 +188,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 277, - "end": 278 - } + "range": [ + 277, + 278 + ] }, "loc": null, - "range": { - "start": 270, - "end": 279 - } + "range": [ + 270, + 279 + ] } ], "loc": null, - "range": { - "start": 230, - "end": 281 - } + "range": [ + 230, + 281 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 204, - "end": 281 - }, + "range": [ + 204, + 281 + ], "loc": null, - "range": { - "start": 204, - "end": 281 - } + "range": [ + 204, + 281 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 204, - "end": 281 - } + "range": [ + 204, + 281 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-break-labeled.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-break-labeled.js.snap index a0907b6287..f9d23eeb7a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-break-labeled.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-break-labeled.js.snap @@ -32,10 +32,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 58 - } + "range": [ + 49, + 58 + ] }, "params": [ { @@ -43,10 +43,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] } ], "body": { @@ -63,32 +63,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 80, - "end": 82 - } + "range": [ + 80, + 82 + ] }, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 83 - } + "range": [ + 70, + 83 + ] }, { "type": "ExpressionStatement", @@ -101,27 +101,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 92 - } + "range": [ + 88, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 86, - "end": 92 - } + "range": [ + 86, + 92 + ] }, "arguments": [ { @@ -131,41 +131,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 98 - } + "range": [ + 93, + 98 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "computed": false, "loc": null, - "range": { - "start": 93, - "end": 100 - } + "range": [ + 93, + 100 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 101 - } + "range": [ + 86, + 101 + ] }, "directive": null, "loc": null, - "range": { - "start": 86, - "end": 102 - } + "range": [ + 86, + 102 + ] }, { "type": "LabeledStatement", @@ -174,10 +174,10 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 110 - } + "range": [ + 105, + 110 + ] }, "body": { "type": "BlockStatement", @@ -191,27 +191,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 127 - } + "range": [ + 122, + 127 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "computed": false, "loc": null, - "range": { - "start": 122, - "end": 129 - } + "range": [ + 122, + 129 + ] }, "consequent": { "type": "BlockStatement", @@ -223,30 +223,30 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 150 - } + "range": [ + 145, + 150 + ] }, "loc": null, - "range": { - "start": 139, - "end": 151 - } + "range": [ + 139, + 151 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 157 - } + "range": [ + 131, + 157 + ] }, "alternate": null, "loc": null, - "range": { - "start": 118, - "end": 157 - } + "range": [ + 118, + 157 + ] }, { "type": "ExpressionStatement", @@ -259,27 +259,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 163 - } + "range": [ + 162, + 163 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 168 - } + "range": [ + 164, + 168 + ] }, "computed": false, "loc": null, - "range": { - "start": 162, - "end": 168 - } + "range": [ + 162, + 168 + ] }, "arguments": [ { @@ -289,54 +289,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 174 - } + "range": [ + 169, + 174 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 176 - } + "range": [ + 175, + 176 + ] }, "computed": false, "loc": null, - "range": { - "start": 169, - "end": 176 - } + "range": [ + 169, + 176 + ] } ], "loc": null, - "range": { - "start": 162, - "end": 177 - } + "range": [ + 162, + 177 + ] }, "directive": null, "loc": null, - "range": { - "start": 162, - "end": 178 - } + "range": [ + 162, + 178 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 182 - } + "range": [ + 112, + 182 + ] }, "loc": null, - "range": { - "start": 105, - "end": 182 - } + "range": [ + 105, + 182 + ] }, { "type": "ExpressionStatement", @@ -349,27 +349,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 191 - } + "range": [ + 187, + 191 + ] }, "computed": false, "loc": null, - "range": { - "start": 185, - "end": 191 - } + "range": [ + 185, + 191 + ] }, "arguments": [ { @@ -379,41 +379,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 197 - } + "range": [ + 192, + 197 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 199 - } + "range": [ + 198, + 199 + ] }, "computed": false, "loc": null, - "range": { - "start": 192, - "end": 199 - } + "range": [ + 192, + 199 + ] } ], "loc": null, - "range": { - "start": 185, - "end": 200 - } + "range": [ + 185, + 200 + ] }, "directive": null, "loc": null, - "range": { - "start": 185, - "end": 201 - } + "range": [ + 185, + 201 + ] }, { "type": "ReturnStatement", @@ -422,42 +422,42 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 212 - } + "range": [ + 211, + 212 + ] }, "loc": null, - "range": { - "start": 204, - "end": 213 - } + "range": [ + 204, + 213 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 215 - } + "range": [ + 66, + 215 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 40, - "end": 215 - }, + "range": [ + 40, + 215 + ], "loc": null, - "range": { - "start": 40, - "end": 215 - } + "range": [ + 40, + 215 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 40, - "end": 215 - } + "range": [ + 40, + 215 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-break.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-break.js.snap index feea785def..5faed745e6 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-break.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-break.js.snap @@ -70,10 +70,10 @@ Output: "name": "ComponentA", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 63 - } + "range": [ + 53, + 63 + ] }, "params": [ { @@ -81,10 +81,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] } ], "body": { @@ -101,32 +101,32 @@ Output: "name": "a_DEBUG", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 88 - } + "range": [ + 81, + 88 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 91, - "end": 93 - } + "range": [ + 91, + 93 + ] }, "loc": null, - "range": { - "start": 81, - "end": 93 - } + "range": [ + 81, + 93 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 94 - } + "range": [ + 75, + 94 + ] }, { "type": "ExpressionStatement", @@ -139,27 +139,27 @@ Output: "name": "a_DEBUG", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 104 - } + "range": [ + 97, + 104 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 109 - } + "range": [ + 105, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 97, - "end": 109 - } + "range": [ + 97, + 109 + ] }, "arguments": [ { @@ -169,41 +169,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 115 - } + "range": [ + 110, + 115 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "computed": false, "loc": null, - "range": { - "start": 110, - "end": 117 - } + "range": [ + 110, + 117 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 118 - } + "range": [ + 97, + 118 + ] }, "directive": null, "loc": null, - "range": { - "start": 97, - "end": 119 - } + "range": [ + 97, + 119 + ] }, { "type": "IfStatement", @@ -214,27 +214,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 131 - } + "range": [ + 126, + 131 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 126, - "end": 133 - } + "range": [ + 126, + 133 + ] }, "consequent": { "type": "BlockStatement", @@ -244,30 +244,30 @@ Output: "argument": { "type": "NullLiteral", "loc": null, - "range": { - "start": 148, - "end": 152 - } + "range": [ + 148, + 152 + ] }, "loc": null, - "range": { - "start": 141, - "end": 153 - } + "range": [ + 141, + 153 + ] } ], "loc": null, - "range": { - "start": 135, - "end": 157 - } + "range": [ + 135, + 157 + ] }, "alternate": null, "loc": null, - "range": { - "start": 122, - "end": 157 - } + "range": [ + 122, + 157 + ] }, { "type": "ExpressionStatement", @@ -280,27 +280,27 @@ Output: "name": "a_DEBUG", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 167 - } + "range": [ + 160, + 167 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 172 - } + "range": [ + 168, + 172 + ] }, "computed": false, "loc": null, - "range": { - "start": 160, - "end": 172 - } + "range": [ + 160, + 172 + ] }, "arguments": [ { @@ -310,41 +310,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 178 - } + "range": [ + 173, + 178 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 179, - "end": 180 - } + "range": [ + 179, + 180 + ] }, "computed": false, "loc": null, - "range": { - "start": 173, - "end": 180 - } + "range": [ + 173, + 180 + ] } ], "loc": null, - "range": { - "start": 160, - "end": 181 - } + "range": [ + 160, + 181 + ] }, "directive": null, "loc": null, - "range": { - "start": 160, - "end": 182 - } + "range": [ + 160, + 182 + ] }, { "type": "ReturnStatement", @@ -353,36 +353,36 @@ Output: "name": "a_DEBUG", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 199 - } + "range": [ + 192, + 199 + ] }, "loc": null, - "range": { - "start": 185, - "end": 200 - } + "range": [ + 185, + 200 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 202 - } + "range": [ + 71, + 202 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 44, - "end": 202 - }, + "range": [ + 44, + 202 + ], "loc": null, - "range": { - "start": 44, - "end": 202 - } + "range": [ + 44, + 202 + ] }, { "type": "FunctionDeclaration", @@ -391,10 +391,10 @@ Output: "name": "ComponentB", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 263 - } + "range": [ + 253, + 263 + ] }, "params": [ { @@ -402,10 +402,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 269 - } + "range": [ + 264, + 269 + ] } ], "body": { @@ -422,32 +422,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 281, - "end": 282 - } + "range": [ + 281, + 282 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 285, - "end": 287 - } + "range": [ + 285, + 287 + ] }, "loc": null, - "range": { - "start": 281, - "end": 287 - } + "range": [ + 281, + 287 + ] } ], "loc": null, - "range": { - "start": 275, - "end": 288 - } + "range": [ + 275, + 288 + ] }, { "type": "ExpressionStatement", @@ -460,27 +460,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 291, - "end": 292 - } + "range": [ + 291, + 292 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 293, - "end": 297 - } + "range": [ + 293, + 297 + ] }, "computed": false, "loc": null, - "range": { - "start": 291, - "end": 297 - } + "range": [ + 291, + 297 + ] }, "arguments": [ { @@ -490,41 +490,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 298, - "end": 303 - } + "range": [ + 298, + 303 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 304, - "end": 305 - } + "range": [ + 304, + 305 + ] }, "computed": false, "loc": null, - "range": { - "start": 298, - "end": 305 - } + "range": [ + 298, + 305 + ] } ], "loc": null, - "range": { - "start": 291, - "end": 306 - } + "range": [ + 291, + 306 + ] }, "directive": null, "loc": null, - "range": { - "start": 291, - "end": 307 - } + "range": [ + 291, + 307 + ] }, { "type": "IfStatement", @@ -535,27 +535,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 314, - "end": 319 - } + "range": [ + 314, + 319 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 320, - "end": 321 - } + "range": [ + 320, + 321 + ] }, "computed": false, "loc": null, - "range": { - "start": 314, - "end": 321 - } + "range": [ + 314, + 321 + ] }, "consequent": { "type": "BlockStatement", @@ -571,27 +571,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 329, - "end": 330 - } + "range": [ + 329, + 330 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 331, - "end": 335 - } + "range": [ + 331, + 335 + ] }, "computed": false, "loc": null, - "range": { - "start": 329, - "end": 335 - } + "range": [ + 329, + 335 + ] }, "arguments": [ { @@ -601,55 +601,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 336, - "end": 341 - } + "range": [ + 336, + 341 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 342, - "end": 343 - } + "range": [ + 342, + 343 + ] }, "computed": false, "loc": null, - "range": { - "start": 336, - "end": 343 - } + "range": [ + 336, + 343 + ] } ], "loc": null, - "range": { - "start": 329, - "end": 344 - } + "range": [ + 329, + 344 + ] }, "directive": null, "loc": null, - "range": { - "start": 329, - "end": 345 - } + "range": [ + 329, + 345 + ] } ], "loc": null, - "range": { - "start": 323, - "end": 349 - } + "range": [ + 323, + 349 + ] }, "alternate": null, "loc": null, - "range": { - "start": 310, - "end": 349 - } + "range": [ + 310, + 349 + ] }, { "type": "ExpressionStatement", @@ -662,27 +662,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 352, - "end": 353 - } + "range": [ + 352, + 353 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 354, - "end": 358 - } + "range": [ + 354, + 358 + ] }, "computed": false, "loc": null, - "range": { - "start": 352, - "end": 358 - } + "range": [ + 352, + 358 + ] }, "arguments": [ { @@ -692,41 +692,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 359, - "end": 364 - } + "range": [ + 359, + 364 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 365, - "end": 366 - } + "range": [ + 365, + 366 + ] }, "computed": false, "loc": null, - "range": { - "start": 359, - "end": 366 - } + "range": [ + 359, + 366 + ] } ], "loc": null, - "range": { - "start": 352, - "end": 367 - } + "range": [ + 352, + 367 + ] }, "directive": null, "loc": null, - "range": { - "start": 352, - "end": 368 - } + "range": [ + 352, + 368 + ] }, { "type": "ReturnStatement", @@ -735,36 +735,36 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 378, - "end": 379 - } + "range": [ + 378, + 379 + ] }, "loc": null, - "range": { - "start": 371, - "end": 380 - } + "range": [ + 371, + 380 + ] } ], "loc": null, - "range": { - "start": 271, - "end": 382 - } + "range": [ + 271, + 382 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 244, - "end": 382 - }, + "range": [ + 244, + 382 + ], "loc": null, - "range": { - "start": 244, - "end": 382 - } + "range": [ + 244, + 382 + ] }, { "type": "FunctionDeclaration", @@ -773,10 +773,10 @@ Output: "name": "ComponentC", "typeAnnotation": null, "loc": null, - "range": { - "start": 477, - "end": 487 - } + "range": [ + 477, + 487 + ] }, "params": [ { @@ -784,10 +784,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 488, - "end": 493 - } + "range": [ + 488, + 493 + ] } ], "body": { @@ -804,32 +804,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 505, - "end": 506 - } + "range": [ + 505, + 506 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 509, - "end": 511 - } + "range": [ + 509, + 511 + ] }, "loc": null, - "range": { - "start": 505, - "end": 511 - } + "range": [ + 505, + 511 + ] } ], "loc": null, - "range": { - "start": 499, - "end": 512 - } + "range": [ + 499, + 512 + ] }, { "type": "ExpressionStatement", @@ -842,27 +842,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 515, - "end": 516 - } + "range": [ + 515, + 516 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 517, - "end": 521 - } + "range": [ + 517, + 521 + ] }, "computed": false, "loc": null, - "range": { - "start": 515, - "end": 521 - } + "range": [ + 515, + 521 + ] }, "arguments": [ { @@ -872,41 +872,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 522, - "end": 527 - } + "range": [ + 522, + 527 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 528, - "end": 529 - } + "range": [ + 528, + 529 + ] }, "computed": false, "loc": null, - "range": { - "start": 522, - "end": 529 - } + "range": [ + 522, + 529 + ] } ], "loc": null, - "range": { - "start": 515, - "end": 530 - } + "range": [ + 515, + 530 + ] }, "directive": null, "loc": null, - "range": { - "start": 515, - "end": 531 - } + "range": [ + 515, + 531 + ] }, { "type": "IfStatement", @@ -917,27 +917,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 538, - "end": 543 - } + "range": [ + 538, + 543 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 544, - "end": 545 - } + "range": [ + 544, + 545 + ] }, "computed": false, "loc": null, - "range": { - "start": 538, - "end": 545 - } + "range": [ + 538, + 545 + ] }, "consequent": { "type": "BlockStatement", @@ -953,27 +953,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 553, - "end": 554 - } + "range": [ + 553, + 554 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 555, - "end": 559 - } + "range": [ + 555, + 559 + ] }, "computed": false, "loc": null, - "range": { - "start": 553, - "end": 559 - } + "range": [ + 553, + 559 + ] }, "arguments": [ { @@ -983,71 +983,71 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 560, - "end": 565 - } + "range": [ + 560, + 565 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 566, - "end": 567 - } + "range": [ + 566, + 567 + ] }, "computed": false, "loc": null, - "range": { - "start": 560, - "end": 567 - } + "range": [ + 560, + 567 + ] } ], "loc": null, - "range": { - "start": 553, - "end": 568 - } + "range": [ + 553, + 568 + ] }, "directive": null, "loc": null, - "range": { - "start": 553, - "end": 569 - } + "range": [ + 553, + 569 + ] }, { "type": "ReturnStatement", "argument": { "type": "NullLiteral", "loc": null, - "range": { - "start": 581, - "end": 585 - } + "range": [ + 581, + 585 + ] }, "loc": null, - "range": { - "start": 574, - "end": 586 - } + "range": [ + 574, + 586 + ] } ], "loc": null, - "range": { - "start": 547, - "end": 590 - } + "range": [ + 547, + 590 + ] }, "alternate": null, "loc": null, - "range": { - "start": 534, - "end": 590 - } + "range": [ + 534, + 590 + ] }, { "type": "ExpressionStatement", @@ -1060,27 +1060,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 593, - "end": 594 - } + "range": [ + 593, + 594 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 595, - "end": 599 - } + "range": [ + 595, + 599 + ] }, "computed": false, "loc": null, - "range": { - "start": 593, - "end": 599 - } + "range": [ + 593, + 599 + ] }, "arguments": [ { @@ -1090,41 +1090,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 600, - "end": 605 - } + "range": [ + 600, + 605 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 606, - "end": 607 - } + "range": [ + 606, + 607 + ] }, "computed": false, "loc": null, - "range": { - "start": 600, - "end": 607 - } + "range": [ + 600, + 607 + ] } ], "loc": null, - "range": { - "start": 593, - "end": 608 - } + "range": [ + 593, + 608 + ] }, "directive": null, "loc": null, - "range": { - "start": 593, - "end": 609 - } + "range": [ + 593, + 609 + ] }, { "type": "ReturnStatement", @@ -1133,36 +1133,36 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 619, - "end": 620 - } + "range": [ + 619, + 620 + ] }, "loc": null, - "range": { - "start": 612, - "end": 621 - } + "range": [ + 612, + 621 + ] } ], "loc": null, - "range": { - "start": 495, - "end": 623 - } + "range": [ + 495, + 623 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 468, - "end": 623 - }, + "range": [ + 468, + 623 + ], "loc": null, - "range": { - "start": 468, - "end": 623 - } + "range": [ + 468, + 623 + ] }, { "type": "FunctionDeclaration", @@ -1171,10 +1171,10 @@ Output: "name": "ComponentD", "typeAnnotation": null, "loc": null, - "range": { - "start": 674, - "end": 684 - } + "range": [ + 674, + 684 + ] }, "params": [ { @@ -1182,10 +1182,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 685, - "end": 690 - } + "range": [ + 685, + 690 + ] } ], "body": { @@ -1202,32 +1202,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 702, - "end": 703 - } + "range": [ + 702, + 703 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 706, - "end": 708 - } + "range": [ + 706, + 708 + ] }, "loc": null, - "range": { - "start": 702, - "end": 708 - } + "range": [ + 702, + 708 + ] } ], "loc": null, - "range": { - "start": 696, - "end": 709 - } + "range": [ + 696, + 709 + ] }, { "type": "ExpressionStatement", @@ -1240,27 +1240,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 712, - "end": 713 - } + "range": [ + 712, + 713 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 714, - "end": 718 - } + "range": [ + 714, + 718 + ] }, "computed": false, "loc": null, - "range": { - "start": 712, - "end": 718 - } + "range": [ + 712, + 718 + ] }, "arguments": [ { @@ -1270,41 +1270,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 719, - "end": 724 - } + "range": [ + 719, + 724 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 725, - "end": 726 - } + "range": [ + 725, + 726 + ] }, "computed": false, "loc": null, - "range": { - "start": 719, - "end": 726 - } + "range": [ + 719, + 726 + ] } ], "loc": null, - "range": { - "start": 712, - "end": 727 - } + "range": [ + 712, + 727 + ] }, "directive": null, "loc": null, - "range": { - "start": 712, - "end": 728 - } + "range": [ + 712, + 728 + ] }, { "type": "IfStatement", @@ -1315,27 +1315,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 735, - "end": 740 - } + "range": [ + 735, + 740 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 741, - "end": 742 - } + "range": [ + 741, + 742 + ] }, "computed": false, "loc": null, - "range": { - "start": 735, - "end": 742 - } + "range": [ + 735, + 742 + ] }, "consequent": { "type": "BlockStatement", @@ -1351,27 +1351,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 750, - "end": 751 - } + "range": [ + 750, + 751 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 752, - "end": 756 - } + "range": [ + 752, + 756 + ] }, "computed": false, "loc": null, - "range": { - "start": 750, - "end": 756 - } + "range": [ + 750, + 756 + ] }, "arguments": [ { @@ -1381,41 +1381,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 757, - "end": 762 - } + "range": [ + 757, + 762 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 763, - "end": 764 - } + "range": [ + 763, + 764 + ] }, "computed": false, "loc": null, - "range": { - "start": 757, - "end": 764 - } + "range": [ + 757, + 764 + ] } ], "loc": null, - "range": { - "start": 750, - "end": 765 - } + "range": [ + 750, + 765 + ] }, "directive": null, "loc": null, - "range": { - "start": 750, - "end": 766 - } + "range": [ + 750, + 766 + ] }, { "type": "ReturnStatement", @@ -1424,30 +1424,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 778, - "end": 779 - } + "range": [ + 778, + 779 + ] }, "loc": null, - "range": { - "start": 771, - "end": 780 - } + "range": [ + 771, + 780 + ] } ], "loc": null, - "range": { - "start": 744, - "end": 784 - } + "range": [ + 744, + 784 + ] }, "alternate": null, "loc": null, - "range": { - "start": 731, - "end": 784 - } + "range": [ + 731, + 784 + ] }, { "type": "ExpressionStatement", @@ -1460,27 +1460,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 787, - "end": 788 - } + "range": [ + 787, + 788 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 789, - "end": 793 - } + "range": [ + 789, + 793 + ] }, "computed": false, "loc": null, - "range": { - "start": 787, - "end": 793 - } + "range": [ + 787, + 793 + ] }, "arguments": [ { @@ -1490,41 +1490,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 794, - "end": 799 - } + "range": [ + 794, + 799 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 800, - "end": 801 - } + "range": [ + 800, + 801 + ] }, "computed": false, "loc": null, - "range": { - "start": 794, - "end": 801 - } + "range": [ + 794, + 801 + ] } ], "loc": null, - "range": { - "start": 787, - "end": 802 - } + "range": [ + 787, + 802 + ] }, "directive": null, "loc": null, - "range": { - "start": 787, - "end": 803 - } + "range": [ + 787, + 803 + ] }, { "type": "ReturnStatement", @@ -1533,42 +1533,42 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 813, - "end": 814 - } + "range": [ + 813, + 814 + ] }, "loc": null, - "range": { - "start": 806, - "end": 815 - } + "range": [ + 806, + 815 + ] } ], "loc": null, - "range": { - "start": 692, - "end": 817 - } + "range": [ + 692, + 817 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 665, - "end": 817 - }, + "range": [ + 665, + 817 + ], "loc": null, - "range": { - "start": 665, - "end": 817 - } + "range": [ + 665, + 817 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 44, - "end": 817 - } + "range": [ + 44, + 817 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-on-mutable.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-on-mutable.js.snap index a712dd38a9..41eab2f595 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-on-mutable.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-on-mutable.js.snap @@ -43,10 +43,10 @@ Output: "name": "ComponentA", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 19 - } + "range": [ + 9, + 19 + ] }, "params": [ { @@ -54,10 +54,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 20, - "end": 25 - } + "range": [ + 20, + 25 + ] } ], "body": { @@ -74,32 +74,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 41, - "end": 43 - } + "range": [ + 41, + 43 + ] }, "loc": null, - "range": { - "start": 37, - "end": 43 - } + "range": [ + 37, + 43 + ] } ], "loc": null, - "range": { - "start": 31, - "end": 44 - } + "range": [ + 31, + 44 + ] }, { "type": "VariableDeclaration", @@ -112,32 +112,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 57, - "end": 59 - } + "range": [ + 57, + 59 + ] }, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 60 - } + "range": [ + 47, + 60 + ] }, { "type": "IfStatement", @@ -146,10 +146,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "consequent": { "type": "BlockStatement", @@ -165,27 +165,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 82 - } + "range": [ + 78, + 82 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "arguments": [ { @@ -195,55 +195,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 88 - } + "range": [ + 83, + 88 + ] }, "property": { "type": "Identifier", "name": "p0", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 91 - } + "range": [ + 89, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 83, - "end": 91 - } + "range": [ + 83, + 91 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 92 - } + "range": [ + 76, + 92 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 93 - } + "range": [ + 76, + 93 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 97 - } + "range": [ + 70, + 97 + ] }, "alternate": null, "loc": null, - "range": { - "start": 63, - "end": 97 - } + "range": [ + 63, + 97 + ] }, { "type": "IfStatement", @@ -254,27 +254,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 109 - } + "range": [ + 104, + 109 + ] }, "property": { "type": "Identifier", "name": "p1", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 112 - } + "range": [ + 110, + 112 + ] }, "computed": false, "loc": null, - "range": { - "start": 104, - "end": 112 - } + "range": [ + 104, + 112 + ] }, "consequent": { "type": "BlockStatement", @@ -290,27 +290,27 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 126 - } + "range": [ + 122, + 126 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] }, "arguments": [ { @@ -320,55 +320,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 132 - } + "range": [ + 127, + 132 + ] }, "property": { "type": "Identifier", "name": "p2", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 135 - } + "range": [ + 133, + 135 + ] }, "computed": false, "loc": null, - "range": { - "start": 127, - "end": 135 - } + "range": [ + 127, + 135 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 136 - } + "range": [ + 120, + 136 + ] }, "directive": null, "loc": null, - "range": { - "start": 120, - "end": 137 - } + "range": [ + 120, + 137 + ] } ], "loc": null, - "range": { - "start": 114, - "end": 141 - } + "range": [ + 114, + 141 + ] }, "alternate": null, "loc": null, - "range": { - "start": 100, - "end": 141 - } + "range": [ + 100, + 141 + ] }, { "type": "ReturnStatement", @@ -380,10 +380,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 152, - "end": 155 - } + "range": [ + 152, + 155 + ] }, "attributes": [ { @@ -392,10 +392,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 156, - "end": 157 - } + "range": [ + 156, + 157 + ] }, "value": { "type": "JSXExpressionContainer", @@ -404,22 +404,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "loc": null, - "range": { - "start": 158, - "end": 161 - } + "range": [ + 158, + 161 + ] }, "loc": null, - "range": { - "start": 156, - "end": 161 - } + "range": [ + 156, + 161 + ] }, { "type": "JSXAttribute", @@ -427,10 +427,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 162, - "end": 163 - } + "range": [ + 162, + 163 + ] }, "value": { "type": "JSXExpressionContainer", @@ -439,64 +439,64 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 166 - } + "range": [ + 165, + 166 + ] }, "loc": null, - "range": { - "start": 164, - "end": 167 - } + "range": [ + 164, + 167 + ] }, "loc": null, - "range": { - "start": 162, - "end": 167 - } + "range": [ + 162, + 167 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 151, - "end": 170 - } + "range": [ + 151, + 170 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 151, - "end": 170 - } + "range": [ + 151, + 170 + ] }, "loc": null, - "range": { - "start": 144, - "end": 171 - } + "range": [ + 144, + 171 + ] } ], "loc": null, - "range": { - "start": 27, - "end": 173 - } + "range": [ + 27, + 173 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 173 - }, + "range": [ + 0, + 173 + ], "loc": null, - "range": { - "start": 0, - "end": 173 - } + "range": [ + 0, + 173 + ] }, { "type": "FunctionDeclaration", @@ -505,10 +505,10 @@ Output: "name": "ComponentB", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 194 - } + "range": [ + 184, + 194 + ] }, "params": [ { @@ -516,10 +516,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 200 - } + "range": [ + 195, + 200 + ] } ], "body": { @@ -536,32 +536,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 213 - } + "range": [ + 212, + 213 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 216, - "end": 218 - } + "range": [ + 216, + 218 + ] }, "loc": null, - "range": { - "start": 212, - "end": 218 - } + "range": [ + 212, + 218 + ] } ], "loc": null, - "range": { - "start": 206, - "end": 219 - } + "range": [ + 206, + 219 + ] }, { "type": "VariableDeclaration", @@ -574,32 +574,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 228, - "end": 229 - } + "range": [ + 228, + 229 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 232, - "end": 234 - } + "range": [ + 232, + 234 + ] }, "loc": null, - "range": { - "start": 228, - "end": 234 - } + "range": [ + 228, + 234 + ] } ], "loc": null, - "range": { - "start": 222, - "end": 235 - } + "range": [ + 222, + 235 + ] }, { "type": "IfStatement", @@ -610,10 +610,10 @@ Output: "name": "mayMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 242, - "end": 251 - } + "range": [ + 242, + 251 + ] }, "arguments": [ { @@ -621,17 +621,17 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 252, - "end": 253 - } + "range": [ + 252, + 253 + ] } ], "loc": null, - "range": { - "start": 242, - "end": 254 - } + "range": [ + 242, + 254 + ] }, "consequent": { "type": "BlockStatement", @@ -647,27 +647,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 262, - "end": 263 - } + "range": [ + 262, + 263 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 268 - } + "range": [ + 264, + 268 + ] }, "computed": false, "loc": null, - "range": { - "start": 262, - "end": 268 - } + "range": [ + 262, + 268 + ] }, "arguments": [ { @@ -677,55 +677,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 269, - "end": 274 - } + "range": [ + 269, + 274 + ] }, "property": { "type": "Identifier", "name": "p0", "typeAnnotation": null, "loc": null, - "range": { - "start": 275, - "end": 277 - } + "range": [ + 275, + 277 + ] }, "computed": false, "loc": null, - "range": { - "start": 269, - "end": 277 - } + "range": [ + 269, + 277 + ] } ], "loc": null, - "range": { - "start": 262, - "end": 278 - } + "range": [ + 262, + 278 + ] }, "directive": null, "loc": null, - "range": { - "start": 262, - "end": 279 - } + "range": [ + 262, + 279 + ] } ], "loc": null, - "range": { - "start": 256, - "end": 283 - } + "range": [ + 256, + 283 + ] }, "alternate": null, "loc": null, - "range": { - "start": 238, - "end": 283 - } + "range": [ + 238, + 283 + ] }, { "type": "IfStatement", @@ -736,27 +736,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 290, - "end": 295 - } + "range": [ + 290, + 295 + ] }, "property": { "type": "Identifier", "name": "p1", "typeAnnotation": null, "loc": null, - "range": { - "start": 296, - "end": 298 - } + "range": [ + 296, + 298 + ] }, "computed": false, "loc": null, - "range": { - "start": 290, - "end": 298 - } + "range": [ + 290, + 298 + ] }, "consequent": { "type": "BlockStatement", @@ -772,27 +772,27 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 306, - "end": 307 - } + "range": [ + 306, + 307 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 308, - "end": 312 - } + "range": [ + 308, + 312 + ] }, "computed": false, "loc": null, - "range": { - "start": 306, - "end": 312 - } + "range": [ + 306, + 312 + ] }, "arguments": [ { @@ -802,55 +802,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 313, - "end": 318 - } + "range": [ + 313, + 318 + ] }, "property": { "type": "Identifier", "name": "p2", "typeAnnotation": null, "loc": null, - "range": { - "start": 319, - "end": 321 - } + "range": [ + 319, + 321 + ] }, "computed": false, "loc": null, - "range": { - "start": 313, - "end": 321 - } + "range": [ + 313, + 321 + ] } ], "loc": null, - "range": { - "start": 306, - "end": 322 - } + "range": [ + 306, + 322 + ] }, "directive": null, "loc": null, - "range": { - "start": 306, - "end": 323 - } + "range": [ + 306, + 323 + ] } ], "loc": null, - "range": { - "start": 300, - "end": 327 - } + "range": [ + 300, + 327 + ] }, "alternate": null, "loc": null, - "range": { - "start": 286, - "end": 327 - } + "range": [ + 286, + 327 + ] }, { "type": "ReturnStatement", @@ -862,10 +862,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 338, - "end": 341 - } + "range": [ + 338, + 341 + ] }, "attributes": [ { @@ -874,10 +874,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 342, - "end": 343 - } + "range": [ + 342, + 343 + ] }, "value": { "type": "JSXExpressionContainer", @@ -886,22 +886,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 345, - "end": 346 - } + "range": [ + 345, + 346 + ] }, "loc": null, - "range": { - "start": 344, - "end": 347 - } + "range": [ + 344, + 347 + ] }, "loc": null, - "range": { - "start": 342, - "end": 347 - } + "range": [ + 342, + 347 + ] }, { "type": "JSXAttribute", @@ -909,10 +909,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 348, - "end": 349 - } + "range": [ + 348, + 349 + ] }, "value": { "type": "JSXExpressionContainer", @@ -921,64 +921,64 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 351, - "end": 352 - } + "range": [ + 351, + 352 + ] }, "loc": null, - "range": { - "start": 350, - "end": 353 - } + "range": [ + 350, + 353 + ] }, "loc": null, - "range": { - "start": 348, - "end": 353 - } + "range": [ + 348, + 353 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 337, - "end": 356 - } + "range": [ + 337, + 356 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 337, - "end": 356 - } + "range": [ + 337, + 356 + ] }, "loc": null, - "range": { - "start": 330, - "end": 357 - } + "range": [ + 330, + 357 + ] } ], "loc": null, - "range": { - "start": 202, - "end": 359 - } + "range": [ + 202, + 359 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 175, - "end": 359 - }, + "range": [ + 175, + 359 + ], "loc": null, - "range": { - "start": 175, - "end": 359 - } + "range": [ + 175, + 359 + ] }, { "type": "FunctionDeclaration", @@ -987,33 +987,33 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 370, - "end": 373 - } + "range": [ + 370, + 373 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 376, - "end": 378 - } + "range": [ + 376, + 378 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 361, - "end": 378 - }, + "range": [ + 361, + 378 + ], "loc": null, - "range": { - "start": 361, - "end": 378 - } + "range": [ + 361, + 378 + ] }, { "type": "FunctionDeclaration", @@ -1022,39 +1022,39 @@ Output: "name": "mayMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 388, - "end": 397 - } + "range": [ + 388, + 397 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 400, - "end": 402 - } + "range": [ + 400, + 402 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 379, - "end": 402 - }, + "range": [ + 379, + 402 + ], "loc": null, - "range": { - "start": 379, - "end": 402 - } + "range": [ + 379, + 402 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 402 - } + "range": [ + 0, + 402 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-set-state-in-render.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-set-state-in-render.js.snap index 1286d7e21d..fb9e109b98 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-set-state-in-render.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@conditional-set-state-in-render.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -42,10 +42,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -65,27 +65,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 45 - } + "range": [ + 36, + 45 + ] }, "init": { "type": "CallExpression", @@ -94,40 +94,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 56 - } + "range": [ + 48, + 56 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 59 - } + "range": [ + 48, + 59 + ] }, "loc": null, - "range": { - "start": 36, - "end": 59 - } + "range": [ + 36, + 59 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 60 - } + "range": [ + 30, + 60 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -161,68 +161,68 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 92 - } + "range": [ + 88, + 92 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 95 - } + "range": [ + 88, + 95 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 96 - } + "range": [ + 88, + 96 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 100 - } + "range": [ + 82, + 100 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 76, - "end": 100 - }, + "range": [ + 76, + 100 + ], "expression": false, "loc": null, - "range": { - "start": 76, - "end": 100 - } + "range": [ + 76, + 100 + ] }, "loc": null, - "range": { - "start": 70, - "end": 100 - } + "range": [ + 70, + 100 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 101 - } + "range": [ + 64, + 101 + ] }, { "type": "IfStatement", @@ -233,27 +233,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 114 - } + "range": [ + 109, + 114 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 119 - } + "range": [ + 115, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 119 - } + "range": [ + 109, + 119 + ] }, "consequent": { "type": "BlockStatement", @@ -267,34 +267,34 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 131 - } + "range": [ + 127, + 131 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 134 - } + "range": [ + 127, + 134 + ] }, "directive": null, "loc": null, - "range": { - "start": 127, - "end": 135 - } + "range": [ + 127, + 135 + ] }, { "type": "ExpressionStatement", @@ -305,38 +305,38 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 143 - } + "range": [ + 140, + 143 + ] }, "arguments": [], "loc": null, - "range": { - "start": 140, - "end": 145 - } + "range": [ + 140, + 145 + ] }, "directive": null, "loc": null, - "range": { - "start": 140, - "end": 146 - } + "range": [ + 140, + 146 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 150 - } + "range": [ + 121, + 150 + ] }, "alternate": null, "loc": null, - "range": { - "start": 105, - "end": 150 - } + "range": [ + 105, + 150 + ] }, { "type": "ReturnStatement", @@ -345,42 +345,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "loc": null, - "range": { - "start": 154, - "end": 163 - } + "range": [ + 154, + 163 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 165 - } + "range": [ + 26, + 165 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 165 - }, + "range": [ + 0, + 165 + ], "loc": null, - "range": { - "start": 0, - "end": 165 - } + "range": [ + 0, + 165 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 165 - } + "range": [ + 0, + 165 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@console-readonly.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@console-readonly.js.snap index 5e56f3eb98..d7da671349 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@console-readonly.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@console-readonly.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -59,10 +59,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -71,10 +71,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [ { @@ -82,30 +82,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 57 - } + "range": [ + 40, + 57 + ] }, "loc": null, - "range": { - "start": 36, - "end": 57 - } + "range": [ + 36, + 57 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 58 - } + "range": [ + 30, + 58 + ] }, { "type": "ExpressionStatement", @@ -118,27 +118,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 163 - } + "range": [ + 156, + 163 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 167 - } + "range": [ + 164, + 167 + ] }, "computed": false, "loc": null, - "range": { - "start": 156, - "end": 167 - } + "range": [ + 156, + 167 + ] }, "arguments": [ { @@ -146,24 +146,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] } ], "loc": null, - "range": { - "start": 156, - "end": 170 - } + "range": [ + 156, + 170 + ] }, "directive": null, "loc": null, - "range": { - "start": 156, - "end": 171 - } + "range": [ + 156, + 171 + ] }, { "type": "ExpressionStatement", @@ -176,27 +176,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 181 - } + "range": [ + 174, + 181 + ] }, "property": { "type": "Identifier", "name": "info", "typeAnnotation": null, "loc": null, - "range": { - "start": 182, - "end": 186 - } + "range": [ + 182, + 186 + ] }, "computed": false, "loc": null, - "range": { - "start": 174, - "end": 186 - } + "range": [ + 174, + 186 + ] }, "arguments": [ { @@ -204,24 +204,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 188 - } + "range": [ + 187, + 188 + ] } ], "loc": null, - "range": { - "start": 174, - "end": 189 - } + "range": [ + 174, + 189 + ] }, "directive": null, "loc": null, - "range": { - "start": 174, - "end": 190 - } + "range": [ + 174, + 190 + ] }, { "type": "ExpressionStatement", @@ -234,27 +234,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 193, - "end": 200 - } + "range": [ + 193, + 200 + ] }, "property": { "type": "Identifier", "name": "warn", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 205 - } + "range": [ + 201, + 205 + ] }, "computed": false, "loc": null, - "range": { - "start": 193, - "end": 205 - } + "range": [ + 193, + 205 + ] }, "arguments": [ { @@ -262,24 +262,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 207 - } + "range": [ + 206, + 207 + ] } ], "loc": null, - "range": { - "start": 193, - "end": 208 - } + "range": [ + 193, + 208 + ] }, "directive": null, "loc": null, - "range": { - "start": 193, - "end": 209 - } + "range": [ + 193, + 209 + ] }, { "type": "ExpressionStatement", @@ -292,27 +292,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 219 - } + "range": [ + 212, + 219 + ] }, "property": { "type": "Identifier", "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 220, - "end": 225 - } + "range": [ + 220, + 225 + ] }, "computed": false, "loc": null, - "range": { - "start": 212, - "end": 225 - } + "range": [ + 212, + 225 + ] }, "arguments": [ { @@ -320,24 +320,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 226, - "end": 227 - } + "range": [ + 226, + 227 + ] } ], "loc": null, - "range": { - "start": 212, - "end": 228 - } + "range": [ + 212, + 228 + ] }, "directive": null, "loc": null, - "range": { - "start": 212, - "end": 229 - } + "range": [ + 212, + 229 + ] }, { "type": "ExpressionStatement", @@ -350,27 +350,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 232, - "end": 239 - } + "range": [ + 232, + 239 + ] }, "property": { "type": "Identifier", "name": "trace", "typeAnnotation": null, "loc": null, - "range": { - "start": 240, - "end": 245 - } + "range": [ + 240, + 245 + ] }, "computed": false, "loc": null, - "range": { - "start": 232, - "end": 245 - } + "range": [ + 232, + 245 + ] }, "arguments": [ { @@ -378,24 +378,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 246, - "end": 247 - } + "range": [ + 246, + 247 + ] } ], "loc": null, - "range": { - "start": 232, - "end": 248 - } + "range": [ + 232, + 248 + ] }, "directive": null, "loc": null, - "range": { - "start": 232, - "end": 249 - } + "range": [ + 232, + 249 + ] }, { "type": "ExpressionStatement", @@ -408,27 +408,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 252, - "end": 259 - } + "range": [ + 252, + 259 + ] }, "property": { "type": "Identifier", "name": "table", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 265 - } + "range": [ + 260, + 265 + ] }, "computed": false, "loc": null, - "range": { - "start": 252, - "end": 265 - } + "range": [ + 252, + 265 + ] }, "arguments": [ { @@ -436,24 +436,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 266, - "end": 267 - } + "range": [ + 266, + 267 + ] } ], "loc": null, - "range": { - "start": 252, - "end": 268 - } + "range": [ + 252, + 268 + ] }, "directive": null, "loc": null, - "range": { - "start": 252, - "end": 269 - } + "range": [ + 252, + 269 + ] }, { "type": "ReturnStatement", @@ -462,42 +462,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 279, - "end": 280 - } + "range": [ + 279, + 280 + ] }, "loc": null, - "range": { - "start": 272, - "end": 281 - } + "range": [ + 272, + 281 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 283 - } + "range": [ + 26, + 283 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 283 - }, + "range": [ + 0, + 283 + ], "loc": null, - "range": { - "start": 0, - "end": 283 - } + "range": [ + 0, + 283 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 283 - } + "range": [ + 0, + 283 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-global.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-global.js.snap index 15f43782b1..7e61eac9d7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-global.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-global.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -45,33 +45,33 @@ Output: "name": "isX", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 28 - } + "range": [ + 25, + 28 + ] }, "init": { "type": "Identifier", "name": "GLOBAL_IS_X", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 42 - } + "range": [ + 31, + 42 + ] }, "loc": null, - "range": { - "start": 25, - "end": 42 - } + "range": [ + 25, + 42 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 43 - } + "range": [ + 19, + 43 + ] }, { "type": "VariableDeclaration", @@ -84,10 +84,10 @@ Output: "name": "getJSX", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 58 - } + "range": [ + 52, + 58 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -106,10 +106,10 @@ Output: "type": "JSXIdentifier", "name": "Child", "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "attributes": [ { @@ -118,10 +118,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "value": { "type": "JSXExpressionContainer", @@ -130,30 +130,30 @@ Output: "name": "isX", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 93 - } + "range": [ + 90, + 93 + ] }, "loc": null, - "range": { - "start": 89, - "end": 94 - } + "range": [ + 89, + 94 + ] }, "loc": null, - "range": { - "start": 87, - "end": 94 - } + "range": [ + 87, + 94 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 80, - "end": 95 - } + "range": [ + 80, + 95 + ] }, "children": [], "closingElement": { @@ -162,62 +162,62 @@ Output: "type": "JSXIdentifier", "name": "Child", "loc": null, - "range": { - "start": 97, - "end": 102 - } + "range": [ + 97, + 102 + ] }, "loc": null, - "range": { - "start": 95, - "end": 103 - } + "range": [ + 95, + 103 + ] }, "loc": null, - "range": { - "start": 80, - "end": 103 - } + "range": [ + 80, + 103 + ] }, "loc": null, - "range": { - "start": 73, - "end": 104 - } + "range": [ + 73, + 104 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 108 - } + "range": [ + 67, + 108 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 61, - "end": 108 - }, + "range": [ + 61, + 108 + ], "expression": false, "loc": null, - "range": { - "start": 61, - "end": 108 - } + "range": [ + 61, + 108 + ] }, "loc": null, - "range": { - "start": 52, - "end": 108 - } + "range": [ + 52, + 108 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 109 - } + "range": [ + 46, + 109 + ] }, { "type": "VariableDeclaration", @@ -230,10 +230,10 @@ Output: "name": "result", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 124 - } + "range": [ + 118, + 124 + ] }, "init": { "type": "CallExpression", @@ -242,30 +242,30 @@ Output: "name": "getJSX", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 133 - } + "range": [ + 127, + 133 + ] }, "arguments": [], "loc": null, - "range": { - "start": 127, - "end": 135 - } + "range": [ + 127, + 135 + ] }, "loc": null, - "range": { - "start": 118, - "end": 135 - } + "range": [ + 118, + 135 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 136 - } + "range": [ + 112, + 136 + ] }, { "type": "ReturnStatement", @@ -274,42 +274,42 @@ Output: "name": "result", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 152 - } + "range": [ + 146, + 152 + ] }, "loc": null, - "range": { - "start": 139, - "end": 153 - } + "range": [ + 139, + 153 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 155 - } + "range": [ + 15, + 155 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 155 - }, + "range": [ + 0, + 155 + ], "loc": null, - "range": { - "start": 0, - "end": 155 - } + "range": [ + 0, + 155 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 155 - } + "range": [ + 0, + 155 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-primitive.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-primitive.js.snap index 5e62a6975e..ec8418e335 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-primitive.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@const-propagation-into-function-expression-primitive.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -83,10 +83,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -106,27 +106,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 64 - } + "range": [ + 57, + 64 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 68 - } + "range": [ + 65, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 68 - } + "range": [ + 57, + 68 + ] }, "arguments": [ { @@ -134,58 +134,58 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 71 - } + "range": [ + 57, + 71 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 72 - } + "range": [ + 57, + 72 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 76 - } + "range": [ + 51, + 76 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 45, - "end": 76 - }, + "range": [ + 45, + 76 + ], "expression": false, "loc": null, - "range": { - "start": 45, - "end": 76 - } + "range": [ + 45, + 76 + ] }, "loc": null, - "range": { - "start": 41, - "end": 76 - } + "range": [ + 41, + 76 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 77 - } + "range": [ + 35, + 77 + ] }, { "type": "ExpressionStatement", @@ -196,24 +196,24 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "arguments": [], "loc": null, - "range": { - "start": 80, - "end": 83 - } + "range": [ + 80, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] }, { "type": "ReturnStatement", @@ -222,42 +222,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 98 - } + "range": [ + 15, + 98 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 98 - }, + "range": [ + 0, + 98 + ], "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-computed.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-computed.js.snap index 50f193c19b..0d3fd4e189 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-computed.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-computed.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "index", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] }, "init": { "type": "StringLiteral", "value": "foo", "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "VariableDeclaration", @@ -93,32 +93,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 63, - "end": 65 - } + "range": [ + 63, + 65 + ] }, "loc": null, - "range": { - "start": 59, - "end": 65 - } + "range": [ + 59, + 65 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 66 - } + "range": [ + 53, + 66 + ] }, { "type": "ExpressionStatement", @@ -132,27 +132,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "property": { "type": "Identifier", "name": "index", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 76 - } + "range": [ + 71, + 76 + ] }, "computed": true, "loc": null, - "range": { - "start": 69, - "end": 77 - } + "range": [ + 69, + 77 + ] }, "right": { "type": "BinaryExpression", @@ -163,27 +163,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "property": { "type": "Identifier", "name": "index", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] }, "computed": true, "loc": null, - "range": { - "start": 80, - "end": 88 - } + "range": [ + 80, + 88 + ] }, "operator": "+", "right": { @@ -193,45 +193,45 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "property": { "type": "StringLiteral", "value": "bar", "loc": null, - "range": { - "start": 93, - "end": 98 - } + "range": [ + 93, + 98 + ] }, "computed": true, "loc": null, - "range": { - "start": 91, - "end": 99 - } + "range": [ + 91, + 99 + ] }, "loc": null, - "range": { - "start": 80, - "end": 99 - } + "range": [ + 80, + 99 + ] }, "loc": null, - "range": { - "start": 69, - "end": 99 - } + "range": [ + 69, + 99 + ] }, "directive": null, "loc": null, - "range": { - "start": 69, - "end": 100 - } + "range": [ + 69, + 100 + ] }, { "type": "ExpressionStatement", @@ -244,27 +244,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "property": { "type": "Identifier", "name": "index", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 110 - } + "range": [ + 105, + 110 + ] }, "computed": true, "loc": null, - "range": { - "start": 103, - "end": 111 - } + "range": [ + 103, + 111 + ] }, "arguments": [ { @@ -274,41 +274,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "computed": false, "loc": null, - "range": { - "start": 112, - "end": 121 - } + "range": [ + 112, + 121 + ] } ], "loc": null, - "range": { - "start": 103, - "end": 122 - } + "range": [ + 103, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 103, - "end": 123 - } + "range": [ + 103, + 123 + ] }, { "type": "ReturnStatement", @@ -317,42 +317,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "loc": null, - "range": { - "start": 126, - "end": 135 - } + "range": [ + 126, + 135 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 137 - } + "range": [ + 26, + 137 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 137 - }, + "range": [ + 0, + 137 + ], "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-for.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-for.js.snap index 1b9e272d58..fb3646d128 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-for.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-for.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "ForStatement", @@ -84,32 +84,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "init": { "type": "NumericLiteral", "value": 100.0, "loc": null, - "range": { - "start": 47, - "end": 50 - } + "range": [ + 47, + 50 + ] }, "loc": null, - "range": { - "start": 43, - "end": 50 - } + "range": [ + 43, + 50 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 50 - } + "range": [ + 37, + 50 + ] }, "test": { "type": "BinaryExpression", @@ -118,36 +118,36 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "operator": "<", "right": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 56, - "end": 58 - } + "range": [ + 56, + 58 + ] }, "loc": null, - "range": { - "start": 52, - "end": 58 - } + "range": [ + 52, + 58 + ] }, "update": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "body": { "type": "BlockStatement", @@ -162,10 +162,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "right": { "type": "BinaryExpression", @@ -174,52 +174,52 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "loc": null, - "range": { - "start": 73, - "end": 78 - } + "range": [ + 73, + 78 + ] }, "loc": null, - "range": { - "start": 69, - "end": 78 - } + "range": [ + 69, + 78 + ] }, "directive": null, "loc": null, - "range": { - "start": 69, - "end": 79 - } + "range": [ + 69, + 79 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 83 - } + "range": [ + 63, + 83 + ] }, "loc": null, - "range": { - "start": 32, - "end": 83 - } + "range": [ + 32, + 83 + ] }, { "type": "ReturnStatement", @@ -228,42 +228,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 97 - } + "range": [ + 15, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 97 - }, + "range": [ + 0, + 97 + ], "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-into-function-expressions.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-into-function-expressions.js.snap index f34e733703..59ba486117 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-into-function-expressions.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-into-function-expressions.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "VariableDeclaration", @@ -93,10 +93,10 @@ Output: "name": "onEvent", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 59 - } + "range": [ + 52, + 59 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -116,27 +116,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 81 - } + "range": [ + 74, + 81 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "computed": false, "loc": null, - "range": { - "start": 74, - "end": 85 - } + "range": [ + 74, + 85 + ] }, "arguments": [ { @@ -144,58 +144,58 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 88 - } + "range": [ + 74, + 88 + ] }, "directive": null, "loc": null, - "range": { - "start": 74, - "end": 89 - } + "range": [ + 74, + 89 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 93 - } + "range": [ + 68, + 93 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 62, - "end": 93 - }, + "range": [ + 62, + 93 + ], "expression": false, "loc": null, - "range": { - "start": 62, - "end": 93 - } + "range": [ + 62, + 93 + ] }, "loc": null, - "range": { - "start": 52, - "end": 93 - } + "range": [ + 52, + 93 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 94 - } + "range": [ + 46, + 94 + ] }, { "type": "ReturnStatement", @@ -207,10 +207,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 105, - "end": 108 - } + "range": [ + 105, + 108 + ] }, "attributes": [ { @@ -219,10 +219,10 @@ Output: "type": "JSXIdentifier", "name": "onEvent", "loc": null, - "range": { - "start": 109, - "end": 116 - } + "range": [ + 109, + 116 + ] }, "value": { "type": "JSXExpressionContainer", @@ -231,70 +231,70 @@ Output: "name": "onEvent", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 125 - } + "range": [ + 118, + 125 + ] }, "loc": null, - "range": { - "start": 117, - "end": 126 - } + "range": [ + 117, + 126 + ] }, "loc": null, - "range": { - "start": 109, - "end": 126 - } + "range": [ + 109, + 126 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 104, - "end": 129 - } + "range": [ + 104, + 129 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 104, - "end": 129 - } + "range": [ + 104, + 129 + ] }, "loc": null, - "range": { - "start": 97, - "end": 130 - } + "range": [ + 97, + 130 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 132 - } + "range": [ + 26, + 132 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 132 - }, + "range": [ + 0, + 132 + ], "loc": null, - "range": { - "start": 0, - "end": 132 - } + "range": [ + 0, + 132 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 132 - } + "range": [ + 0, + 132 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-phi.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-phi.js.snap index d26001e5a8..ea4dd04c92 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-phi.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-phi.js.snap @@ -30,10 +30,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -41,30 +41,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -81,24 +81,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 32 - } + "range": [ + 26, + 32 + ] }, { "type": "IfStatement", @@ -107,10 +107,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "consequent": { "type": "BlockStatement", @@ -125,10 +125,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "right": { "type": "BinaryExpression", @@ -136,46 +136,46 @@ Output: "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "operator": "-", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] }, "loc": null, - "range": { - "start": 48, - "end": 57 - } + "range": [ + 48, + 57 + ] }, "directive": null, "loc": null, - "range": { - "start": 48, - "end": 58 - } + "range": [ + 48, + 58 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 62 - } + "range": [ + 42, + 62 + ] }, "alternate": { "type": "BlockStatement", @@ -190,10 +190,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "right": { "type": "BinaryExpression", @@ -201,52 +201,52 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, "loc": null, - "range": { - "start": 74, - "end": 83 - } + "range": [ + 74, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 74, - "end": 84 - } + "range": [ + 74, + 84 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 88 - } + "range": [ + 68, + 88 + ] }, "loc": null, - "range": { - "start": 35, - "end": 88 - } + "range": [ + 35, + 88 + ] }, { "type": "IfStatement", @@ -257,26 +257,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "loc": null, - "range": { - "start": 95, - "end": 102 - } + "range": [ + 95, + 102 + ] }, "consequent": { "type": "BlockStatement", @@ -288,23 +288,23 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "loc": null, - "range": { - "start": 110, - "end": 119 - } + "range": [ + 110, + 119 + ] } ], "loc": null, - "range": { - "start": 104, - "end": 123 - } + "range": [ + 104, + 123 + ] }, "alternate": { "type": "BlockStatement", @@ -316,55 +316,55 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "loc": null, - "range": { - "start": 135, - "end": 144 - } + "range": [ + 135, + 144 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 148 - } + "range": [ + 129, + 148 + ] }, "loc": null, - "range": { - "start": 91, - "end": 148 - } + "range": [ + 91, + 148 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 150 - } + "range": [ + 22, + 150 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 150 - }, + "range": [ + 0, + 150 + ], "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-while.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-while.js.snap index 2de957d118..0bde4b59a7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-while.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation-while.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 100.0, "loc": null, - "range": { - "start": 27, - "end": 30 - } + "range": [ + 27, + 30 + ] }, "loc": null, - "range": { - "start": 23, - "end": 30 - } + "range": [ + 23, + 30 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 31 - } + "range": [ + 19, + 31 + ] }, { "type": "VariableDeclaration", @@ -83,32 +83,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 44 - } + "range": [ + 34, + 44 + ] }, { "type": "WhileStatement", @@ -119,26 +119,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "operator": "<", "right": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 58, - "end": 60 - } + "range": [ + 58, + 60 + ] }, "loc": null, - "range": { - "start": 54, - "end": 60 - } + "range": [ + 54, + 60 + ] }, "body": { "type": "BlockStatement", @@ -153,45 +153,45 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 68, - "end": 74 - } + "range": [ + 68, + 74 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 75 - } + "range": [ + 68, + 75 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 79 - } + "range": [ + 62, + 79 + ] }, "loc": null, - "range": { - "start": 47, - "end": 79 - } + "range": [ + 47, + 79 + ] }, { "type": "ReturnStatement", @@ -200,42 +200,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "loc": null, - "range": { - "start": 82, - "end": 91 - } + "range": [ + 82, + 91 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 93 - } + "range": [ + 15, + 93 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 93 - }, + "range": [ + 0, + 93 + ], "loc": null, - "range": { - "start": 0, - "end": 93 - } + "range": [ + 0, + 93 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 93 - } + "range": [ + 0, + 93 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation.js.snap index b30091d7da..bf64bee48f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constant-propagation.js.snap @@ -35,10 +35,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -55,32 +55,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "loc": null, - "range": { - "start": 25, - "end": 30 - } + "range": [ + 25, + 30 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 31 - } + "range": [ + 19, + 31 + ] }, { "type": "VariableDeclaration", @@ -93,32 +93,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "loc": null, - "range": { - "start": 40, - "end": 45 - } + "range": [ + 40, + 45 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 46 - } + "range": [ + 34, + 46 + ] }, { "type": "VariableDeclaration", @@ -131,32 +131,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "init": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "loc": null, - "range": { - "start": 55, - "end": 60 - } + "range": [ + 55, + 60 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 61 - } + "range": [ + 49, + 61 + ] }, { "type": "VariableDeclaration", @@ -169,10 +169,10 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "init": { "type": "BinaryExpression", @@ -181,10 +181,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "operator": "+", "right": { @@ -192,29 +192,29 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "loc": null, - "range": { - "start": 70, - "end": 79 - } + "range": [ + 70, + 79 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 80 - } + "range": [ + 64, + 80 + ] }, { "type": "VariableDeclaration", @@ -227,10 +227,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "init": { "type": "BinaryExpression", @@ -239,10 +239,10 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "operator": "*", "right": { @@ -250,29 +250,29 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "loc": null, - "range": { - "start": 93, - "end": 98 - } + "range": [ + 93, + 98 + ] }, "loc": null, - "range": { - "start": 89, - "end": 98 - } + "range": [ + 89, + 98 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 99 - } + "range": [ + 83, + 99 + ] }, { "type": "VariableDeclaration", @@ -285,10 +285,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "init": { "type": "BinaryExpression", @@ -297,10 +297,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "operator": "/", "right": { @@ -308,29 +308,29 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] }, "loc": null, - "range": { - "start": 108, - "end": 117 - } + "range": [ + 108, + 117 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 118 - } + "range": [ + 102, + 118 + ] }, { "type": "VariableDeclaration", @@ -343,10 +343,10 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "init": { "type": "BinaryExpression", @@ -355,10 +355,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 132 - } + "range": [ + 131, + 132 + ] }, "operator": "-", "right": { @@ -366,29 +366,29 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, "loc": null, - "range": { - "start": 127, - "end": 136 - } + "range": [ + 127, + 136 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 137 - } + "range": [ + 121, + 137 + ] }, { "type": "IfStatement", @@ -397,10 +397,10 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "consequent": { "type": "BlockStatement", @@ -416,65 +416,65 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 161 - } + "range": [ + 154, + 161 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 165 - } + "range": [ + 162, + 165 + ] }, "computed": false, "loc": null, - "range": { - "start": 154, - "end": 165 - } + "range": [ + 154, + 165 + ] }, "arguments": [ { "type": "StringLiteral", "value": "foo", "loc": null, - "range": { - "start": 166, - "end": 171 - } + "range": [ + 166, + 171 + ] } ], "loc": null, - "range": { - "start": 154, - "end": 172 - } + "range": [ + 154, + 172 + ] }, "directive": null, "loc": null, - "range": { - "start": 154, - "end": 173 - } + "range": [ + 154, + 173 + ] } ], "loc": null, - "range": { - "start": 148, - "end": 177 - } + "range": [ + 148, + 177 + ] }, "alternate": null, "loc": null, - "range": { - "start": 141, - "end": 177 - } + "range": [ + 141, + 177 + ] }, { "type": "VariableDeclaration", @@ -487,33 +487,33 @@ Output: "name": "h", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 188 - } + "range": [ + 187, + 188 + ] }, "init": { "type": "Identifier", "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 191, - "end": 192 - } + "range": [ + 191, + 192 + ] }, "loc": null, - "range": { - "start": 187, - "end": 192 - } + "range": [ + 187, + 192 + ] } ], "loc": null, - "range": { - "start": 181, - "end": 193 - } + "range": [ + 181, + 193 + ] }, { "type": "VariableDeclaration", @@ -526,33 +526,33 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 203 - } + "range": [ + 202, + 203 + ] }, "init": { "type": "Identifier", "name": "h", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 207 - } + "range": [ + 206, + 207 + ] }, "loc": null, - "range": { - "start": 202, - "end": 207 - } + "range": [ + 202, + 207 + ] } ], "loc": null, - "range": { - "start": 196, - "end": 208 - } + "range": [ + 196, + 208 + ] }, { "type": "VariableDeclaration", @@ -565,33 +565,33 @@ Output: "name": "j", "typeAnnotation": null, "loc": null, - "range": { - "start": 217, - "end": 218 - } + "range": [ + 217, + 218 + ] }, "init": { "type": "Identifier", "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 221, - "end": 222 - } + "range": [ + 221, + 222 + ] }, "loc": null, - "range": { - "start": 217, - "end": 222 - } + "range": [ + 217, + 222 + ] } ], "loc": null, - "range": { - "start": 211, - "end": 223 - } + "range": [ + 211, + 223 + ] }, { "type": "ReturnStatement", @@ -600,42 +600,42 @@ Output: "name": "j", "typeAnnotation": null, "loc": null, - "range": { - "start": 233, - "end": 234 - } + "range": [ + 233, + 234 + ] }, "loc": null, - "range": { - "start": 226, - "end": 235 - } + "range": [ + 226, + 235 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 237 - } + "range": [ + 15, + 237 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 237 - }, + "range": [ + 0, + 237 + ], "loc": null, - "range": { - "start": 0, - "end": 237 - } + "range": [ + 0, + 237 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 237 - } + "range": [ + 0, + 237 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constructor.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constructor.js.snap index 54e4b4902b..ee4ef69c14 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constructor.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@constructor.js.snap @@ -27,33 +27,33 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 15, - "end": 17 - } + "range": [ + 15, + 17 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 17 - }, + "range": [ + 0, + 17 + ], "loc": null, - "range": { - "start": 0, - "end": 17 - } + "range": [ + 0, + 17 + ] }, { "type": "FunctionDeclaration", @@ -62,10 +62,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 37 - } + "range": [ + 28, + 37 + ] }, "params": [ { @@ -73,10 +73,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "body": { @@ -93,32 +93,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 59, - "end": 61 - } + "range": [ + 59, + 61 + ] }, "loc": null, - "range": { - "start": 55, - "end": 61 - } + "range": [ + 55, + 61 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 62 - } + "range": [ + 49, + 62 + ] }, { "type": "VariableDeclaration", @@ -131,32 +131,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 75, - "end": 77 - } + "range": [ + 75, + 77 + ] }, "loc": null, - "range": { - "start": 71, - "end": 77 - } + "range": [ + 71, + 77 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 78 - } + "range": [ + 65, + 78 + ] }, { "type": "ExpressionStatement", @@ -167,10 +167,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 88 - } + "range": [ + 85, + 88 + ] }, "arguments": [ { @@ -178,34 +178,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 94 - } + "range": [ + 81, + 94 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 95 - } + "range": [ + 81, + 95 + ] }, { "type": "VariableDeclaration", @@ -218,10 +218,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "init": { "type": "JSXElement", @@ -231,10 +231,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 107, - "end": 110 - } + "range": [ + 107, + 110 + ] }, "attributes": [ { @@ -243,10 +243,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "value": { "type": "JSXExpressionContainer", @@ -255,51 +255,51 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "loc": null, - "range": { - "start": 113, - "end": 116 - } + "range": [ + 113, + 116 + ] }, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 106, - "end": 119 - } + "range": [ + 106, + 119 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 106, - "end": 119 - } + "range": [ + 106, + 119 + ] }, "loc": null, - "range": { - "start": 102, - "end": 119 - } + "range": [ + 102, + 119 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 120 - } + "range": [ + 98, + 120 + ] }, { "type": "ExpressionStatement", @@ -310,10 +310,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 130 - } + "range": [ + 127, + 130 + ] }, "arguments": [ { @@ -321,24 +321,24 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 132 - } + "range": [ + 131, + 132 + ] } ], "loc": null, - "range": { - "start": 123, - "end": 133 - } + "range": [ + 123, + 133 + ] }, "directive": null, "loc": null, - "range": { - "start": 123, - "end": 134 - } + "range": [ + 123, + 134 + ] }, { "type": "ReturnStatement", @@ -350,10 +350,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 145, - "end": 148 - } + "range": [ + 145, + 148 + ] }, "attributes": [ { @@ -362,10 +362,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 149, - "end": 150 - } + "range": [ + 149, + 150 + ] }, "value": { "type": "JSXExpressionContainer", @@ -374,22 +374,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] }, "loc": null, - "range": { - "start": 151, - "end": 154 - } + "range": [ + 151, + 154 + ] }, "loc": null, - "range": { - "start": 149, - "end": 154 - } + "range": [ + 149, + 154 + ] }, { "type": "JSXAttribute", @@ -397,10 +397,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "value": { "type": "JSXExpressionContainer", @@ -409,70 +409,70 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 159 - } + "range": [ + 158, + 159 + ] }, "loc": null, - "range": { - "start": 157, - "end": 160 - } + "range": [ + 157, + 160 + ] }, "loc": null, - "range": { - "start": 155, - "end": 160 - } + "range": [ + 155, + 160 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 144, - "end": 163 - } + "range": [ + 144, + 163 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 144, - "end": 163 - } + "range": [ + 144, + 163 + ] }, "loc": null, - "range": { - "start": 137, - "end": 164 - } + "range": [ + 137, + 164 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 166 - } + "range": [ + 45, + 166 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 19, - "end": 166 - }, + "range": [ + 19, + 166 + ], "loc": null, - "range": { - "start": 19, - "end": 166 - } + "range": [ + 19, + 166 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 166 - } + "range": [ + 0, + 166 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@context-variable-reassigned-outside-of-lambda.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@context-variable-reassigned-outside-of-lambda.js.snap index dd7ea2c5be..2bb7f2ff5e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@context-variable-reassigned-outside-of-lambda.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@context-variable-reassigned-outside-of-lambda.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 28 - } + "range": [ + 19, + 28 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 34 - } + "range": [ + 29, + 34 + ] } ], "body": { @@ -57,31 +57,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "init": { "type": "NullLiteral", "loc": null, - "range": { - "start": 48, - "end": 52 - } + "range": [ + 48, + 52 + ] }, "loc": null, - "range": { - "start": 44, - "end": 52 - } + "range": [ + 44, + 52 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 53 - } + "range": [ + 40, + 53 + ] }, { "type": "VariableDeclaration", @@ -94,10 +94,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 70 - } + "range": [ + 62, + 70 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -108,10 +108,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] } ], "body": { @@ -128,27 +128,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 93 - } + "range": [ + 86, + 93 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 97 - } + "range": [ + 94, + 97 + ] }, "computed": false, "loc": null, - "range": { - "start": 86, - "end": 97 - } + "range": [ + 86, + 97 + ] }, "arguments": [ { @@ -156,58 +156,58 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 100 - } + "range": [ + 86, + 100 + ] }, "directive": null, "loc": null, - "range": { - "start": 86, - "end": 101 - } + "range": [ + 86, + 101 + ] } ], "loc": null, - "range": { - "start": 80, - "end": 105 - } + "range": [ + 80, + 105 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 73, - "end": 105 - }, + "range": [ + 73, + 105 + ], "expression": false, "loc": null, - "range": { - "start": 73, - "end": 105 - } + "range": [ + 73, + 105 + ] }, "loc": null, - "range": { - "start": 62, - "end": 105 - } + "range": [ + 62, + 105 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 106 - } + "range": [ + 56, + 106 + ] }, { "type": "ExpressionStatement", @@ -219,32 +219,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 113, - "end": 115 - } + "range": [ + 113, + 115 + ] }, "loc": null, - "range": { - "start": 109, - "end": 115 - } + "range": [ + 109, + 115 + ] }, "directive": null, "loc": null, - "range": { - "start": 109, - "end": 116 - } + "range": [ + 109, + 116 + ] }, { "type": "ReturnStatement", @@ -256,10 +256,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 127, - "end": 130 - } + "range": [ + 127, + 130 + ] }, "attributes": [ { @@ -268,10 +268,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 131, - "end": 139 - } + "range": [ + 131, + 139 + ] }, "value": { "type": "JSXExpressionContainer", @@ -280,70 +280,70 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 149 - } + "range": [ + 141, + 149 + ] }, "loc": null, - "range": { - "start": 140, - "end": 150 - } + "range": [ + 140, + 150 + ] }, "loc": null, - "range": { - "start": 131, - "end": 150 - } + "range": [ + 131, + 150 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 126, - "end": 153 - } + "range": [ + 126, + 153 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 126, - "end": 153 - } + "range": [ + 126, + 153 + ] }, "loc": null, - "range": { - "start": 119, - "end": 154 - } + "range": [ + 119, + 154 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 156 - } + "range": [ + 36, + 156 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 10, - "end": 156 - }, + "range": [ + 10, + 156 + ], "loc": null, - "range": { - "start": 10, - "end": 156 - } + "range": [ + 10, + 156 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 10, - "end": 156 - } + "range": [ + 10, + 156 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@controlled-input.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@controlled-input.js.snap index 63cfc5e160..287eceb4af 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@controlled-input.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@controlled-input.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -45,27 +45,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 37 - } + "range": [ + 33, + 37 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 38 - } + "range": [ + 29, + 38 + ] }, "init": { "type": "CallExpression", @@ -74,40 +74,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 49 - } + "range": [ + 41, + 49 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 52 - } + "range": [ + 41, + 52 + ] }, "loc": null, - "range": { - "start": 29, - "end": 52 - } + "range": [ + 29, + 52 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 53 - } + "range": [ + 25, + 53 + ] }, { "type": "VariableDeclaration", @@ -120,10 +120,10 @@ Output: "name": "handler", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 69 - } + "range": [ + 62, + 69 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -134,10 +134,10 @@ Output: "name": "event", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 78 - } + "range": [ + 73, + 78 + ] } ], "body": { @@ -147,10 +147,10 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 87 - } + "range": [ + 83, + 87 + ] }, "arguments": [ { @@ -162,78 +162,78 @@ Output: "name": "event", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 100 - } + "range": [ + 94, + 100 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 100 - } + "range": [ + 88, + 100 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 106 - } + "range": [ + 101, + 106 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 106 - } + "range": [ + 88, + 106 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 107 - } + "range": [ + 83, + 107 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 72, - "end": 107 - }, + "range": [ + 72, + 107 + ], "expression": true, "loc": null, - "range": { - "start": 72, - "end": 107 - } + "range": [ + 72, + 107 + ] }, "loc": null, - "range": { - "start": 62, - "end": 107 - } + "range": [ + 62, + 107 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 108 - } + "range": [ + 56, + 108 + ] }, { "type": "ReturnStatement", @@ -245,10 +245,10 @@ Output: "type": "JSXIdentifier", "name": "input", "loc": null, - "range": { - "start": 119, - "end": 124 - } + "range": [ + 119, + 124 + ] }, "attributes": [ { @@ -257,10 +257,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 125, - "end": 133 - } + "range": [ + 125, + 133 + ] }, "value": { "type": "JSXExpressionContainer", @@ -269,22 +269,22 @@ Output: "name": "handler", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 142 - } + "range": [ + 135, + 142 + ] }, "loc": null, - "range": { - "start": 134, - "end": 143 - } + "range": [ + 134, + 143 + ] }, "loc": null, - "range": { - "start": 125, - "end": 143 - } + "range": [ + 125, + 143 + ] }, { "type": "JSXAttribute", @@ -292,10 +292,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 144, - "end": 149 - } + "range": [ + 144, + 149 + ] }, "value": { "type": "JSXExpressionContainer", @@ -304,70 +304,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] }, "loc": null, - "range": { - "start": 150, - "end": 153 - } + "range": [ + 150, + 153 + ] }, "loc": null, - "range": { - "start": 144, - "end": 153 - } + "range": [ + 144, + 153 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 118, - "end": 156 - } + "range": [ + 118, + 156 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 118, - "end": 156 - } + "range": [ + 118, + 156 + ] }, "loc": null, - "range": { - "start": 111, - "end": 157 - } + "range": [ + 111, + 157 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 159 - } + "range": [ + 21, + 159 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 159 - }, + "range": [ + 0, + 159 + ], "loc": null, - "range": { - "start": 0, - "end": 159 - } + "range": [ + 0, + 159 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 159 - } + "range": [ + 0, + 159 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dce-loop.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dce-loop.js.snap index 7cdaf23742..5325abdc93 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dce-loop.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dce-loop.js.snap @@ -26,10 +26,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "loc": null, - "range": { - "start": 28, - "end": 33 - } + "range": [ + 28, + 33 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 34 - } + "range": [ + 24, + 34 + ] }, { "type": "VariableDeclaration", @@ -95,32 +95,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 47 - } + "range": [ + 37, + 47 + ] }, { "type": "WhileStatement", @@ -131,10 +131,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "operator": "<", "right": { @@ -144,33 +144,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "property": { "type": "Identifier", "name": "max", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 70 - } + "range": [ + 61, + 70 + ] }, "loc": null, - "range": { - "start": 57, - "end": 70 - } + "range": [ + 57, + 70 + ] }, "body": { "type": "BlockStatement", @@ -185,24 +185,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "prefix": false, "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 82 - } + "range": [ + 78, + 82 + ] }, { "type": "ExpressionStatement", @@ -214,37 +214,37 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "prefix": false, "loc": null, - "range": { - "start": 87, - "end": 90 - } + "range": [ + 87, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 87, - "end": 91 - } + "range": [ + 87, + 91 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 95 - } + "range": [ + 72, + 95 + ] }, "loc": null, - "range": { - "start": 50, - "end": 95 - } + "range": [ + 50, + 95 + ] }, { "type": "ReturnStatement", @@ -253,42 +253,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "loc": null, - "range": { - "start": 98, - "end": 107 - } + "range": [ + 98, + 107 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 109 - } + "range": [ + 20, + 109 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 109 - }, + "range": [ + 0, + 109 + ], "loc": null, - "range": { - "start": 0, - "end": 109 - } + "range": [ + 0, + 109 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 109 - } + "range": [ + 0, + 109 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@debugger-memoized.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@debugger-memoized.js.snap index cd15961b26..ac3d45553a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@debugger-memoized.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@debugger-memoized.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,40 +54,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "DebuggerStatement", "loc": null, - "range": { - "start": 46, - "end": 55 - } + "range": [ + 46, + 55 + ] }, { "type": "ExpressionStatement", @@ -100,27 +100,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 64 - } + "range": [ + 60, + 64 + ] }, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 64 - } + "range": [ + 58, + 64 + ] }, "arguments": [ { @@ -130,41 +130,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 76 - } + "range": [ + 71, + 76 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 76 - } + "range": [ + 65, + 76 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 77 - } + "range": [ + 58, + 77 + ] }, "directive": null, "loc": null, - "range": { - "start": 58, - "end": 78 - } + "range": [ + 58, + 78 + ] }, { "type": "ReturnStatement", @@ -173,42 +173,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "loc": null, - "range": { - "start": 81, - "end": 90 - } + "range": [ + 81, + 90 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 92 - } + "range": [ + 26, + 92 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 92 - }, + "range": [ + 0, + 92 + ], "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@debugger.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@debugger.js.snap index 862f43bbe0..b849d781a9 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@debugger.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@debugger.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -51,10 +51,10 @@ Output: { "type": "DebuggerStatement", "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] }, { "type": "IfStatement", @@ -65,27 +65,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 51 - } + "range": [ + 46, + 51 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 46, - "end": 56 - } + "range": [ + 46, + 56 + ] }, "consequent": { "type": "BlockStatement", @@ -93,17 +93,17 @@ Output: { "type": "DebuggerStatement", "loc": null, - "range": { - "start": 64, - "end": 73 - } + "range": [ + 64, + 73 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 77 - } + "range": [ + 58, + 77 + ] }, "alternate": { "type": "BlockStatement", @@ -117,27 +117,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 101 - } + "range": [ + 96, + 101 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 106 - } + "range": [ + 102, + 106 + ] }, "computed": false, "loc": null, - "range": { - "start": 96, - "end": 106 - } + "range": [ + 96, + 106 + ] }, "body": { "type": "BlockStatement", @@ -145,70 +145,70 @@ Output: { "type": "DebuggerStatement", "loc": null, - "range": { - "start": 116, - "end": 125 - } + "range": [ + 116, + 125 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 131 - } + "range": [ + 108, + 131 + ] }, "loc": null, - "range": { - "start": 89, - "end": 131 - } + "range": [ + 89, + 131 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 135 - } + "range": [ + 83, + 135 + ] }, "loc": null, - "range": { - "start": 42, - "end": 135 - } + "range": [ + 42, + 135 + ] }, { "type": "DebuggerStatement", "loc": null, - "range": { - "start": 138, - "end": 147 - } + "range": [ + 138, + 147 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 149 - } + "range": [ + 26, + 149 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 149 - }, + "range": [ + 0, + 149 + ], "loc": null, - "range": { - "start": 0, - "end": 149 - } + "range": [ + 0, + 149 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 149 - } + "range": [ + 0, + 149 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-closure.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-closure.js.snap index 231f8e490a..bb80c3f9f7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-closure.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-closure.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -57,24 +57,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 32 - } + "range": [ + 26, + 32 + ] }, { "type": "VariableDeclaration", @@ -87,10 +87,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 44 - } + "range": [ + 41, + 44 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -109,66 +109,66 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 63, - "end": 65 - } + "range": [ + 63, + 65 + ] }, "loc": null, - "range": { - "start": 59, - "end": 65 - } + "range": [ + 59, + 65 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 66 - } + "range": [ + 59, + 66 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 70 - } + "range": [ + 53, + 70 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 47, - "end": 70 - }, + "range": [ + 47, + 70 + ], "expression": false, "loc": null, - "range": { - "start": 47, - "end": 70 - } + "range": [ + 47, + 70 + ] }, "loc": null, - "range": { - "start": 41, - "end": 70 - } + "range": [ + 41, + 70 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 71 - } + "range": [ + 35, + 71 + ] }, { "type": "ExpressionStatement", @@ -179,24 +179,24 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 77 - } + "range": [ + 74, + 77 + ] }, "arguments": [], "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "directive": null, "loc": null, - "range": { - "start": 74, - "end": 80 - } + "range": [ + 74, + 80 + ] }, { "type": "ReturnStatement", @@ -205,42 +205,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "loc": null, - "range": { - "start": 84, - "end": 93 - } + "range": [ + 84, + 93 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 95 - } + "range": [ + 22, + 95 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 95 - }, + "range": [ + 0, + 95 + ], "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-function-declaration.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-function-declaration.js.snap index 4314df7e3c..a1b83194dc 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-function-declaration.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@declare-reassign-variable-in-function-declaration.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -45,31 +45,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "NullLiteral", "loc": null, - "range": { - "start": 33, - "end": 37 - } + "range": [ + 33, + 37 + ] }, "loc": null, - "range": { - "start": 29, - "end": 37 - } + "range": [ + 29, + 37 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 38 - } + "range": [ + 25, + 38 + ] }, { "type": "FunctionDeclaration", @@ -78,10 +78,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 53 - } + "range": [ + 50, + 53 + ] }, "params": [], "body": { @@ -97,52 +97,52 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "right": { "type": "NumericLiteral", "value": 9.0, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 68 - } + "range": [ + 62, + 68 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 72 - } + "range": [ + 56, + 72 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 41, - "end": 72 - }, + "range": [ + 41, + 72 + ], "loc": null, - "range": { - "start": 41, - "end": 72 - } + "range": [ + 41, + 72 + ] }, { "type": "VariableDeclaration", @@ -155,10 +155,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "init": { "type": "CallExpression", @@ -167,10 +167,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 88 - } + "range": [ + 85, + 88 + ] }, "arguments": [ { @@ -178,30 +178,30 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 93 - } + "range": [ + 85, + 93 + ] }, "loc": null, - "range": { - "start": 81, - "end": 93 - } + "range": [ + 81, + 93 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 94 - } + "range": [ + 75, + 94 + ] }, { "type": "ReturnStatement", @@ -213,10 +213,10 @@ Output: "type": "JSXIdentifier", "name": "Child", "loc": null, - "range": { - "start": 105, - "end": 110 - } + "range": [ + 105, + 110 + ] }, "attributes": [ { @@ -225,10 +225,10 @@ Output: "type": "JSXIdentifier", "name": "y", "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "value": { "type": "JSXExpressionContainer", @@ -237,70 +237,70 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "loc": null, - "range": { - "start": 113, - "end": 116 - } + "range": [ + 113, + 116 + ] }, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 104, - "end": 119 - } + "range": [ + 104, + 119 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 104, - "end": 119 - } + "range": [ + 104, + 119 + ] }, "loc": null, - "range": { - "start": 97, - "end": 120 - } + "range": [ + 97, + 120 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 122 - } + "range": [ + 21, + 122 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 122 - }, + "range": [ + 0, + 122 + ], "loc": null, - "range": { - "start": 0, - "end": 122 - } + "range": [ + 0, + 122 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 122 - } + "range": [ + 0, + 122 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@delete-computed-property.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@delete-computed-property.js.snap index 8a379fff99..7f116bf113 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@delete-computed-property.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@delete-computed-property.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", @@ -69,10 +69,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "value": { "type": "MemberExpression", @@ -81,37 +81,37 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 52 - } + "range": [ + 45, + 52 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 42, - "end": 52 - } + "range": [ + 42, + 52 + ] }, { "type": "Property", @@ -120,10 +120,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "value": { "type": "MemberExpression", @@ -132,57 +132,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 64 - } + "range": [ + 57, + 64 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 64 - } + "range": [ + 54, + 64 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 66 - } + "range": [ + 40, + 66 + ] }, "loc": null, - "range": { - "start": 36, - "end": 66 - } + "range": [ + 36, + 66 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 67 - } + "range": [ + 30, + 67 + ] }, { "type": "VariableDeclaration", @@ -195,32 +195,32 @@ Output: "name": "key", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "init": { "type": "StringLiteral", "value": "b", "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "loc": null, - "range": { - "start": 76, - "end": 85 - } + "range": [ + 76, + 85 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 86 - } + "range": [ + 70, + 86 + ] }, { "type": "ExpressionStatement", @@ -235,40 +235,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] }, "property": { "type": "Identifier", "name": "key", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "computed": true, "loc": null, - "range": { - "start": 96, - "end": 102 - } + "range": [ + 96, + 102 + ] }, "loc": null, - "range": { - "start": 89, - "end": 102 - } + "range": [ + 89, + 102 + ] }, "directive": null, "loc": null, - "range": { - "start": 89, - "end": 103 - } + "range": [ + 89, + 103 + ] }, { "type": "ReturnStatement", @@ -277,42 +277,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 117 - } + "range": [ + 26, + 117 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 117 - }, + "range": [ + 0, + 117 + ], "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@delete-property.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@delete-property.js.snap index 7a9f25b570..3f3f0f0d29 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@delete-property.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@delete-property.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", @@ -68,10 +68,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "value": { "type": "MemberExpression", @@ -80,37 +80,37 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 52 - } + "range": [ + 45, + 52 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 42, - "end": 52 - } + "range": [ + 42, + 52 + ] }, { "type": "Property", @@ -119,10 +119,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "value": { "type": "MemberExpression", @@ -131,57 +131,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 64 - } + "range": [ + 57, + 64 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 64 - } + "range": [ + 54, + 64 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 66 - } + "range": [ + 40, + 66 + ] }, "loc": null, - "range": { - "start": 36, - "end": 66 - } + "range": [ + 36, + 66 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 67 - } + "range": [ + 30, + 67 + ] }, { "type": "ExpressionStatement", @@ -196,40 +196,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "computed": false, "loc": null, - "range": { - "start": 77, - "end": 80 - } + "range": [ + 77, + 80 + ] }, "loc": null, - "range": { - "start": 70, - "end": 80 - } + "range": [ + 70, + 80 + ] }, "directive": null, "loc": null, - "range": { - "start": 70, - "end": 81 - } + "range": [ + 70, + 81 + ] }, { "type": "ReturnStatement", @@ -238,42 +238,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "loc": null, - "range": { - "start": 84, - "end": 93 - } + "range": [ + 84, + 93 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 95 - } + "range": [ + 26, + 95 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 95 - }, + "range": [ + 0, + 95 + ], "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dependencies-outputs.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dependencies-outputs.js.snap index aaf926cc38..05034ae661 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dependencies-outputs.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dependencies-outputs.js.snap @@ -31,10 +31,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -42,20 +42,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -72,32 +72,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 33, - "end": 35 - } + "range": [ + 33, + 35 + ] }, "loc": null, - "range": { - "start": 29, - "end": 35 - } + "range": [ + 29, + 35 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 36 - } + "range": [ + 23, + 36 + ] }, { "type": "ExpressionStatement", @@ -110,27 +110,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 45 - } + "range": [ + 41, + 45 + ] }, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] }, "arguments": [ { @@ -138,24 +138,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 48 - } + "range": [ + 39, + 48 + ] }, "directive": null, "loc": null, - "range": { - "start": 39, - "end": 49 - } + "range": [ + 39, + 49 + ] }, { "type": "ExpressionStatement", @@ -167,18 +167,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] }, "children": [ { @@ -188,16 +188,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] } ], "closingElement": { @@ -206,29 +206,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "loc": null, - "range": { - "start": 60, - "end": 66 - } + "range": [ + 60, + 66 + ] }, "loc": null, - "range": { - "start": 52, - "end": 66 - } + "range": [ + 52, + 66 + ] }, "directive": null, "loc": null, - "range": { - "start": 52, - "end": 67 - } + "range": [ + 52, + 67 + ] }, { "type": "VariableDeclaration", @@ -241,32 +241,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 81, - "end": 83 - } + "range": [ + 81, + 83 + ] }, "loc": null, - "range": { - "start": 77, - "end": 83 - } + "range": [ + 77, + 83 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 84 - } + "range": [ + 71, + 84 + ] }, { "type": "IfStatement", @@ -277,27 +277,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "computed": false, "loc": null, - "range": { - "start": 91, - "end": 99 - } + "range": [ + 91, + 99 + ] }, "consequent": { "type": "BlockStatement", @@ -313,27 +313,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 113 - } + "range": [ + 109, + 113 + ] }, "computed": false, "loc": null, - "range": { - "start": 107, - "end": 113 - } + "range": [ + 107, + 113 + ] }, "arguments": [ { @@ -341,38 +341,38 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] } ], "loc": null, - "range": { - "start": 107, - "end": 116 - } + "range": [ + 107, + 116 + ] }, "directive": null, "loc": null, - "range": { - "start": 107, - "end": 117 - } + "range": [ + 107, + 117 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 121 - } + "range": [ + 101, + 121 + ] }, "alternate": null, "loc": null, - "range": { - "start": 87, - "end": 121 - } + "range": [ + 87, + 121 + ] }, { "type": "IfStatement", @@ -381,10 +381,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "consequent": { "type": "BlockStatement", @@ -400,27 +400,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 143 - } + "range": [ + 139, + 143 + ] }, "computed": false, "loc": null, - "range": { - "start": 137, - "end": 143 - } + "range": [ + 137, + 143 + ] }, "arguments": [ { @@ -428,38 +428,38 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 145 - } + "range": [ + 144, + 145 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 146 - } + "range": [ + 137, + 146 + ] }, "directive": null, "loc": null, - "range": { - "start": 137, - "end": 147 - } + "range": [ + 137, + 147 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 151 - } + "range": [ + 131, + 151 + ] }, "alternate": null, "loc": null, - "range": { - "start": 124, - "end": 151 - } + "range": [ + 124, + 151 + ] }, { "type": "ReturnStatement", @@ -468,42 +468,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "loc": null, - "range": { - "start": 154, - "end": 163 - } + "range": [ + 154, + 163 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 165 - } + "range": [ + 19, + 165 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 165 - }, + "range": [ + 0, + 165 + ], "loc": null, - "range": { - "start": 0, - "end": 165 - } + "range": [ + 0, + 165 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 165 - } + "range": [ + 0, + 165 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dependencies.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dependencies.js.snap index 59fdccc63e..ad86fa703b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dependencies.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dependencies.js.snap @@ -32,10 +32,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -43,30 +43,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -83,10 +83,10 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 37 - } + "range": [ + 32, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -96,30 +96,30 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 43 - } + "range": [ + 40, + 43 + ] }, "loc": null, - "range": { - "start": 32, - "end": 43 - } + "range": [ + 32, + 43 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 44 - } + "range": [ + 26, + 44 + ] }, { "type": "ExpressionStatement", @@ -132,27 +132,27 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 52 - } + "range": [ + 47, + 52 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 57 - } + "range": [ + 53, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 47, - "end": 57 - } + "range": [ + 47, + 57 + ] }, "arguments": [ { @@ -160,24 +160,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 60 - } + "range": [ + 47, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 47, - "end": 61 - } + "range": [ + 47, + 61 + ] }, { "type": "VariableDeclaration", @@ -190,32 +190,32 @@ Output: "name": "items2", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 77 - } + "range": [ + 71, + 77 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 80, - "end": 82 - } + "range": [ + 80, + 82 + ] }, "loc": null, - "range": { - "start": 71, - "end": 82 - } + "range": [ + 71, + 82 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 83 - } + "range": [ + 65, + 83 + ] }, { "type": "IfStatement", @@ -224,10 +224,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "consequent": { "type": "BlockStatement", @@ -243,27 +243,27 @@ Output: "name": "items2", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 105 - } + "range": [ + 99, + 105 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 110 - } + "range": [ + 106, + 110 + ] }, "computed": false, "loc": null, - "range": { - "start": 99, - "end": 110 - } + "range": [ + 99, + 110 + ] }, "arguments": [ { @@ -271,38 +271,38 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 113 - } + "range": [ + 99, + 113 + ] }, "directive": null, "loc": null, - "range": { - "start": 99, - "end": 114 - } + "range": [ + 99, + 114 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 118 - } + "range": [ + 93, + 118 + ] }, "alternate": null, "loc": null, - "range": { - "start": 86, - "end": 118 - } + "range": [ + 86, + 118 + ] }, { "type": "IfStatement", @@ -311,10 +311,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "consequent": { "type": "BlockStatement", @@ -330,27 +330,27 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 140 - } + "range": [ + 135, + 140 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 145 - } + "range": [ + 141, + 145 + ] }, "computed": false, "loc": null, - "range": { - "start": 135, - "end": 145 - } + "range": [ + 135, + 145 + ] }, "arguments": [ { @@ -358,38 +358,38 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 147 - } + "range": [ + 146, + 147 + ] } ], "loc": null, - "range": { - "start": 135, - "end": 148 - } + "range": [ + 135, + 148 + ] }, "directive": null, "loc": null, - "range": { - "start": 135, - "end": 149 - } + "range": [ + 135, + 149 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 153 - } + "range": [ + 129, + 153 + ] }, "alternate": null, "loc": null, - "range": { - "start": 122, - "end": 153 - } + "range": [ + 122, + 153 + ] }, { "type": "ReturnStatement", @@ -398,42 +398,42 @@ Output: "name": "items2", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 170 - } + "range": [ + 164, + 170 + ] }, "loc": null, - "range": { - "start": 157, - "end": 171 - } + "range": [ + 157, + 171 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 173 - } + "range": [ + 22, + 173 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 173 - }, + "range": [ + 0, + 173 + ], "loc": null, - "range": { - "start": 0, - "end": 173 - } + "range": [ + 0, + 173 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 173 - } + "range": [ + 0, + 173 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructure-capture-global.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructure-capture-global.js.snap index c628a272ee..9a468351f7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructure-capture-global.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructure-capture-global.js.snap @@ -26,32 +26,32 @@ Output: "name": "someGlobal", "typeAnnotation": null, "loc": null, - "range": { - "start": 4, - "end": 14 - } + "range": [ + 4, + 14 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 17, - "end": 19 - } + "range": [ + 17, + 19 + ] }, "loc": null, - "range": { - "start": 4, - "end": 19 - } + "range": [ + 4, + 19 + ] } ], "loc": null, - "range": { - "start": 0, - "end": 20 - } + "range": [ + 0, + 20 + ] }, { "type": "FunctionDeclaration", @@ -60,10 +60,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] }, "params": [ { @@ -71,10 +71,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] } ], "body": { @@ -91,10 +91,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "init": { "type": "ObjectExpression", @@ -106,30 +106,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, { "type": "Property", @@ -138,50 +138,50 @@ Output: "name": "someGlobal", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 70 - } + "range": [ + 60, + 70 + ] }, "value": { "type": "Identifier", "name": "someGlobal", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 70 - } + "range": [ + 60, + 70 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 60, - "end": 70 - } + "range": [ + 60, + 70 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 72 - } + "range": [ + 55, + 72 + ] }, "loc": null, - "range": { - "start": 51, - "end": 72 - } + "range": [ + 51, + 72 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 73 - } + "range": [ + 47, + 73 + ] }, { "type": "ReturnStatement", @@ -190,42 +190,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] }, "loc": null, - "range": { - "start": 76, - "end": 85 - } + "range": [ + 76, + 85 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 87 - } + "range": [ + 43, + 87 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 21, - "end": 87 - }, + "range": [ + 21, + 87 + ], "loc": null, - "range": { - "start": 21, - "end": 87 - } + "range": [ + 21, + 87 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructure-direct-reassignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructure-direct-reassignment.js.snap index a6c12c3a72..a7fb377ef6 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructure-direct-reassignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructure-direct-reassignment.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -55,17 +55,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, { "type": "VariableDeclarator", @@ -74,24 +74,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 33 - } + "range": [ + 24, + 33 + ] }, { "type": "ExpressionStatement", @@ -108,30 +108,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, { "type": "Property", @@ -140,37 +140,37 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 45 - } + "range": [ + 37, + 45 + ] }, "right": { "type": "ObjectExpression", @@ -182,10 +182,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "value": { "type": "MemberExpression", @@ -194,37 +194,37 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 58 - } + "range": [ + 53, + 58 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 60 - } + "range": [ + 53, + 60 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 50, - "end": 60 - } + "range": [ + 50, + 60 + ] }, { "type": "Property", @@ -233,10 +233,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "value": { "type": "MemberExpression", @@ -245,57 +245,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 72 - } + "range": [ + 62, + 72 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 74 - } + "range": [ + 48, + 74 + ] }, "loc": null, - "range": { - "start": 37, - "end": 74 - } + "range": [ + 37, + 74 + ] }, "directive": null, "loc": null, - "range": { - "start": 36, - "end": 76 - } + "range": [ + 36, + 76 + ] }, { "type": "ExpressionStatement", @@ -308,27 +308,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 86 - } + "range": [ + 79, + 86 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 90 - } + "range": [ + 87, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 90 - } + "range": [ + 79, + 90 + ] }, "arguments": [ { @@ -336,24 +336,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 93 - } + "range": [ + 79, + 93 + ] }, "directive": null, "loc": null, - "range": { - "start": 79, - "end": 94 - } + "range": [ + 79, + 94 + ] }, { "type": "ExpressionStatement", @@ -365,10 +365,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 145 - } + "range": [ + 144, + 145 + ] }, "right": { "type": "MemberExpression", @@ -377,40 +377,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 153 - } + "range": [ + 148, + 153 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "computed": false, "loc": null, - "range": { - "start": 148, - "end": 155 - } + "range": [ + 148, + 155 + ] }, "loc": null, - "range": { - "start": 144, - "end": 155 - } + "range": [ + 144, + 155 + ] }, "directive": null, "loc": null, - "range": { - "start": 144, - "end": 156 - } + "range": [ + 144, + 156 + ] }, { "type": "ReturnStatement", @@ -421,10 +421,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 167 - } + "range": [ + 166, + 167 + ] }, "operator": "+", "right": { @@ -432,48 +432,48 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 171 - } + "range": [ + 170, + 171 + ] }, "loc": null, - "range": { - "start": 166, - "end": 171 - } + "range": [ + 166, + 171 + ] }, "loc": null, - "range": { - "start": 159, - "end": 172 - } + "range": [ + 159, + 172 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 174 - } + "range": [ + 20, + 174 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 174 - }, + "range": [ + 0, + 174 + ], "loc": null, - "range": { - "start": 0, - "end": 174 - } + "range": [ + 0, + 174 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 174 - } + "range": [ + 0, + 174 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-array-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-array-default.js.snap index 2d14edcdab..c2dccbdfbe 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-array-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-array-default.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,17 +60,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 40 - } + "range": [ + 37, + 40 + ] }, "right": { "type": "ArrayExpression", @@ -79,30 +79,30 @@ Output: "type": "StringLiteral", "value": "default", "loc": null, - "range": { - "start": 44, - "end": 53 - } + "range": [ + 44, + 53 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, "loc": null, - "range": { - "start": 37, - "end": 54 - } + "range": [ + 37, + 54 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 55 - } + "range": [ + 36, + 55 + ] }, "init": { "type": "MemberExpression", @@ -111,40 +111,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 63 - } + "range": [ + 58, + 63 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 65 - } + "range": [ + 58, + 65 + ] }, "loc": null, - "range": { - "start": 36, - "end": 65 - } + "range": [ + 36, + 65 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 66 - } + "range": [ + 30, + 66 + ] }, { "type": "ReturnStatement", @@ -153,42 +153,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "loc": null, - "range": { - "start": 69, - "end": 78 - } + "range": [ + 69, + 78 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 80 - } + "range": [ + 26, + 80 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 80 - }, + "range": [ + 0, + 80 + ], "loc": null, - "range": { - "start": 0, - "end": 80 - } + "range": [ + 0, + 80 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 80 - } + "range": [ + 0, + 80 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-array-param-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-array-param-default.js.snap index 0c4e820e0d..09f206aa78 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-array-param-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-array-param-default.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,32 +36,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 20, - "end": 21 - } + "range": [ + 20, + 21 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] }, "loc": null, - "range": { - "start": 20, - "end": 25 - } + "range": [ + 20, + 25 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 26 - } + "range": [ + 19, + 26 + ] } ], "body": { @@ -74,42 +74,42 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "loc": null, - "range": { - "start": 32, - "end": 41 - } + "range": [ + 32, + 41 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 43 - } + "range": [ + 28, + 43 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 43 - }, + "range": [ + 0, + 43 + ], "loc": null, - "range": { - "start": 0, - "end": 43 - } + "range": [ + 0, + 43 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 43 - } + "range": [ + 0, + 43 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-assignment-array-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-assignment-array-default.js.snap index 91c97d6fe2..0fadd091d6 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-assignment-array-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-assignment-array-default.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,24 +57,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 36 - } + "range": [ + 30, + 36 + ] }, { "type": "IfStatement", @@ -85,27 +85,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] }, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 53 - } + "range": [ + 43, + 53 + ] }, "consequent": { "type": "BlockStatement", @@ -128,17 +128,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "right": { "type": "ArrayExpression", @@ -147,30 +147,30 @@ Output: "type": "StringLiteral", "value": "default", "loc": null, - "range": { - "start": 69, - "end": 78 - } + "range": [ + 69, + 78 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 79 - } + "range": [ + 68, + 79 + ] }, "loc": null, - "range": { - "start": 62, - "end": 79 - } + "range": [ + 62, + 79 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 80 - } + "range": [ + 61, + 80 + ] }, "right": { "type": "MemberExpression", @@ -179,47 +179,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 88 - } + "range": [ + 83, + 88 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 83, - "end": 90 - } + "range": [ + 83, + 90 + ] }, "loc": null, - "range": { - "start": 61, - "end": 90 - } + "range": [ + 61, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 61, - "end": 91 - } + "range": [ + 61, + 91 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 95 - } + "range": [ + 55, + 95 + ] }, "alternate": { "type": "BlockStatement", @@ -234,10 +234,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "right": { "type": "MemberExpression", @@ -246,53 +246,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] }, "property": { "type": "Identifier", "name": "fallback", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 125 - } + "range": [ + 117, + 125 + ] }, "computed": false, "loc": null, - "range": { - "start": 111, - "end": 125 - } + "range": [ + 111, + 125 + ] }, "loc": null, - "range": { - "start": 107, - "end": 125 - } + "range": [ + 107, + 125 + ] }, "directive": null, "loc": null, - "range": { - "start": 107, - "end": 126 - } + "range": [ + 107, + 126 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 130 - } + "range": [ + 101, + 130 + ] }, "loc": null, - "range": { - "start": 39, - "end": 130 - } + "range": [ + 39, + 130 + ] }, { "type": "ReturnStatement", @@ -301,42 +301,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] }, "loc": null, - "range": { - "start": 133, - "end": 142 - } + "range": [ + 133, + 142 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 144 - } + "range": [ + 26, + 144 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 144 - }, + "range": [ + 0, + 144 + ], "loc": null, - "range": { - "start": 0, - "end": 144 - } + "range": [ + 0, + 144 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 144 - } + "range": [ + 0, + 144 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-assignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-assignment.js.snap index bc2c0d86a4..5411c86df9 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-assignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-assignment.js.snap @@ -35,10 +35,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -46,30 +46,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -86,17 +86,17 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, { "type": "VariableDeclarator", @@ -105,17 +105,17 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, { "type": "VariableDeclarator", @@ -124,17 +124,17 @@ Output: "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, { "type": "VariableDeclarator", @@ -143,24 +143,24 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "init": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 41 - } + "range": [ + 26, + 41 + ] }, { "type": "ExpressionStatement", @@ -175,10 +175,10 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, { "type": "ArrayPattern", @@ -193,10 +193,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "value": { "type": "ObjectPattern", @@ -208,91 +208,91 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "value": { "type": "Identifier", "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 86 - } + "range": [ + 78, + 86 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 75, - "end": 86 - } + "range": [ + 75, + 86 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 95 - } + "range": [ + 65, + 95 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 102 - } + "range": [ + 57, + 102 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 107 - } + "range": [ + 44, + 107 + ] }, "right": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "loc": null, - "range": { - "start": 44, - "end": 111 - } + "range": [ + 44, + 111 + ] }, "directive": null, "loc": null, - "range": { - "start": 44, - "end": 112 - } + "range": [ + 44, + 112 + ] }, { "type": "ExpressionStatement", @@ -309,10 +309,10 @@ Output: "name": "l", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "value": { "type": "ObjectPattern", @@ -324,10 +324,10 @@ Output: "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "value": { "type": "ArrayPattern", @@ -340,51 +340,51 @@ Output: "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 138, - "end": 139 - } + "range": [ + 138, + 139 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 140 - } + "range": [ + 137, + 140 + ] } ], "loc": null, - "range": { - "start": 136, - "end": 141 - } + "range": [ + 136, + 141 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 133, - "end": 141 - } + "range": [ + 133, + 141 + ] } ], "loc": null, - "range": { - "start": 125, - "end": 148 - } + "range": [ + 125, + 148 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 122, - "end": 148 - } + "range": [ + 122, + 148 + ] }, { "type": "Property", @@ -393,60 +393,60 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "value": { "type": "Identifier", "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] } ], "loc": null, - "range": { - "start": 116, - "end": 160 - } + "range": [ + 116, + 160 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 164 - } + "range": [ + 163, + 164 + ] }, "loc": null, - "range": { - "start": 116, - "end": 164 - } + "range": [ + 116, + 164 + ] }, "directive": null, "loc": null, - "range": { - "start": 115, - "end": 166 - } + "range": [ + 115, + 166 + ] }, { "type": "ReturnStatement", @@ -460,30 +460,30 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 178, - "end": 179 - } + "range": [ + 178, + 179 + ] }, "value": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 178, - "end": 179 - } + "range": [ + 178, + 179 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 178, - "end": 179 - } + "range": [ + 178, + 179 + ] }, { "type": "Property", @@ -492,30 +492,30 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "value": { "type": "Identifier", "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, { "type": "Property", @@ -524,30 +524,30 @@ Output: "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, "value": { "type": "Identifier", "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, { "type": "Property", @@ -556,69 +556,69 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 188 - } + "range": [ + 187, + 188 + ] }, "value": { "type": "Identifier", "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 188 - } + "range": [ + 187, + 188 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 187, - "end": 188 - } + "range": [ + 187, + 188 + ] } ], "loc": null, - "range": { - "start": 176, - "end": 190 - } + "range": [ + 176, + 190 + ] }, "loc": null, - "range": { - "start": 169, - "end": 191 - } + "range": [ + 169, + 191 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 193 - } + "range": [ + 22, + 193 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 193 - }, + "range": [ + 0, + 193 + ], "loc": null, - "range": { - "start": 0, - "end": 193 - } + "range": [ + 0, + 193 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 193 - } + "range": [ + 0, + 193 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-and-local-variables-with-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-and-local-variables-with-default.js.snap index e25d55d317..1795184c81 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-and-local-variables-with-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-and-local-variables-with-default.js.snap @@ -37,10 +37,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -48,10 +48,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -68,10 +68,10 @@ Output: "name": "post", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "CallExpression", @@ -80,10 +80,10 @@ Output: "name": "useFragment", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, "arguments": [ { @@ -93,10 +93,10 @@ Output: "name": "graphql", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 62 - } + "range": [ + 55, + 62 + ] }, "quasi": { "type": "TemplateLiteral", @@ -109,24 +109,24 @@ Output: "raw": "..." }, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, { "type": "MemberExpression", @@ -135,47 +135,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "property": { "type": "Identifier", "name": "post", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 79 - } + "range": [ + 69, + 79 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 80 - } + "range": [ + 43, + 80 + ] }, "loc": null, - "range": { - "start": 36, - "end": 80 - } + "range": [ + 36, + 80 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 81 - } + "range": [ + 30, + 81 + ] }, { "type": "VariableDeclaration", @@ -188,32 +188,32 @@ Output: "name": "allUrls", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 97 - } + "range": [ + 90, + 97 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 100, - "end": 102 - } + "range": [ + 100, + 102 + ] }, "loc": null, - "range": { - "start": 90, - "end": 102 - } + "range": [ + 90, + 102 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 103 - } + "range": [ + 84, + 103 + ] }, { "type": "VariableDeclaration", @@ -231,10 +231,10 @@ Output: "name": "media", "typeAnnotation": null, "loc": null, - "range": { - "start": 590, - "end": 595 - } + "range": [ + 590, + 595 + ] }, "value": { "type": "AssignmentPattern", @@ -243,34 +243,34 @@ Output: "name": "media", "typeAnnotation": null, "loc": null, - "range": { - "start": 590, - "end": 595 - } + "range": [ + 590, + 595 + ] }, "right": { "type": "NullLiteral", "loc": null, - "range": { - "start": 598, - "end": 602 - } + "range": [ + 598, + 602 + ] }, "loc": null, - "range": { - "start": 590, - "end": 602 - } + "range": [ + 590, + 602 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 590, - "end": 602 - } + "range": [ + 590, + 602 + ] }, { "type": "Property", @@ -279,10 +279,10 @@ Output: "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 604, - "end": 612 - } + "range": [ + 604, + 612 + ] }, "value": { "type": "AssignmentPattern", @@ -291,35 +291,35 @@ Output: "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 604, - "end": 612 - } + "range": [ + 604, + 612 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 615, - "end": 617 - } + "range": [ + 615, + 617 + ] }, "loc": null, - "range": { - "start": 604, - "end": 617 - } + "range": [ + 604, + 617 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 604, - "end": 617 - } + "range": [ + 604, + 617 + ] }, { "type": "Property", @@ -328,10 +328,10 @@ Output: "name": "urls", "typeAnnotation": null, "loc": null, - "range": { - "start": 619, - "end": 623 - } + "range": [ + 619, + 623 + ] }, "value": { "type": "AssignmentPattern", @@ -340,65 +340,65 @@ Output: "name": "urls", "typeAnnotation": null, "loc": null, - "range": { - "start": 619, - "end": 623 - } + "range": [ + 619, + 623 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 626, - "end": 628 - } + "range": [ + 626, + 628 + ] }, "loc": null, - "range": { - "start": 619, - "end": 628 - } + "range": [ + 619, + 628 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 619, - "end": 628 - } + "range": [ + 619, + 628 + ] } ], "loc": null, - "range": { - "start": 588, - "end": 630 - } + "range": [ + 588, + 630 + ] }, "init": { "type": "Identifier", "name": "post", "typeAnnotation": null, "loc": null, - "range": { - "start": 633, - "end": 637 - } + "range": [ + 633, + 637 + ] }, "loc": null, - "range": { - "start": 588, - "end": 637 - } + "range": [ + 588, + 637 + ] } ], "loc": null, - "range": { - "start": 582, - "end": 638 - } + "range": [ + 582, + 638 + ] }, { "type": "VariableDeclaration", @@ -411,10 +411,10 @@ Output: "name": "onClick", "typeAnnotation": null, "loc": null, - "range": { - "start": 647, - "end": 654 - } + "range": [ + 647, + 654 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -425,10 +425,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 658, - "end": 659 - } + "range": [ + 658, + 659 + ] } ], "body": { @@ -447,33 +447,33 @@ Output: "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 675, - "end": 683 - } + "range": [ + 675, + 683 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 684, - "end": 690 - } + "range": [ + 684, + 690 + ] }, "computed": false, "loc": null, - "range": { - "start": 675, - "end": 690 - } + "range": [ + 675, + 690 + ] }, "loc": null, - "range": { - "start": 674, - "end": 690 - } + "range": [ + 674, + 690 + ] }, "consequent": { "type": "BlockStatement", @@ -482,24 +482,24 @@ Output: "type": "ReturnStatement", "argument": null, "loc": null, - "range": { - "start": 700, - "end": 707 - } + "range": [ + 700, + 707 + ] } ], "loc": null, - "range": { - "start": 692, - "end": 713 - } + "range": [ + 692, + 713 + ] }, "alternate": null, "loc": null, - "range": { - "start": 670, - "end": 713 - } + "range": [ + 670, + 713 + ] }, { "type": "ExpressionStatement", @@ -512,27 +512,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 718, - "end": 725 - } + "range": [ + 718, + 725 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 726, - "end": 729 - } + "range": [ + 726, + 729 + ] }, "computed": false, "loc": null, - "range": { - "start": 718, - "end": 729 - } + "range": [ + 718, + 729 + ] }, "arguments": [ { @@ -542,75 +542,75 @@ Output: "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 730, - "end": 738 - } + "range": [ + 730, + 738 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 739, - "end": 745 - } + "range": [ + 739, + 745 + ] }, "computed": false, "loc": null, - "range": { - "start": 730, - "end": 745 - } + "range": [ + 730, + 745 + ] } ], "loc": null, - "range": { - "start": 718, - "end": 746 - } + "range": [ + 718, + 746 + ] }, "directive": null, "loc": null, - "range": { - "start": 718, - "end": 747 - } + "range": [ + 718, + 747 + ] } ], "loc": null, - "range": { - "start": 664, - "end": 751 - } + "range": [ + 664, + 751 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 657, - "end": 751 - }, + "range": [ + 657, + 751 + ], "expression": false, "loc": null, - "range": { - "start": 657, - "end": 751 - } + "range": [ + 657, + 751 + ] }, "loc": null, - "range": { - "start": 647, - "end": 751 - } + "range": [ + 647, + 751 + ] } ], "loc": null, - "range": { - "start": 641, - "end": 752 - } + "range": [ + 641, + 752 + ] }, { "type": "ExpressionStatement", @@ -623,27 +623,27 @@ Output: "name": "allUrls", "typeAnnotation": null, "loc": null, - "range": { - "start": 755, - "end": 762 - } + "range": [ + 755, + 762 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 763, - "end": 767 - } + "range": [ + 763, + 767 + ] }, "computed": false, "loc": null, - "range": { - "start": 755, - "end": 767 - } + "range": [ + 755, + 767 + ] }, "arguments": [ { @@ -653,30 +653,30 @@ Output: "name": "urls", "typeAnnotation": null, "loc": null, - "range": { - "start": 771, - "end": 775 - } + "range": [ + 771, + 775 + ] }, "loc": null, - "range": { - "start": 768, - "end": 775 - } + "range": [ + 768, + 775 + ] } ], "loc": null, - "range": { - "start": 755, - "end": 776 - } + "range": [ + 755, + 776 + ] }, "directive": null, "loc": null, - "range": { - "start": 755, - "end": 777 - } + "range": [ + 755, + 777 + ] }, { "type": "ReturnStatement", @@ -688,10 +688,10 @@ Output: "type": "JSXIdentifier", "name": "Media", "loc": null, - "range": { - "start": 788, - "end": 793 - } + "range": [ + 788, + 793 + ] }, "attributes": [ { @@ -700,10 +700,10 @@ Output: "type": "JSXIdentifier", "name": "media", "loc": null, - "range": { - "start": 794, - "end": 799 - } + "range": [ + 794, + 799 + ] }, "value": { "type": "JSXExpressionContainer", @@ -712,22 +712,22 @@ Output: "name": "media", "typeAnnotation": null, "loc": null, - "range": { - "start": 801, - "end": 806 - } + "range": [ + 801, + 806 + ] }, "loc": null, - "range": { - "start": 800, - "end": 807 - } + "range": [ + 800, + 807 + ] }, "loc": null, - "range": { - "start": 794, - "end": 807 - } + "range": [ + 794, + 807 + ] }, { "type": "JSXAttribute", @@ -735,10 +735,10 @@ Output: "type": "JSXIdentifier", "name": "onClick", "loc": null, - "range": { - "start": 808, - "end": 815 - } + "range": [ + 808, + 815 + ] }, "value": { "type": "JSXExpressionContainer", @@ -747,70 +747,70 @@ Output: "name": "onClick", "typeAnnotation": null, "loc": null, - "range": { - "start": 817, - "end": 824 - } + "range": [ + 817, + 824 + ] }, "loc": null, - "range": { - "start": 816, - "end": 825 - } + "range": [ + 816, + 825 + ] }, "loc": null, - "range": { - "start": 808, - "end": 825 - } + "range": [ + 808, + 825 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 787, - "end": 828 - } + "range": [ + 787, + 828 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 787, - "end": 828 - } + "range": [ + 787, + 828 + ] }, "loc": null, - "range": { - "start": 780, - "end": 829 - } + "range": [ + 780, + 829 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 831 - } + "range": [ + 26, + 831 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 831 - }, + "range": [ + 0, + 831 + ], "loc": null, - "range": { - "start": 0, - "end": 831 - } + "range": [ + 0, + 831 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 831 - } + "range": [ + 0, + 831 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-declarations-and-locals.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-declarations-and-locals.js.snap index e89795a993..df3160712d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-declarations-and-locals.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-mixed-scope-declarations-and-locals.js.snap @@ -37,10 +37,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -48,10 +48,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -68,10 +68,10 @@ Output: "name": "post", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "CallExpression", @@ -80,10 +80,10 @@ Output: "name": "useFragment", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, "arguments": [ { @@ -93,10 +93,10 @@ Output: "name": "graphql", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 62 - } + "range": [ + 55, + 62 + ] }, "quasi": { "type": "TemplateLiteral", @@ -109,24 +109,24 @@ Output: "raw": "..." }, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, { "type": "MemberExpression", @@ -135,47 +135,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "property": { "type": "Identifier", "name": "post", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 79 - } + "range": [ + 69, + 79 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 80 - } + "range": [ + 43, + 80 + ] }, "loc": null, - "range": { - "start": 36, - "end": 80 - } + "range": [ + 36, + 80 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 81 - } + "range": [ + 30, + 81 + ] }, { "type": "VariableDeclaration", @@ -188,32 +188,32 @@ Output: "name": "allUrls", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 97 - } + "range": [ + 90, + 97 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 100, - "end": 102 - } + "range": [ + 100, + 102 + ] }, "loc": null, - "range": { - "start": 90, - "end": 102 - } + "range": [ + 90, + 102 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 103 - } + "range": [ + 84, + 103 + ] }, { "type": "VariableDeclaration", @@ -231,30 +231,30 @@ Output: "name": "media", "typeAnnotation": null, "loc": null, - "range": { - "start": 590, - "end": 595 - } + "range": [ + 590, + 595 + ] }, "value": { "type": "Identifier", "name": "media", "typeAnnotation": null, "loc": null, - "range": { - "start": 590, - "end": 595 - } + "range": [ + 590, + 595 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 590, - "end": 595 - } + "range": [ + 590, + 595 + ] }, { "type": "Property", @@ -263,30 +263,30 @@ Output: "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 597, - "end": 605 - } + "range": [ + 597, + 605 + ] }, "value": { "type": "Identifier", "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 597, - "end": 605 - } + "range": [ + 597, + 605 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 597, - "end": 605 - } + "range": [ + 597, + 605 + ] }, { "type": "Property", @@ -295,60 +295,60 @@ Output: "name": "urls", "typeAnnotation": null, "loc": null, - "range": { - "start": 607, - "end": 611 - } + "range": [ + 607, + 611 + ] }, "value": { "type": "Identifier", "name": "urls", "typeAnnotation": null, "loc": null, - "range": { - "start": 607, - "end": 611 - } + "range": [ + 607, + 611 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 607, - "end": 611 - } + "range": [ + 607, + 611 + ] } ], "loc": null, - "range": { - "start": 588, - "end": 613 - } + "range": [ + 588, + 613 + ] }, "init": { "type": "Identifier", "name": "post", "typeAnnotation": null, "loc": null, - "range": { - "start": 616, - "end": 620 - } + "range": [ + 616, + 620 + ] }, "loc": null, - "range": { - "start": 588, - "end": 620 - } + "range": [ + 588, + 620 + ] } ], "loc": null, - "range": { - "start": 582, - "end": 621 - } + "range": [ + 582, + 621 + ] }, { "type": "VariableDeclaration", @@ -361,10 +361,10 @@ Output: "name": "onClick", "typeAnnotation": null, "loc": null, - "range": { - "start": 630, - "end": 637 - } + "range": [ + 630, + 637 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -375,10 +375,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 641, - "end": 642 - } + "range": [ + 641, + 642 + ] } ], "body": { @@ -397,33 +397,33 @@ Output: "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 658, - "end": 666 - } + "range": [ + 658, + 666 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 667, - "end": 673 - } + "range": [ + 667, + 673 + ] }, "computed": false, "loc": null, - "range": { - "start": 658, - "end": 673 - } + "range": [ + 658, + 673 + ] }, "loc": null, - "range": { - "start": 657, - "end": 673 - } + "range": [ + 657, + 673 + ] }, "consequent": { "type": "BlockStatement", @@ -432,24 +432,24 @@ Output: "type": "ReturnStatement", "argument": null, "loc": null, - "range": { - "start": 683, - "end": 690 - } + "range": [ + 683, + 690 + ] } ], "loc": null, - "range": { - "start": 675, - "end": 696 - } + "range": [ + 675, + 696 + ] }, "alternate": null, "loc": null, - "range": { - "start": 653, - "end": 696 - } + "range": [ + 653, + 696 + ] }, { "type": "ExpressionStatement", @@ -462,27 +462,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 701, - "end": 708 - } + "range": [ + 701, + 708 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 709, - "end": 712 - } + "range": [ + 709, + 712 + ] }, "computed": false, "loc": null, - "range": { - "start": 701, - "end": 712 - } + "range": [ + 701, + 712 + ] }, "arguments": [ { @@ -492,75 +492,75 @@ Output: "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 713, - "end": 721 - } + "range": [ + 713, + 721 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 722, - "end": 728 - } + "range": [ + 722, + 728 + ] }, "computed": false, "loc": null, - "range": { - "start": 713, - "end": 728 - } + "range": [ + 713, + 728 + ] } ], "loc": null, - "range": { - "start": 701, - "end": 729 - } + "range": [ + 701, + 729 + ] }, "directive": null, "loc": null, - "range": { - "start": 701, - "end": 730 - } + "range": [ + 701, + 730 + ] } ], "loc": null, - "range": { - "start": 647, - "end": 734 - } + "range": [ + 647, + 734 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 640, - "end": 734 - }, + "range": [ + 640, + 734 + ], "expression": false, "loc": null, - "range": { - "start": 640, - "end": 734 - } + "range": [ + 640, + 734 + ] }, "loc": null, - "range": { - "start": 630, - "end": 734 - } + "range": [ + 630, + 734 + ] } ], "loc": null, - "range": { - "start": 624, - "end": 735 - } + "range": [ + 624, + 735 + ] }, { "type": "ExpressionStatement", @@ -573,27 +573,27 @@ Output: "name": "allUrls", "typeAnnotation": null, "loc": null, - "range": { - "start": 738, - "end": 745 - } + "range": [ + 738, + 745 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 746, - "end": 750 - } + "range": [ + 746, + 750 + ] }, "computed": false, "loc": null, - "range": { - "start": 738, - "end": 750 - } + "range": [ + 738, + 750 + ] }, "arguments": [ { @@ -603,30 +603,30 @@ Output: "name": "urls", "typeAnnotation": null, "loc": null, - "range": { - "start": 754, - "end": 758 - } + "range": [ + 754, + 758 + ] }, "loc": null, - "range": { - "start": 751, - "end": 758 - } + "range": [ + 751, + 758 + ] } ], "loc": null, - "range": { - "start": 738, - "end": 759 - } + "range": [ + 738, + 759 + ] }, "directive": null, "loc": null, - "range": { - "start": 738, - "end": 760 - } + "range": [ + 738, + 760 + ] }, { "type": "ReturnStatement", @@ -638,10 +638,10 @@ Output: "type": "JSXIdentifier", "name": "Media", "loc": null, - "range": { - "start": 771, - "end": 776 - } + "range": [ + 771, + 776 + ] }, "attributes": [ { @@ -650,10 +650,10 @@ Output: "type": "JSXIdentifier", "name": "media", "loc": null, - "range": { - "start": 777, - "end": 782 - } + "range": [ + 777, + 782 + ] }, "value": { "type": "JSXExpressionContainer", @@ -662,22 +662,22 @@ Output: "name": "media", "typeAnnotation": null, "loc": null, - "range": { - "start": 784, - "end": 789 - } + "range": [ + 784, + 789 + ] }, "loc": null, - "range": { - "start": 783, - "end": 790 - } + "range": [ + 783, + 790 + ] }, "loc": null, - "range": { - "start": 777, - "end": 790 - } + "range": [ + 777, + 790 + ] }, { "type": "JSXAttribute", @@ -685,10 +685,10 @@ Output: "type": "JSXIdentifier", "name": "onClick", "loc": null, - "range": { - "start": 791, - "end": 798 - } + "range": [ + 791, + 798 + ] }, "value": { "type": "JSXExpressionContainer", @@ -697,70 +697,70 @@ Output: "name": "onClick", "typeAnnotation": null, "loc": null, - "range": { - "start": 800, - "end": 807 - } + "range": [ + 800, + 807 + ] }, "loc": null, - "range": { - "start": 799, - "end": 808 - } + "range": [ + 799, + 808 + ] }, "loc": null, - "range": { - "start": 791, - "end": 808 - } + "range": [ + 791, + 808 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 770, - "end": 811 - } + "range": [ + 770, + 811 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 770, - "end": 811 - } + "range": [ + 770, + 811 + ] }, "loc": null, - "range": { - "start": 763, - "end": 812 - } + "range": [ + 763, + 812 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 814 - } + "range": [ + 26, + 814 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 814 - }, + "range": [ + 0, + 814 + ], "loc": null, - "range": { - "start": 0, - "end": 814 - } + "range": [ + 0, + 814 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 814 - } + "range": [ + 0, + 814 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-object-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-object-default.js.snap index 1434df8958..3b3ac5dda7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-object-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-object-default.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "value": { "type": "AssignmentPattern", @@ -74,37 +74,37 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "right": { "type": "ObjectExpression", @@ -116,59 +116,59 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "value": { "type": "StringLiteral", "value": "default", "loc": null, - "range": { - "start": 54, - "end": 63 - } + "range": [ + 54, + 63 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 63 - } + "range": [ + 51, + 63 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 65 - } + "range": [ + 49, + 65 + ] }, "loc": null, - "range": { - "start": 41, - "end": 65 - } + "range": [ + 41, + 65 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 38, - "end": 65 - } + "range": [ + 38, + 65 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 67 - } + "range": [ + 36, + 67 + ] }, "init": { "type": "MemberExpression", @@ -177,40 +177,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 75 - } + "range": [ + 70, + 75 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "computed": false, "loc": null, - "range": { - "start": 70, - "end": 77 - } + "range": [ + 70, + 77 + ] }, "loc": null, - "range": { - "start": 36, - "end": 77 - } + "range": [ + 36, + 77 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 78 - } + "range": [ + 30, + 78 + ] }, { "type": "ReturnStatement", @@ -219,42 +219,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "loc": null, - "range": { - "start": 81, - "end": 90 - } + "range": [ + 81, + 90 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 92 - } + "range": [ + 26, + 92 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 92 - }, + "range": [ + 0, + 92 + ], "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-object-param-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-object-param-default.js.snap index ace92c934f..59be62b9d4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-object-param-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-object-param-default.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 22 - } + "range": [ + 21, + 22 + ] }, "value": { "type": "AssignmentPattern", @@ -48,42 +48,42 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 22 - } + "range": [ + 21, + 22 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "loc": null, - "range": { - "start": 21, - "end": 26 - } + "range": [ + 21, + 26 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 21, - "end": 26 - } + "range": [ + 21, + 26 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 28 - } + "range": [ + 19, + 28 + ] } ], "body": { @@ -96,42 +96,42 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "loc": null, - "range": { - "start": 34, - "end": 43 - } + "range": [ + 34, + 43 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 45 - } + "range": [ + 30, + 45 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 45 - }, + "range": [ + 0, + 45 + ], "loc": null, - "range": { - "start": 0, - "end": 45 - } + "range": [ + 0, + 45 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 45 - } + "range": [ + 0, + 45 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-property-inference.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-property-inference.js.snap index 08b752974e..83da63b732 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-property-inference.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring-property-inference.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "ExpressionStatement", @@ -93,27 +93,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 52 - } + "range": [ + 48, + 52 + ] }, "computed": false, "loc": null, - "range": { - "start": 46, - "end": 52 - } + "range": [ + 46, + 52 + ] }, "arguments": [ { @@ -123,41 +123,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 58 - } + "range": [ + 53, + 58 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 64 - } + "range": [ + 53, + 64 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 65 - } + "range": [ + 46, + 65 + ] }, "directive": null, "loc": null, - "range": { - "start": 46, - "end": 66 - } + "range": [ + 46, + 66 + ] }, { "type": "VariableDeclaration", @@ -175,60 +175,60 @@ Output: "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 83 - } + "range": [ + 77, + 83 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 88 - } + "range": [ + 75, + 88 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "loc": null, - "range": { - "start": 75, - "end": 92 - } + "range": [ + 75, + 92 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 93 - } + "range": [ + 69, + 93 + ] }, { "type": "ExpressionStatement", @@ -239,10 +239,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 99 - } + "range": [ + 96, + 99 + ] }, "arguments": [ { @@ -250,24 +250,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 102 - } + "range": [ + 96, + 102 + ] }, "directive": null, "loc": null, - "range": { - "start": 96, - "end": 103 - } + "range": [ + 96, + 103 + ] }, { "type": "ReturnStatement", @@ -279,59 +279,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 119 - } + "range": [ + 113, + 119 + ] }, "loc": null, - "range": { - "start": 106, - "end": 120 - } + "range": [ + 106, + 120 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 122 - } + "range": [ + 26, + 122 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 122 - }, + "range": [ + 0, + 122 + ], "loc": null, - "range": { - "start": 0, - "end": 122 - } + "range": [ + 0, + 122 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 122 - } + "range": [ + 0, + 122 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring.js.snap index 263737681e..b10aee06ea 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@destructuring.js.snap @@ -36,10 +36,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -47,30 +47,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -90,10 +90,10 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, { "type": "ArrayPattern", @@ -108,10 +108,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "value": { "type": "ObjectPattern", @@ -123,47 +123,47 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "value": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 63, - "end": 71 - } + "range": [ + 63, + 71 + ] }, { "type": "RestElement", @@ -172,30 +172,30 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 81, - "end": 85 - } + "range": [ + 81, + 85 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 93 - } + "range": [ + 53, + 93 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 100 - } + "range": [ + 45, + 100 + ] }, { "type": "RestElement", @@ -204,46 +204,46 @@ Output: "name": "h", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "loc": null, - "range": { - "start": 106, - "end": 110 - } + "range": [ + 106, + 110 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 114 - } + "range": [ + 32, + 114 + ] }, "init": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "loc": null, - "range": { - "start": 32, - "end": 118 - } + "range": [ + 32, + 118 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 119 - } + "range": [ + 26, + 119 + ] }, { "type": "VariableDeclaration", @@ -261,10 +261,10 @@ Output: "name": "l", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] }, "value": { "type": "ObjectPattern", @@ -276,10 +276,10 @@ Output: "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "value": { "type": "ArrayPattern", @@ -292,17 +292,17 @@ Output: "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] } ], "loc": null, - "range": { - "start": 149, - "end": 152 - } + "range": [ + 149, + 152 + ] }, { "type": "RestElement", @@ -311,50 +311,50 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "loc": null, - "range": { - "start": 154, - "end": 158 - } + "range": [ + 154, + 158 + ] } ], "loc": null, - "range": { - "start": 148, - "end": 159 - } + "range": [ + 148, + 159 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 145, - "end": 159 - } + "range": [ + 145, + 159 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 166 - } + "range": [ + 137, + 166 + ] }, "kind": "init", "computed": false, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 134, - "end": 166 - } + "range": [ + 134, + 166 + ] }, { "type": "Property", @@ -363,60 +363,60 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 173 - } + "range": [ + 172, + 173 + ] }, "value": { "type": "Identifier", "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 173 - } + "range": [ + 172, + 173 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 172, - "end": 173 - } + "range": [ + 172, + 173 + ] } ], "loc": null, - "range": { - "start": 128, - "end": 178 - } + "range": [ + 128, + 178 + ] }, "init": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "loc": null, - "range": { - "start": 128, - "end": 182 - } + "range": [ + 128, + 182 + ] } ], "loc": null, - "range": { - "start": 122, - "end": 183 - } + "range": [ + 122, + 183 + ] }, { "type": "ReturnStatement", @@ -428,109 +428,109 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 195 - } + "range": [ + 194, + 195 + ] }, { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 198 - } + "range": [ + 197, + 198 + ] }, { "type": "Identifier", "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 201 - } + "range": [ + 200, + 201 + ] }, { "type": "Identifier", "name": "h", "typeAnnotation": null, "loc": null, - "range": { - "start": 203, - "end": 204 - } + "range": [ + 203, + 204 + ] }, { "type": "Identifier", "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 207 - } + "range": [ + 206, + 207 + ] }, { "type": "Identifier", "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 210 - } + "range": [ + 209, + 210 + ] }, { "type": "Identifier", "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 213 - } + "range": [ + 212, + 213 + ] } ], "loc": null, - "range": { - "start": 193, - "end": 214 - } + "range": [ + 193, + 214 + ] }, "loc": null, - "range": { - "start": 186, - "end": 215 - } + "range": [ + 186, + 215 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 217 - } + "range": [ + 22, + 217 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 217 - }, + "range": [ + 0, + 217 + ], "loc": null, - "range": { - "start": 0, - "end": 217 - } + "range": [ + 0, + 217 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 217 - } + "range": [ + 0, + 217 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@disable-jsx-memoization.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@disable-jsx-memoization.js.snap index 70c097b037..3a9b55158f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@disable-jsx-memoization.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@disable-jsx-memoization.js.snap @@ -29,10 +29,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 47 - } + "range": [ + 38, + 47 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 53 - } + "range": [ + 48, + 53 + ] } ], "body": { @@ -63,27 +63,27 @@ Output: "name": "name", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 70 - } + "range": [ + 66, + 70 + ] }, { "type": "Identifier", "name": "setName", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 79 - } + "range": [ + 72, + 79 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 80 - } + "range": [ + 65, + 80 + ] }, "init": { "type": "CallExpression", @@ -92,39 +92,39 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 91 - } + "range": [ + 83, + 91 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 92, - "end": 96 - } + "range": [ + 92, + 96 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 97 - } + "range": [ + 83, + 97 + ] }, "loc": null, - "range": { - "start": 65, - "end": 97 - } + "range": [ + 65, + 97 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 98 - } + "range": [ + 59, + 98 + ] }, { "type": "VariableDeclaration", @@ -137,10 +137,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 115 - } + "range": [ + 107, + 115 + ] }, "init": { "type": "FunctionExpression", @@ -151,10 +151,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] } ], "body": { @@ -169,10 +169,10 @@ Output: "name": "setName", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 144 - } + "range": [ + 137, + 144 + ] }, "arguments": [ { @@ -184,91 +184,91 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 153 - } + "range": [ + 147, + 153 + ] }, "computed": false, "loc": null, - "range": { - "start": 145, - "end": 153 - } + "range": [ + 145, + 153 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 159 - } + "range": [ + 154, + 159 + ] }, "computed": false, "loc": null, - "range": { - "start": 145, - "end": 159 - } + "range": [ + 145, + 159 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 160 - } + "range": [ + 137, + 160 + ] }, "directive": null, "loc": null, - "range": { - "start": 137, - "end": 161 - } + "range": [ + 137, + 161 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 165 - } + "range": [ + 131, + 165 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 118, - "end": 165 - }, + "range": [ + 118, + 165 + ], "loc": null, - "range": { - "start": 118, - "end": 165 - } + "range": [ + 118, + 165 + ] }, "loc": null, - "range": { - "start": 107, - "end": 165 - } + "range": [ + 107, + 165 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 166 - } + "range": [ + 101, + 166 + ] }, { "type": "ReturnStatement", @@ -280,18 +280,18 @@ Output: "type": "JSXIdentifier", "name": "form", "loc": null, - "range": { - "start": 183, - "end": 187 - } + "range": [ + 183, + 187 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 182, - "end": 188 - } + "range": [ + 182, + 188 + ] }, "children": [ { @@ -299,10 +299,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 188, - "end": 195 - } + "range": [ + 188, + 195 + ] }, { "type": "JSXElement", @@ -312,10 +312,10 @@ Output: "type": "JSXIdentifier", "name": "input", "loc": null, - "range": { - "start": 196, - "end": 201 - } + "range": [ + 196, + 201 + ] }, "attributes": [ { @@ -324,10 +324,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 202, - "end": 210 - } + "range": [ + 202, + 210 + ] }, "value": { "type": "JSXExpressionContainer", @@ -336,22 +336,22 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 220 - } + "range": [ + 212, + 220 + ] }, "loc": null, - "range": { - "start": 211, - "end": 221 - } + "range": [ + 211, + 221 + ] }, "loc": null, - "range": { - "start": 202, - "end": 221 - } + "range": [ + 202, + 221 + ] }, { "type": "JSXAttribute", @@ -359,10 +359,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 222, - "end": 227 - } + "range": [ + 222, + 227 + ] }, "value": { "type": "JSXExpressionContainer", @@ -371,48 +371,48 @@ Output: "name": "name", "typeAnnotation": null, "loc": null, - "range": { - "start": 229, - "end": 233 - } + "range": [ + 229, + 233 + ] }, "loc": null, - "range": { - "start": 228, - "end": 234 - } + "range": [ + 228, + 234 + ] }, "loc": null, - "range": { - "start": 222, - "end": 234 - } + "range": [ + 222, + 234 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 195, - "end": 237 - } + "range": [ + 195, + 237 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 195, - "end": 237 - } + "range": [ + 195, + 237 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 237, - "end": 242 - } + "range": [ + 237, + 242 + ] } ], "closingElement": { @@ -421,54 +421,54 @@ Output: "type": "JSXIdentifier", "name": "form", "loc": null, - "range": { - "start": 244, - "end": 248 - } + "range": [ + 244, + 248 + ] }, "loc": null, - "range": { - "start": 242, - "end": 249 - } + "range": [ + 242, + 249 + ] }, "loc": null, - "range": { - "start": 182, - "end": 249 - } + "range": [ + 182, + 249 + ] }, "loc": null, - "range": { - "start": 169, - "end": 254 - } + "range": [ + 169, + 254 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 256 - } + "range": [ + 55, + 256 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 29, - "end": 256 - }, + "range": [ + 29, + 256 + ], "loc": null, - "range": { - "start": 29, - "end": 256 - } + "range": [ + 29, + 256 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 29, - "end": 256 - } + "range": [ + 29, + 256 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-break.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-break.js.snap index fd4c2ee2a3..3f49958f47 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-break.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-break.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,17 +52,17 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 49 - } + "range": [ + 33, + 49 + ] }, "test": { "type": "MemberExpression", @@ -71,33 +71,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 67 - } + "range": [ + 63, + 67 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 67 - } + "range": [ + 57, + 67 + ] }, "loc": null, - "range": { - "start": 30, - "end": 69 - } + "range": [ + 30, + 69 + ] }, { "type": "ReturnStatement", @@ -106,42 +106,42 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "loc": null, - "range": { - "start": 72, - "end": 85 - } + "range": [ + 72, + 85 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 87 - } + "range": [ + 26, + 87 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 87 - }, + "range": [ + 0, + 87 + ], "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-compound-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-compound-test.js.snap index 887d457bf8..6679db979c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-compound-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-compound-test.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", @@ -69,48 +69,48 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 47 - } + "range": [ + 38, + 47 + ] }, "loc": null, - "range": { - "start": 34, - "end": 47 - } + "range": [ + 34, + 47 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 48 - } + "range": [ + 30, + 48 + ] }, { "type": "VariableDeclaration", @@ -123,32 +123,32 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 58 - } + "range": [ + 55, + 58 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 61, - "end": 63 - } + "range": [ + 61, + 63 + ] }, "loc": null, - "range": { - "start": 55, - "end": 63 - } + "range": [ + 55, + 63 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 64 - } + "range": [ + 51, + 64 + ] }, { "type": "DoWhileStatement", @@ -166,10 +166,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] }, "init": { "type": "CallExpression", @@ -180,47 +180,47 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "property": { "type": "Identifier", "name": "pop", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 87, - "end": 92 - } + "range": [ + 87, + 92 + ] }, "arguments": [], "loc": null, - "range": { - "start": 87, - "end": 94 - } + "range": [ + 87, + 94 + ] }, "loc": null, - "range": { - "start": 80, - "end": 94 - } + "range": [ + 80, + 94 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 95 - } + "range": [ + 76, + 95 + ] }, { "type": "ExpressionStatement", @@ -233,27 +233,27 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 103 - } + "range": [ + 100, + 103 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 108 - } + "range": [ + 104, + 108 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 108 - } + "range": [ + 100, + 108 + ] }, "arguments": [ { @@ -263,47 +263,47 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 113 - } + "range": [ + 109, + 113 + ] }, "operator": "*", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "loc": null, - "range": { - "start": 109, - "end": 117 - } + "range": [ + 109, + 117 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 118 - } + "range": [ + 100, + 118 + ] }, "directive": null, "loc": null, - "range": { - "start": 100, - "end": 119 - } + "range": [ + 100, + 119 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 123 - } + "range": [ + 70, + 123 + ] }, "test": { "type": "LogicalExpression", @@ -315,27 +315,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 132 - } + "range": [ + 131, + 132 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 139 - } + "range": [ + 133, + 139 + ] }, "computed": false, "loc": null, - "range": { - "start": 131, - "end": 139 - } + "range": [ + 131, + 139 + ] }, "right": { "type": "MemberExpression", @@ -344,39 +344,39 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 148 - } + "range": [ + 143, + 148 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 153 - } + "range": [ + 149, + 153 + ] }, "computed": false, "loc": null, - "range": { - "start": 143, - "end": 153 - } + "range": [ + 143, + 153 + ] }, "loc": null, - "range": { - "start": 131, - "end": 153 - } + "range": [ + 131, + 153 + ] }, "loc": null, - "range": { - "start": 67, - "end": 155 - } + "range": [ + 67, + 155 + ] }, { "type": "ReturnStatement", @@ -385,42 +385,42 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 168 - } + "range": [ + 165, + 168 + ] }, "loc": null, - "range": { - "start": 158, - "end": 169 - } + "range": [ + 158, + 169 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 171 - } + "range": [ + 26, + 171 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 171 - }, + "range": [ + 0, + 171 + ], "loc": null, - "range": { - "start": 0, - "end": 171 - } + "range": [ + 0, + 171 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 171 - } + "range": [ + 0, + 171 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-conditional-break.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-conditional-break.js.snap index 788c900346..af11402bb5 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-conditional-break.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-conditional-break.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", @@ -70,57 +70,57 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 50 - } + "range": [ + 38, + 50 + ] }, "loc": null, - "range": { - "start": 34, - "end": 50 - } + "range": [ + 34, + 50 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 51 - } + "range": [ + 30, + 51 + ] }, { "type": "DoWhileStatement", @@ -136,26 +136,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 67, - "end": 74 - } + "range": [ + 67, + 74 + ] }, "consequent": { "type": "BlockStatement", @@ -164,24 +164,24 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 84, - "end": 90 - } + "range": [ + 84, + 90 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 96 - } + "range": [ + 76, + 96 + ] }, "alternate": null, "loc": null, - "range": { - "start": 63, - "end": 96 - } + "range": [ + 63, + 96 + ] }, { "type": "ExpressionStatement", @@ -192,10 +192,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 107 - } + "range": [ + 101, + 107 + ] }, "arguments": [ { @@ -203,31 +203,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] }, "directive": null, "loc": null, - "range": { - "start": 101, - "end": 111 - } + "range": [ + 101, + 111 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 115 - } + "range": [ + 57, + 115 + ] }, "test": { "type": "MemberExpression", @@ -236,33 +236,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 128 - } + "range": [ + 123, + 128 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 133 - } + "range": [ + 129, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 123, - "end": 133 - } + "range": [ + 123, + 133 + ] }, "loc": null, - "range": { - "start": 54, - "end": 135 - } + "range": [ + 54, + 135 + ] }, { "type": "ReturnStatement", @@ -271,42 +271,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "loc": null, - "range": { - "start": 138, - "end": 147 - } + "range": [ + 138, + 147 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 149 - } + "range": [ + 26, + 149 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 149 - }, + "range": [ + 0, + 149 + ], "loc": null, - "range": { - "start": 0, - "end": 149 - } + "range": [ + 0, + 149 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 149 - } + "range": [ + 0, + 149 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-continue.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-continue.js.snap index 22443b3e3e..57ef469d40 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-continue.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-continue.js.snap @@ -30,10 +30,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -50,10 +50,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": { "type": "ArrayExpression", @@ -62,57 +62,57 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 47 - } + "range": [ + 35, + 47 + ] }, "loc": null, - "range": { - "start": 31, - "end": 47 - } + "range": [ + 31, + 47 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 48 - } + "range": [ + 25, + 48 + ] }, { "type": "VariableDeclaration", @@ -125,32 +125,32 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 63, - "end": 65 - } + "range": [ + 63, + 65 + ] }, "loc": null, - "range": { - "start": 57, - "end": 65 - } + "range": [ + 57, + 65 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 66 - } + "range": [ + 51, + 66 + ] }, { "type": "DoWhileStatement", @@ -168,10 +168,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 88 - } + "range": [ + 84, + 88 + ] }, "init": { "type": "CallExpression", @@ -182,47 +182,47 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "property": { "type": "Identifier", "name": "pop", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 96 - } + "range": [ + 93, + 96 + ] }, "computed": false, "loc": null, - "range": { - "start": 91, - "end": 96 - } + "range": [ + 91, + 96 + ] }, "arguments": [], "loc": null, - "range": { - "start": 91, - "end": 98 - } + "range": [ + 91, + 98 + ] }, "loc": null, - "range": { - "start": 84, - "end": 98 - } + "range": [ + 84, + 98 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 99 - } + "range": [ + 78, + 99 + ] }, { "type": "IfStatement", @@ -233,26 +233,26 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 112 - } + "range": [ + 108, + 112 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "loc": null, - "range": { - "start": 108, - "end": 118 - } + "range": [ + 108, + 118 + ] }, "consequent": { "type": "BlockStatement", @@ -261,24 +261,24 @@ Output: "type": "ContinueStatement", "label": null, "loc": null, - "range": { - "start": 128, - "end": 137 - } + "range": [ + 128, + 137 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 143 - } + "range": [ + 120, + 143 + ] }, "alternate": null, "loc": null, - "range": { - "start": 104, - "end": 143 - } + "range": [ + 104, + 143 + ] }, { "type": "ExpressionStatement", @@ -291,27 +291,27 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 151 - } + "range": [ + 148, + 151 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 156 - } + "range": [ + 152, + 156 + ] }, "computed": false, "loc": null, - "range": { - "start": 148, - "end": 156 - } + "range": [ + 148, + 156 + ] }, "arguments": [ { @@ -321,47 +321,47 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 161 - } + "range": [ + 157, + 161 + ] }, "operator": "/", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 164, - "end": 165 - } + "range": [ + 164, + 165 + ] }, "loc": null, - "range": { - "start": 157, - "end": 165 - } + "range": [ + 157, + 165 + ] } ], "loc": null, - "range": { - "start": 148, - "end": 166 - } + "range": [ + 148, + 166 + ] }, "directive": null, "loc": null, - "range": { - "start": 148, - "end": 167 - } + "range": [ + 148, + 167 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 171 - } + "range": [ + 72, + 171 + ] }, "test": { "type": "MemberExpression", @@ -370,33 +370,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 179, - "end": 180 - } + "range": [ + 179, + 180 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 187 - } + "range": [ + 181, + 187 + ] }, "computed": false, "loc": null, - "range": { - "start": 179, - "end": 187 - } + "range": [ + 179, + 187 + ] }, "loc": null, - "range": { - "start": 69, - "end": 189 - } + "range": [ + 69, + 189 + ] }, { "type": "ReturnStatement", @@ -405,42 +405,42 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 203 - } + "range": [ + 200, + 203 + ] }, "loc": null, - "range": { - "start": 193, - "end": 204 - } + "range": [ + 193, + 204 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 206 - } + "range": [ + 21, + 206 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 206 - }, + "range": [ + 0, + 206 + ], "loc": null, - "range": { - "start": 0, - "end": 206 - } + "range": [ + 0, + 206 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 206 - } + "range": [ + 0, + 206 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-early-unconditional-break.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-early-unconditional-break.js.snap index bb6f9afaac..4c1e297005 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-early-unconditional-break.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-early-unconditional-break.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", @@ -68,48 +68,48 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 47 - } + "range": [ + 38, + 47 + ] }, "loc": null, - "range": { - "start": 34, - "end": 47 - } + "range": [ + 34, + 47 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 48 - } + "range": [ + 30, + 48 + ] }, { "type": "DoWhileStatement", @@ -125,10 +125,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 66 - } + "range": [ + 60, + 66 + ] }, "arguments": [ { @@ -136,40 +136,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 69 - } + "range": [ + 60, + 69 + ] }, "directive": null, "loc": null, - "range": { - "start": 60, - "end": 70 - } + "range": [ + 60, + 70 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 75, - "end": 81 - } + "range": [ + 75, + 81 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 85 - } + "range": [ + 54, + 85 + ] }, "test": { "type": "MemberExpression", @@ -178,33 +178,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 98 - } + "range": [ + 93, + 98 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 103 - } + "range": [ + 99, + 103 + ] }, "computed": false, "loc": null, - "range": { - "start": 93, - "end": 103 - } + "range": [ + 93, + 103 + ] }, "loc": null, - "range": { - "start": 51, - "end": 105 - } + "range": [ + 51, + 105 + ] }, { "type": "ReturnStatement", @@ -213,42 +213,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "loc": null, - "range": { - "start": 108, - "end": 117 - } + "range": [ + 108, + 117 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 119 - } + "range": [ + 26, + 119 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 119 - }, + "range": [ + 0, + 119 + ], "loc": null, - "range": { - "start": 0, - "end": 119 - } + "range": [ + 0, + 119 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 119 - } + "range": [ + 0, + 119 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-simple.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-simple.js.snap index 4b229745a5..cd0ca7eb8b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-simple.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@do-while-simple.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -46,10 +46,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ArrayExpression", @@ -58,48 +58,48 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] }, "loc": null, - "range": { - "start": 29, - "end": 42 - } + "range": [ + 29, + 42 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 43 - } + "range": [ + 25, + 43 + ] }, { "type": "VariableDeclaration", @@ -112,32 +112,32 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 53 - } + "range": [ + 50, + 53 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 56, - "end": 58 - } + "range": [ + 56, + 58 + ] }, "loc": null, - "range": { - "start": 50, - "end": 58 - } + "range": [ + 50, + 58 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 59 - } + "range": [ + 46, + 59 + ] }, { "type": "DoWhileStatement", @@ -155,10 +155,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "init": { "type": "CallExpression", @@ -169,47 +169,47 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "property": { "type": "Identifier", "name": "pop", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 87 - } + "range": [ + 84, + 87 + ] }, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] }, "arguments": [], "loc": null, - "range": { - "start": 82, - "end": 89 - } + "range": [ + 82, + 89 + ] }, "loc": null, - "range": { - "start": 75, - "end": 89 - } + "range": [ + 75, + 89 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 90 - } + "range": [ + 71, + 90 + ] }, { "type": "ExpressionStatement", @@ -222,27 +222,27 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 98 - } + "range": [ + 95, + 98 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 103 - } + "range": [ + 99, + 103 + ] }, "computed": false, "loc": null, - "range": { - "start": 95, - "end": 103 - } + "range": [ + 95, + 103 + ] }, "arguments": [ { @@ -252,47 +252,47 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 108 - } + "range": [ + 104, + 108 + ] }, "operator": "*", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "loc": null, - "range": { - "start": 104, - "end": 112 - } + "range": [ + 104, + 112 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 113 - } + "range": [ + 95, + 113 + ] }, "directive": null, "loc": null, - "range": { - "start": 95, - "end": 114 - } + "range": [ + 95, + 114 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 118 - } + "range": [ + 65, + 118 + ] }, "test": { "type": "MemberExpression", @@ -301,33 +301,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 134 - } + "range": [ + 128, + 134 + ] }, "computed": false, "loc": null, - "range": { - "start": 126, - "end": 134 - } + "range": [ + 126, + 134 + ] }, "loc": null, - "range": { - "start": 62, - "end": 136 - } + "range": [ + 62, + 136 + ] }, { "type": "ReturnStatement", @@ -336,42 +336,42 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 149 - } + "range": [ + 146, + 149 + ] }, "loc": null, - "range": { - "start": 139, - "end": 150 - } + "range": [ + 139, + 150 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 152 - } + "range": [ + 21, + 152 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 152 - }, + "range": [ + 0, + 152 + ], "loc": null, - "range": { - "start": 0, - "end": 152 - } + "range": [ + 0, + 152 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 152 - } + "range": [ + 0, + 152 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dominator.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dominator.js.snap index a03a4f9e4d..b3cb445544 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dominator.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@dominator.js.snap @@ -50,10 +50,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -61,10 +61,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -81,32 +81,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "LabeledStatement", @@ -115,10 +115,10 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "body": { "type": "IfStatement", @@ -129,27 +129,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 61 - } + "range": [ + 54, + 61 + ] }, "consequent": { "type": "BlockStatement", @@ -164,39 +164,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "directive": null, "loc": null, - "range": { - "start": 69, - "end": 75 - } + "range": [ + 69, + 75 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 79 - } + "range": [ + 63, + 79 + ] }, "alternate": { "type": "BlockStatement", @@ -210,27 +210,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 100 - } + "range": [ + 95, + 100 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "computed": false, "loc": null, - "range": { - "start": 95, - "end": 102 - } + "range": [ + 95, + 102 + ] }, "consequent": { "type": "BlockStatement", @@ -245,39 +245,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] }, "directive": null, "loc": null, - "range": { - "start": 112, - "end": 118 - } + "range": [ + 112, + 118 + ] } ], "loc": null, - "range": { - "start": 104, - "end": 124 - } + "range": [ + 104, + 124 + ] }, "alternate": { "type": "BlockStatement", @@ -289,29 +289,29 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 149 - } + "range": [ + 144, + 149 + ] }, "loc": null, - "range": { - "start": 138, - "end": 150 - } + "range": [ + 138, + 150 + ] } ], "loc": null, - "range": { - "start": 130, - "end": 156 - } + "range": [ + 130, + 156 + ] }, "loc": null, - "range": { - "start": 91, - "end": 156 - } + "range": [ + 91, + 156 + ] }, { "type": "ExpressionStatement", @@ -323,51 +323,51 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 165, - "end": 166 - } + "range": [ + 165, + 166 + ] }, "loc": null, - "range": { - "start": 161, - "end": 166 - } + "range": [ + 161, + 166 + ] }, "directive": null, "loc": null, - "range": { - "start": 161, - "end": 167 - } + "range": [ + 161, + 167 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 171 - } + "range": [ + 85, + 171 + ] }, "loc": null, - "range": { - "start": 50, - "end": 171 - } + "range": [ + 50, + 171 + ] }, "loc": null, - "range": { - "start": 43, - "end": 171 - } + "range": [ + 43, + 171 + ] }, { "type": "LabeledStatement", @@ -376,10 +376,10 @@ Output: "name": "label2", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 180 - } + "range": [ + 174, + 180 + ] }, "body": { "type": "SwitchStatement", @@ -390,27 +390,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 195 - } + "range": [ + 190, + 195 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 197 - } + "range": [ + 196, + 197 + ] }, "computed": false, "loc": null, - "range": { - "start": 190, - "end": 197 - } + "range": [ + 190, + 197 + ] }, "cases": [ { @@ -419,10 +419,10 @@ Output: "type": "StringLiteral", "value": "a", "loc": null, - "range": { - "start": 210, - "end": 213 - } + "range": [ + 210, + 213 + ] }, "consequent": [ { @@ -438,55 +438,55 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 224 - } + "range": [ + 223, + 224 + ] }, "right": { "type": "NumericLiteral", "value": 4.0, "loc": null, - "range": { - "start": 227, - "end": 228 - } + "range": [ + 227, + 228 + ] }, "loc": null, - "range": { - "start": 223, - "end": 228 - } + "range": [ + 223, + 228 + ] }, "directive": null, "loc": null, - "range": { - "start": 223, - "end": 229 - } + "range": [ + 223, + 229 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 236, - "end": 242 - } + "range": [ + 236, + 242 + ] } ], "loc": null, - "range": { - "start": 215, - "end": 248 - } + "range": [ + 215, + 248 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 248 - } + "range": [ + 205, + 248 + ] }, { "type": "SwitchCase", @@ -494,10 +494,10 @@ Output: "type": "StringLiteral", "value": "b", "loc": null, - "range": { - "start": 258, - "end": 261 - } + "range": [ + 258, + 261 + ] }, "consequent": [ { @@ -510,30 +510,30 @@ Output: "name": "label2", "typeAnnotation": null, "loc": null, - "range": { - "start": 277, - "end": 283 - } + "range": [ + 277, + 283 + ] }, "loc": null, - "range": { - "start": 271, - "end": 284 - } + "range": [ + 271, + 284 + ] } ], "loc": null, - "range": { - "start": 263, - "end": 290 - } + "range": [ + 263, + 290 + ] } ], "loc": null, - "range": { - "start": 253, - "end": 290 - } + "range": [ + 253, + 290 + ] }, { "type": "SwitchCase", @@ -541,10 +541,10 @@ Output: "type": "StringLiteral", "value": "c", "loc": null, - "range": { - "start": 300, - "end": 303 - } + "range": [ + 300, + 303 + ] }, "consequent": [ { @@ -560,46 +560,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 313, - "end": 314 - } + "range": [ + 313, + 314 + ] }, "right": { "type": "NumericLiteral", "value": 5.0, "loc": null, - "range": { - "start": 317, - "end": 318 - } + "range": [ + 317, + 318 + ] }, "loc": null, - "range": { - "start": 313, - "end": 318 - } + "range": [ + 313, + 318 + ] }, "directive": null, "loc": null, - "range": { - "start": 313, - "end": 319 - } + "range": [ + 313, + 319 + ] } ], "loc": null, - "range": { - "start": 305, - "end": 358 - } + "range": [ + 305, + 358 + ] } ], "loc": null, - "range": { - "start": 295, - "end": 358 - } + "range": [ + 295, + 358 + ] }, { "type": "SwitchCase", @@ -618,59 +618,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 380, - "end": 381 - } + "range": [ + 380, + 381 + ] }, "right": { "type": "NumericLiteral", "value": 6.0, "loc": null, - "range": { - "start": 384, - "end": 385 - } + "range": [ + 384, + 385 + ] }, "loc": null, - "range": { - "start": 380, - "end": 385 - } + "range": [ + 380, + 385 + ] }, "directive": null, "loc": null, - "range": { - "start": 380, - "end": 386 - } + "range": [ + 380, + 386 + ] } ], "loc": null, - "range": { - "start": 372, - "end": 392 - } + "range": [ + 372, + 392 + ] } ], "loc": null, - "range": { - "start": 363, - "end": 392 - } + "range": [ + 363, + 392 + ] } ], "loc": null, - "range": { - "start": 182, - "end": 396 - } + "range": [ + 182, + 396 + ] }, "loc": null, - "range": { - "start": 174, - "end": 396 - } + "range": [ + 174, + 396 + ] }, { "type": "IfStatement", @@ -681,27 +681,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 403, - "end": 408 - } + "range": [ + 403, + 408 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 409, - "end": 410 - } + "range": [ + 409, + 410 + ] }, "computed": false, "loc": null, - "range": { - "start": 403, - "end": 410 - } + "range": [ + 403, + 410 + ] }, "consequent": { "type": "BlockStatement", @@ -711,30 +711,30 @@ Output: "argument": { "type": "NullLiteral", "loc": null, - "range": { - "start": 425, - "end": 429 - } + "range": [ + 425, + 429 + ] }, "loc": null, - "range": { - "start": 418, - "end": 430 - } + "range": [ + 418, + 430 + ] } ], "loc": null, - "range": { - "start": 412, - "end": 434 - } + "range": [ + 412, + 434 + ] }, "alternate": null, "loc": null, - "range": { - "start": 399, - "end": 434 - } + "range": [ + 399, + 434 + ] }, { "type": "ReturnStatement", @@ -743,42 +743,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 444, - "end": 445 - } + "range": [ + 444, + 445 + ] }, "loc": null, - "range": { - "start": 437, - "end": 446 - } + "range": [ + 437, + 446 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 448 - } + "range": [ + 26, + 448 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 448 - }, + "range": [ + 0, + 448 + ], "loc": null, - "range": { - "start": 0, - "end": 448 - } + "range": [ + 0, + 448 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 448 - } + "range": [ + 0, + 448 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@early-return.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@early-return.js.snap index 67b5edcd8a..b03efaa1b6 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@early-return.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@early-return.js.snap @@ -25,10 +25,10 @@ Output: "name": "MyApp", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 14 - } + "range": [ + 9, + 14 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 15, - "end": 20 - } + "range": [ + 15, + 20 + ] } ], "body": { @@ -56,24 +56,24 @@ Output: "name": "res", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 33 - } + "range": [ + 30, + 33 + ] }, "init": null, "loc": null, - "range": { - "start": 30, - "end": 33 - } + "range": [ + 30, + 33 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 34 - } + "range": [ + 26, + 34 + ] }, { "type": "IfStatement", @@ -84,27 +84,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 51 - } + "range": [ + 47, + 51 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 51 - } + "range": [ + 41, + 51 + ] }, "consequent": { "type": "BlockStatement", @@ -113,17 +113,17 @@ Output: "type": "ReturnStatement", "argument": null, "loc": null, - "range": { - "start": 59, - "end": 66 - } + "range": [ + 59, + 66 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 70 - } + "range": [ + 53, + 70 + ] }, "alternate": { "type": "BlockStatement", @@ -138,71 +138,71 @@ Output: "name": "res", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "loc": null, - "range": { - "start": 82, - "end": 89 - } + "range": [ + 82, + 89 + ] }, "directive": null, "loc": null, - "range": { - "start": 82, - "end": 90 - } + "range": [ + 82, + 90 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 94 - } + "range": [ + 76, + 94 + ] }, "loc": null, - "range": { - "start": 37, - "end": 94 - } + "range": [ + 37, + 94 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 96 - } + "range": [ + 22, + 96 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 96 - }, + "range": [ + 0, + 96 + ], "loc": null, - "range": { - "start": 0, - "end": 96 - } + "range": [ + 0, + 96 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 96 - } + "range": [ + 0, + 96 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.computed-lval-in-destructure.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.computed-lval-in-destructure.js.snap index 1e7f16107c..3ace381bc9 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.computed-lval-in-destructure.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.computed-lval-in-destructure.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "computedKey", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 47 - } + "range": [ + 36, + 47 + ] }, "init": { "type": "MemberExpression", @@ -66,40 +66,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "property": { "type": "Identifier", "name": "key", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 50, - "end": 59 - } + "range": [ + 50, + 59 + ] }, "loc": null, - "range": { - "start": 36, - "end": 59 - } + "range": [ + 36, + 59 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 60 - } + "range": [ + 30, + 60 + ] }, { "type": "VariableDeclaration", @@ -117,37 +117,37 @@ Output: "name": "computedKey", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 83 - } + "range": [ + 72, + 83 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "kind": "init", "computed": true, "shorthand": false, "method": false, "loc": null, - "range": { - "start": 71, - "end": 87 - } + "range": [ + 71, + 87 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 89 - } + "range": [ + 69, + 89 + ] }, "init": { "type": "MemberExpression", @@ -156,40 +156,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 97 - } + "range": [ + 92, + 97 + ] }, "property": { "type": "Identifier", "name": "val", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "computed": false, "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] }, "loc": null, - "range": { - "start": 69, - "end": 101 - } + "range": [ + 69, + 101 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 102 - } + "range": [ + 63, + 102 + ] }, { "type": "ReturnStatement", @@ -198,42 +198,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 117 - } + "range": [ + 26, + 117 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 117 - }, + "range": [ + 0, + 117 + ], "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.multi-arrow-expr-export-default-gating-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.multi-arrow-expr-export-default-gating-test.js.snap index a5468eb644..6635e8afce 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.multi-arrow-expr-export-default-gating-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error._todo.multi-arrow-expr-export-default-gating-test.js.snap @@ -30,10 +30,10 @@ Output: "name": "ErrorView", "typeAnnotation": null, "loc": null, - "range": { - "start": 17, - "end": 26 - } + "range": [ + 17, + 26 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -44,20 +44,20 @@ Output: "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] }, { "type": "Identifier", "name": "_retry", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 43 - } + "range": [ + 37, + 43 + ] } ], "body": { @@ -68,10 +68,10 @@ Output: "type": "JSXIdentifier", "name": "MessageBox", "loc": null, - "range": { - "start": 49, - "end": 59 - } + "range": [ + 49, + 59 + ] }, "attributes": [ { @@ -80,10 +80,10 @@ Output: "type": "JSXIdentifier", "name": "error", "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "value": { "type": "JSXExpressionContainer", @@ -92,30 +92,30 @@ Output: "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] }, "loc": null, - "range": { - "start": 60, - "end": 73 - } + "range": [ + 60, + 73 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 48, - "end": 74 - } + "range": [ + 48, + 74 + ] }, "children": [], "closingElement": { @@ -124,49 +124,49 @@ Output: "type": "JSXIdentifier", "name": "MessageBox", "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, "loc": null, - "range": { - "start": 74, - "end": 87 - } + "range": [ + 74, + 87 + ] }, "loc": null, - "range": { - "start": 48, - "end": 87 - } + "range": [ + 48, + 87 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 29, - "end": 87 - }, + "range": [ + 29, + 87 + ], "expression": true, "loc": null, - "range": { - "start": 29, - "end": 87 - } + "range": [ + 29, + 87 + ] }, "loc": null, - "range": { - "start": 17, - "end": 87 - } + "range": [ + 17, + 87 + ] } ], "loc": null, - "range": { - "start": 11, - "end": 88 - } + "range": [ + 11, + 88 + ] }, { "type": "ExportDefaultDeclaration", @@ -178,10 +178,10 @@ Output: "name": "Renderer", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 113 - } + "range": [ + 105, + 113 + ] }, "right": { "type": "ArrowFunctionExpression", @@ -192,10 +192,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 122 - } + "range": [ + 117, + 122 + ] } ], "body": { @@ -206,18 +206,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 132, - "end": 135 - } + "range": [ + 132, + 135 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, "children": [ { @@ -225,10 +225,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 136, - "end": 141 - } + "range": [ + 136, + 141 + ] }, { "type": "JSXElement", @@ -238,18 +238,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 142, - "end": 145 - } + "range": [ + 142, + 145 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 141, - "end": 146 - } + "range": [ + 141, + 146 + ] }, "children": [], "closingElement": { @@ -258,32 +258,32 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 148, - "end": 151 - } + "range": [ + 148, + 151 + ] }, "loc": null, - "range": { - "start": 146, - "end": 152 - } + "range": [ + 146, + 152 + ] }, "loc": null, - "range": { - "start": 141, - "end": 152 - } + "range": [ + 141, + 152 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 152, - "end": 157 - } + "range": [ + 152, + 157 + ] }, { "type": "JSXElement", @@ -293,18 +293,18 @@ Output: "type": "JSXIdentifier", "name": "ErrorView", "loc": null, - "range": { - "start": 158, - "end": 167 - } + "range": [ + 158, + 167 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 157, - "end": 168 - } + "range": [ + 157, + 168 + ] }, "children": [], "closingElement": { @@ -313,32 +313,32 @@ Output: "type": "JSXIdentifier", "name": "ErrorView", "loc": null, - "range": { - "start": 170, - "end": 179 - } + "range": [ + 170, + 179 + ] }, "loc": null, - "range": { - "start": 168, - "end": 180 - } + "range": [ + 168, + 180 + ] }, "loc": null, - "range": { - "start": 157, - "end": 180 - } + "range": [ + 157, + 180 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 180, - "end": 183 - } + "range": [ + 180, + 183 + ] } ], "closingElement": { @@ -347,54 +347,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 185, - "end": 188 - } + "range": [ + 185, + 188 + ] }, "loc": null, - "range": { - "start": 183, - "end": 189 - } + "range": [ + 183, + 189 + ] }, "loc": null, - "range": { - "start": 131, - "end": 189 - } + "range": [ + 131, + 189 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 116, - "end": 191 - }, + "range": [ + 116, + 191 + ], "expression": true, "loc": null, - "range": { - "start": 116, - "end": 191 - } + "range": [ + 116, + 191 + ] }, "loc": null, - "range": { - "start": 105, - "end": 191 - } + "range": [ + 105, + 191 + ] }, "loc": null, - "range": { - "start": 90, - "end": 192 - } + "range": [ + 90, + 192 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 11, - "end": 192 - } + "range": [ + 11, + 192 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.babel-existing-react-namespace-import.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.babel-existing-react-namespace-import.js.snap index c0db030b1c..f6c2817aad 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.babel-existing-react-namespace-import.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.babel-existing-react-namespace-import.js.snap @@ -35,32 +35,32 @@ Output: "name": "React", "typeAnnotation": null, "loc": null, - "range": { - "start": 12, - "end": 17 - } + "range": [ + 12, + 17 + ] }, "loc": null, - "range": { - "start": 7, - "end": 17 - } + "range": [ + 7, + 17 + ] } ], "source": { "type": "StringLiteral", "value": "react", "loc": null, - "range": { - "start": 23, - "end": 30 - } + "range": [ + 23, + 30 + ] }, "loc": null, - "range": { - "start": 0, - "end": 31 - } + "range": [ + 0, + 31 + ] }, { "type": "FunctionDeclaration", @@ -69,10 +69,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 51 - } + "range": [ + 42, + 51 + ] }, "params": [ { @@ -80,10 +80,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] } ], "body": { @@ -103,17 +103,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "init": { "type": "CallExpression", @@ -124,57 +124,57 @@ Output: "name": "React", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 80 - } + "range": [ + 75, + 80 + ] }, "property": { "type": "Identifier", "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 89 - } + "range": [ + 81, + 89 + ] }, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 89 - } + "range": [ + 75, + 89 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 92 - } + "range": [ + 75, + 92 + ] }, "loc": null, - "range": { - "start": 69, - "end": 92 - } + "range": [ + 69, + 92 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 93 - } + "range": [ + 63, + 93 + ] }, { "type": "VariableDeclaration", @@ -187,10 +187,10 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 117 - } + "range": [ + 102, + 117 + ] }, "init": { "type": "CallExpression", @@ -201,27 +201,27 @@ Output: "name": "React", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 125 - } + "range": [ + 120, + 125 + ] }, "property": { "type": "Identifier", "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 133 - } + "range": [ + 126, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 133 - } + "range": [ + 120, + 133 + ] }, "arguments": [ { @@ -235,10 +235,10 @@ Output: "name": "calculateExpensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 164 - } + "range": [ + 140, + 164 + ] }, "arguments": [ { @@ -246,31 +246,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 166 - } + "range": [ + 165, + 166 + ] } ], "loc": null, - "range": { - "start": 140, - "end": 167 - } + "range": [ + 140, + 167 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 134, - "end": 167 - }, + "range": [ + 134, + 167 + ], "expression": true, "loc": null, - "range": { - "start": 134, - "end": 167 - } + "range": [ + 134, + 167 + ] }, { "type": "ArrayExpression", @@ -280,37 +280,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 171 - } + "range": [ + 170, + 171 + ] } ], "loc": null, - "range": { - "start": 169, - "end": 172 - } + "range": [ + 169, + 172 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 173 - } + "range": [ + 120, + 173 + ] }, "loc": null, - "range": { - "start": 102, - "end": 173 - } + "range": [ + 102, + 173 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 174 - } + "range": [ + 96, + 174 + ] }, { "type": "ReturnStatement", @@ -322,18 +322,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 186, - "end": 189 - } + "range": [ + 186, + 189 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 185, - "end": 190 - } + "range": [ + 185, + 190 + ] }, "children": [ { @@ -343,16 +343,16 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 191, - "end": 206 - } + "range": [ + 191, + 206 + ] }, "loc": null, - "range": { - "start": 190, - "end": 207 - } + "range": [ + 190, + 207 + ] } ], "closingElement": { @@ -361,48 +361,48 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 209, - "end": 212 - } + "range": [ + 209, + 212 + ] }, "loc": null, - "range": { - "start": 207, - "end": 213 - } + "range": [ + 207, + 213 + ] }, "loc": null, - "range": { - "start": 185, - "end": 213 - } + "range": [ + 185, + 213 + ] }, "loc": null, - "range": { - "start": 178, - "end": 214 - } + "range": [ + 178, + 214 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 216 - } + "range": [ + 59, + 216 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 33, - "end": 216 - }, + "range": [ + 33, + 216 + ], "loc": null, - "range": { - "start": 33, - "end": 216 - } + "range": [ + 33, + 216 + ] }, { "type": "FunctionDeclaration", @@ -411,10 +411,10 @@ Output: "name": "Component2", "typeAnnotation": null, "loc": null, - "range": { - "start": 227, - "end": 237 - } + "range": [ + 227, + 237 + ] }, "params": [ { @@ -422,10 +422,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 243 - } + "range": [ + 238, + 243 + ] } ], "body": { @@ -445,17 +445,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 256, - "end": 257 - } + "range": [ + 256, + 257 + ] } ], "loc": null, - "range": { - "start": 255, - "end": 258 - } + "range": [ + 255, + 258 + ] }, "init": { "type": "CallExpression", @@ -466,57 +466,57 @@ Output: "name": "React", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 266 - } + "range": [ + 261, + 266 + ] }, "property": { "type": "Identifier", "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 267, - "end": 275 - } + "range": [ + 267, + 275 + ] }, "computed": false, "loc": null, - "range": { - "start": 261, - "end": 275 - } + "range": [ + 261, + 275 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 276, - "end": 277 - } + "range": [ + 276, + 277 + ] } ], "loc": null, - "range": { - "start": 261, - "end": 278 - } + "range": [ + 261, + 278 + ] }, "loc": null, - "range": { - "start": 255, - "end": 278 - } + "range": [ + 255, + 278 + ] } ], "loc": null, - "range": { - "start": 249, - "end": 279 - } + "range": [ + 249, + 279 + ] }, { "type": "VariableDeclaration", @@ -529,10 +529,10 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 288, - "end": 303 - } + "range": [ + 288, + 303 + ] }, "init": { "type": "CallExpression", @@ -543,27 +543,27 @@ Output: "name": "React", "typeAnnotation": null, "loc": null, - "range": { - "start": 306, - "end": 311 - } + "range": [ + 306, + 311 + ] }, "property": { "type": "Identifier", "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 312, - "end": 319 - } + "range": [ + 312, + 319 + ] }, "computed": false, "loc": null, - "range": { - "start": 306, - "end": 319 - } + "range": [ + 306, + 319 + ] }, "arguments": [ { @@ -577,10 +577,10 @@ Output: "name": "calculateExpensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 326, - "end": 350 - } + "range": [ + 326, + 350 + ] }, "arguments": [ { @@ -588,31 +588,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 351, - "end": 352 - } + "range": [ + 351, + 352 + ] } ], "loc": null, - "range": { - "start": 326, - "end": 353 - } + "range": [ + 326, + 353 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 320, - "end": 353 - }, + "range": [ + 320, + 353 + ], "expression": true, "loc": null, - "range": { - "start": 320, - "end": 353 - } + "range": [ + 320, + 353 + ] }, { "type": "ArrayExpression", @@ -622,37 +622,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 356, - "end": 357 - } + "range": [ + 356, + 357 + ] } ], "loc": null, - "range": { - "start": 355, - "end": 358 - } + "range": [ + 355, + 358 + ] } ], "loc": null, - "range": { - "start": 306, - "end": 359 - } + "range": [ + 306, + 359 + ] }, "loc": null, - "range": { - "start": 288, - "end": 359 - } + "range": [ + 288, + 359 + ] } ], "loc": null, - "range": { - "start": 282, - "end": 360 - } + "range": [ + 282, + 360 + ] }, { "type": "ReturnStatement", @@ -664,18 +664,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 372, - "end": 375 - } + "range": [ + 372, + 375 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 371, - "end": 376 - } + "range": [ + 371, + 376 + ] }, "children": [ { @@ -685,16 +685,16 @@ Output: "name": "expensiveNumber", "typeAnnotation": null, "loc": null, - "range": { - "start": 377, - "end": 392 - } + "range": [ + 377, + 392 + ] }, "loc": null, - "range": { - "start": 376, - "end": 393 - } + "range": [ + 376, + 393 + ] } ], "closingElement": { @@ -703,54 +703,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 395, - "end": 398 - } + "range": [ + 395, + 398 + ] }, "loc": null, - "range": { - "start": 393, - "end": 399 - } + "range": [ + 393, + 399 + ] }, "loc": null, - "range": { - "start": 371, - "end": 399 - } + "range": [ + 371, + 399 + ] }, "loc": null, - "range": { - "start": 364, - "end": 400 - } + "range": [ + 364, + 400 + ] } ], "loc": null, - "range": { - "start": 245, - "end": 402 - } + "range": [ + 245, + 402 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 218, - "end": 402 - }, + "range": [ + 218, + 402 + ], "loc": null, - "range": { - "start": 218, - "end": 402 - } + "range": [ + 218, + 402 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 402 - } + "range": [ + 0, + 402 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.bug-validate-no-set-state-not-all-mutable-range-extensions-are-bad.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.bug-validate-no-set-state-not-all-mutable-range-extensions-are-bad.js.snap index c90a9379aa..9e0e36eedf 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.bug-validate-no-set-state-not-all-mutable-range-extensions-are-bad.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.bug-validate-no-set-state-not-all-mutable-range-extensions-are-bad.js.snap @@ -41,10 +41,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -52,10 +52,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -72,10 +72,10 @@ Output: "name": "logEvent", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] }, "init": { "type": "CallExpression", @@ -84,10 +84,10 @@ Output: "name": "useLogging", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 57 - } + "range": [ + 47, + 57 + ] }, "arguments": [ { @@ -97,47 +97,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 63 - } + "range": [ + 58, + 63 + ] }, "property": { "type": "Identifier", "name": "appId", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 69 - } + "range": [ + 58, + 69 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 70 - } + "range": [ + 47, + 70 + ] }, "loc": null, - "range": { - "start": 36, - "end": 70 - } + "range": [ + 36, + 70 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 71 - } + "range": [ + 30, + 71 + ] }, { "type": "VariableDeclaration", @@ -153,27 +153,27 @@ Output: "name": "currentStep", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 92 - } + "range": [ + 81, + 92 + ] }, { "type": "Identifier", "name": "setCurrentStep", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 108 - } + "range": [ + 94, + 108 + ] } ], "loc": null, - "range": { - "start": 80, - "end": 109 - } + "range": [ + 80, + 109 + ] }, "init": { "type": "CallExpression", @@ -182,40 +182,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 120 - } + "range": [ + 112, + 120 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 123 - } + "range": [ + 112, + 123 + ] }, "loc": null, - "range": { - "start": 80, - "end": 123 - } + "range": [ + 80, + 123 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 124 - } + "range": [ + 74, + 124 + ] }, { "type": "VariableDeclaration", @@ -228,10 +228,10 @@ Output: "name": "onSubmit", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 142 - } + "range": [ + 134, + 142 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -242,10 +242,10 @@ Output: "name": "errorEvent", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 156 - } + "range": [ + 146, + 156 + ] } ], "body": { @@ -260,10 +260,10 @@ Output: "name": "logEvent", "typeAnnotation": null, "loc": null, - "range": { - "start": 225, - "end": 233 - } + "range": [ + 225, + 233 + ] }, "arguments": [ { @@ -271,24 +271,24 @@ Output: "name": "errorEvent", "typeAnnotation": null, "loc": null, - "range": { - "start": 234, - "end": 244 - } + "range": [ + 234, + 244 + ] } ], "loc": null, - "range": { - "start": 225, - "end": 245 - } + "range": [ + 225, + 245 + ] }, "directive": null, "loc": null, - "range": { - "start": 225, - "end": 246 - } + "range": [ + 225, + 246 + ] }, { "type": "ExpressionStatement", @@ -299,68 +299,68 @@ Output: "name": "setCurrentStep", "typeAnnotation": null, "loc": null, - "range": { - "start": 499, - "end": 513 - } + "range": [ + 499, + 513 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 514, - "end": 515 - } + "range": [ + 514, + 515 + ] } ], "loc": null, - "range": { - "start": 499, - "end": 516 - } + "range": [ + 499, + 516 + ] }, "directive": null, "loc": null, - "range": { - "start": 499, - "end": 517 - } + "range": [ + 499, + 517 + ] } ], "loc": null, - "range": { - "start": 161, - "end": 521 - } + "range": [ + 161, + 521 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 145, - "end": 521 - }, + "range": [ + 145, + 521 + ], "expression": false, "loc": null, - "range": { - "start": 145, - "end": 521 - } + "range": [ + 145, + 521 + ] }, "loc": null, - "range": { - "start": 134, - "end": 521 - } + "range": [ + 134, + 521 + ] } ], "loc": null, - "range": { - "start": 128, - "end": 522 - } + "range": [ + 128, + 522 + ] }, { "type": "SwitchStatement", @@ -369,10 +369,10 @@ Output: "name": "currentStep", "typeAnnotation": null, "loc": null, - "range": { - "start": 534, - "end": 545 - } + "range": [ + 534, + 545 + ] }, "cases": [ { @@ -381,10 +381,10 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 558, - "end": 559 - } + "range": [ + 558, + 559 + ] }, "consequent": [ { @@ -397,10 +397,10 @@ Output: "type": "JSXIdentifier", "name": "OtherComponent", "loc": null, - "range": { - "start": 575, - "end": 589 - } + "range": [ + 575, + 589 + ] }, "attributes": [ { @@ -409,10 +409,10 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 590, - "end": 594 - } + "range": [ + 590, + 594 + ] }, "value": { "type": "JSXExpressionContainer", @@ -426,77 +426,77 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 598, - "end": 601 - } + "range": [ + 598, + 601 + ] }, "value": { "type": "StringLiteral", "value": "bar", "loc": null, - "range": { - "start": 603, - "end": 608 - } + "range": [ + 603, + 608 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 598, - "end": 608 - } + "range": [ + 598, + 608 + ] } ], "loc": null, - "range": { - "start": 596, - "end": 610 - } + "range": [ + 596, + 610 + ] }, "loc": null, - "range": { - "start": 595, - "end": 611 - } + "range": [ + 595, + 611 + ] }, "loc": null, - "range": { - "start": 590, - "end": 611 - } + "range": [ + 590, + 611 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 574, - "end": 614 - } + "range": [ + 574, + 614 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 574, - "end": 614 - } + "range": [ + 574, + 614 + ] }, "loc": null, - "range": { - "start": 567, - "end": 615 - } + "range": [ + 567, + 615 + ] } ], "loc": null, - "range": { - "start": 553, - "end": 615 - } + "range": [ + 553, + 615 + ] }, { "type": "SwitchCase", @@ -504,10 +504,10 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 625, - "end": 626 - } + "range": [ + 625, + 626 + ] }, "consequent": [ { @@ -520,10 +520,10 @@ Output: "type": "JSXIdentifier", "name": "OtherComponent", "loc": null, - "range": { - "start": 642, - "end": 656 - } + "range": [ + 642, + 656 + ] }, "attributes": [ { @@ -532,10 +532,10 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 657, - "end": 661 - } + "range": [ + 657, + 661 + ] }, "value": { "type": "JSXExpressionContainer", @@ -549,48 +549,48 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 665, - "end": 668 - } + "range": [ + 665, + 668 + ] }, "value": { "type": "StringLiteral", "value": "joe", "loc": null, - "range": { - "start": 670, - "end": 675 - } + "range": [ + 670, + 675 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 665, - "end": 675 - } + "range": [ + 665, + 675 + ] } ], "loc": null, - "range": { - "start": 663, - "end": 677 - } + "range": [ + 663, + 677 + ] }, "loc": null, - "range": { - "start": 662, - "end": 678 - } + "range": [ + 662, + 678 + ] }, "loc": null, - "range": { - "start": 657, - "end": 678 - } + "range": [ + 657, + 678 + ] }, { "type": "JSXAttribute", @@ -598,10 +598,10 @@ Output: "type": "JSXIdentifier", "name": "onSubmit", "loc": null, - "range": { - "start": 679, - "end": 687 - } + "range": [ + 679, + 687 + ] }, "value": { "type": "JSXExpressionContainer", @@ -610,51 +610,51 @@ Output: "name": "onSubmit", "typeAnnotation": null, "loc": null, - "range": { - "start": 689, - "end": 697 - } + "range": [ + 689, + 697 + ] }, "loc": null, - "range": { - "start": 688, - "end": 698 - } + "range": [ + 688, + 698 + ] }, "loc": null, - "range": { - "start": 679, - "end": 698 - } + "range": [ + 679, + 698 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 641, - "end": 701 - } + "range": [ + 641, + 701 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 641, - "end": 701 - } + "range": [ + 641, + 701 + ] }, "loc": null, - "range": { - "start": 634, - "end": 702 - } + "range": [ + 634, + 702 + ] } ], "loc": null, - "range": { - "start": 620, - "end": 702 - } + "range": [ + 620, + 702 + ] }, { "type": "SwitchCase", @@ -669,34 +669,34 @@ Output: "name": "logEvent", "typeAnnotation": null, "loc": null, - "range": { - "start": 791, - "end": 799 - } + "range": [ + 791, + 799 + ] }, "arguments": [ { "type": "StringLiteral", "value": "Invalid step", "loc": null, - "range": { - "start": 800, - "end": 814 - } + "range": [ + 800, + 814 + ] } ], "loc": null, - "range": { - "start": 791, - "end": 815 - } + "range": [ + 791, + 815 + ] }, "directive": null, "loc": null, - "range": { - "start": 791, - "end": 816 - } + "range": [ + 791, + 816 + ] }, { "type": "ReturnStatement", @@ -708,10 +708,10 @@ Output: "type": "JSXIdentifier", "name": "OtherComponent", "loc": null, - "range": { - "start": 831, - "end": 845 - } + "range": [ + 831, + 845 + ] }, "attributes": [ { @@ -720,94 +720,94 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 846, - "end": 850 - } + "range": [ + 846, + 850 + ] }, "value": { "type": "JSXExpressionContainer", "expression": { "type": "NullLiteral", "loc": null, - "range": { - "start": 852, - "end": 856 - } + "range": [ + 852, + 856 + ] }, "loc": null, - "range": { - "start": 851, - "end": 857 - } + "range": [ + 851, + 857 + ] }, "loc": null, - "range": { - "start": 846, - "end": 857 - } + "range": [ + 846, + 857 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 830, - "end": 860 - } + "range": [ + 830, + 860 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 830, - "end": 860 - } + "range": [ + 830, + 860 + ] }, "loc": null, - "range": { - "start": 823, - "end": 861 - } + "range": [ + 823, + 861 + ] } ], "loc": null, - "range": { - "start": 707, - "end": 861 - } + "range": [ + 707, + 861 + ] } ], "loc": null, - "range": { - "start": 526, - "end": 865 - } + "range": [ + 526, + 865 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 867 - } + "range": [ + 26, + 867 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 867 - }, + "range": [ + 0, + 867 + ], "loc": null, - "range": { - "start": 0, - "end": 867 - } + "range": [ + 0, + 867 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 867 - } + "range": [ + 0, + 867 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.call-args-destructuring-asignment-complex.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.call-args-destructuring-asignment-complex.js.snap index 8590681f6e..b1bc56a368 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.call-args-destructuring-asignment-complex.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.call-args-destructuring-asignment-complex.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "CallExpression", @@ -65,30 +65,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 48 - } + "range": [ + 38, + 48 + ] }, "arguments": [], "loc": null, - "range": { - "start": 38, - "end": 50 - } + "range": [ + 38, + 50 + ] }, "loc": null, - "range": { - "start": 34, - "end": 50 - } + "range": [ + 34, + 50 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 51 - } + "range": [ + 30, + 51 + ] }, { "type": "ExpressionStatement", @@ -101,27 +101,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "arguments": [ { @@ -138,24 +138,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "right": { "type": "CallExpression", @@ -164,37 +164,37 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 79 - } + "range": [ + 69, + 79 + ] }, "arguments": [], "loc": null, - "range": { - "start": 69, - "end": 81 - } + "range": [ + 69, + 81 + ] }, "loc": null, - "range": { - "start": 61, - "end": 81 - } + "range": [ + 61, + 81 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 83 - } + "range": [ + 54, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 54, - "end": 84 - } + "range": [ + 54, + 84 + ] }, { "type": "ReturnStatement", @@ -203,42 +203,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 98 - } + "range": [ + 26, + 98 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 98 - }, + "range": [ + 0, + 98 + ], "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.codegen-error-on-conflicting-imports.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.codegen-error-on-conflicting-imports.js.snap index 95c9bf8c3a..b31390254c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.codegen-error-on-conflicting-imports.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.codegen-error-on-conflicting-imports.js.snap @@ -27,32 +27,32 @@ Output: "name": "makeReadOnly", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 56 - } + "range": [ + 44, + 56 + ] }, "init": { "type": "StringLiteral", "value": "conflicting identifier", "loc": null, - "range": { - "start": 59, - "end": 83 - } + "range": [ + 59, + 83 + ] }, "loc": null, - "range": { - "start": 44, - "end": 83 - } + "range": [ + 44, + 83 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 84 - } + "range": [ + 40, + 84 + ] }, { "type": "FunctionDeclaration", @@ -61,10 +61,10 @@ Output: "name": "useFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 100 - } + "range": [ + 94, + 100 + ] }, "params": [ { @@ -72,10 +72,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 106 - } + "range": [ + 101, + 106 + ] } ], "body": { @@ -90,10 +90,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 122 - } + "range": [ + 119, + 122 + ] }, "arguments": [ { @@ -103,66 +103,66 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 128 - } + "range": [ + 123, + 128 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 130 - } + "range": [ + 129, + 130 + ] }, "computed": false, "loc": null, - "range": { - "start": 123, - "end": 130 - } + "range": [ + 123, + 130 + ] } ], "loc": null, - "range": { - "start": 119, - "end": 131 - } + "range": [ + 119, + 131 + ] }, "loc": null, - "range": { - "start": 112, - "end": 132 - } + "range": [ + 112, + 132 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 134 - } + "range": [ + 108, + 134 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 85, - "end": 134 - }, + "range": [ + 85, + 134 + ], "loc": null, - "range": { - "start": 85, - "end": 134 - } + "range": [ + 85, + 134 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 40, - "end": 134 - } + "range": [ + 40, + 134 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.hoisted-function-declaration.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.hoisted-function-declaration.js.snap index 13c6290c21..fd96901eb4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.hoisted-function-declaration.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.hoisted-function-declaration.js.snap @@ -25,10 +25,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -71,50 +71,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "ExpressionStatement", @@ -125,10 +125,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "arguments": [ { @@ -136,24 +136,24 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 47 - } + "range": [ + 43, + 47 + ] }, "directive": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, { "type": "FunctionDeclaration", @@ -162,10 +162,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "params": [ { @@ -173,10 +173,10 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] } ], "body": { @@ -193,61 +193,61 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 87, - "end": 92 - } + "range": [ + 87, + 92 + ] }, "arguments": [], "loc": null, - "range": { - "start": 87, - "end": 94 - } + "range": [ + 87, + 94 + ] }, "directive": null, "loc": null, - "range": { - "start": 87, - "end": 95 - } + "range": [ + 87, + 95 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 99 - } + "range": [ + 81, + 99 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 67, - "end": 99 - }, + "range": [ + 67, + 99 + ], "loc": null, - "range": { - "start": 67, - "end": 99 - } + "range": [ + 67, + 99 + ] }, { "type": "ReturnStatement", @@ -256,42 +256,42 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "loc": null, - "range": { - "start": 102, - "end": 111 - } + "range": [ + 102, + 111 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 113 - } + "range": [ + 22, + 113 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 113 - }, + "range": [ + 0, + 113 + ], "loc": null, - "range": { - "start": 0, - "end": 113 - } + "range": [ + 0, + 113 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 113 - } + "range": [ + 0, + 113 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.hooks-with-React-namespace.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.hooks-with-React-namespace.js.snap index b8d6e37051..307ccc3b7b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.hooks-with-React-namespace.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.hooks-with-React-namespace.js.snap @@ -21,10 +21,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -44,27 +44,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 33 - } + "range": [ + 29, + 33 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 34 - } + "range": [ + 25, + 34 + ] }, "init": { "type": "CallExpression", @@ -75,57 +75,57 @@ Output: "name": "React", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "property": { "type": "Identifier", "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 51 - } + "range": [ + 43, + 51 + ] }, "computed": false, "loc": null, - "range": { - "start": 37, - "end": 51 - } + "range": [ + 37, + 51 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 54 - } + "range": [ + 37, + 54 + ] }, "loc": null, - "range": { - "start": 25, - "end": 54 - } + "range": [ + 25, + 54 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 55 - } + "range": [ + 19, + 55 + ] }, { "type": "ReturnStatement", @@ -134,42 +134,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "loc": null, - "range": { - "start": 58, - "end": 67 - } + "range": [ + 58, + 67 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 69 - } + "range": [ + 15, + 69 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 69 - }, + "range": [ + 0, + 69 + ], "loc": null, - "range": { - "start": 0, - "end": 69 - } + "range": [ + 0, + 69 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 69 - } + "range": [ + 0, + 69 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-access-ref-during-render.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-access-ref-during-render.js.snap index 2d3f5849ff..f494b07a96 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-access-ref-during-render.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-access-ref-during-render.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 28 - } + "range": [ + 19, + 28 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 34 - } + "range": [ + 29, + 34 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 49 - } + "range": [ + 46, + 49 + ] }, "init": { "type": "CallExpression", @@ -66,39 +66,39 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 58 - } + "range": [ + 52, + 58 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 59, - "end": 63 - } + "range": [ + 59, + 63 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 64 - } + "range": [ + 52, + 64 + ] }, "loc": null, - "range": { - "start": 46, - "end": 64 - } + "range": [ + 46, + 64 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 65 - } + "range": [ + 40, + 65 + ] }, { "type": "VariableDeclaration", @@ -111,10 +111,10 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "init": { "type": "MemberExpression", @@ -123,40 +123,40 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 93 - } + "range": [ + 86, + 93 + ] }, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 93 - } + "range": [ + 82, + 93 + ] }, "loc": null, - "range": { - "start": 74, - "end": 93 - } + "range": [ + 74, + 93 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 94 - } + "range": [ + 68, + 94 + ] }, { "type": "ReturnStatement", @@ -165,42 +165,42 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 109 - } + "range": [ + 104, + 109 + ] }, "loc": null, - "range": { - "start": 97, - "end": 110 - } + "range": [ + 97, + 110 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 112 - } + "range": [ + 36, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 10, - "end": 112 - }, + "range": [ + 10, + 112 + ], "loc": null, - "range": { - "start": 10, - "end": 112 - } + "range": [ + 10, + 112 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 10, - "end": 112 - } + "range": [ + 10, + 112 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-array-push-frozen.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-array-push-frozen.js.snap index 082ac0c171..d32fda9a35 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-array-push-frozen.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-array-push-frozen.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,32 +54,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "ExpressionStatement", @@ -91,18 +91,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 47, - "end": 50 - } + "range": [ + 47, + 50 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 46, - "end": 51 - } + "range": [ + 46, + 51 + ] }, "children": [ { @@ -112,16 +112,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] } ], "closingElement": { @@ -130,29 +130,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "loc": null, - "range": { - "start": 54, - "end": 60 - } + "range": [ + 54, + 60 + ] }, "loc": null, - "range": { - "start": 46, - "end": 60 - } + "range": [ + 46, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 46, - "end": 61 - } + "range": [ + 46, + 61 + ] }, { "type": "ExpressionStatement", @@ -165,27 +165,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 70 - } + "range": [ + 66, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 64, - "end": 70 - } + "range": [ + 64, + 70 + ] }, "arguments": [ { @@ -195,41 +195,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 76 - } + "range": [ + 71, + 76 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 82 - } + "range": [ + 77, + 82 + ] }, "computed": false, "loc": null, - "range": { - "start": 71, - "end": 82 - } + "range": [ + 71, + 82 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 83 - } + "range": [ + 64, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 64, - "end": 84 - } + "range": [ + 64, + 84 + ] }, { "type": "ReturnStatement", @@ -238,42 +238,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 98 - } + "range": [ + 26, + 98 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 98 - }, + "range": [ + 0, + 98 + ], "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-assign-hook-to-local.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-assign-hook-to-local.js.snap index fef2ea0158..83e928ca16 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-assign-hook-to-local.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-assign-hook-to-local.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,33 +53,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "Identifier", "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 48 - } + "range": [ + 40, + 48 + ] }, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 49 - } + "range": [ + 30, + 49 + ] }, { "type": "VariableDeclaration", @@ -92,10 +92,10 @@ Output: "name": "state", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 63 - } + "range": [ + 58, + 63 + ] }, "init": { "type": "CallExpression", @@ -104,39 +104,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 68, - "end": 72 - } + "range": [ + 68, + 72 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] }, "loc": null, - "range": { - "start": 58, - "end": 73 - } + "range": [ + 58, + 73 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 74 - } + "range": [ + 52, + 74 + ] }, { "type": "ReturnStatement", @@ -147,58 +147,58 @@ Output: "name": "state", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 89 - } + "range": [ + 84, + 89 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "computed": true, "loc": null, - "range": { - "start": 84, - "end": 92 - } + "range": [ + 84, + 92 + ] }, "loc": null, - "range": { - "start": 77, - "end": 93 - } + "range": [ + 77, + 93 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 95 - } + "range": [ + 26, + 95 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 95 - }, + "range": [ + 0, + 95 + ], "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-capture-func-passed-to-jsx.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-capture-func-passed-to-jsx.js.snap index 2381caffb5..919e89952a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-capture-func-passed-to-jsx.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-capture-func-passed-to-jsx.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -69,10 +69,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -84,50 +84,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 43 - } + "range": [ + 29, + 43 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "init": { "type": "ObjectExpression", @@ -155,50 +155,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "loc": null, - "range": { - "start": 50, - "end": 59 - } + "range": [ + 50, + 59 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 60 - } + "range": [ + 46, + 60 + ] }, { "type": "VariableDeclaration", @@ -211,10 +211,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "init": { "type": "FunctionExpression", @@ -235,49 +235,49 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "loc": null, - "range": { - "start": 89, - "end": 96 - } + "range": [ + 89, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 89, - "end": 97 - } + "range": [ + 89, + 97 + ] }, { "type": "ExpressionStatement", @@ -288,67 +288,67 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "computed": false, "loc": null, - "range": { - "start": 102, - "end": 105 - } + "range": [ + 102, + 105 + ] }, "directive": null, "loc": null, - "range": { - "start": 102, - "end": 106 - } + "range": [ + 102, + 106 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 110 - } + "range": [ + 83, + 110 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 71, - "end": 110 - }, + "range": [ + 71, + 110 + ], "loc": null, - "range": { - "start": 71, - "end": 110 - } + "range": [ + 71, + 110 + ] }, "loc": null, - "range": { - "start": 67, - "end": 110 - } + "range": [ + 67, + 110 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 111 - } + "range": [ + 63, + 111 + ] }, { "type": "VariableDeclaration", @@ -361,10 +361,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "init": { "type": "JSXElement", @@ -374,10 +374,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 123, - "end": 126 - } + "range": [ + 123, + 126 + ] }, "attributes": [ { @@ -386,10 +386,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "value": { "type": "JSXExpressionContainer", @@ -398,30 +398,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "loc": null, - "range": { - "start": 129, - "end": 132 - } + "range": [ + 129, + 132 + ] }, "loc": null, - "range": { - "start": 127, - "end": 132 - } + "range": [ + 127, + 132 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 122, - "end": 133 - } + "range": [ + 122, + 133 + ] }, "children": [], "closingElement": { @@ -430,35 +430,35 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 135, - "end": 138 - } + "range": [ + 135, + 138 + ] }, "loc": null, - "range": { - "start": 133, - "end": 139 - } + "range": [ + 133, + 139 + ] }, "loc": null, - "range": { - "start": 122, - "end": 139 - } + "range": [ + 122, + 139 + ] }, "loc": null, - "range": { - "start": 118, - "end": 139 - } + "range": [ + 118, + 139 + ] } ], "loc": null, - "range": { - "start": 114, - "end": 140 - } + "range": [ + 114, + 140 + ] }, { "type": "ExpressionStatement", @@ -469,10 +469,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 149 - } + "range": [ + 143, + 149 + ] }, "arguments": [ { @@ -480,24 +480,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 152 - } + "range": [ + 143, + 152 + ] }, "directive": null, "loc": null, - "range": { - "start": 143, - "end": 153 - } + "range": [ + 143, + 153 + ] }, { "type": "ReturnStatement", @@ -506,42 +506,42 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 191 - } + "range": [ + 190, + 191 + ] }, "loc": null, - "range": { - "start": 183, - "end": 192 - } + "range": [ + 183, + 192 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 194 - } + "range": [ + 25, + 194 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 194 - }, + "range": [ + 0, + 194 + ], "loc": null, - "range": { - "start": 0, - "end": 194 - } + "range": [ + 0, + 194 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 194 - } + "range": [ + 0, + 194 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-computed-store-to-frozen-value.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-computed-store-to-frozen-value.js.snap index 1c94189f4c..cf78a6fb32 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-computed-store-to-frozen-value.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-computed-store-to-frozen-value.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -67,30 +67,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "ExpressionStatement", @@ -102,18 +102,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] }, "children": [ { @@ -123,16 +123,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 73, - "end": 76 - } + "range": [ + 73, + 76 + ] } ], "closingElement": { @@ -141,29 +141,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "loc": null, - "range": { - "start": 68, - "end": 82 - } + "range": [ + 68, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 83 - } + "range": [ + 68, + 83 + ] }, { "type": "ExpressionStatement", @@ -177,48 +177,48 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "computed": true, "loc": null, - "range": { - "start": 86, - "end": 90 - } + "range": [ + 86, + 90 + ] }, "right": { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 93, - "end": 97 - } + "range": [ + 93, + 97 + ] }, "loc": null, - "range": { - "start": 86, - "end": 97 - } + "range": [ + 86, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 86, - "end": 98 - } + "range": [ + 86, + 98 + ] }, { "type": "ReturnStatement", @@ -227,42 +227,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 112 - } + "range": [ + 26, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 112 - }, + "range": [ + 0, + 112 + ], "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-delete-computed-property-of-frozen-value.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-delete-computed-property-of-frozen-value.js.snap index 08dfd3b1a2..164a52ac4a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-delete-computed-property-of-frozen-value.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-delete-computed-property-of-frozen-value.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -67,30 +67,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "ExpressionStatement", @@ -102,18 +102,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] }, "children": [ { @@ -123,16 +123,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 73, - "end": 76 - } + "range": [ + 73, + 76 + ] } ], "closingElement": { @@ -141,29 +141,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "loc": null, - "range": { - "start": 68, - "end": 82 - } + "range": [ + 68, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 83 - } + "range": [ + 68, + 83 + ] }, { "type": "ExpressionStatement", @@ -178,40 +178,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "computed": true, "loc": null, - "range": { - "start": 93, - "end": 97 - } + "range": [ + 93, + 97 + ] }, "loc": null, - "range": { - "start": 86, - "end": 97 - } + "range": [ + 86, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 86, - "end": 98 - } + "range": [ + 86, + 98 + ] }, { "type": "ReturnStatement", @@ -220,42 +220,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 112 - } + "range": [ + 26, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 112 - }, + "range": [ + 0, + 112 + ], "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-delete-property-of-frozen-value.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-delete-property-of-frozen-value.js.snap index f028b1eb9c..57fa11645f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-delete-property-of-frozen-value.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-delete-property-of-frozen-value.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -67,30 +67,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "ExpressionStatement", @@ -102,18 +102,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] }, "children": [ { @@ -123,16 +123,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 73, - "end": 76 - } + "range": [ + 73, + 76 + ] } ], "closingElement": { @@ -141,29 +141,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "loc": null, - "range": { - "start": 68, - "end": 82 - } + "range": [ + 68, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 83 - } + "range": [ + 68, + 83 + ] }, { "type": "ExpressionStatement", @@ -178,40 +178,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "computed": false, "loc": null, - "range": { - "start": 93, - "end": 96 - } + "range": [ + 93, + 96 + ] }, "loc": null, - "range": { - "start": 86, - "end": 96 - } + "range": [ + 86, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 86, - "end": 97 - } + "range": [ + 86, + 97 + ] }, { "type": "ReturnStatement", @@ -220,42 +220,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "loc": null, - "range": { - "start": 100, - "end": 109 - } + "range": [ + 100, + 109 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 111 - } + "range": [ + 26, + 111 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 111 - }, + "range": [ + 0, + 111 + ], "loc": null, - "range": { - "start": 0, - "end": 111 - } + "range": [ + 0, + 111 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 111 - } + "range": [ + 0, + 111 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-destructure-assignment-to-global.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-destructure-assignment-to-global.js.snap index 68444b4226..cd22db5721 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-destructure-assignment-to-global.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-destructure-assignment-to-global.js.snap @@ -21,10 +21,10 @@ Output: "name": "useFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 15 - } + "range": [ + 9, + 15 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 21 - } + "range": [ + 16, + 21 + ] } ], "body": { @@ -54,40 +54,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] } ], "loc": null, - "range": { - "start": 27, - "end": 30 - } + "range": [ + 27, + 30 + ] }, "right": { "type": "Identifier", "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 38 - } + "range": [ + 33, + 38 + ] }, "loc": null, - "range": { - "start": 27, - "end": 38 - } + "range": [ + 27, + 38 + ] }, "directive": null, "loc": null, - "range": { - "start": 27, - "end": 39 - } + "range": [ + 27, + 39 + ] }, { "type": "ReturnStatement", @@ -101,69 +101,69 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 54 - } + "range": [ + 49, + 54 + ] }, "loc": null, - "range": { - "start": 42, - "end": 55 - } + "range": [ + 42, + 55 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 57 - } + "range": [ + 23, + 57 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 57 - }, + "range": [ + 0, + 57 + ], "loc": null, - "range": { - "start": 0, - "end": 57 - } + "range": [ + 0, + 57 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 57 - } + "range": [ + 0, + 57 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-destructure-to-local-global-variables.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-destructure-to-local-global-variables.js.snap index 6074a81c75..e77050d7fd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-destructure-to-local-global-variables.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-destructure-to-local-global-variables.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,24 +54,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 36 - } + "range": [ + 30, + 36 + ] }, { "type": "ExpressionStatement", @@ -86,27 +86,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] }, "right": { "type": "MemberExpression", @@ -115,40 +115,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 53 - } + "range": [ + 48, + 53 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 48, - "end": 59 - } + "range": [ + 48, + 59 + ] }, "loc": null, - "range": { - "start": 39, - "end": 59 - } + "range": [ + 39, + 59 + ] }, "directive": null, "loc": null, - "range": { - "start": 39, - "end": 60 - } + "range": [ + 39, + 60 + ] }, { "type": "ReturnStatement", @@ -160,59 +160,59 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 77 - } + "range": [ + 71, + 77 + ] }, "loc": null, - "range": { - "start": 64, - "end": 78 - } + "range": [ + 64, + 78 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 80 - } + "range": [ + 26, + 80 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 80 - }, + "range": [ + 0, + 80 + ], "loc": null, - "range": { - "start": 0, - "end": 80 - } + "range": [ + 0, + 80 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 80 - } + "range": [ + 0, + 80 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-conditionally-mutable-lambda.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-conditionally-mutable-lambda.js.snap index db2af28e0d..4d0520715a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-conditionally-mutable-lambda.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-conditionally-mutable-lambda.js.snap @@ -33,10 +33,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -44,10 +44,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -64,32 +64,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "VariableDeclaration", @@ -102,24 +102,24 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 52 - } + "range": [ + 50, + 52 + ] }, "init": null, "loc": null, - "range": { - "start": 50, - "end": 52 - } + "range": [ + 50, + 52 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 53 - } + "range": [ + 46, + 53 + ] }, { "type": "IfStatement", @@ -130,27 +130,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 70 - } + "range": [ + 66, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 60, - "end": 70 - } + "range": [ + 60, + 70 + ] }, "consequent": { "type": "BlockStatement", @@ -165,10 +165,10 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 95 - } + "range": [ + 93, + 95 + ] }, "right": { "type": "ArrowFunctionExpression", @@ -189,27 +189,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 119 - } + "range": [ + 114, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 112, - "end": 119 - } + "range": [ + 112, + 119 + ] }, "right": { "type": "MemberExpression", @@ -218,81 +218,81 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 127 - } + "range": [ + 122, + 127 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 133 - } + "range": [ + 128, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 122, - "end": 133 - } + "range": [ + 122, + 133 + ] }, "loc": null, - "range": { - "start": 112, - "end": 133 - } + "range": [ + 112, + 133 + ] }, "directive": null, "loc": null, - "range": { - "start": 112, - "end": 134 - } + "range": [ + 112, + 134 + ] } ], "loc": null, - "range": { - "start": 104, - "end": 140 - } + "range": [ + 104, + 140 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 98, - "end": 140 - }, + "range": [ + 98, + 140 + ], "expression": false, "loc": null, - "range": { - "start": 98, - "end": 140 - } + "range": [ + 98, + 140 + ] }, "loc": null, - "range": { - "start": 93, - "end": 140 - } + "range": [ + 93, + 140 + ] }, "directive": null, "loc": null, - "range": { - "start": 93, - "end": 141 - } + "range": [ + 93, + 141 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 145 - } + "range": [ + 72, + 145 + ] }, "alternate": { "type": "BlockStatement", @@ -307,10 +307,10 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 176 - } + "range": [ + 174, + 176 + ] }, "right": { "type": "ArrowFunctionExpression", @@ -328,81 +328,81 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 193, - "end": 194 - } + "range": [ + 193, + 194 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 200 - } + "range": [ + 195, + 200 + ] }, "computed": false, "loc": null, - "range": { - "start": 193, - "end": 200 - } + "range": [ + 193, + 200 + ] }, "directive": null, "loc": null, - "range": { - "start": 193, - "end": 201 - } + "range": [ + 193, + 201 + ] } ], "loc": null, - "range": { - "start": 185, - "end": 207 - } + "range": [ + 185, + 207 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 179, - "end": 207 - }, + "range": [ + 179, + 207 + ], "expression": false, "loc": null, - "range": { - "start": 179, - "end": 207 - } + "range": [ + 179, + 207 + ] }, "loc": null, - "range": { - "start": 174, - "end": 207 - } + "range": [ + 174, + 207 + ] }, "directive": null, "loc": null, - "range": { - "start": 174, - "end": 208 - } + "range": [ + 174, + 208 + ] } ], "loc": null, - "range": { - "start": 151, - "end": 212 - } + "range": [ + 151, + 212 + ] }, "loc": null, - "range": { - "start": 56, - "end": 212 - } + "range": [ + 56, + 212 + ] }, { "type": "ReturnStatement", @@ -411,42 +411,42 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 222, - "end": 224 - } + "range": [ + 222, + 224 + ] }, "loc": null, - "range": { - "start": 215, - "end": 225 - } + "range": [ + 215, + 225 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 227 - } + "range": [ + 26, + 227 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 227 - }, + "range": [ + 0, + 227 + ], "loc": null, - "range": { - "start": 0, - "end": 227 - } + "range": [ + 0, + 227 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 227 - } + "range": [ + 0, + 227 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-mutable-lambda-mutate-local.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-mutable-lambda-mutate-local.js.snap index 7dd46d8cb3..04c47f78ec 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-mutable-lambda-mutate-local.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-mutable-lambda-mutate-local.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "VariableDeclaration", @@ -95,10 +95,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 60 - } + "range": [ + 52, + 60 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -109,10 +109,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] } ], "body": { @@ -130,27 +130,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 147 - } + "range": [ + 142, + 147 + ] }, "computed": false, "loc": null, - "range": { - "start": 140, - "end": 147 - } + "range": [ + 140, + 147 + ] }, "right": { "type": "MemberExpression", @@ -161,57 +161,57 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 158 - } + "range": [ + 152, + 158 + ] }, "computed": false, "loc": null, - "range": { - "start": 150, - "end": 158 - } + "range": [ + 150, + 158 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 164 - } + "range": [ + 159, + 164 + ] }, "computed": false, "loc": null, - "range": { - "start": 150, - "end": 164 - } + "range": [ + 150, + 164 + ] }, "loc": null, - "range": { - "start": 140, - "end": 164 - } + "range": [ + 140, + 164 + ] }, "directive": null, "loc": null, - "range": { - "start": 140, - "end": 165 - } + "range": [ + 140, + 165 + ] }, { "type": "ExpressionStatement", @@ -222,10 +222,10 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 174 - } + "range": [ + 170, + 174 + ] }, "arguments": [ { @@ -233,58 +233,58 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 176 - } + "range": [ + 175, + 176 + ] } ], "loc": null, - "range": { - "start": 170, - "end": 177 - } + "range": [ + 170, + 177 + ] }, "directive": null, "loc": null, - "range": { - "start": 170, - "end": 178 - } + "range": [ + 170, + 178 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 182 - } + "range": [ + 70, + 182 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 63, - "end": 182 - }, + "range": [ + 63, + 182 + ], "expression": false, "loc": null, - "range": { - "start": 63, - "end": 182 - } + "range": [ + 63, + 182 + ] }, "loc": null, - "range": { - "start": 52, - "end": 182 - } + "range": [ + 52, + 182 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 183 - } + "range": [ + 46, + 183 + ] }, { "type": "ReturnStatement", @@ -296,10 +296,10 @@ Output: "type": "JSXIdentifier", "name": "input", "loc": null, - "range": { - "start": 194, - "end": 199 - } + "range": [ + 194, + 199 + ] }, "attributes": [ { @@ -308,10 +308,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 200, - "end": 205 - } + "range": [ + 200, + 205 + ] }, "value": { "type": "JSXExpressionContainer", @@ -322,39 +322,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 208 - } + "range": [ + 207, + 208 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 214 - } + "range": [ + 209, + 214 + ] }, "computed": false, "loc": null, - "range": { - "start": 207, - "end": 214 - } + "range": [ + 207, + 214 + ] }, "loc": null, - "range": { - "start": 206, - "end": 215 - } + "range": [ + 206, + 215 + ] }, "loc": null, - "range": { - "start": 200, - "end": 215 - } + "range": [ + 200, + 215 + ] }, { "type": "JSXAttribute", @@ -362,10 +362,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 216, - "end": 224 - } + "range": [ + 216, + 224 + ] }, "value": { "type": "JSXExpressionContainer", @@ -374,70 +374,70 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 226, - "end": 234 - } + "range": [ + 226, + 234 + ] }, "loc": null, - "range": { - "start": 225, - "end": 235 - } + "range": [ + 225, + 235 + ] }, "loc": null, - "range": { - "start": 216, - "end": 235 - } + "range": [ + 216, + 235 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 193, - "end": 238 - } + "range": [ + 193, + 238 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 193, - "end": 238 - } + "range": [ + 193, + 238 + ] }, "loc": null, - "range": { - "start": 186, - "end": 239 - } + "range": [ + 186, + 239 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 241 - } + "range": [ + 26, + 241 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 241 - }, + "range": [ + 0, + 241 + ], "loc": null, - "range": { - "start": 0, - "end": 241 - } + "range": [ + 0, + 241 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 241 - } + "range": [ + 0, + 241 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-mutable-lambda-reassign-local.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-mutable-lambda-reassign-local.js.snap index a1b78b4635..97f68c0db0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-mutable-lambda-reassign-local.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-freeze-mutable-lambda-reassign-local.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "StringLiteral", "value": "", "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -93,10 +93,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 58 - } + "range": [ + 50, + 58 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -107,10 +107,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] } ], "body": { @@ -126,10 +126,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "right": { "type": "MemberExpression", @@ -140,91 +140,91 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 86 - } + "range": [ + 80, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 86 - } + "range": [ + 78, + 86 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 92 - } + "range": [ + 87, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 92 - } + "range": [ + 78, + 92 + ] }, "loc": null, - "range": { - "start": 74, - "end": 92 - } + "range": [ + 74, + 92 + ] }, "directive": null, "loc": null, - "range": { - "start": 74, - "end": 93 - } + "range": [ + 74, + 93 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 97 - } + "range": [ + 68, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 61, - "end": 97 - }, + "range": [ + 61, + 97 + ], "expression": false, "loc": null, - "range": { - "start": 61, - "end": 97 - } + "range": [ + 61, + 97 + ] }, "loc": null, - "range": { - "start": 50, - "end": 97 - } + "range": [ + 50, + 97 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 98 - } + "range": [ + 44, + 98 + ] }, { "type": "ReturnStatement", @@ -236,10 +236,10 @@ Output: "type": "JSXIdentifier", "name": "input", "loc": null, - "range": { - "start": 109, - "end": 114 - } + "range": [ + 109, + 114 + ] }, "attributes": [ { @@ -248,10 +248,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "value": { "type": "JSXExpressionContainer", @@ -260,22 +260,22 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] }, "loc": null, - "range": { - "start": 115, - "end": 124 - } + "range": [ + 115, + 124 + ] }, { "type": "JSXAttribute", @@ -283,10 +283,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 125, - "end": 133 - } + "range": [ + 125, + 133 + ] }, "value": { "type": "JSXExpressionContainer", @@ -295,70 +295,70 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 143 - } + "range": [ + 135, + 143 + ] }, "loc": null, - "range": { - "start": 134, - "end": 144 - } + "range": [ + 134, + 144 + ] }, "loc": null, - "range": { - "start": 125, - "end": 144 - } + "range": [ + 125, + 144 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 108, - "end": 147 - } + "range": [ + 108, + 147 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 108, - "end": 147 - } + "range": [ + 108, + 147 + ] }, "loc": null, - "range": { - "start": 101, - "end": 148 - } + "range": [ + 101, + 148 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 150 - } + "range": [ + 26, + 150 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 150 - }, + "range": [ + 0, + 150 + ], "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-function-expression-mutates-immutable-value.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-function-expression-mutates-immutable-value.js.snap index 01f3333678..1501e6301f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-function-expression-mutates-immutable-value.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-function-expression-mutates-immutable-value.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,27 +60,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 45 - } + "range": [ + 36, + 45 + ] }, "init": { "type": "CallExpression", @@ -89,10 +89,10 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 56 - } + "range": [ + 48, + 56 + ] }, "arguments": [ { @@ -105,56 +105,56 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "value": { "type": "StringLiteral", "value": "", "loc": null, - "range": { - "start": 66, - "end": 68 - } + "range": [ + 66, + 68 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 68 - } + "range": [ + 59, + 68 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 70 - } + "range": [ + 57, + 70 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 71 - } + "range": [ + 48, + 71 + ] }, "loc": null, - "range": { - "start": 36, - "end": 71 - } + "range": [ + 36, + 71 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 72 - } + "range": [ + 30, + 72 + ] }, { "type": "VariableDeclaration", @@ -167,10 +167,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 89 - } + "range": [ + 81, + 89 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -181,10 +181,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] } ], "body": { @@ -202,27 +202,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 170 - } + "range": [ + 169, + 170 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 176 - } + "range": [ + 171, + 176 + ] }, "computed": false, "loc": null, - "range": { - "start": 169, - "end": 176 - } + "range": [ + 169, + 176 + ] }, "right": { "type": "MemberExpression", @@ -233,57 +233,57 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 179, - "end": 180 - } + "range": [ + 179, + 180 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 187 - } + "range": [ + 181, + 187 + ] }, "computed": false, "loc": null, - "range": { - "start": 179, - "end": 187 - } + "range": [ + 179, + 187 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 193 - } + "range": [ + 188, + 193 + ] }, "computed": false, "loc": null, - "range": { - "start": 179, - "end": 193 - } + "range": [ + 179, + 193 + ] }, "loc": null, - "range": { - "start": 169, - "end": 193 - } + "range": [ + 169, + 193 + ] }, "directive": null, "loc": null, - "range": { - "start": 169, - "end": 194 - } + "range": [ + 169, + 194 + ] }, { "type": "ExpressionStatement", @@ -294,10 +294,10 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 203 - } + "range": [ + 199, + 203 + ] }, "arguments": [ { @@ -305,58 +305,58 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 204, - "end": 205 - } + "range": [ + 204, + 205 + ] } ], "loc": null, - "range": { - "start": 199, - "end": 206 - } + "range": [ + 199, + 206 + ] }, "directive": null, "loc": null, - "range": { - "start": 199, - "end": 207 - } + "range": [ + 199, + 207 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 211 - } + "range": [ + 99, + 211 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 92, - "end": 211 - }, + "range": [ + 92, + 211 + ], "expression": false, "loc": null, - "range": { - "start": 92, - "end": 211 - } + "range": [ + 92, + 211 + ] }, "loc": null, - "range": { - "start": 81, - "end": 211 - } + "range": [ + 81, + 211 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 212 - } + "range": [ + 75, + 212 + ] }, { "type": "ReturnStatement", @@ -368,10 +368,10 @@ Output: "type": "JSXIdentifier", "name": "input", "loc": null, - "range": { - "start": 223, - "end": 228 - } + "range": [ + 223, + 228 + ] }, "attributes": [ { @@ -380,10 +380,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 229, - "end": 234 - } + "range": [ + 229, + 234 + ] }, "value": { "type": "JSXExpressionContainer", @@ -394,39 +394,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 236, - "end": 237 - } + "range": [ + 236, + 237 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 243 - } + "range": [ + 238, + 243 + ] }, "computed": false, "loc": null, - "range": { - "start": 236, - "end": 243 - } + "range": [ + 236, + 243 + ] }, "loc": null, - "range": { - "start": 235, - "end": 244 - } + "range": [ + 235, + 244 + ] }, "loc": null, - "range": { - "start": 229, - "end": 244 - } + "range": [ + 229, + 244 + ] }, { "type": "JSXAttribute", @@ -434,10 +434,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 245, - "end": 253 - } + "range": [ + 245, + 253 + ] }, "value": { "type": "JSXExpressionContainer", @@ -446,70 +446,70 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 263 - } + "range": [ + 255, + 263 + ] }, "loc": null, - "range": { - "start": 254, - "end": 264 - } + "range": [ + 254, + 264 + ] }, "loc": null, - "range": { - "start": 245, - "end": 264 - } + "range": [ + 245, + 264 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 222, - "end": 267 - } + "range": [ + 222, + 267 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 222, - "end": 267 - } + "range": [ + 222, + 267 + ] }, "loc": null, - "range": { - "start": 215, - "end": 268 - } + "range": [ + 215, + 268 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 270 - } + "range": [ + 26, + 270 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 270 - }, + "range": [ + 0, + 270 + ], "loc": null, - "range": { - "start": 0, - "end": 270 - } + "range": [ + 0, + 270 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 270 - } + "range": [ + 0, + 270 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-mutate-after-aliased-freeze.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-mutate-after-aliased-freeze.js.snap index 72ea3f7d54..3e72180034 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-mutate-after-aliased-freeze.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-mutate-after-aliased-freeze.js.snap @@ -33,10 +33,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -44,10 +44,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -64,32 +64,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -102,33 +102,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "loc": null, - "range": { - "start": 48, - "end": 53 - } + "range": [ + 48, + 53 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 54 - } + "range": [ + 44, + 54 + ] }, { "type": "IfStatement", @@ -139,27 +139,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "property": { "type": "Identifier", "name": "p1", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 70 - } + "range": [ + 68, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 70 - } + "range": [ + 62, + 70 + ] }, "consequent": { "type": "BlockStatement", @@ -174,46 +174,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 82, - "end": 84 - } + "range": [ + 82, + 84 + ] }, "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 85 - } + "range": [ + 78, + 85 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 89 - } + "range": [ + 72, + 89 + ] }, "alternate": null, "loc": null, - "range": { - "start": 58, - "end": 89 - } + "range": [ + 58, + 89 + ] }, { "type": "VariableDeclaration", @@ -226,10 +226,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "init": { "type": "JSXElement", @@ -239,10 +239,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 102, - "end": 111 - } + "range": [ + 102, + 111 + ] }, "attributes": [ { @@ -251,10 +251,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "value": { "type": "JSXExpressionContainer", @@ -263,51 +263,51 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "loc": null, - "range": { - "start": 114, - "end": 117 - } + "range": [ + 114, + 117 + ] }, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 101, - "end": 120 - } + "range": [ + 101, + 120 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 101, - "end": 120 - } + "range": [ + 101, + 120 + ] }, "loc": null, - "range": { - "start": 97, - "end": 120 - } + "range": [ + 97, + 120 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 121 - } + "range": [ + 93, + 121 + ] }, { "type": "ExpressionStatement", @@ -320,27 +320,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 225, - "end": 226 - } + "range": [ + 225, + 226 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 227, - "end": 231 - } + "range": [ + 227, + 231 + ] }, "computed": false, "loc": null, - "range": { - "start": 225, - "end": 231 - } + "range": [ + 225, + 231 + ] }, "arguments": [ { @@ -350,41 +350,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 232, - "end": 237 - } + "range": [ + 232, + 237 + ] }, "property": { "type": "Identifier", "name": "p2", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 240 - } + "range": [ + 238, + 240 + ] }, "computed": false, "loc": null, - "range": { - "start": 232, - "end": 240 - } + "range": [ + 232, + 240 + ] } ], "loc": null, - "range": { - "start": 225, - "end": 241 - } + "range": [ + 225, + 241 + ] }, "directive": null, "loc": null, - "range": { - "start": 225, - "end": 242 - } + "range": [ + 225, + 242 + ] }, { "type": "ReturnStatement", @@ -396,10 +396,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 254, - "end": 263 - } + "range": [ + 254, + 263 + ] }, "attributes": [ { @@ -408,10 +408,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 264, - "end": 265 - } + "range": [ + 264, + 265 + ] }, "value": { "type": "JSXExpressionContainer", @@ -420,22 +420,22 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 267, - "end": 268 - } + "range": [ + 267, + 268 + ] }, "loc": null, - "range": { - "start": 266, - "end": 269 - } + "range": [ + 266, + 269 + ] }, "loc": null, - "range": { - "start": 264, - "end": 269 - } + "range": [ + 264, + 269 + ] }, { "type": "JSXAttribute", @@ -443,10 +443,10 @@ Output: "type": "JSXIdentifier", "name": "y", "loc": null, - "range": { - "start": 270, - "end": 271 - } + "range": [ + 270, + 271 + ] }, "value": { "type": "JSXExpressionContainer", @@ -455,70 +455,70 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 273, - "end": 274 - } + "range": [ + 273, + 274 + ] }, "loc": null, - "range": { - "start": 272, - "end": 275 - } + "range": [ + 272, + 275 + ] }, "loc": null, - "range": { - "start": 270, - "end": 275 - } + "range": [ + 270, + 275 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 253, - "end": 278 - } + "range": [ + 253, + 278 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 253, - "end": 278 - } + "range": [ + 253, + 278 + ] }, "loc": null, - "range": { - "start": 246, - "end": 279 - } + "range": [ + 246, + 279 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 281 - } + "range": [ + 26, + 281 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 281 - }, + "range": [ + 0, + 281 + ], "loc": null, - "range": { - "start": 0, - "end": 281 - } + "range": [ + 0, + 281 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 281 - } + "range": [ + 0, + 281 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-mutate-after-freeze.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-mutate-after-freeze.js.snap index 69648ea86e..248cb0a805 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-mutate-after-freeze.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-mutate-after-freeze.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,32 +58,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -96,10 +96,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "init": { "type": "JSXElement", @@ -109,10 +109,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 54, - "end": 63 - } + "range": [ + 54, + 63 + ] }, "attributes": [ { @@ -121,10 +121,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "value": { "type": "JSXExpressionContainer", @@ -133,51 +133,51 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "loc": null, - "range": { - "start": 66, - "end": 69 - } + "range": [ + 66, + 69 + ] }, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 53, - "end": 72 - } + "range": [ + 53, + 72 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 53, - "end": 72 - } + "range": [ + 53, + 72 + ] }, "loc": null, - "range": { - "start": 49, - "end": 72 - } + "range": [ + 49, + 72 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 73 - } + "range": [ + 45, + 73 + ] }, { "type": "ExpressionStatement", @@ -190,27 +190,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 114 - } + "range": [ + 110, + 114 + ] }, "computed": false, "loc": null, - "range": { - "start": 108, - "end": 114 - } + "range": [ + 108, + 114 + ] }, "arguments": [ { @@ -220,41 +220,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "property": { "type": "Identifier", "name": "p2", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 123 - } + "range": [ + 121, + 123 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 123 - } + "range": [ + 115, + 123 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 124 - } + "range": [ + 108, + 124 + ] }, "directive": null, "loc": null, - "range": { - "start": 108, - "end": 125 - } + "range": [ + 108, + 125 + ] }, { "type": "ReturnStatement", @@ -266,18 +266,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 137, - "end": 140 - } + "range": [ + 137, + 140 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 136, - "end": 141 - } + "range": [ + 136, + 141 + ] }, "children": [ { @@ -287,16 +287,16 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "loc": null, - "range": { - "start": 141, - "end": 144 - } + "range": [ + 141, + 144 + ] } ], "closingElement": { @@ -305,54 +305,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 146, - "end": 149 - } + "range": [ + 146, + 149 + ] }, "loc": null, - "range": { - "start": 144, - "end": 150 - } + "range": [ + 144, + 150 + ] }, "loc": null, - "range": { - "start": 136, - "end": 150 - } + "range": [ + 136, + 150 + ] }, "loc": null, - "range": { - "start": 129, - "end": 151 - } + "range": [ + 129, + 151 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 153 - } + "range": [ + 26, + 153 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 153 - }, + "range": [ + 0, + 153 + ], "loc": null, - "range": { - "start": 0, - "end": 153 - } + "range": [ + 0, + 153 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 153 - } + "range": [ + 0, + 153 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-hook-as-call-arg.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-hook-as-call-arg.js.snap index ff36cc1d97..f73f698e1a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-hook-as-call-arg.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-hook-as-call-arg.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -31,10 +31,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -49,10 +49,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 40 - } + "range": [ + 37, + 40 + ] }, "arguments": [ { @@ -60,49 +60,49 @@ Output: "name": "useFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 47 - } + "range": [ + 41, + 47 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] }, "loc": null, - "range": { - "start": 30, - "end": 49 - } + "range": [ + 30, + 49 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 51 - } + "range": [ + 26, + 51 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 51 - }, + "range": [ + 0, + 51 + ], "loc": null, - "range": { - "start": 0, - "end": 51 - } + "range": [ + 0, + 51 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 51 - } + "range": [ + 0, + 51 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-hook-as-prop.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-hook-as-prop.js.snap index 273d994b5f..ef63bc03a2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-hook-as-prop.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-hook-as-prop.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -31,10 +31,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -50,10 +50,10 @@ Output: "type": "JSXIdentifier", "name": "Child", "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] }, "attributes": [ { @@ -62,10 +62,10 @@ Output: "type": "JSXIdentifier", "name": "foo", "loc": null, - "range": { - "start": 44, - "end": 47 - } + "range": [ + 44, + 47 + ] }, "value": { "type": "JSXExpressionContainer", @@ -74,70 +74,70 @@ Output: "name": "useFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 55 - } + "range": [ + 49, + 55 + ] }, "loc": null, - "range": { - "start": 48, - "end": 56 - } + "range": [ + 48, + 56 + ] }, "loc": null, - "range": { - "start": 44, - "end": 56 - } + "range": [ + 44, + 56 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 37, - "end": 59 - } + "range": [ + 37, + 59 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 37, - "end": 59 - } + "range": [ + 37, + 59 + ] }, "loc": null, - "range": { - "start": 30, - "end": 60 - } + "range": [ + 30, + 60 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 62 - } + "range": [ + 26, + 62 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 62 - }, + "range": [ + 0, + 62 + ], "loc": null, - "range": { - "start": 0, - "end": 62 - } + "range": [ + 0, + 62 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 62 - } + "range": [ + 0, + 62 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-ref-to-function.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-ref-to-function.js.snap index f2966e711c..0d7ff5d379 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-ref-to-function.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-pass-ref-to-function.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "init": { "type": "CallExpression", @@ -65,39 +65,39 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 48 - } + "range": [ + 42, + 48 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 54 - } + "range": [ + 42, + 54 + ] }, "loc": null, - "range": { - "start": 36, - "end": 54 - } + "range": [ + 36, + 54 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 55 - } + "range": [ + 30, + 55 + ] }, { "type": "VariableDeclaration", @@ -110,10 +110,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "init": { "type": "CallExpression", @@ -122,10 +122,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 71 - } + "range": [ + 68, + 71 + ] }, "arguments": [ { @@ -133,30 +133,30 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 75 - } + "range": [ + 72, + 75 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 76 - } + "range": [ + 68, + 76 + ] }, "loc": null, - "range": { - "start": 64, - "end": 76 - } + "range": [ + 64, + 76 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 77 - } + "range": [ + 58, + 77 + ] }, { "type": "ReturnStatement", @@ -167,59 +167,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 96 - } + "range": [ + 89, + 96 + ] }, "computed": false, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] }, "loc": null, - "range": { - "start": 80, - "end": 97 - } + "range": [ + 80, + 97 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 99 - } + "range": [ + 26, + 99 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 99 - }, + "range": [ + 0, + 99 + ], "loc": null, - "range": { - "start": 0, - "end": 99 - } + "range": [ + 0, + 99 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 99 - } + "range": [ + 0, + 99 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-property-store-to-frozen-value.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-property-store-to-frozen-value.js.snap index a580d49644..8b1acc970b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-property-store-to-frozen-value.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-property-store-to-frozen-value.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -67,30 +67,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "ExpressionStatement", @@ -102,18 +102,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] }, "children": [ { @@ -123,16 +123,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 73, - "end": 76 - } + "range": [ + 73, + 76 + ] } ], "closingElement": { @@ -141,29 +141,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "loc": null, - "range": { - "start": 68, - "end": 82 - } + "range": [ + 68, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 83 - } + "range": [ + 68, + 83 + ] }, { "type": "ExpressionStatement", @@ -177,49 +177,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "computed": false, "loc": null, - "range": { - "start": 86, - "end": 89 - } + "range": [ + 86, + 89 + ] }, "right": { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 92, - "end": 96 - } + "range": [ + 92, + 96 + ] }, "loc": null, - "range": { - "start": 86, - "end": 96 - } + "range": [ + 86, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 86, - "end": 97 - } + "range": [ + 86, + 97 + ] }, { "type": "ReturnStatement", @@ -228,42 +228,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "loc": null, - "range": { - "start": 100, - "end": 109 - } + "range": [ + 100, + 109 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 111 - } + "range": [ + 26, + 111 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 111 - }, + "range": [ + 0, + 111 + ], "loc": null, - "range": { - "start": 0, - "end": 111 - } + "range": [ + 0, + 111 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 111 - } + "range": [ + 0, + 111 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ref-in-callback-invoked-during-render.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ref-in-callback-invoked-during-render.js.snap index 0ac7e69f0f..4f2a330bf2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ref-in-callback-invoked-during-render.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ref-in-callback-invoked-during-render.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 28 - } + "range": [ + 19, + 28 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 34 - } + "range": [ + 29, + 34 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 49 - } + "range": [ + 46, + 49 + ] }, "init": { "type": "CallExpression", @@ -69,39 +69,39 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 58 - } + "range": [ + 52, + 58 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 59, - "end": 63 - } + "range": [ + 59, + 63 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 64 - } + "range": [ + 52, + 64 + ] }, "loc": null, - "range": { - "start": 46, - "end": 64 - } + "range": [ + 46, + 64 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 65 - } + "range": [ + 40, + 65 + ] }, { "type": "VariableDeclaration", @@ -114,10 +114,10 @@ Output: "name": "renderItem", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 84 - } + "range": [ + 74, + 84 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -128,10 +128,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 92 - } + "range": [ + 88, + 92 + ] } ], "body": { @@ -148,10 +148,10 @@ Output: "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 116 - } + "range": [ + 109, + 116 + ] }, "init": { "type": "MemberExpression", @@ -160,40 +160,40 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 122 - } + "range": [ + 119, + 122 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 130 - } + "range": [ + 123, + 130 + ] }, "computed": false, "loc": null, - "range": { - "start": 119, - "end": 130 - } + "range": [ + 119, + 130 + ] }, "loc": null, - "range": { - "start": 109, - "end": 130 - } + "range": [ + 109, + 130 + ] } ], "loc": null, - "range": { - "start": 103, - "end": 131 - } + "range": [ + 103, + 131 + ] }, { "type": "ReturnStatement", @@ -205,10 +205,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 144, - "end": 147 - } + "range": [ + 144, + 147 + ] }, "attributes": [ { @@ -217,10 +217,10 @@ Output: "type": "JSXIdentifier", "name": "item", "loc": null, - "range": { - "start": 148, - "end": 152 - } + "range": [ + 148, + 152 + ] }, "value": { "type": "JSXExpressionContainer", @@ -229,22 +229,22 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 158 - } + "range": [ + 154, + 158 + ] }, "loc": null, - "range": { - "start": 153, - "end": 159 - } + "range": [ + 153, + 159 + ] }, "loc": null, - "range": { - "start": 148, - "end": 159 - } + "range": [ + 148, + 159 + ] }, { "type": "JSXAttribute", @@ -252,10 +252,10 @@ Output: "type": "JSXIdentifier", "name": "current", "loc": null, - "range": { - "start": 160, - "end": 167 - } + "range": [ + 160, + 167 + ] }, "value": { "type": "JSXExpressionContainer", @@ -264,78 +264,78 @@ Output: "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 176 - } + "range": [ + 169, + 176 + ] }, "loc": null, - "range": { - "start": 168, - "end": 177 - } + "range": [ + 168, + 177 + ] }, "loc": null, - "range": { - "start": 160, - "end": 177 - } + "range": [ + 160, + 177 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 143, - "end": 180 - } + "range": [ + 143, + 180 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 143, - "end": 180 - } + "range": [ + 143, + 180 + ] }, "loc": null, - "range": { - "start": 136, - "end": 181 - } + "range": [ + 136, + 181 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 185 - } + "range": [ + 97, + 185 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 87, - "end": 185 - }, + "range": [ + 87, + 185 + ], "expression": false, "loc": null, - "range": { - "start": 87, - "end": 185 - } + "range": [ + 87, + 185 + ] }, "loc": null, - "range": { - "start": 74, - "end": 185 - } + "range": [ + 74, + 185 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 186 - } + "range": [ + 68, + 186 + ] }, { "type": "ReturnStatement", @@ -347,18 +347,18 @@ Output: "type": "JSXIdentifier", "name": "Items", "loc": null, - "range": { - "start": 197, - "end": 202 - } + "range": [ + 197, + 202 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 196, - "end": 203 - } + "range": [ + 196, + 203 + ] }, "children": [ { @@ -374,44 +374,44 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 204, - "end": 209 - } + "range": [ + 204, + 209 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 215 - } + "range": [ + 210, + 215 + ] }, "computed": false, "loc": null, - "range": { - "start": 204, - "end": 215 - } + "range": [ + 204, + 215 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 216, - "end": 219 - } + "range": [ + 216, + 219 + ] }, "computed": false, "loc": null, - "range": { - "start": 204, - "end": 219 - } + "range": [ + 204, + 219 + ] }, "arguments": [ { @@ -423,10 +423,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 221, - "end": 225 - } + "range": [ + 221, + 225 + ] } ], "body": { @@ -436,10 +436,10 @@ Output: "name": "renderItem", "typeAnnotation": null, "loc": null, - "range": { - "start": 230, - "end": 240 - } + "range": [ + 230, + 240 + ] }, "arguments": [ { @@ -447,44 +447,44 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 241, - "end": 245 - } + "range": [ + 241, + 245 + ] } ], "loc": null, - "range": { - "start": 230, - "end": 246 - } + "range": [ + 230, + 246 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 220, - "end": 246 - }, + "range": [ + 220, + 246 + ], "expression": true, "loc": null, - "range": { - "start": 220, - "end": 246 - } + "range": [ + 220, + 246 + ] } ], "loc": null, - "range": { - "start": 204, - "end": 247 - } + "range": [ + 204, + 247 + ] }, "loc": null, - "range": { - "start": 203, - "end": 248 - } + "range": [ + 203, + 248 + ] } ], "closingElement": { @@ -493,54 +493,54 @@ Output: "type": "JSXIdentifier", "name": "Items", "loc": null, - "range": { - "start": 250, - "end": 255 - } + "range": [ + 250, + 255 + ] }, "loc": null, - "range": { - "start": 248, - "end": 256 - } + "range": [ + 248, + 256 + ] }, "loc": null, - "range": { - "start": 196, - "end": 256 - } + "range": [ + 196, + 256 + ] }, "loc": null, - "range": { - "start": 189, - "end": 257 - } + "range": [ + 189, + 257 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 259 - } + "range": [ + 36, + 259 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 10, - "end": 259 - }, + "range": [ + 10, + 259 + ], "loc": null, - "range": { - "start": 10, - "end": 259 - } + "range": [ + 10, + 259 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 10, - "end": 259 - } + "range": [ + 10, + 259 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ref-value-as-props.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ref-value-as-props.js.snap index 7cefb28616..4e178cf2be 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ref-value-as-props.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ref-value-as-props.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "init": { "type": "CallExpression", @@ -64,39 +64,39 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 48 - } + "range": [ + 42, + 48 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 54 - } + "range": [ + 42, + 54 + ] }, "loc": null, - "range": { - "start": 36, - "end": 54 - } + "range": [ + 36, + 54 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 55 - } + "range": [ + 30, + 55 + ] }, { "type": "ReturnStatement", @@ -108,10 +108,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 66, - "end": 69 - } + "range": [ + 66, + 69 + ] }, "attributes": [ { @@ -120,10 +120,10 @@ Output: "type": "JSXIdentifier", "name": "ref", "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "value": { "type": "JSXExpressionContainer", @@ -134,87 +134,87 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 78 - } + "range": [ + 75, + 78 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 86 - } + "range": [ + 79, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 86 - } + "range": [ + 75, + 86 + ] }, "loc": null, - "range": { - "start": 74, - "end": 87 - } + "range": [ + 74, + 87 + ] }, "loc": null, - "range": { - "start": 70, - "end": 87 - } + "range": [ + 70, + 87 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 65, - "end": 90 - } + "range": [ + 65, + 90 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 65, - "end": 90 - } + "range": [ + 65, + 90 + ] }, "loc": null, - "range": { - "start": 58, - "end": 91 - } + "range": [ + 58, + 91 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 93 - } + "range": [ + 26, + 93 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 93 - }, + "range": [ + 0, + 93 + ], "loc": null, - "range": { - "start": 0, - "end": 93 - } + "range": [ + 0, + 93 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 93 - } + "range": [ + 0, + 93 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-set-and-read-ref-during-render.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-set-and-read-ref-during-render.js.snap index 742318dea3..2be798b58a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-set-and-read-ref-during-render.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-set-and-read-ref-during-render.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "init": { "type": "CallExpression", @@ -65,39 +65,39 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 48 - } + "range": [ + 42, + 48 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 54 - } + "range": [ + 42, + 54 + ] }, "loc": null, - "range": { - "start": 36, - "end": 54 - } + "range": [ + 36, + 54 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 55 - } + "range": [ + 30, + 55 + ] }, { "type": "ExpressionStatement", @@ -111,27 +111,27 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 61 - } + "range": [ + 58, + 61 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 69 - } + "range": [ + 62, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 69 - } + "range": [ + 58, + 69 + ] }, "right": { "type": "MemberExpression", @@ -140,40 +140,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 77 - } + "range": [ + 72, + 77 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, "computed": false, "loc": null, - "range": { - "start": 72, - "end": 83 - } + "range": [ + 72, + 83 + ] }, "loc": null, - "range": { - "start": 58, - "end": 83 - } + "range": [ + 58, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 58, - "end": 84 - } + "range": [ + 58, + 84 + ] }, { "type": "ReturnStatement", @@ -184,59 +184,59 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 97 - } + "range": [ + 94, + 97 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 105 - } + "range": [ + 98, + 105 + ] }, "computed": false, "loc": null, - "range": { - "start": 94, - "end": 105 - } + "range": [ + 94, + 105 + ] }, "loc": null, - "range": { - "start": 87, - "end": 106 - } + "range": [ + 87, + 106 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 108 - } + "range": [ + 26, + 108 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 108 - }, + "range": [ + 0, + 108 + ], "loc": null, - "range": { - "start": 0, - "end": 108 - } + "range": [ + 0, + 108 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 108 - } + "range": [ + 0, + 108 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-sketchy-code-use-forget.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-sketchy-code-use-forget.js.snap index 8037460a27..6b63ef4694 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-sketchy-code-use-forget.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-sketchy-code-use-forget.js.snap @@ -24,10 +24,10 @@ Output: "name": "lowercasecomponent", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 75 - } + "range": [ + 57, + 75 + ] }, "params": [], "body": { @@ -39,17 +39,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 82, - "end": 94 - } + "range": [ + 82, + 94 + ] }, "directive": null, "loc": null, - "range": { - "start": 82, - "end": 95 - } + "range": [ + 82, + 95 + ] }, { "type": "VariableDeclaration", @@ -62,32 +62,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 108, - "end": 110 - } + "range": [ + 108, + 110 + ] }, "loc": null, - "range": { - "start": 104, - "end": 110 - } + "range": [ + 104, + 110 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 111 - } + "range": [ + 98, + 111 + ] }, { "type": "ReturnStatement", @@ -99,18 +99,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 122, - "end": 125 - } + "range": [ + 122, + 125 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 121, - "end": 126 - } + "range": [ + 121, + 126 + ] }, "children": [ { @@ -120,16 +120,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "loc": null, - "range": { - "start": 126, - "end": 129 - } + "range": [ + 126, + 129 + ] } ], "closingElement": { @@ -138,54 +138,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 131, - "end": 134 - } + "range": [ + 131, + 134 + ] }, "loc": null, - "range": { - "start": 129, - "end": 135 - } + "range": [ + 129, + 135 + ] }, "loc": null, - "range": { - "start": 121, - "end": 135 - } + "range": [ + 121, + 135 + ] }, "loc": null, - "range": { - "start": 114, - "end": 136 - } + "range": [ + 114, + 136 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 138 - } + "range": [ + 78, + 138 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 138 - }, + "range": [ + 48, + 138 + ], "loc": null, - "range": { - "start": 48, - "end": 138 - } + "range": [ + 48, + 138 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 48, - "end": 138 - } + "range": [ + 48, + 138 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ternary-with-hook-values.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ternary-with-hook-values.js.snap index 9852208110..49469ae814 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ternary-with-hook-values.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-ternary-with-hook-values.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ConditionalExpression", @@ -66,66 +66,66 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 45 - } + "range": [ + 40, + 45 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 50 - } + "range": [ + 46, + 50 + ] }, "computed": false, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "alternate": { "type": "Identifier", "name": "useB", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 64 - } + "range": [ + 60, + 64 + ] }, "consequent": { "type": "Identifier", "name": "useA", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 57 - } + "range": [ + 53, + 57 + ] }, "loc": null, - "range": { - "start": 40, - "end": 64 - } + "range": [ + 40, + 64 + ] }, "loc": null, - "range": { - "start": 36, - "end": 64 - } + "range": [ + 36, + 64 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 65 - } + "range": [ + 30, + 65 + ] }, { "type": "ReturnStatement", @@ -136,49 +136,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "arguments": [], "loc": null, - "range": { - "start": 75, - "end": 78 - } + "range": [ + 75, + 78 + ] }, "loc": null, - "range": { - "start": 68, - "end": 79 - } + "range": [ + 68, + 79 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 81 - } + "range": [ + 26, + 81 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 81 - }, + "range": [ + 0, + 81 + ], "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-unconditional-set-state-in-render.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-unconditional-set-state-in-render.js.snap index 37f490cd28..84f383a0a1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-unconditional-set-state-in-render.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-unconditional-set-state-in-render.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,27 +60,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 45 - } + "range": [ + 36, + 45 + ] }, "init": { "type": "CallExpression", @@ -89,40 +89,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 56 - } + "range": [ + 48, + 56 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 59 - } + "range": [ + 48, + 59 + ] }, "loc": null, - "range": { - "start": 36, - "end": 59 - } + "range": [ + 36, + 59 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 60 - } + "range": [ + 30, + 60 + ] }, { "type": "VariableDeclaration", @@ -135,33 +135,33 @@ Output: "name": "aliased", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 76 - } + "range": [ + 69, + 76 + ] }, "init": { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 83 - } + "range": [ + 79, + 83 + ] }, "loc": null, - "range": { - "start": 69, - "end": 83 - } + "range": [ + 69, + 83 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 84 - } + "range": [ + 63, + 84 + ] }, { "type": "ExpressionStatement", @@ -172,34 +172,34 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 92 - } + "range": [ + 88, + 92 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 95 - } + "range": [ + 88, + 95 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 96 - } + "range": [ + 88, + 96 + ] }, { "type": "ExpressionStatement", @@ -210,34 +210,34 @@ Output: "name": "aliased", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 106 - } + "range": [ + 99, + 106 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 109 - } + "range": [ + 99, + 109 + ] }, "directive": null, "loc": null, - "range": { - "start": 99, - "end": 110 - } + "range": [ + 99, + 110 + ] }, { "type": "ReturnStatement", @@ -246,42 +246,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "loc": null, - "range": { - "start": 114, - "end": 123 - } + "range": [ + 114, + 123 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 125 - } + "range": [ + 26, + 125 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 125 - }, + "range": [ + 0, + 125 + ], "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-use-ref-added-to-dep-without-type-info.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-use-ref-added-to-dep-without-type-info.js.snap index 1a1c1aa497..7361f9a245 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-use-ref-added-to-dep-without-type-info.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-use-ref-added-to-dep-without-type-info.js.snap @@ -29,10 +29,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -45,37 +45,37 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 15, - "end": 16 - } + "range": [ + 15, + 16 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 15, - "end": 16 - } + "range": [ + 15, + 16 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 15, - "end": 16 - } + "range": [ + 15, + 16 + ] } ], "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -92,10 +92,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 33 - } + "range": [ + 30, + 33 + ] }, "init": { "type": "CallExpression", @@ -104,30 +104,30 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] }, "arguments": [], "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] }, "loc": null, - "range": { - "start": 30, - "end": 44 - } + "range": [ + 30, + 44 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 45 - } + "range": [ + 24, + 45 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "val", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 126 - } + "range": [ + 123, + 126 + ] }, "init": { "type": "ObjectExpression", @@ -155,50 +155,50 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 134 - } + "range": [ + 131, + 134 + ] }, "value": { "type": "Identifier", "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 134 - } + "range": [ + 131, + 134 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 131, - "end": 134 - } + "range": [ + 131, + 134 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 136 - } + "range": [ + 129, + 136 + ] }, "loc": null, - "range": { - "start": 123, - "end": 136 - } + "range": [ + 123, + 136 + ] } ], "loc": null, - "range": { - "start": 117, - "end": 137 - } + "range": [ + 117, + 137 + ] }, { "type": "VariableDeclaration", @@ -211,10 +211,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 410, - "end": 411 - } + "range": [ + 410, + 411 + ] }, "init": { "type": "ObjectExpression", @@ -226,30 +226,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 416, - "end": 417 - } + "range": [ + 416, + 417 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 416, - "end": 417 - } + "range": [ + 416, + 417 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 416, - "end": 417 - } + "range": [ + 416, + 417 + ] }, { "type": "Property", @@ -258,10 +258,10 @@ Output: "name": "val", "typeAnnotation": null, "loc": null, - "range": { - "start": 419, - "end": 422 - } + "range": [ + 419, + 422 + ] }, "value": { "type": "MemberExpression", @@ -272,74 +272,74 @@ Output: "name": "val", "typeAnnotation": null, "loc": null, - "range": { - "start": 424, - "end": 427 - } + "range": [ + 424, + 427 + ] }, "property": { "type": "Identifier", "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 428, - "end": 431 - } + "range": [ + 428, + 431 + ] }, "computed": false, "loc": null, - "range": { - "start": 424, - "end": 431 - } + "range": [ + 424, + 431 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 432, - "end": 439 - } + "range": [ + 432, + 439 + ] }, "computed": false, "loc": null, - "range": { - "start": 424, - "end": 439 - } + "range": [ + 424, + 439 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 419, - "end": 439 - } + "range": [ + 419, + 439 + ] } ], "loc": null, - "range": { - "start": 414, - "end": 441 - } + "range": [ + 414, + 441 + ] }, "loc": null, - "range": { - "start": 410, - "end": 441 - } + "range": [ + 410, + 441 + ] } ], "loc": null, - "range": { - "start": 404, - "end": 442 - } + "range": [ + 404, + 442 + ] }, { "type": "ReturnStatement", @@ -351,10 +351,10 @@ Output: "type": "JSXIdentifier", "name": "VideoList", "loc": null, - "range": { - "start": 454, - "end": 463 - } + "range": [ + 454, + 463 + ] }, "attributes": [ { @@ -363,10 +363,10 @@ Output: "type": "JSXIdentifier", "name": "videos", "loc": null, - "range": { - "start": 464, - "end": 470 - } + "range": [ + 464, + 470 + ] }, "value": { "type": "JSXExpressionContainer", @@ -375,70 +375,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 472, - "end": 473 - } + "range": [ + 472, + 473 + ] }, "loc": null, - "range": { - "start": 471, - "end": 474 - } + "range": [ + 471, + 474 + ] }, "loc": null, - "range": { - "start": 464, - "end": 474 - } + "range": [ + 464, + 474 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 453, - "end": 477 - } + "range": [ + 453, + 477 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 453, - "end": 477 - } + "range": [ + 453, + 477 + ] }, "loc": null, - "range": { - "start": 446, - "end": 478 - } + "range": [ + 446, + 478 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 480 - } + "range": [ + 20, + 480 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 480 - }, + "range": [ + 0, + 480 + ], "loc": null, - "range": { - "start": 0, - "end": 480 - } + "range": [ + 0, + 480 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 480 - } + "range": [ + 0, + 480 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-useMemo-async-callback.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-useMemo-async-callback.js.snap index 185c7fb807..b66cdffa61 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-useMemo-async-callback.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-useMemo-async-callback.js.snap @@ -23,10 +23,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,20 +34,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -64,10 +64,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "CallExpression", @@ -76,10 +76,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 44 - } + "range": [ + 37, + 44 + ] }, "arguments": [ { @@ -98,73 +98,73 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "loc": null, - "range": { - "start": 63, - "end": 70 - } + "range": [ + 63, + 70 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 71 - } + "range": [ + 63, + 71 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 75 - } + "range": [ + 57, + 75 + ] }, "generator": false, "async": true, "loc": null, - "range": { - "start": 45, - "end": 75 - }, + "range": [ + 45, + 75 + ], "expression": false, "loc": null, - "range": { - "start": 45, - "end": 75 - } + "range": [ + 45, + 75 + ] }, { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 77, - "end": 79 - } + "range": [ + 77, + 79 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 80 - } + "range": [ + 37, + 80 + ] }, "loc": null, - "range": { - "start": 33, - "end": 80 - } + "range": [ + 33, + 80 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 81 - } + "range": [ + 29, + 81 + ] }, { "type": "ReturnStatement", @@ -173,42 +173,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "loc": null, - "range": { - "start": 84, - "end": 93 - } + "range": [ + 84, + 93 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 95 - } + "range": [ + 25, + 95 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 95 - }, + "range": [ + 0, + 95 + ], "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-useMemo-callback-args.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-useMemo-callback-args.js.snap index 4044ffb702..28551f5b67 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-useMemo-callback-args.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.invalid-useMemo-callback-args.js.snap @@ -21,10 +21,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,20 +32,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -62,10 +62,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "CallExpression", @@ -74,10 +74,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 44 - } + "range": [ + 37, + 44 + ] }, "arguments": [ { @@ -89,10 +89,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] } ], "body": { @@ -100,53 +100,53 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 45, - "end": 53 - }, + "range": [ + 45, + 53 + ], "expression": true, "loc": null, - "range": { - "start": 45, - "end": 53 - } + "range": [ + 45, + 53 + ] }, { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 55, - "end": 57 - } + "range": [ + 55, + 57 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 58 - } + "range": [ + 37, + 58 + ] }, "loc": null, - "range": { - "start": 33, - "end": 58 - } + "range": [ + 33, + 58 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 59 - } + "range": [ + 29, + 59 + ] }, { "type": "ReturnStatement", @@ -155,42 +155,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "loc": null, - "range": { - "start": 62, - "end": 71 - } + "range": [ + 62, + 71 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 73 - } + "range": [ + 25, + 73 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 73 - }, + "range": [ + 0, + 73 + ], "loc": null, - "range": { - "start": 0, - "end": 73 - } + "range": [ + 0, + 73 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 73 - } + "range": [ + 0, + 73 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-captured-arg-separately.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-captured-arg-separately.js.snap index 09ceea372e..b72e8c316c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-captured-arg-separately.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-captured-arg-separately.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 78 - } + "range": [ + 69, + 78 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "init": { "type": "FunctionExpression", @@ -79,10 +79,10 @@ Output: "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "arguments": [ { @@ -90,57 +90,57 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 116 - } + "range": [ + 112, + 116 + ] }, "directive": null, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] } ], "loc": null, - "range": { - "start": 106, - "end": 121 - } + "range": [ + 106, + 121 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 94, - "end": 121 - }, + "range": [ + 94, + 121 + ], "loc": null, - "range": { - "start": 94, - "end": 121 - } + "range": [ + 94, + 121 + ] }, "loc": null, - "range": { - "start": 90, - "end": 121 - } + "range": [ + 90, + 121 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 122 - } + "range": [ + 86, + 122 + ] }, { "type": "VariableDeclaration", @@ -153,10 +153,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "init": { "type": "ObjectExpression", @@ -168,50 +168,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 137 - } + "range": [ + 136, + 137 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 137 - } + "range": [ + 136, + 137 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 136, - "end": 137 - } + "range": [ + 136, + 137 + ] } ], "loc": null, - "range": { - "start": 134, - "end": 139 - } + "range": [ + 134, + 139 + ] }, "loc": null, - "range": { - "start": 130, - "end": 139 - } + "range": [ + 130, + 139 + ] } ], "loc": null, - "range": { - "start": 126, - "end": 140 - } + "range": [ + 126, + 140 + ] }, { "type": "ExpressionStatement", @@ -222,10 +222,10 @@ Output: "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, "arguments": [ { @@ -233,24 +233,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 147 - } + "range": [ + 143, + 147 + ] }, "directive": null, "loc": null, - "range": { - "start": 143, - "end": 148 - } + "range": [ + 143, + 148 + ] }, { "type": "ReturnStatement", @@ -259,42 +259,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 159 - } + "range": [ + 158, + 159 + ] }, "loc": null, - "range": { - "start": 151, - "end": 160 - } + "range": [ + 151, + 160 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 162 - } + "range": [ + 82, + 162 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 60, - "end": 162 - }, + "range": [ + 60, + 162 + ], "loc": null, - "range": { - "start": 60, - "end": 162 - } + "range": [ + 60, + 162 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 60, - "end": 162 - } + "range": [ + 60, + 162 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-global-increment-op-invalid-react.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-global-increment-op-invalid-react.js.snap index e4e4484df9..84fdd0436a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-global-increment-op-invalid-react.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.mutate-global-increment-op-invalid-react.js.snap @@ -27,32 +27,32 @@ Output: "name": "renderCount", "typeAnnotation": null, "loc": null, - "range": { - "start": 4, - "end": 15 - } + "range": [ + 4, + 15 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 18, - "end": 19 - } + "range": [ + 18, + 19 + ] }, "loc": null, - "range": { - "start": 4, - "end": 19 - } + "range": [ + 4, + 19 + ] } ], "loc": null, - "range": { - "start": 0, - "end": 20 - } + "range": [ + 0, + 20 + ] }, { "type": "FunctionDeclaration", @@ -61,10 +61,10 @@ Output: "name": "NoHooks", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 38 - } + "range": [ + 31, + 38 + ] }, "params": [], "body": { @@ -80,24 +80,24 @@ Output: "name": "renderCount", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 56 - } + "range": [ + 45, + 56 + ] }, "prefix": false, "loc": null, - "range": { - "start": 45, - "end": 58 - } + "range": [ + 45, + 58 + ] }, "directive": null, "loc": null, - "range": { - "start": 45, - "end": 59 - } + "range": [ + 45, + 59 + ] }, { "type": "ReturnStatement", @@ -109,58 +109,58 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "attributes": [], "selfClosing": true, "loc": null, - "range": { - "start": 69, - "end": 76 - } + "range": [ + 69, + 76 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 69, - "end": 76 - } + "range": [ + 69, + 76 + ] }, "loc": null, - "range": { - "start": 62, - "end": 77 - } + "range": [ + 62, + 77 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 79 - } + "range": [ + 41, + 79 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 22, - "end": 79 - }, + "range": [ + 22, + 79 + ], "loc": null, - "range": { - "start": 22, - "end": 79 - } + "range": [ + 22, + 79 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 79 - } + "range": [ + 0, + 79 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.reassignment-to-global.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.reassignment-to-global.js.snap index 71bb793777..18fcf83c77 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.reassignment-to-global.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.reassignment-to-global.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -41,32 +41,32 @@ Output: "name": "someUnknownGlobal", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 72 - } + "range": [ + 55, + 72 + ] }, "right": { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "loc": null, - "range": { - "start": 55, - "end": 79 - } + "range": [ + 55, + 79 + ] }, "directive": null, "loc": null, - "range": { - "start": 55, - "end": 80 - } + "range": [ + 55, + 80 + ] }, { "type": "ExpressionStatement", @@ -78,58 +78,58 @@ Output: "name": "moduleLocal", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 94 - } + "range": [ + 83, + 94 + ] }, "right": { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 97, - "end": 101 - } + "range": [ + 97, + 101 + ] }, "loc": null, - "range": { - "start": 83, - "end": 101 - } + "range": [ + 83, + 101 + ] }, "directive": null, "loc": null, - "range": { - "start": 83, - "end": 102 - } + "range": [ + 83, + 102 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 104 - } + "range": [ + 21, + 104 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 104 - }, + "range": [ + 0, + 104 + ], "loc": null, - "range": { - "start": 0, - "end": 104 - } + "range": [ + 0, + 104 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 104 - } + "range": [ + 0, + 104 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-kitchensink.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-kitchensink.js.snap index eb0892b0b6..c8fe7f821b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-kitchensink.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-kitchensink.js.snap @@ -87,10 +87,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -101,27 +101,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 14, - "end": 15 - } + "range": [ + 14, + 15 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 17, - "end": 18 - } + "range": [ + 17, + 18 + ] } ], "loc": null, - "range": { - "start": 13, - "end": 19 - } + "range": [ + 13, + 19 + ] }, { "type": "ObjectPattern", @@ -133,30 +133,30 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "value": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, { "type": "Property", @@ -165,30 +165,30 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "value": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, { "type": "Property", @@ -197,10 +197,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "value": { "type": "AssignmentPattern", @@ -209,42 +209,42 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "right": { "type": "StringLiteral", "value": "e", "loc": null, - "range": { - "start": 33, - "end": 36 - } + "range": [ + 33, + 36 + ] }, "loc": null, - "range": { - "start": 29, - "end": 36 - } + "range": [ + 29, + 36 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 29, - "end": 36 - } + "range": [ + 29, + 36 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 38 - } + "range": [ + 21, + 38 + ] }, { "type": "AssignmentPattern", @@ -253,25 +253,25 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "right": { "type": "StringLiteral", "value": "f", "loc": null, - "range": { - "start": 44, - "end": 47 - } + "range": [ + 44, + 47 + ] }, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, { "type": "RestElement", @@ -280,16 +280,16 @@ Output: "name": "args", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] }, "loc": null, - "range": { - "start": 49, - "end": 56 - } + "range": [ + 49, + 56 + ] } ], "body": { @@ -306,32 +306,32 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 72 - } + "range": [ + 62, + 72 + ] }, { "type": "VariableDeclaration", @@ -344,32 +344,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 83, - "end": 85 - } + "range": [ + 83, + 85 + ] }, "loc": null, - "range": { - "start": 79, - "end": 85 - } + "range": [ + 79, + 85 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 86 - } + "range": [ + 75, + 86 + ] }, { "type": "ClassDeclaration", @@ -378,10 +378,10 @@ Output: "name": "Bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 99 - } + "range": [ + 96, + 99 + ] }, "superClass": null, "body": { @@ -394,26 +394,26 @@ Output: "name": "secretSauce", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 118 - } + "range": [ + 106, + 118 + ] }, "value": { "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 121, - "end": 123 - } + "range": [ + 121, + 123 + ] }, "static": false, "loc": null, - "range": { - "start": 106, - "end": 124 - } + "range": [ + 106, + 124 + ] }, { "type": "MethodDefinition", @@ -422,10 +422,10 @@ Output: "name": "constructor", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 140 - } + "range": [ + 129, + 140 + ] }, "value": { "type": "FunctionExpression", @@ -445,27 +445,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 158 - } + "range": [ + 151, + 158 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 162 - } + "range": [ + 159, + 162 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 162 - } + "range": [ + 151, + 162 + ] }, "arguments": [ { @@ -473,10 +473,10 @@ Output: "object": { "type": "ThisExpression", "loc": null, - "range": { - "start": 163, - "end": 167 - } + "range": [ + 163, + 167 + ] }, "property": { "type": "PrivateName", @@ -485,79 +485,79 @@ Output: "name": "secretSauce", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 180 - } + "range": [ + 168, + 180 + ] }, "loc": null, - "range": { - "start": 168, - "end": 180 - } + "range": [ + 168, + 180 + ] }, "computed": false, "loc": null, - "range": { - "start": 163, - "end": 180 - } + "range": [ + 163, + 180 + ] } ], "loc": null, - "range": { - "start": 151, - "end": 181 - } + "range": [ + 151, + 181 + ] }, "directive": null, "loc": null, - "range": { - "start": 151, - "end": 182 - } + "range": [ + 151, + 182 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 188 - } + "range": [ + 143, + 188 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 140, - "end": 188 - }, + "range": [ + 140, + 188 + ], "loc": null, - "range": { - "start": 140, - "end": 188 - } + "range": [ + 140, + 188 + ] }, "kind": "constructor", "computed": false, "static": false, "loc": null, - "range": { - "start": 129, - "end": 188 - } + "range": [ + 129, + 188 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 192 - } + "range": [ + 100, + 192 + ] }, "loc": null, - "range": { - "start": 90, - "end": 192 - } + "range": [ + 90, + 192 + ] }, { "type": "VariableDeclaration", @@ -570,10 +570,10 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 203 - } + "range": [ + 202, + 203 + ] }, "init": { "type": "ObjectExpression", @@ -585,10 +585,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 208, - "end": 209 - } + "range": [ + 208, + 209 + ] }, "value": { "type": "FunctionExpression", @@ -598,33 +598,33 @@ Output: "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 212, - "end": 214 - } + "range": [ + 212, + 214 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 208, - "end": 214 - }, + "range": [ + 208, + 214 + ], "loc": null, - "range": { - "start": 208, - "end": 214 - } + "range": [ + 208, + 214 + ] }, "kind": "init", "method": true, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 208, - "end": 214 - } + "range": [ + 208, + 214 + ] }, { "type": "Property", @@ -633,10 +633,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 216, - "end": 217 - } + "range": [ + 216, + 217 + ] }, "value": { "type": "ArrowFunctionExpression", @@ -646,54 +646,54 @@ Output: "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 225, - "end": 227 - } + "range": [ + 225, + 227 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 219, - "end": 227 - }, + "range": [ + 219, + 227 + ], "expression": false, "loc": null, - "range": { - "start": 219, - "end": 227 - } + "range": [ + 219, + 227 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 216, - "end": 227 - } + "range": [ + 216, + 227 + ] } ], "loc": null, - "range": { - "start": 206, - "end": 229 - } + "range": [ + 206, + 229 + ] }, "loc": null, - "range": { - "start": 202, - "end": 229 - } + "range": [ + 202, + 229 + ] } ], "loc": null, - "range": { - "start": 196, - "end": 230 - } + "range": [ + 196, + 230 + ] }, { "type": "VariableDeclaration", @@ -711,30 +711,30 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 241, - "end": 242 - } + "range": [ + 241, + 242 + ] }, "value": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 241, - "end": 242 - } + "range": [ + 241, + 242 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 241, - "end": 242 - } + "range": [ + 241, + 242 + ] }, { "type": "Property", @@ -743,10 +743,10 @@ Output: "name": "aa", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 246 - } + "range": [ + 244, + 246 + ] }, "value": { "type": "AssignmentPattern", @@ -755,42 +755,42 @@ Output: "name": "aa", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 246 - } + "range": [ + 244, + 246 + ] }, "right": { "type": "StringLiteral", "value": "aa", "loc": null, - "range": { - "start": 249, - "end": 253 - } + "range": [ + 249, + 253 + ] }, "loc": null, - "range": { - "start": 244, - "end": 253 - } + "range": [ + 244, + 253 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 244, - "end": 253 - } + "range": [ + 244, + 253 + ] } ], "loc": null, - "range": { - "start": 239, - "end": 255 - } + "range": [ + 239, + 255 + ] }, "init": { "type": "CallExpression", @@ -799,30 +799,30 @@ Output: "name": "useCustom", "typeAnnotation": null, "loc": null, - "range": { - "start": 258, - "end": 267 - } + "range": [ + 258, + 267 + ] }, "arguments": [], "loc": null, - "range": { - "start": 258, - "end": 269 - } + "range": [ + 258, + 269 + ] }, "loc": null, - "range": { - "start": 239, - "end": 269 - } + "range": [ + 239, + 269 + ] } ], "loc": null, - "range": { - "start": 233, - "end": 270 - } + "range": [ + 233, + 270 + ] }, { "type": "ExpressionStatement", @@ -834,10 +834,10 @@ Output: "type": "JSXIdentifier", "name": "Button", "loc": null, - "range": { - "start": 275, - "end": 281 - } + "range": [ + 275, + 281 + ] }, "attributes": [ { @@ -846,10 +846,10 @@ Output: "type": "JSXIdentifier", "name": "haha", "loc": null, - "range": { - "start": 282, - "end": 286 - } + "range": [ + 282, + 286 + ] }, "value": { "type": "JSXExpressionContainer", @@ -857,30 +857,30 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 288, - "end": 289 - } + "range": [ + 288, + 289 + ] }, "loc": null, - "range": { - "start": 287, - "end": 290 - } + "range": [ + 287, + 290 + ] }, "loc": null, - "range": { - "start": 282, - "end": 290 - } + "range": [ + 282, + 290 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 274, - "end": 291 - } + "range": [ + 274, + 291 + ] }, "children": [], "closingElement": { @@ -889,29 +889,29 @@ Output: "type": "JSXIdentifier", "name": "Button", "loc": null, - "range": { - "start": 293, - "end": 299 - } + "range": [ + 293, + 299 + ] }, "loc": null, - "range": { - "start": 291, - "end": 300 - } + "range": [ + 291, + 300 + ] }, "loc": null, - "range": { - "start": 274, - "end": 300 - } + "range": [ + 274, + 300 + ] }, "directive": null, "loc": null, - "range": { - "start": 274, - "end": 301 - } + "range": [ + 274, + 301 + ] }, { "type": "ExpressionStatement", @@ -923,18 +923,18 @@ Output: "type": "JSXIdentifier", "name": "Button", "loc": null, - "range": { - "start": 305, - "end": 311 - } + "range": [ + 305, + 311 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 304, - "end": 312 - } + "range": [ + 304, + 312 + ] }, "children": [ { @@ -942,16 +942,16 @@ Output: "expression": { "type": "JSXEmptyExpression", "loc": null, - "range": { - "start": 313, - "end": 325 - } + "range": [ + 313, + 325 + ] }, "loc": null, - "range": { - "start": 312, - "end": 326 - } + "range": [ + 312, + 326 + ] } ], "closingElement": { @@ -960,29 +960,29 @@ Output: "type": "JSXIdentifier", "name": "Button", "loc": null, - "range": { - "start": 328, - "end": 334 - } + "range": [ + 328, + 334 + ] }, "loc": null, - "range": { - "start": 326, - "end": 335 - } + "range": [ + 326, + 335 + ] }, "loc": null, - "range": { - "start": 304, - "end": 335 - } + "range": [ + 304, + 335 + ] }, "directive": null, "loc": null, - "range": { - "start": 304, - "end": 336 - } + "range": [ + 304, + 336 + ] }, { "type": "VariableDeclaration", @@ -995,10 +995,10 @@ Output: "name": "j", "typeAnnotation": null, "loc": null, - "range": { - "start": 346, - "end": 347 - } + "range": [ + 346, + 347 + ] }, "init": { "type": "FunctionExpression", @@ -1007,10 +1007,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 359, - "end": 362 - } + "range": [ + 359, + 362 + ] }, "params": [ { @@ -1021,27 +1021,27 @@ Output: "name": "quz", "typeAnnotation": null, "loc": null, - "range": { - "start": 364, - "end": 367 - } + "range": [ + 364, + 367 + ] }, { "type": "Identifier", "name": "qux", "typeAnnotation": null, "loc": null, - "range": { - "start": 369, - "end": 372 - } + "range": [ + 369, + 372 + ] } ], "loc": null, - "range": { - "start": 363, - "end": 373 - } + "range": [ + 363, + 373 + ] }, { "type": "RestElement", @@ -1050,52 +1050,52 @@ Output: "name": "args", "typeAnnotation": null, "loc": null, - "range": { - "start": 378, - "end": 382 - } + "range": [ + 378, + 382 + ] }, "loc": null, - "range": { - "start": 375, - "end": 382 - } + "range": [ + 375, + 382 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 384, - "end": 386 - } + "range": [ + 384, + 386 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 350, - "end": 386 - }, + "range": [ + 350, + 386 + ], "loc": null, - "range": { - "start": 350, - "end": 386 - } + "range": [ + 350, + 386 + ] }, "loc": null, - "range": { - "start": 346, - "end": 386 - } + "range": [ + 346, + 386 + ] } ], "loc": null, - "range": { - "start": 340, - "end": 387 - } + "range": [ + 340, + 387 + ] }, { "type": "ForStatement", @@ -1107,26 +1107,26 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 398, - "end": 399 - } + "range": [ + 398, + 399 + ] }, "operator": "<", "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 402, - "end": 403 - } + "range": [ + 402, + 403 + ] }, "loc": null, - "range": { - "start": 398, - "end": 403 - } + "range": [ + 398, + 403 + ] }, "update": { "type": "AssignmentExpression", @@ -1136,25 +1136,25 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 405, - "end": 406 - } + "range": [ + 405, + 406 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 410, - "end": 411 - } + "range": [ + 410, + 411 + ] }, "loc": null, - "range": { - "start": 405, - "end": 411 - } + "range": [ + 405, + 411 + ] }, "body": { "type": "BlockStatement", @@ -1170,27 +1170,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 419, - "end": 420 - } + "range": [ + 419, + 420 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 421, - "end": 425 - } + "range": [ + 421, + 425 + ] }, "computed": false, "loc": null, - "range": { - "start": 419, - "end": 425 - } + "range": [ + 419, + 425 + ] }, "arguments": [ { @@ -1198,37 +1198,37 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 426, - "end": 427 - } + "range": [ + 426, + 427 + ] } ], "loc": null, - "range": { - "start": 419, - "end": 428 - } + "range": [ + 419, + 428 + ] }, "directive": null, "loc": null, - "range": { - "start": 419, - "end": 429 - } + "range": [ + 419, + 429 + ] } ], "loc": null, - "range": { - "start": 413, - "end": 433 - } + "range": [ + 413, + 433 + ] }, "loc": null, - "range": { - "start": 391, - "end": 433 - } + "range": [ + 391, + 433 + ] }, { "type": "ForStatement", @@ -1240,26 +1240,26 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 443, - "end": 444 - } + "range": [ + 443, + 444 + ] }, "operator": "<", "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 447, - "end": 448 - } + "range": [ + 447, + 448 + ] }, "loc": null, - "range": { - "start": 443, - "end": 448 - } + "range": [ + 443, + 448 + ] }, "update": null, "body": { @@ -1269,23 +1269,23 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 458, - "end": 464 - } + "range": [ + 458, + 464 + ] } ], "loc": null, - "range": { - "start": 452, - "end": 468 - } + "range": [ + 452, + 468 + ] }, "loc": null, - "range": { - "start": 436, - "end": 468 - } + "range": [ + 436, + 468 + ] }, { "type": "ForStatement", @@ -1299,23 +1299,23 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 486, - "end": 492 - } + "range": [ + 486, + 492 + ] } ], "loc": null, - "range": { - "start": 480, - "end": 496 - } + "range": [ + 480, + 496 + ] }, "loc": null, - "range": { - "start": 471, - "end": 496 - } + "range": [ + 471, + 496 + ] }, { "type": "ExpressionStatement", @@ -1326,10 +1326,10 @@ Output: "name": "graphql", "typeAnnotation": null, "loc": null, - "range": { - "start": 500, - "end": 507 - } + "range": [ + 500, + 507 + ] }, "quasi": { "type": "TemplateLiteral", @@ -1342,10 +1342,10 @@ Output: "raw": "\n " }, "loc": null, - "range": { - "start": 507, - "end": 515 - } + "range": [ + 507, + 515 + ] }, { "type": "TemplateElement", @@ -1355,10 +1355,10 @@ Output: "raw": "\n " }, "loc": null, - "range": { - "start": 516, - "end": 521 - } + "range": [ + 516, + 521 + ] } ], "expressions": [ @@ -1367,30 +1367,30 @@ Output: "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 515, - "end": 516 - } + "range": [ + 515, + 516 + ] } ], "loc": null, - "range": { - "start": 507, - "end": 521 - } + "range": [ + 507, + 521 + ] }, "loc": null, - "range": { - "start": 500, - "end": 521 - } + "range": [ + 500, + 521 + ] }, "directive": null, "loc": null, - "range": { - "start": 500, - "end": 522 - } + "range": [ + 500, + 522 + ] }, { "type": "ExpressionStatement", @@ -1401,10 +1401,10 @@ Output: "name": "graphql", "typeAnnotation": null, "loc": null, - "range": { - "start": 526, - "end": 533 - } + "range": [ + 526, + 533 + ] }, "quasi": { "type": "TemplateLiteral", @@ -1417,31 +1417,31 @@ Output: "raw": "\\\\t\\n" }, "loc": null, - "range": { - "start": 533, - "end": 540 - } + "range": [ + 533, + 540 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 533, - "end": 540 - } + "range": [ + 533, + 540 + ] }, "loc": null, - "range": { - "start": 526, - "end": 540 - } + "range": [ + 526, + 540 + ] }, "directive": null, "loc": null, - "range": { - "start": 526, - "end": 541 - } + "range": [ + 526, + 541 + ] }, { "type": "ForOfStatement", @@ -1451,10 +1451,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 550, - "end": 551 - } + "range": [ + 550, + 551 + ] }, "right": { "type": "ArrayExpression", @@ -1463,41 +1463,41 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 556, - "end": 557 - } + "range": [ + 556, + 557 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 559, - "end": 560 - } + "range": [ + 559, + 560 + ] } ], "loc": null, - "range": { - "start": 555, - "end": 561 - } + "range": [ + 555, + 561 + ] }, "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 563, - "end": 568 - } + "range": [ + 563, + 568 + ] }, "loc": null, - "range": { - "start": 545, - "end": 568 - } + "range": [ + 545, + 568 + ] }, { "type": "ForOfStatement", @@ -1510,17 +1510,17 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 577, - "end": 578 - } + "range": [ + 577, + 578 + ] } ], "loc": null, - "range": { - "start": 576, - "end": 579 - } + "range": [ + 576, + 579 + ] }, "right": { "type": "ArrayExpression", @@ -1532,17 +1532,17 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 585, - "end": 586 - } + "range": [ + 585, + 586 + ] } ], "loc": null, - "range": { - "start": 584, - "end": 587 - } + "range": [ + 584, + 587 + ] }, { "type": "ArrayExpression", @@ -1551,39 +1551,39 @@ Output: "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 590, - "end": 591 - } + "range": [ + 590, + 591 + ] } ], "loc": null, - "range": { - "start": 589, - "end": 592 - } + "range": [ + 589, + 592 + ] } ], "loc": null, - "range": { - "start": 583, - "end": 593 - } + "range": [ + 583, + 593 + ] }, "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 595, - "end": 600 - } + "range": [ + 595, + 600 + ] }, "loc": null, - "range": { - "start": 571, - "end": 600 - } + "range": [ + 571, + 600 + ] }, { "type": "ForOfStatement", @@ -1598,37 +1598,37 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 610, - "end": 611 - } + "range": [ + 610, + 611 + ] }, "value": { "type": "Identifier", "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 610, - "end": 611 - } + "range": [ + 610, + 611 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 610, - "end": 611 - } + "range": [ + 610, + 611 + ] } ], "loc": null, - "range": { - "start": 608, - "end": 613 - } + "range": [ + 608, + 613 + ] }, "right": { "type": "ArrayExpression", @@ -1643,36 +1643,36 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 620, - "end": 621 - } + "range": [ + 620, + 621 + ] }, "value": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 623, - "end": 624 - } + "range": [ + 623, + 624 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 620, - "end": 624 - } + "range": [ + 620, + 624 + ] } ], "loc": null, - "range": { - "start": 618, - "end": 626 - } + "range": [ + 618, + 626 + ] }, { "type": "ObjectExpression", @@ -1684,58 +1684,58 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 630, - "end": 631 - } + "range": [ + 630, + 631 + ] }, "value": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 633, - "end": 634 - } + "range": [ + 633, + 634 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 630, - "end": 634 - } + "range": [ + 630, + 634 + ] } ], "loc": null, - "range": { - "start": 628, - "end": 636 - } + "range": [ + 628, + 636 + ] } ], "loc": null, - "range": { - "start": 617, - "end": 637 - } + "range": [ + 617, + 637 + ] }, "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 639, - "end": 644 - } + "range": [ + 639, + 644 + ] }, "loc": null, - "range": { - "start": 603, - "end": 644 - } + "range": [ + 603, + 644 + ] }, { "type": "ForInStatement", @@ -1750,24 +1750,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 657, - "end": 658 - } + "range": [ + 657, + 658 + ] }, "init": null, "loc": null, - "range": { - "start": 657, - "end": 658 - } + "range": [ + 657, + 658 + ] } ], "loc": null, - "range": { - "start": 653, - "end": 658 - } + "range": [ + 653, + 658 + ] }, "right": { "type": "ObjectExpression", @@ -1779,51 +1779,51 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 664, - "end": 665 - } + "range": [ + 664, + 665 + ] }, "value": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 667, - "end": 668 - } + "range": [ + 667, + 668 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 664, - "end": 668 - } + "range": [ + 664, + 668 + ] } ], "loc": null, - "range": { - "start": 662, - "end": 670 - } + "range": [ + 662, + 670 + ] }, "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 672, - "end": 677 - } + "range": [ + 672, + 677 + ] }, "loc": null, - "range": { - "start": 648, - "end": 677 - } + "range": [ + 648, + 677 + ] }, { "type": "VariableDeclaration", @@ -1836,32 +1836,32 @@ Output: "name": "updateIdentifier", "typeAnnotation": null, "loc": null, - "range": { - "start": 685, - "end": 701 - } + "range": [ + 685, + 701 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 704, - "end": 705 - } + "range": [ + 704, + 705 + ] }, "loc": null, - "range": { - "start": 685, - "end": 705 - } + "range": [ + 685, + 705 + ] } ], "loc": null, - "range": { - "start": 681, - "end": 706 - } + "range": [ + 681, + 706 + ] }, { "type": "ExpressionStatement", @@ -1873,24 +1873,24 @@ Output: "name": "updateIdentifier", "typeAnnotation": null, "loc": null, - "range": { - "start": 711, - "end": 727 - } + "range": [ + 711, + 727 + ] }, "prefix": true, "loc": null, - "range": { - "start": 709, - "end": 727 - } + "range": [ + 709, + 727 + ] }, "directive": null, "loc": null, - "range": { - "start": 709, - "end": 728 - } + "range": [ + 709, + 728 + ] }, { "type": "ExpressionStatement", @@ -1902,24 +1902,24 @@ Output: "name": "updateIdentifier", "typeAnnotation": null, "loc": null, - "range": { - "start": 733, - "end": 749 - } + "range": [ + 733, + 749 + ] }, "prefix": true, "loc": null, - "range": { - "start": 731, - "end": 749 - } + "range": [ + 731, + 749 + ] }, "directive": null, "loc": null, - "range": { - "start": 731, - "end": 750 - } + "range": [ + 731, + 750 + ] }, { "type": "ExpressionStatement", @@ -1933,41 +1933,41 @@ Output: "name": "updateIdentifier", "typeAnnotation": null, "loc": null, - "range": { - "start": 753, - "end": 769 - } + "range": [ + 753, + 769 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 770, - "end": 771 - } + "range": [ + 770, + 771 + ] }, "computed": false, "loc": null, - "range": { - "start": 753, - "end": 771 - } + "range": [ + 753, + 771 + ] }, "prefix": false, "loc": null, - "range": { - "start": 753, - "end": 773 - } + "range": [ + 753, + 773 + ] }, "directive": null, "loc": null, - "range": { - "start": 753, - "end": 774 - } + "range": [ + 753, + 774 + ] }, { "type": "ExpressionStatement", @@ -1981,41 +1981,41 @@ Output: "name": "updateIdentifier", "typeAnnotation": null, "loc": null, - "range": { - "start": 777, - "end": 793 - } + "range": [ + 777, + 793 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 794, - "end": 795 - } + "range": [ + 794, + 795 + ] }, "computed": false, "loc": null, - "range": { - "start": 777, - "end": 795 - } + "range": [ + 777, + 795 + ] }, "prefix": false, "loc": null, - "range": { - "start": 777, - "end": 797 - } + "range": [ + 777, + 797 + ] }, "directive": null, "loc": null, - "range": { - "start": 777, - "end": 798 - } + "range": [ + 777, + 798 + ] }, { "type": "SwitchStatement", @@ -2024,10 +2024,10 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 810, - "end": 811 - } + "range": [ + 810, + 811 + ] }, "cases": [ { @@ -2038,43 +2038,43 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 824, - "end": 825 - } + "range": [ + 824, + 825 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 828, - "end": 829 - } + "range": [ + 828, + 829 + ] }, "loc": null, - "range": { - "start": 824, - "end": 829 - } + "range": [ + 824, + 829 + ] }, "consequent": [ { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 831, - "end": 838 - } + "range": [ + 831, + 838 + ] } ], "loc": null, - "range": { - "start": 819, - "end": 838 - } + "range": [ + 819, + 838 + ] }, { "type": "SwitchCase", @@ -2085,34 +2085,34 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 848, - "end": 851 - } + "range": [ + 848, + 851 + ] }, "arguments": [], "loc": null, - "range": { - "start": 848, - "end": 853 - } + "range": [ + 848, + 853 + ] }, "consequent": [ { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 855, - "end": 862 - } + "range": [ + 855, + 862 + ] } ], "loc": null, - "range": { - "start": 843, - "end": 862 - } + "range": [ + 843, + 862 + ] }, { "type": "SwitchCase", @@ -2123,44 +2123,44 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 872, - "end": 873 - } + "range": [ + 872, + 873 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 874, - "end": 875 - } + "range": [ + 874, + 875 + ] }, "computed": false, "loc": null, - "range": { - "start": 872, - "end": 875 - } + "range": [ + 872, + 875 + ] }, "consequent": [ { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 877, - "end": 884 - } + "range": [ + 877, + 884 + ] } ], "loc": null, - "range": { - "start": 867, - "end": 884 - } + "range": [ + 867, + 884 + ] }, { "type": "SwitchCase", @@ -2170,24 +2170,24 @@ Output: "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 898, - "end": 905 - } + "range": [ + 898, + 905 + ] } ], "loc": null, - "range": { - "start": 889, - "end": 905 - } + "range": [ + 889, + 905 + ] } ], "loc": null, - "range": { - "start": 802, - "end": 909 - } + "range": [ + 802, + 909 + ] }, { "type": "FunctionDeclaration", @@ -2196,10 +2196,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 922, - "end": 931 - } + "range": [ + 922, + 931 + ] }, "params": [ { @@ -2207,10 +2207,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 932, - "end": 933 - } + "range": [ + 932, + 933 + ] } ], "body": { @@ -2223,33 +2223,33 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 1027, - "end": 1028 - } + "range": [ + 1027, + 1028 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 1031, - "end": 1033 - } + "range": [ + 1031, + 1033 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 1018, - "end": 1033 - }, + "range": [ + 1018, + 1033 + ], "loc": null, - "range": { - "start": 1018, - "end": 1033 - } + "range": [ + 1018, + 1033 + ] }, { "type": "ExpressionStatement", @@ -2260,64 +2260,64 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 1038, - "end": 1039 - } + "range": [ + 1038, + 1039 + ] }, "arguments": [], "loc": null, - "range": { - "start": 1038, - "end": 1041 - } + "range": [ + 1038, + 1041 + ] }, "directive": null, "loc": null, - "range": { - "start": 1038, - "end": 1042 - } + "range": [ + 1038, + 1042 + ] } ], "loc": null, - "range": { - "start": 935, - "end": 1046 - } + "range": [ + 935, + 1046 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 913, - "end": 1046 - }, + "range": [ + 913, + 1046 + ], "loc": null, - "range": { - "start": 913, - "end": 1046 - } + "range": [ + 913, + 1046 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 1048 - } + "range": [ + 58, + 1048 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 1048 - }, + "range": [ + 0, + 1048 + ], "loc": null, - "range": { - "start": 0, - "end": 1048 - } + "range": [ + 0, + 1048 + ] }, { "type": "VariableDeclaration", @@ -2330,38 +2330,38 @@ Output: "name": "moduleLocal", "typeAnnotation": null, "loc": null, - "range": { - "start": 1054, - "end": 1065 - } + "range": [ + 1054, + 1065 + ] }, "init": { "type": "BooleanLiteral", "value": false, "loc": null, - "range": { - "start": 1068, - "end": 1073 - } + "range": [ + 1068, + 1073 + ] }, "loc": null, - "range": { - "start": 1054, - "end": 1073 - } + "range": [ + 1054, + 1073 + ] } ], "loc": null, - "range": { - "start": 1050, - "end": 1074 - } + "range": [ + 1050, + 1074 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 1074 - } + "range": [ + 0, + 1074 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-unconditional-set-state-lambda.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-unconditional-set-state-lambda.js.snap index 2f22aef11a..a520786c55 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-unconditional-set-state-lambda.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo-unconditional-set-state-lambda.js.snap @@ -29,10 +29,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,32 +60,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "VariableDeclaration", @@ -101,27 +101,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 57 - } + "range": [ + 53, + 57 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 58 - } + "range": [ + 49, + 58 + ] }, "init": { "type": "CallExpression", @@ -130,40 +130,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 69 - } + "range": [ + 61, + 69 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 72 - } + "range": [ + 61, + 72 + ] }, "loc": null, - "range": { - "start": 49, - "end": 72 - } + "range": [ + 49, + 72 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 73 - } + "range": [ + 43, + 73 + ] }, { "type": "VariableDeclaration", @@ -176,10 +176,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 86 - } + "range": [ + 83, + 86 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -197,34 +197,34 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 105 - } + "range": [ + 101, + 105 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 108 - } + "range": [ + 101, + 108 + ] }, "directive": null, "loc": null, - "range": { - "start": 101, - "end": 109 - } + "range": [ + 101, + 109 + ] }, { "type": "ExpressionStatement", @@ -236,66 +236,66 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "loc": null, - "range": { - "start": 114, - "end": 119 - } + "range": [ + 114, + 119 + ] }, "directive": null, "loc": null, - "range": { - "start": 114, - "end": 120 - } + "range": [ + 114, + 120 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 211 - } + "range": [ + 95, + 211 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 89, - "end": 211 - }, + "range": [ + 89, + 211 + ], "expression": false, "loc": null, - "range": { - "start": 89, - "end": 211 - } + "range": [ + 89, + 211 + ] }, "loc": null, - "range": { - "start": 83, - "end": 211 - } + "range": [ + 83, + 211 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 212 - } + "range": [ + 77, + 212 + ] }, { "type": "ExpressionStatement", @@ -306,24 +306,24 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 215, - "end": 218 - } + "range": [ + 215, + 218 + ] }, "arguments": [], "loc": null, - "range": { - "start": 215, - "end": 220 - } + "range": [ + 215, + 220 + ] }, "directive": null, "loc": null, - "range": { - "start": 215, - "end": 221 - } + "range": [ + 215, + 221 + ] }, { "type": "ReturnStatement", @@ -335,59 +335,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 233, - "end": 234 - } + "range": [ + 233, + 234 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 236, - "end": 237 - } + "range": [ + 236, + 237 + ] } ], "loc": null, - "range": { - "start": 232, - "end": 238 - } + "range": [ + 232, + 238 + ] }, "loc": null, - "range": { - "start": 225, - "end": 239 - } + "range": [ + 225, + 239 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 241 - } + "range": [ + 26, + 241 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 241 - }, + "range": [ + 0, + 241 + ], "loc": null, - "range": { - "start": 0, - "end": 241 - } + "range": [ + 0, + 241 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 241 - } + "range": [ + 0, + 241 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo.destructure-assignment-to-context-var.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo.destructure-assignment-to-context-var.js.snap index b181244d5e..2a0d37660e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo.destructure-assignment-to-context-var.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.todo.destructure-assignment-to-context-var.js.snap @@ -26,10 +26,10 @@ Output: "name": "useFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 15 - } + "range": [ + 9, + 15 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 21 - } + "range": [ + 16, + 21 + ] } ], "body": { @@ -57,24 +57,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] } ], "loc": null, - "range": { - "start": 27, - "end": 33 - } + "range": [ + 27, + 33 + ] }, { "type": "ExpressionStatement", @@ -89,40 +89,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "right": { "type": "Identifier", "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 47 - } + "range": [ + 42, + 47 + ] }, "loc": null, - "range": { - "start": 36, - "end": 47 - } + "range": [ + 36, + 47 + ] }, "directive": null, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] }, { "type": "VariableDeclaration", @@ -135,10 +135,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -157,10 +157,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "right": { "type": "CallExpression", @@ -169,10 +169,10 @@ Output: "name": "getX", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 83 - } + "range": [ + 79, + 83 + ] }, "arguments": [ { @@ -180,64 +180,64 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 89 - } + "range": [ + 84, + 89 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 90 - } + "range": [ + 79, + 90 + ] }, "loc": null, - "range": { - "start": 75, - "end": 90 - } + "range": [ + 75, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 75, - "end": 91 - } + "range": [ + 75, + 91 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 95 - } + "range": [ + 69, + 95 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 63, - "end": 95 - }, + "range": [ + 63, + 95 + ], "expression": false, "loc": null, - "range": { - "start": 63, - "end": 95 - } + "range": [ + 63, + 95 + ] }, "loc": null, - "range": { - "start": 57, - "end": 95 - } + "range": [ + 57, + 95 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 96 - } + "range": [ + 51, + 96 + ] }, { "type": "ExpressionStatement", @@ -248,24 +248,24 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 102 - } + "range": [ + 99, + 102 + ] }, "arguments": [], "loc": null, - "range": { - "start": 99, - "end": 104 - } + "range": [ + 99, + 104 + ] }, "directive": null, "loc": null, - "range": { - "start": 99, - "end": 105 - } + "range": [ + 99, + 105 + ] }, { "type": "ReturnStatement", @@ -279,69 +279,69 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] } ], "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "loc": null, - "range": { - "start": 108, - "end": 121 - } + "range": [ + 108, + 121 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 123 - } + "range": [ + 23, + 123 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 123 - }, + "range": [ + 0, + 123 + ], "loc": null, - "range": { - "start": 0, - "end": 123 - } + "range": [ + 0, + 123 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 123 - } + "range": [ + 0, + 123 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.useMemo-callback-generator.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.useMemo-callback-generator.js.snap index c8c508db5f..69c1757f2c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.useMemo-callback-generator.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.useMemo-callback-generator.js.snap @@ -26,10 +26,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,20 +37,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -67,10 +67,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 195 - } + "range": [ + 194, + 195 + ] }, "init": { "type": "CallExpression", @@ -79,10 +79,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 205 - } + "range": [ + 198, + 205 + ] }, "arguments": [ { @@ -101,73 +101,73 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 231, - "end": 232 - } + "range": [ + 231, + 232 + ] }, "delegate": false, "loc": null, - "range": { - "start": 225, - "end": 232 - } + "range": [ + 225, + 232 + ] }, "directive": null, "loc": null, - "range": { - "start": 225, - "end": 233 - } + "range": [ + 225, + 233 + ] } ], "loc": null, - "range": { - "start": 219, - "end": 237 - } + "range": [ + 219, + 237 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 206, - "end": 237 - }, + "range": [ + 206, + 237 + ], "loc": null, - "range": { - "start": 206, - "end": 237 - } + "range": [ + 206, + 237 + ] }, { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 239, - "end": 241 - } + "range": [ + 239, + 241 + ] } ], "loc": null, - "range": { - "start": 198, - "end": 242 - } + "range": [ + 198, + 242 + ] }, "loc": null, - "range": { - "start": 194, - "end": 242 - } + "range": [ + 194, + 242 + ] } ], "loc": null, - "range": { - "start": 190, - "end": 243 - } + "range": [ + 190, + 243 + ] }, { "type": "ReturnStatement", @@ -176,42 +176,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 254 - } + "range": [ + 253, + 254 + ] }, "loc": null, - "range": { - "start": 246, - "end": 255 - } + "range": [ + 246, + 255 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 257 - } + "range": [ + 25, + 257 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 257 - }, + "range": [ + 0, + 257 + ], "loc": null, - "range": { - "start": 0, - "end": 257 - } + "range": [ + 0, + 257 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 257 - } + "range": [ + 0, + 257 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.while-with-assignment-in-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.while-with-assignment-in-test.js.snap index 158248bb47..68fecbd2d7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.while-with-assignment-in-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@error.while-with-assignment-in-test.js.snap @@ -27,10 +27,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "reader", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 17 - } + "range": [ + 11, + 17 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "queue", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 34 - } + "range": [ + 29, + 34 + ] }, "init": { "type": "ArrayExpression", @@ -70,48 +70,48 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 46 - } + "range": [ + 37, + 46 + ] }, "loc": null, - "range": { - "start": 29, - "end": 46 - } + "range": [ + 29, + 46 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 47 - } + "range": [ + 23, + 47 + ] }, { "type": "VariableDeclaration", @@ -124,32 +124,32 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "loc": null, - "range": { - "start": 54, - "end": 63 - } + "range": [ + 54, + 63 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 64 - } + "range": [ + 50, + 64 + ] }, { "type": "VariableDeclaration", @@ -162,32 +162,32 @@ Output: "name": "sum", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 74 - } + "range": [ + 71, + 74 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "loc": null, - "range": { - "start": 71, - "end": 78 - } + "range": [ + 71, + 78 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 79 - } + "range": [ + 67, + 79 + ] }, { "type": "WhileStatement", @@ -201,10 +201,10 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 152 - } + "range": [ + 147, + 152 + ] }, "right": { "type": "CallExpression", @@ -215,55 +215,55 @@ Output: "name": "queue", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 160 - } + "range": [ + 155, + 160 + ] }, "property": { "type": "Identifier", "name": "pop", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 164 - } + "range": [ + 161, + 164 + ] }, "computed": false, "loc": null, - "range": { - "start": 155, - "end": 164 - } + "range": [ + 155, + 164 + ] }, "arguments": [], "loc": null, - "range": { - "start": 155, - "end": 166 - } + "range": [ + 155, + 166 + ] }, "loc": null, - "range": { - "start": 147, - "end": 166 - } + "range": [ + 147, + 166 + ] }, "operator": "!=", "right": { "type": "NullLiteral", "loc": null, - "range": { - "start": 171, - "end": 175 - } + "range": [ + 171, + 175 + ] }, "loc": null, - "range": { - "start": 146, - "end": 175 - } + "range": [ + 146, + 175 + ] }, "body": { "type": "BlockStatement", @@ -278,46 +278,46 @@ Output: "name": "sum", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 186 - } + "range": [ + 183, + 186 + ] }, "right": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 195 - } + "range": [ + 190, + 195 + ] }, "loc": null, - "range": { - "start": 183, - "end": 195 - } + "range": [ + 183, + 195 + ] }, "directive": null, "loc": null, - "range": { - "start": 183, - "end": 196 - } + "range": [ + 183, + 196 + ] } ], "loc": null, - "range": { - "start": 177, - "end": 200 - } + "range": [ + 177, + 200 + ] }, "loc": null, - "range": { - "start": 139, - "end": 200 - } + "range": [ + 139, + 200 + ] }, { "type": "ReturnStatement", @@ -326,42 +326,42 @@ Output: "name": "sum", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 213 - } + "range": [ + 210, + 213 + ] }, "loc": null, - "range": { - "start": 203, - "end": 214 - } + "range": [ + 203, + 214 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 216 - } + "range": [ + 19, + 216 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 216 - }, + "range": [ + 0, + 216 + ], "loc": null, - "range": { - "start": 0, - "end": 216 - } + "range": [ + 0, + 216 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 216 - } + "range": [ + 0, + 216 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-destructured-rest-element.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-destructured-rest-element.js.snap index a0df8eb5fc..8c0699a952 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-destructured-rest-element.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-destructured-rest-element.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,30 +60,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, { "type": "RestElement", @@ -92,23 +92,23 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "loc": null, - "range": { - "start": 117, - "end": 121 - } + "range": [ + 117, + 121 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 123 - } + "range": [ + 112, + 123 + ] }, "init": { "type": "MemberExpression", @@ -117,40 +117,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 131 - } + "range": [ + 126, + 131 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 126, - "end": 133 - } + "range": [ + 126, + 133 + ] }, "loc": null, - "range": { - "start": 112, - "end": 133 - } + "range": [ + 112, + 133 + ] } ], "loc": null, - "range": { - "start": 106, - "end": 134 - } + "range": [ + 106, + 134 + ] }, { "type": "VariableDeclaration", @@ -166,10 +166,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 219 - } + "range": [ + 218, + 219 + ] }, { "type": "RestElement", @@ -178,23 +178,23 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 224, - "end": 225 - } + "range": [ + 224, + 225 + ] }, "loc": null, - "range": { - "start": 221, - "end": 225 - } + "range": [ + 221, + 225 + ] } ], "loc": null, - "range": { - "start": 217, - "end": 226 - } + "range": [ + 217, + 226 + ] }, "init": { "type": "MemberExpression", @@ -203,40 +203,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 229, - "end": 234 - } + "range": [ + 229, + 234 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 235, - "end": 236 - } + "range": [ + 235, + 236 + ] }, "computed": false, "loc": null, - "range": { - "start": 229, - "end": 236 - } + "range": [ + 229, + 236 + ] }, "loc": null, - "range": { - "start": 217, - "end": 236 - } + "range": [ + 217, + 236 + ] } ], "loc": null, - "range": { - "start": 211, - "end": 237 - } + "range": [ + 211, + 237 + ] }, { "type": "ReturnStatement", @@ -248,10 +248,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 248, - "end": 251 - } + "range": [ + 248, + 251 + ] }, "attributes": [ { @@ -260,10 +260,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 252, - "end": 253 - } + "range": [ + 252, + 253 + ] }, "value": { "type": "JSXExpressionContainer", @@ -272,22 +272,22 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 256 - } + "range": [ + 255, + 256 + ] }, "loc": null, - "range": { - "start": 254, - "end": 257 - } + "range": [ + 254, + 257 + ] }, "loc": null, - "range": { - "start": 252, - "end": 257 - } + "range": [ + 252, + 257 + ] }, { "type": "JSXAttribute", @@ -295,10 +295,10 @@ Output: "type": "JSXIdentifier", "name": "d", "loc": null, - "range": { - "start": 258, - "end": 259 - } + "range": [ + 258, + 259 + ] }, "value": { "type": "JSXExpressionContainer", @@ -307,30 +307,30 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 262 - } + "range": [ + 261, + 262 + ] }, "loc": null, - "range": { - "start": 260, - "end": 263 - } + "range": [ + 260, + 263 + ] }, "loc": null, - "range": { - "start": 258, - "end": 263 - } + "range": [ + 258, + 263 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 247, - "end": 264 - } + "range": [ + 247, + 264 + ] }, "children": [], "closingElement": { @@ -339,54 +339,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 266, - "end": 269 - } + "range": [ + 266, + 269 + ] }, "loc": null, - "range": { - "start": 264, - "end": 270 - } + "range": [ + 264, + 270 + ] }, "loc": null, - "range": { - "start": 247, - "end": 270 - } + "range": [ + 247, + 270 + ] }, "loc": null, - "range": { - "start": 240, - "end": 271 - } + "range": [ + 240, + 271 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 273 - } + "range": [ + 26, + 273 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 273 - }, + "range": [ + 0, + 273 + ], "loc": null, - "range": { - "start": 0, - "end": 273 - } + "range": [ + 0, + 273 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 273 - } + "range": [ + 0, + 273 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-jsx-child.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-jsx-child.js.snap index de05b21bee..7699129b46 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-jsx-child.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-jsx-child.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,30 +39,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -79,32 +79,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 36, - "end": 38 - } + "range": [ + 36, + 38 + ] }, "loc": null, - "range": { - "start": 32, - "end": 38 - } + "range": [ + 32, + 38 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 39 - } + "range": [ + 26, + 39 + ] }, { "type": "IfStatement", @@ -113,10 +113,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "consequent": { "type": "BlockStatement", @@ -132,32 +132,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 65, - "end": 67 - } + "range": [ + 65, + 67 + ] }, "loc": null, - "range": { - "start": 61, - "end": 67 - } + "range": [ + 61, + 67 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 68 - } + "range": [ + 55, + 68 + ] }, { "type": "IfStatement", @@ -166,10 +166,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "consequent": { "type": "BlockStatement", @@ -185,27 +185,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 94 - } + "range": [ + 90, + 94 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 94 - } + "range": [ + 88, + 94 + ] }, "arguments": [ { @@ -213,38 +213,38 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 98 - } + "range": [ + 88, + 98 + ] } ], "loc": null, - "range": { - "start": 80, - "end": 104 - } + "range": [ + 80, + 104 + ] }, "alternate": null, "loc": null, - "range": { - "start": 73, - "end": 104 - } + "range": [ + 73, + 104 + ] }, { "type": "ExpressionStatement", @@ -257,27 +257,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 115 - } + "range": [ + 111, + 115 + ] }, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 115 - } + "range": [ + 109, + 115 + ] }, "arguments": [ { @@ -288,18 +288,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 117, - "end": 120 - } + "range": [ + 117, + 120 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 116, - "end": 121 - } + "range": [ + 116, + 121 + ] }, "children": [ { @@ -309,16 +309,16 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] } ], "closingElement": { @@ -327,50 +327,50 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 126, - "end": 129 - } + "range": [ + 126, + 129 + ] }, "loc": null, - "range": { - "start": 124, - "end": 130 - } + "range": [ + 124, + 130 + ] }, "loc": null, - "range": { - "start": 116, - "end": 130 - } + "range": [ + 116, + 130 + ] } ], "loc": null, - "range": { - "start": 109, - "end": 131 - } + "range": [ + 109, + 131 + ] }, "directive": null, "loc": null, - "range": { - "start": 109, - "end": 132 - } + "range": [ + 109, + 132 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 136 - } + "range": [ + 49, + 136 + ] }, "alternate": null, "loc": null, - "range": { - "start": 42, - "end": 136 - } + "range": [ + 42, + 136 + ] }, { "type": "ReturnStatement", @@ -379,42 +379,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 147 - } + "range": [ + 146, + 147 + ] }, "loc": null, - "range": { - "start": 139, - "end": 148 - } + "range": [ + 139, + 148 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 150 - } + "range": [ + 22, + 150 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 150 - }, + "range": [ + 0, + 150 + ], "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-logical.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-logical.js.snap index 5c01415077..6bc3b69d12 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-logical.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-logical.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -71,47 +71,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "VariableDeclaration", @@ -124,10 +124,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "init": { "type": "ArrayExpression", @@ -139,47 +139,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "computed": false, "loc": null, - "range": { - "start": 64, - "end": 71 - } + "range": [ + 64, + 71 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 72 - } + "range": [ + 63, + 72 + ] }, "loc": null, - "range": { - "start": 59, - "end": 72 - } + "range": [ + 59, + 72 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 73 - } + "range": [ + 53, + 73 + ] }, { "type": "VariableDeclaration", @@ -192,10 +192,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "init": { "type": "ArrayExpression", @@ -207,47 +207,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 92 - } + "range": [ + 87, + 92 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "computed": false, "loc": null, - "range": { - "start": 87, - "end": 94 - } + "range": [ + 87, + 94 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] }, "loc": null, - "range": { - "start": 82, - "end": 95 - } + "range": [ + 82, + 95 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 96 - } + "range": [ + 76, + 96 + ] }, { "type": "ReturnStatement", @@ -262,74 +262,74 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 233, - "end": 234 - } + "range": [ + 233, + 234 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 239 - } + "range": [ + 238, + 239 + ] }, "loc": null, - "range": { - "start": 233, - "end": 239 - } + "range": [ + 233, + 239 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 245 - } + "range": [ + 244, + 245 + ] }, "loc": null, - "range": { - "start": 232, - "end": 245 - } + "range": [ + 232, + 245 + ] }, "loc": null, - "range": { - "start": 225, - "end": 246 - } + "range": [ + 225, + 246 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 248 - } + "range": [ + 26, + 248 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 248 - }, + "range": [ + 0, + 248 + ], "loc": null, - "range": { - "start": 0, - "end": 248 - } + "range": [ + 0, + 248 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 248 - } + "range": [ + 0, + 248 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-allocating-dependency.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-allocating-dependency.js.snap index da5ffcc410..b92458efe5 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-allocating-dependency.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-allocating-dependency.js.snap @@ -32,10 +32,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -43,10 +43,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -63,10 +63,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "init": { "type": "ArrayExpression", @@ -78,47 +78,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 107 - } + "range": [ + 100, + 107 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 108 - } + "range": [ + 99, + 108 + ] }, "loc": null, - "range": { - "start": 95, - "end": 108 - } + "range": [ + 95, + 108 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 109 - } + "range": [ + 89, + 109 + ] }, { "type": "VariableDeclaration", @@ -131,32 +131,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 356, - "end": 357 - } + "range": [ + 356, + 357 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 360, - "end": 362 - } + "range": [ + 360, + 362 + ] }, "loc": null, - "range": { - "start": 356, - "end": 362 - } + "range": [ + 356, + 362 + ] } ], "loc": null, - "range": { - "start": 350, - "end": 363 - } + "range": [ + 350, + 363 + ] }, { "type": "VariableDeclaration", @@ -169,32 +169,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 372, - "end": 373 - } + "range": [ + 372, + 373 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 376, - "end": 378 - } + "range": [ + 376, + 378 + ] }, "loc": null, - "range": { - "start": 372, - "end": 378 - } + "range": [ + 372, + 378 + ] } ], "loc": null, - "range": { - "start": 366, - "end": 379 - } + "range": [ + 366, + 379 + ] }, { "type": "ExpressionStatement", @@ -208,50 +208,50 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 382, - "end": 383 - } + "range": [ + 382, + 383 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 384, - "end": 385 - } + "range": [ + 384, + 385 + ] }, "computed": false, "loc": null, - "range": { - "start": 382, - "end": 385 - } + "range": [ + 382, + 385 + ] }, "right": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 388, - "end": 389 - } + "range": [ + 388, + 389 + ] }, "loc": null, - "range": { - "start": 382, - "end": 389 - } + "range": [ + 382, + 389 + ] }, "directive": null, "loc": null, - "range": { - "start": 382, - "end": 390 - } + "range": [ + 382, + 390 + ] }, { "type": "ExpressionStatement", @@ -264,27 +264,27 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 393, - "end": 394 - } + "range": [ + 393, + 394 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 395, - "end": 399 - } + "range": [ + 395, + 399 + ] }, "computed": false, "loc": null, - "range": { - "start": 393, - "end": 399 - } + "range": [ + 393, + 399 + ] }, "arguments": [ { @@ -294,41 +294,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 400, - "end": 405 - } + "range": [ + 400, + 405 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 406, - "end": 407 - } + "range": [ + 406, + 407 + ] }, "computed": false, "loc": null, - "range": { - "start": 400, - "end": 407 - } + "range": [ + 400, + 407 + ] } ], "loc": null, - "range": { - "start": 393, - "end": 408 - } + "range": [ + 393, + 408 + ] }, "directive": null, "loc": null, - "range": { - "start": 393, - "end": 409 - } + "range": [ + 393, + 409 + ] }, { "type": "ReturnStatement", @@ -337,42 +337,42 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 420, - "end": 421 - } + "range": [ + 420, + 421 + ] }, "loc": null, - "range": { - "start": 413, - "end": 422 - } + "range": [ + 413, + 422 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 424 - } + "range": [ + 26, + 424 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 424 - }, + "range": [ + 0, + 424 + ], "loc": null, - "range": { - "start": 0, - "end": 424 - } + "range": [ + 0, + 424 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 424 - } + "range": [ + 0, + 424 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-allocating-nested-dependency.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-allocating-nested-dependency.js.snap index f5644469a2..6335ad8970 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-allocating-nested-dependency.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-allocating-nested-dependency.js.snap @@ -41,10 +41,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -52,10 +52,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -72,10 +72,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 259, - "end": 260 - } + "range": [ + 259, + 260 + ] }, "init": { "type": "ArrayExpression", @@ -87,47 +87,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 269 - } + "range": [ + 264, + 269 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 270, - "end": 271 - } + "range": [ + 270, + 271 + ] }, "computed": false, "loc": null, - "range": { - "start": 264, - "end": 271 - } + "range": [ + 264, + 271 + ] } ], "loc": null, - "range": { - "start": 263, - "end": 272 - } + "range": [ + 263, + 272 + ] }, "loc": null, - "range": { - "start": 259, - "end": 272 - } + "range": [ + 259, + 272 + ] } ], "loc": null, - "range": { - "start": 253, - "end": 273 - } + "range": [ + 253, + 273 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 463, - "end": 464 - } + "range": [ + 463, + 464 + ] }, "init": { "type": "ArrayExpression", @@ -153,30 +153,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 468, - "end": 469 - } + "range": [ + 468, + 469 + ] } ], "loc": null, - "range": { - "start": 467, - "end": 470 - } + "range": [ + 467, + 470 + ] }, "loc": null, - "range": { - "start": 463, - "end": 470 - } + "range": [ + 463, + 470 + ] } ], "loc": null, - "range": { - "start": 457, - "end": 471 - } + "range": [ + 457, + 471 + ] }, { "type": "VariableDeclaration", @@ -189,32 +189,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 796, - "end": 797 - } + "range": [ + 796, + 797 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 800, - "end": 802 - } + "range": [ + 800, + 802 + ] }, "loc": null, - "range": { - "start": 796, - "end": 802 - } + "range": [ + 796, + 802 + ] } ], "loc": null, - "range": { - "start": 790, - "end": 803 - } + "range": [ + 790, + 803 + ] }, { "type": "VariableDeclaration", @@ -227,32 +227,32 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 812, - "end": 813 - } + "range": [ + 812, + 813 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 816, - "end": 818 - } + "range": [ + 816, + 818 + ] }, "loc": null, - "range": { - "start": 812, - "end": 818 - } + "range": [ + 812, + 818 + ] } ], "loc": null, - "range": { - "start": 806, - "end": 819 - } + "range": [ + 806, + 819 + ] }, { "type": "ExpressionStatement", @@ -266,50 +266,50 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 822, - "end": 823 - } + "range": [ + 822, + 823 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 824, - "end": 825 - } + "range": [ + 824, + 825 + ] }, "computed": false, "loc": null, - "range": { - "start": 822, - "end": 825 - } + "range": [ + 822, + 825 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 828, - "end": 829 - } + "range": [ + 828, + 829 + ] }, "loc": null, - "range": { - "start": 822, - "end": 829 - } + "range": [ + 822, + 829 + ] }, "directive": null, "loc": null, - "range": { - "start": 822, - "end": 830 - } + "range": [ + 822, + 830 + ] }, { "type": "ExpressionStatement", @@ -322,27 +322,27 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 833, - "end": 834 - } + "range": [ + 833, + 834 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 835, - "end": 839 - } + "range": [ + 835, + 839 + ] }, "computed": false, "loc": null, - "range": { - "start": 833, - "end": 839 - } + "range": [ + 833, + 839 + ] }, "arguments": [ { @@ -352,41 +352,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 840, - "end": 845 - } + "range": [ + 840, + 845 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 846, - "end": 847 - } + "range": [ + 846, + 847 + ] }, "computed": false, "loc": null, - "range": { - "start": 840, - "end": 847 - } + "range": [ + 840, + 847 + ] } ], "loc": null, - "range": { - "start": 833, - "end": 848 - } + "range": [ + 833, + 848 + ] }, "directive": null, "loc": null, - "range": { - "start": 833, - "end": 849 - } + "range": [ + 833, + 849 + ] }, { "type": "ReturnStatement", @@ -395,42 +395,42 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 860, - "end": 861 - } + "range": [ + 860, + 861 + ] }, "loc": null, - "range": { - "start": 853, - "end": 862 - } + "range": [ + 853, + 862 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 864 - } + "range": [ + 26, + 864 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 864 - }, + "range": [ + 0, + 864 + ], "loc": null, - "range": { - "start": 0, - "end": 864 - } + "range": [ + 0, + 864 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 864 - } + "range": [ + 0, + 864 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-primitive-dependency.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-primitive-dependency.js.snap index f71f9aa255..8b82efd575 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-primitive-dependency.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-non-escaping-interleaved-primitive-dependency.js.snap @@ -34,10 +34,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -45,10 +45,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -65,10 +65,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 241, - "end": 242 - } + "range": [ + 241, + 242 + ] }, "init": { "type": "BinaryExpression", @@ -79,27 +79,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 245, - "end": 250 - } + "range": [ + 245, + 250 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 251, - "end": 252 - } + "range": [ + 251, + 252 + ] }, "computed": false, "loc": null, - "range": { - "start": 245, - "end": 252 - } + "range": [ + 245, + 252 + ] }, "operator": "+", "right": { @@ -109,46 +109,46 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 260 - } + "range": [ + 255, + 260 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 262 - } + "range": [ + 261, + 262 + ] }, "computed": false, "loc": null, - "range": { - "start": 255, - "end": 262 - } + "range": [ + 255, + 262 + ] }, "loc": null, - "range": { - "start": 245, - "end": 262 - } + "range": [ + 245, + 262 + ] }, "loc": null, - "range": { - "start": 241, - "end": 262 - } + "range": [ + 241, + 262 + ] } ], "loc": null, - "range": { - "start": 235, - "end": 263 - } + "range": [ + 235, + 263 + ] }, { "type": "VariableDeclaration", @@ -161,32 +161,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 510, - "end": 511 - } + "range": [ + 510, + 511 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 514, - "end": 516 - } + "range": [ + 514, + 516 + ] }, "loc": null, - "range": { - "start": 510, - "end": 516 - } + "range": [ + 510, + 516 + ] } ], "loc": null, - "range": { - "start": 504, - "end": 517 - } + "range": [ + 504, + 517 + ] }, { "type": "VariableDeclaration", @@ -199,32 +199,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 526, - "end": 527 - } + "range": [ + 526, + 527 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 530, - "end": 532 - } + "range": [ + 530, + 532 + ] }, "loc": null, - "range": { - "start": 526, - "end": 532 - } + "range": [ + 526, + 532 + ] } ], "loc": null, - "range": { - "start": 520, - "end": 533 - } + "range": [ + 520, + 533 + ] }, { "type": "ExpressionStatement", @@ -238,50 +238,50 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 536, - "end": 537 - } + "range": [ + 536, + 537 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 538, - "end": 539 - } + "range": [ + 538, + 539 + ] }, "computed": false, "loc": null, - "range": { - "start": 536, - "end": 539 - } + "range": [ + 536, + 539 + ] }, "right": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 542, - "end": 543 - } + "range": [ + 542, + 543 + ] }, "loc": null, - "range": { - "start": 536, - "end": 543 - } + "range": [ + 536, + 543 + ] }, "directive": null, "loc": null, - "range": { - "start": 536, - "end": 544 - } + "range": [ + 536, + 544 + ] }, { "type": "ExpressionStatement", @@ -294,27 +294,27 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 547, - "end": 548 - } + "range": [ + 547, + 548 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 549, - "end": 553 - } + "range": [ + 549, + 553 + ] }, "computed": false, "loc": null, - "range": { - "start": 547, - "end": 553 - } + "range": [ + 547, + 553 + ] }, "arguments": [ { @@ -324,41 +324,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 554, - "end": 559 - } + "range": [ + 554, + 559 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 560, - "end": 561 - } + "range": [ + 560, + 561 + ] }, "computed": false, "loc": null, - "range": { - "start": 554, - "end": 561 - } + "range": [ + 554, + 561 + ] } ], "loc": null, - "range": { - "start": 547, - "end": 562 - } + "range": [ + 547, + 562 + ] }, "directive": null, "loc": null, - "range": { - "start": 547, - "end": 563 - } + "range": [ + 547, + 563 + ] }, { "type": "ReturnStatement", @@ -367,42 +367,42 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 574, - "end": 575 - } + "range": [ + 574, + 575 + ] }, "loc": null, - "range": { - "start": 567, - "end": 576 - } + "range": [ + 567, + 576 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 578 - } + "range": [ + 26, + 578 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 578 - }, + "range": [ + 0, + 578 + ], "loc": null, - "range": { - "start": 0, - "end": 578 - } + "range": [ + 0, + 578 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 578 - } + "range": [ + 0, + 578 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-conditional-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-conditional-test.js.snap index a8246fa356..5291bbbc4a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-conditional-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-conditional-test.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -68,47 +68,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "VariableDeclaration", @@ -121,10 +121,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "init": { "type": "ConditionalExpression", @@ -133,10 +133,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "alternate": { "type": "MemberExpression", @@ -145,27 +145,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 82 - } + "range": [ + 77, + 82 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] }, "computed": false, "loc": null, - "range": { - "start": 77, - "end": 84 - } + "range": [ + 77, + 84 + ] }, "consequent": { "type": "MemberExpression", @@ -174,46 +174,46 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 67, - "end": 74 - } + "range": [ + 67, + 74 + ] }, "loc": null, - "range": { - "start": 63, - "end": 84 - } + "range": [ + 63, + 84 + ] }, "loc": null, - "range": { - "start": 59, - "end": 84 - } + "range": [ + 59, + 84 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 85 - } + "range": [ + 53, + 85 + ] }, { "type": "ReturnStatement", @@ -222,42 +222,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 99 - } + "range": [ + 26, + 99 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 99 - }, + "range": [ + 0, + 99 + ], "loc": null, - "range": { - "start": 0, - "end": 99 - } + "range": [ + 0, + 99 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 99 - } + "range": [ + 0, + 99 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-if-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-if-test.js.snap index 6414e741d1..fd85998dba 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-if-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-if-test.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -73,47 +73,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "VariableDeclaration", @@ -126,24 +126,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "init": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] }, { "type": "IfStatement", @@ -152,10 +152,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "consequent": { "type": "BlockStatement", @@ -170,10 +170,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "right": { "type": "MemberExpression", @@ -182,47 +182,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 86 - } + "range": [ + 79, + 86 + ] }, "loc": null, - "range": { - "start": 75, - "end": 86 - } + "range": [ + 75, + 86 + ] }, "directive": null, "loc": null, - "range": { - "start": 75, - "end": 87 - } + "range": [ + 75, + 87 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 91 - } + "range": [ + 69, + 91 + ] }, "alternate": { "type": "BlockStatement", @@ -237,10 +237,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "right": { "type": "MemberExpression", @@ -249,53 +249,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 112 - } + "range": [ + 107, + 112 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "computed": false, "loc": null, - "range": { - "start": 107, - "end": 114 - } + "range": [ + 107, + 114 + ] }, "loc": null, - "range": { - "start": 103, - "end": 114 - } + "range": [ + 103, + 114 + ] }, "directive": null, "loc": null, - "range": { - "start": 103, - "end": 115 - } + "range": [ + 103, + 115 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 119 - } + "range": [ + 97, + 119 + ] }, "loc": null, - "range": { - "start": 62, - "end": 119 - } + "range": [ + 62, + 119 + ] }, { "type": "ReturnStatement", @@ -304,42 +304,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 130 - } + "range": [ + 129, + 130 + ] }, "loc": null, - "range": { - "start": 122, - "end": 131 - } + "range": [ + 122, + 131 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 133 - } + "range": [ + 26, + 133 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 133 - }, + "range": [ + 0, + 133 + ], "loc": null, - "range": { - "start": 0, - "end": 133 - } + "range": [ + 0, + 133 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 133 - } + "range": [ + 0, + 133 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-switch-case.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-switch-case.js.snap index 719209f252..7c0b9a0999 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-switch-case.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-switch-case.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -73,47 +73,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "VariableDeclaration", @@ -126,10 +126,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "init": { "type": "MemberExpression", @@ -138,40 +138,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 68 - } + "range": [ + 61, + 68 + ] }, "loc": null, - "range": { - "start": 57, - "end": 68 - } + "range": [ + 57, + 68 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 69 - } + "range": [ + 53, + 69 + ] }, { "type": "SwitchStatement", @@ -182,27 +182,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "computed": false, "loc": null, - "range": { - "start": 80, - "end": 87 - } + "range": [ + 80, + 87 + ] }, "cases": [ { @@ -212,10 +212,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "consequent": [ { @@ -231,10 +231,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "right": { "type": "MemberExpression", @@ -243,61 +243,61 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 122 - } + "range": [ + 115, + 122 + ] }, "loc": null, - "range": { - "start": 111, - "end": 122 - } + "range": [ + 111, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 111, - "end": 123 - } + "range": [ + 111, + 123 + ] } ], "loc": null, - "range": { - "start": 103, - "end": 129 - } + "range": [ + 103, + 129 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 129 - } + "range": [ + 95, + 129 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 133 - } + "range": [ + 72, + 133 + ] }, { "type": "ReturnStatement", @@ -306,42 +306,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, "loc": null, - "range": { - "start": 136, - "end": 145 - } + "range": [ + 136, + 145 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 147 - } + "range": [ + 26, + 147 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 147 - }, + "range": [ + 0, + 147 + ], "loc": null, - "range": { - "start": 0, - "end": 147 - } + "range": [ + 0, + 147 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 147 - } + "range": [ + 0, + 147 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-switch-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-switch-test.js.snap index 4fee5cc971..d4b8c7a9e1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-switch-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@escape-analysis-not-switch-test.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", @@ -73,47 +73,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 41, - "end": 48 - } + "range": [ + 41, + 48 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "VariableDeclaration", @@ -126,10 +126,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "init": { "type": "MemberExpression", @@ -138,40 +138,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 68 - } + "range": [ + 61, + 68 + ] }, "loc": null, - "range": { - "start": 57, - "end": 68 - } + "range": [ + 57, + 68 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 69 - } + "range": [ + 53, + 69 + ] }, { "type": "SwitchStatement", @@ -180,10 +180,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "cases": [ { @@ -192,10 +192,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 94, - "end": 98 - } + "range": [ + 94, + 98 + ] }, "consequent": [ { @@ -211,10 +211,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "right": { "type": "MemberExpression", @@ -223,61 +223,61 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 112, - "end": 119 - } + "range": [ + 112, + 119 + ] }, "loc": null, - "range": { - "start": 108, - "end": 119 - } + "range": [ + 108, + 119 + ] }, "directive": null, "loc": null, - "range": { - "start": 108, - "end": 120 - } + "range": [ + 108, + 120 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 126 - } + "range": [ + 100, + 126 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 126 - } + "range": [ + 89, + 126 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 130 - } + "range": [ + 72, + 130 + ] }, { "type": "ReturnStatement", @@ -286,42 +286,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] }, "loc": null, - "range": { - "start": 133, - "end": 142 - } + "range": [ + 133, + 142 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 144 - } + "range": [ + 26, + 144 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 144 - }, + "range": [ + 0, + 144 + ], "loc": null, - "range": { - "start": 0, - "end": 144 - } + "range": [ + 0, + 144 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 144 - } + "range": [ + 0, + 144 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@expression-with-assignment-dynamic.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@expression-with-assignment-dynamic.js.snap index 9bb5437034..23b3a96e8e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@expression-with-assignment-dynamic.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@expression-with-assignment-dynamic.js.snap @@ -21,10 +21,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 12 - } + "range": [ + 11, + 12 + ] } ], "body": { @@ -52,33 +52,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] }, "init": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "loc": null, - "range": { - "start": 22, - "end": 27 - } + "range": [ + 22, + 27 + ] } ], "loc": null, - "range": { - "start": 18, - "end": 28 - } + "range": [ + 18, + 28 + ] }, { "type": "ReturnStatement", @@ -91,10 +91,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "operator": "+", "right": { @@ -105,31 +105,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "loc": null, - "range": { - "start": 38, - "end": 49 - } + "range": [ + 38, + 49 + ] }, "operator": "+", "right": { @@ -137,48 +137,48 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "loc": null, - "range": { - "start": 38, - "end": 53 - } + "range": [ + 38, + 53 + ] }, "loc": null, - "range": { - "start": 31, - "end": 54 - } + "range": [ + 31, + 54 + ] } ], "loc": null, - "range": { - "start": 14, - "end": 56 - } + "range": [ + 14, + 56 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 56 - }, + "range": [ + 0, + 56 + ], "loc": null, - "range": { - "start": 0, - "end": 56 - } + "range": [ + 0, + 56 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 56 - } + "range": [ + 0, + 56 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@expression-with-assignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@expression-with-assignment.js.snap index f20a58dc4e..2d16cbff11 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@expression-with-assignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@expression-with-assignment.js.snap @@ -21,10 +21,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [], "body": { @@ -41,32 +41,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 22 - } + "range": [ + 21, + 22 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "loc": null, - "range": { - "start": 21, - "end": 26 - } + "range": [ + 21, + 26 + ] } ], "loc": null, - "range": { - "start": 17, - "end": 27 - } + "range": [ + 17, + 27 + ] }, { "type": "ReturnStatement", @@ -79,10 +79,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "operator": "+", "right": { @@ -93,31 +93,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "loc": null, - "range": { - "start": 42, - "end": 47 - } + "range": [ + 42, + 47 + ] }, "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] }, "operator": "+", "right": { @@ -125,48 +125,48 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "loc": null, - "range": { - "start": 37, - "end": 52 - } + "range": [ + 37, + 52 + ] }, "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] } ], "loc": null, - "range": { - "start": 13, - "end": 55 - } + "range": [ + 13, + 55 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 55 - }, + "range": [ + 0, + 55 + ], "loc": null, - "range": { - "start": 0, - "end": 55 - } + "range": [ + 0, + 55 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 55 - } + "range": [ + 0, + 55 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@extend-scopes-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@extend-scopes-if.js.snap index c42196a68a..e61ad70600 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@extend-scopes-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@extend-scopes-if.js.snap @@ -31,10 +31,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -42,30 +42,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -82,32 +82,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 34, - "end": 36 - } + "range": [ + 34, + 36 + ] }, "loc": null, - "range": { - "start": 30, - "end": 36 - } + "range": [ + 30, + 36 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 37 - } + "range": [ + 26, + 37 + ] }, { "type": "IfStatement", @@ -116,10 +116,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "consequent": { "type": "BlockStatement", @@ -131,10 +131,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "consequent": { "type": "BlockStatement", @@ -146,10 +146,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "consequent": { "type": "BlockStatement", @@ -165,93 +165,93 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 91 - } + "range": [ + 87, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 85, - "end": 91 - } + "range": [ + 85, + 91 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 94 - } + "range": [ + 85, + 94 + ] }, "directive": null, "loc": null, - "range": { - "start": 85, - "end": 95 - } + "range": [ + 85, + 95 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 103 - } + "range": [ + 75, + 103 + ] }, "alternate": null, "loc": null, - "range": { - "start": 68, - "end": 103 - } + "range": [ + 68, + 103 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 109 - } + "range": [ + 60, + 109 + ] }, "alternate": null, "loc": null, - "range": { - "start": 53, - "end": 109 - } + "range": [ + 53, + 109 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 113 - } + "range": [ + 47, + 113 + ] }, "alternate": null, "loc": null, - "range": { - "start": 40, - "end": 113 - } + "range": [ + 40, + 113 + ] }, { "type": "IfStatement", @@ -262,27 +262,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 128 - } + "range": [ + 122, + 128 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 128 - } + "range": [ + 120, + 128 + ] }, "consequent": { "type": "BlockStatement", @@ -294,72 +294,72 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, "loc": null, - "range": { - "start": 136, - "end": 145 - } + "range": [ + 136, + 145 + ] } ], "loc": null, - "range": { - "start": 130, - "end": 149 - } + "range": [ + 130, + 149 + ] }, "alternate": null, "loc": null, - "range": { - "start": 116, - "end": 149 - } + "range": [ + 116, + 149 + ] }, { "type": "ReturnStatement", "argument": { "type": "NullLiteral", "loc": null, - "range": { - "start": 159, - "end": 163 - } + "range": [ + 159, + 163 + ] }, "loc": null, - "range": { - "start": 152, - "end": 164 - } + "range": [ + 152, + 164 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 166 - } + "range": [ + 22, + 166 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 166 - }, + "range": [ + 0, + 166 + ], "loc": null, - "range": { - "start": 0, - "end": 166 - } + "range": [ + 0, + 166 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 166 - } + "range": [ + 0, + 166 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-call-complex-param-value.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-call-complex-param-value.js.snap index d3c4271652..b4e3c08884 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-call-complex-param-value.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-call-complex-param-value.js.snap @@ -29,32 +29,32 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] }, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] } ], "source": { "type": "StringLiteral", "value": "fbt", "loc": null, - "range": { - "start": 16, - "end": 21 - } + "range": [ + 16, + 21 + ] }, "loc": null, - "range": { - "start": 0, - "end": 22 - } + "range": [ + 0, + 22 + ] }, { "type": "FunctionDeclaration", @@ -63,10 +63,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] }, "params": [ { @@ -74,10 +74,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] } ], "body": { @@ -94,10 +94,10 @@ Output: "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 64 - } + "range": [ + 60, + 64 + ] }, "init": { "type": "CallExpression", @@ -106,10 +106,10 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] }, "arguments": [ { @@ -123,10 +123,10 @@ Output: "raw": "Hello, " }, "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, { "type": "TemplateElement", @@ -136,10 +136,10 @@ Output: "raw": "!" }, "loc": null, - "range": { - "start": 133, - "end": 136 - } + "range": [ + 133, + 136 + ] } ], "expressions": [ @@ -152,37 +152,37 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 89 - } + "range": [ + 86, + 89 + ] }, "property": { "type": "Identifier", "name": "param", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] }, "computed": false, "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] }, "arguments": [ { "type": "StringLiteral", "value": "(key) name", "loc": null, - "range": { - "start": 96, - "end": 108 - } + "range": [ + 96, + 108 + ] }, { "type": "CallExpression", @@ -191,10 +191,10 @@ Output: "name": "capitalize", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 120 - } + "range": [ + 110, + 120 + ] }, "arguments": [ { @@ -204,77 +204,77 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 126 - } + "range": [ + 121, + 126 + ] }, "property": { "type": "Identifier", "name": "name", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 131 - } + "range": [ + 127, + 131 + ] }, "computed": false, "loc": null, - "range": { - "start": 121, - "end": 131 - } + "range": [ + 121, + 131 + ] } ], "loc": null, - "range": { - "start": 110, - "end": 132 - } + "range": [ + 110, + 132 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 133 - } + "range": [ + 86, + 133 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 136 - } + "range": [ + 76, + 136 + ] }, { "type": "StringLiteral", "value": "(description) Greeting", "loc": null, - "range": { - "start": 142, - "end": 166 - } + "range": [ + 142, + 166 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 170 - } + "range": [ + 67, + 170 + ] }, "loc": null, - "range": { - "start": 60, - "end": 170 - } + "range": [ + 60, + 170 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 171 - } + "range": [ + 54, + 171 + ] }, { "type": "ReturnStatement", @@ -286,18 +286,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 182, - "end": 185 - } + "range": [ + 182, + 185 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 181, - "end": 186 - } + "range": [ + 181, + 186 + ] }, "children": [ { @@ -307,16 +307,16 @@ Output: "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 191 - } + "range": [ + 187, + 191 + ] }, "loc": null, - "range": { - "start": 186, - "end": 192 - } + "range": [ + 186, + 192 + ] } ], "closingElement": { @@ -325,54 +325,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 194, - "end": 197 - } + "range": [ + 194, + 197 + ] }, "loc": null, - "range": { - "start": 192, - "end": 198 - } + "range": [ + 192, + 198 + ] }, "loc": null, - "range": { - "start": 181, - "end": 198 - } + "range": [ + 181, + 198 + ] }, "loc": null, - "range": { - "start": 174, - "end": 199 - } + "range": [ + 174, + 199 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 201 - } + "range": [ + 50, + 201 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 24, - "end": 201 - }, + "range": [ + 24, + 201 + ], "loc": null, - "range": { - "start": 24, - "end": 201 - } + "range": [ + 24, + 201 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 201 - } + "range": [ + 0, + 201 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-call.js.snap index 8f774e062c..12267e7880 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-call.js.snap @@ -29,32 +29,32 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] }, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] } ], "source": { "type": "StringLiteral", "value": "fbt", "loc": null, - "range": { - "start": 16, - "end": 21 - } + "range": [ + 16, + 21 + ] }, "loc": null, - "range": { - "start": 0, - "end": 22 - } + "range": [ + 0, + 22 + ] }, { "type": "FunctionDeclaration", @@ -63,10 +63,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] }, "params": [ { @@ -74,10 +74,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] } ], "body": { @@ -94,10 +94,10 @@ Output: "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 64 - } + "range": [ + 60, + 64 + ] }, "init": { "type": "CallExpression", @@ -106,10 +106,10 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] }, "arguments": [ { @@ -123,10 +123,10 @@ Output: "raw": "" }, "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, { "type": "TemplateElement", @@ -136,10 +136,10 @@ Output: "raw": " items" }, "loc": null, - "range": { - "start": 116, - "end": 124 - } + "range": [ + 116, + 124 + ] } ], "expressions": [ @@ -152,37 +152,37 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 82 - } + "range": [ + 79, + 82 + ] }, "property": { "type": "Identifier", "name": "param", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 88 - } + "range": [ + 83, + 88 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 88 - } + "range": [ + 79, + 88 + ] }, "arguments": [ { "type": "StringLiteral", "value": "(key) count", "loc": null, - "range": { - "start": 89, - "end": 102 - } + "range": [ + 89, + 102 + ] }, { "type": "MemberExpression", @@ -191,70 +191,70 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 109 - } + "range": [ + 104, + 109 + ] }, "property": { "type": "Identifier", "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 115 - } + "range": [ + 110, + 115 + ] }, "computed": false, "loc": null, - "range": { - "start": 104, - "end": 115 - } + "range": [ + 104, + 115 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 116 - } + "range": [ + 79, + 116 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 124 - } + "range": [ + 76, + 124 + ] }, { "type": "StringLiteral", "value": "(description) Number of items", "loc": null, - "range": { - "start": 130, - "end": 161 - } + "range": [ + 130, + 161 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 165 - } + "range": [ + 67, + 165 + ] }, "loc": null, - "range": { - "start": 60, - "end": 165 - } + "range": [ + 60, + 165 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 166 - } + "range": [ + 54, + 166 + ] }, { "type": "ReturnStatement", @@ -266,18 +266,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 177, - "end": 180 - } + "range": [ + 177, + 180 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 176, - "end": 181 - } + "range": [ + 176, + 181 + ] }, "children": [ { @@ -287,16 +287,16 @@ Output: "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 182, - "end": 186 - } + "range": [ + 182, + 186 + ] }, "loc": null, - "range": { - "start": 181, - "end": 187 - } + "range": [ + 181, + 187 + ] } ], "closingElement": { @@ -305,54 +305,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 189, - "end": 192 - } + "range": [ + 189, + 192 + ] }, "loc": null, - "range": { - "start": 187, - "end": 193 - } + "range": [ + 187, + 193 + ] }, "loc": null, - "range": { - "start": 176, - "end": 193 - } + "range": [ + 176, + 193 + ] }, "loc": null, - "range": { - "start": 169, - "end": 194 - } + "range": [ + 169, + 194 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 196 - } + "range": [ + 50, + 196 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 24, - "end": 196 - }, + "range": [ + 24, + 196 + ], "loc": null, - "range": { - "start": 24, - "end": 196 - } + "range": [ + 24, + 196 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 196 - } + "range": [ + 0, + 196 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-params-complex-param-value.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-params-complex-param-value.js.snap index f3dfa55a2f..59434db874 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-params-complex-param-value.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-params-complex-param-value.js.snap @@ -29,32 +29,32 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] }, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] } ], "source": { "type": "StringLiteral", "value": "fbt", "loc": null, - "range": { - "start": 16, - "end": 21 - } + "range": [ + 16, + 21 + ] }, "loc": null, - "range": { - "start": 0, - "end": 22 - } + "range": [ + 0, + 22 + ] }, { "type": "FunctionDeclaration", @@ -63,10 +63,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] }, "params": [ { @@ -74,10 +74,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] } ], "body": { @@ -93,10 +93,10 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 68, - "end": 71 - } + "range": [ + 68, + 71 + ] }, "attributes": [ { @@ -105,10 +105,10 @@ Output: "type": "JSXIdentifier", "name": "desc", "loc": null, - "range": { - "start": 72, - "end": 76 - } + "range": [ + 72, + 76 + ] }, "value": { "type": "JSXExpressionContainer", @@ -116,30 +116,30 @@ Output: "type": "StringLiteral", "value": "Dialog to show to user", "loc": null, - "range": { - "start": 78, - "end": 102 - } + "range": [ + 78, + 102 + ] }, "loc": null, - "range": { - "start": 77, - "end": 103 - } + "range": [ + 77, + 103 + ] }, "loc": null, - "range": { - "start": 72, - "end": 103 - } + "range": [ + 72, + 103 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 67, - "end": 104 - } + "range": [ + 67, + 104 + ] }, "children": [ { @@ -147,10 +147,10 @@ Output: "value": "\n Hello ", "raw": "\n Hello ", "loc": null, - "range": { - "start": 104, - "end": 117 - } + "range": [ + 104, + 117 + ] }, { "type": "JSXElement", @@ -162,25 +162,25 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "name": { "type": "JSXIdentifier", "name": "param", "loc": null, - "range": { - "start": 122, - "end": 127 - } + "range": [ + 122, + 127 + ] }, "loc": null, - "range": { - "start": 118, - "end": 127 - } + "range": [ + 118, + 127 + ] }, "attributes": [ { @@ -189,34 +189,34 @@ Output: "type": "JSXIdentifier", "name": "name", "loc": null, - "range": { - "start": 128, - "end": 132 - } + "range": [ + 128, + 132 + ] }, "value": { "type": "JSXStringLiteral", "value": "user name", "raw": "\"user name\"", "loc": null, - "range": { - "start": 133, - "end": 144 - } + "range": [ + 133, + 144 + ] }, "loc": null, - "range": { - "start": 128, - "end": 144 - } + "range": [ + 128, + 144 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 117, - "end": 145 - } + "range": [ + 117, + 145 + ] }, "children": [ { @@ -228,10 +228,10 @@ Output: "name": "capitalize", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 156 - } + "range": [ + 146, + 156 + ] }, "arguments": [ { @@ -241,40 +241,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 162 - } + "range": [ + 157, + 162 + ] }, "property": { "type": "Identifier", "name": "name", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 167 - } + "range": [ + 163, + 167 + ] }, "computed": false, "loc": null, - "range": { - "start": 157, - "end": 167 - } + "range": [ + 157, + 167 + ] } ], "loc": null, - "range": { - "start": 146, - "end": 168 - } + "range": [ + 146, + 168 + ] }, "loc": null, - "range": { - "start": 145, - "end": 169 - } + "range": [ + 145, + 169 + ] } ], "closingElement": { @@ -285,47 +285,47 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 171, - "end": 174 - } + "range": [ + 171, + 174 + ] }, "name": { "type": "JSXIdentifier", "name": "param", "loc": null, - "range": { - "start": 175, - "end": 180 - } + "range": [ + 175, + 180 + ] }, "loc": null, - "range": { - "start": 171, - "end": 180 - } + "range": [ + 171, + 180 + ] }, "loc": null, - "range": { - "start": 169, - "end": 181 - } + "range": [ + 169, + 181 + ] }, "loc": null, - "range": { - "start": 117, - "end": 181 - } + "range": [ + 117, + 181 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 181, - "end": 186 - } + "range": [ + 181, + 186 + ] } ], "closingElement": { @@ -334,54 +334,54 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 188, - "end": 191 - } + "range": [ + 188, + 191 + ] }, "loc": null, - "range": { - "start": 186, - "end": 192 - } + "range": [ + 186, + 192 + ] }, "loc": null, - "range": { - "start": 67, - "end": 192 - } + "range": [ + 67, + 192 + ] }, "loc": null, - "range": { - "start": 54, - "end": 197 - } + "range": [ + 54, + 197 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 199 - } + "range": [ + 50, + 199 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 24, - "end": 199 - }, + "range": [ + 24, + 199 + ], "loc": null, - "range": { - "start": 24, - "end": 199 - } + "range": [ + 24, + 199 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 199 - } + "range": [ + 0, + 199 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-params.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-params.js.snap index 8d645f191c..e7d016236d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-params.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-params.js.snap @@ -29,32 +29,32 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] }, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] } ], "source": { "type": "StringLiteral", "value": "fbt", "loc": null, - "range": { - "start": 16, - "end": 21 - } + "range": [ + 16, + 21 + ] }, "loc": null, - "range": { - "start": 0, - "end": 22 - } + "range": [ + 0, + 22 + ] }, { "type": "FunctionDeclaration", @@ -63,10 +63,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 42 - } + "range": [ + 33, + 42 + ] }, "params": [ { @@ -74,10 +74,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] } ], "body": { @@ -93,10 +93,10 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 68, - "end": 71 - } + "range": [ + 68, + 71 + ] }, "attributes": [ { @@ -105,10 +105,10 @@ Output: "type": "JSXIdentifier", "name": "desc", "loc": null, - "range": { - "start": 72, - "end": 76 - } + "range": [ + 72, + 76 + ] }, "value": { "type": "JSXExpressionContainer", @@ -116,30 +116,30 @@ Output: "type": "StringLiteral", "value": "Dialog to show to user", "loc": null, - "range": { - "start": 78, - "end": 102 - } + "range": [ + 78, + 102 + ] }, "loc": null, - "range": { - "start": 77, - "end": 103 - } + "range": [ + 77, + 103 + ] }, "loc": null, - "range": { - "start": 72, - "end": 103 - } + "range": [ + 72, + 103 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 67, - "end": 104 - } + "range": [ + 67, + 104 + ] }, "children": [ { @@ -147,10 +147,10 @@ Output: "value": "\n Hello ", "raw": "\n Hello ", "loc": null, - "range": { - "start": 104, - "end": 117 - } + "range": [ + 104, + 117 + ] }, { "type": "JSXElement", @@ -162,25 +162,25 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "name": { "type": "JSXIdentifier", "name": "param", "loc": null, - "range": { - "start": 122, - "end": 127 - } + "range": [ + 122, + 127 + ] }, "loc": null, - "range": { - "start": 118, - "end": 127 - } + "range": [ + 118, + 127 + ] }, "attributes": [ { @@ -189,34 +189,34 @@ Output: "type": "JSXIdentifier", "name": "name", "loc": null, - "range": { - "start": 128, - "end": 132 - } + "range": [ + 128, + 132 + ] }, "value": { "type": "JSXStringLiteral", "value": "user name", "raw": "\"user name\"", "loc": null, - "range": { - "start": 133, - "end": 144 - } + "range": [ + 133, + 144 + ] }, "loc": null, - "range": { - "start": 128, - "end": 144 - } + "range": [ + 128, + 144 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 117, - "end": 145 - } + "range": [ + 117, + 145 + ] }, "children": [ { @@ -228,33 +228,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 151 - } + "range": [ + 146, + 151 + ] }, "property": { "type": "Identifier", "name": "name", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 156 - } + "range": [ + 152, + 156 + ] }, "computed": false, "loc": null, - "range": { - "start": 146, - "end": 156 - } + "range": [ + 146, + 156 + ] }, "loc": null, - "range": { - "start": 145, - "end": 157 - } + "range": [ + 145, + 157 + ] } ], "closingElement": { @@ -265,47 +265,47 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 159, - "end": 162 - } + "range": [ + 159, + 162 + ] }, "name": { "type": "JSXIdentifier", "name": "param", "loc": null, - "range": { - "start": 163, - "end": 168 - } + "range": [ + 163, + 168 + ] }, "loc": null, - "range": { - "start": 159, - "end": 168 - } + "range": [ + 159, + 168 + ] }, "loc": null, - "range": { - "start": 157, - "end": 169 - } + "range": [ + 157, + 169 + ] }, "loc": null, - "range": { - "start": 117, - "end": 169 - } + "range": [ + 117, + 169 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 169, - "end": 174 - } + "range": [ + 169, + 174 + ] } ], "closingElement": { @@ -314,54 +314,54 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 176, - "end": 179 - } + "range": [ + 176, + 179 + ] }, "loc": null, - "range": { - "start": 174, - "end": 180 - } + "range": [ + 174, + 180 + ] }, "loc": null, - "range": { - "start": 67, - "end": 180 - } + "range": [ + 67, + 180 + ] }, "loc": null, - "range": { - "start": 54, - "end": 185 - } + "range": [ + 54, + 185 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 187 - } + "range": [ + 50, + 187 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 24, - "end": 187 - }, + "range": [ + 24, + 187 + ], "loc": null, - "range": { - "start": 24, - "end": 187 - } + "range": [ + 24, + 187 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 187 - } + "range": [ + 0, + 187 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-template-string-same-scope.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-template-string-same-scope.js.snap index ac851a9473..425f9bab12 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-template-string-same-scope.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@fbt-template-string-same-scope.js.snap @@ -37,32 +37,32 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] }, "loc": null, - "range": { - "start": 7, - "end": 10 - } + "range": [ + 7, + 10 + ] } ], "source": { "type": "StringLiteral", "value": "fbt", "loc": null, - "range": { - "start": 16, - "end": 21 - } + "range": [ + 16, + 21 + ] }, "loc": null, - "range": { - "start": 0, - "end": 22 - } + "range": [ + 0, + 22 + ] }, { "type": "ExportNamedDeclaration", @@ -73,10 +73,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "params": [ { @@ -84,10 +84,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] } ], "body": { @@ -104,32 +104,32 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 65, - "end": 74 - } + "range": [ + 65, + 74 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 75 - } + "range": [ + 61, + 75 + ] }, { "type": "IfStatement", @@ -140,27 +140,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] }, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 93 - } + "range": [ + 82, + 93 + ] }, "consequent": { "type": "BlockStatement", @@ -175,10 +175,10 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 106 - } + "range": [ + 101, + 106 + ] }, "right": { "type": "MemberExpression", @@ -189,71 +189,71 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 114 - } + "range": [ + 109, + 114 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 120 - } + "range": [ + 109, + 120 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 127 - } + "range": [ + 121, + 127 + ] }, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 127 - } + "range": [ + 109, + 127 + ] }, "loc": null, - "range": { - "start": 101, - "end": 127 - } + "range": [ + 101, + 127 + ] }, "directive": null, "loc": null, - "range": { - "start": 101, - "end": 128 - } + "range": [ + 101, + 128 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 132 - } + "range": [ + 95, + 132 + ] }, "alternate": null, "loc": null, - "range": { - "start": 78, - "end": 132 - } + "range": [ + 78, + 132 + ] }, { "type": "ReturnStatement", @@ -265,18 +265,18 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 149, - "end": 153 - } + "range": [ + 149, + 153 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 148, - "end": 154 - } + "range": [ + 148, + 154 + ] }, "children": [ { @@ -284,10 +284,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 154, - "end": 161 - } + "range": [ + 154, + 161 + ] }, { "type": "JSXExpressionContainer", @@ -298,10 +298,10 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 165 - } + "range": [ + 162, + 165 + ] }, "arguments": [ { @@ -315,10 +315,10 @@ Output: "raw": "for " }, "loc": null, - "range": { - "start": 175, - "end": 182 - } + "range": [ + 175, + 182 + ] }, { "type": "TemplateElement", @@ -328,10 +328,10 @@ Output: "raw": " experiences" }, "loc": null, - "range": { - "start": 207, - "end": 221 - } + "range": [ + 207, + 221 + ] } ], "expressions": [ @@ -344,61 +344,61 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 182, - "end": 185 - } + "range": [ + 182, + 185 + ] }, "property": { "type": "Identifier", "name": "param", "typeAnnotation": null, "loc": null, - "range": { - "start": 186, - "end": 191 - } + "range": [ + 186, + 191 + ] }, "computed": false, "loc": null, - "range": { - "start": 182, - "end": 191 - } + "range": [ + 182, + 191 + ] }, "arguments": [ { "type": "StringLiteral", "value": "count", "loc": null, - "range": { - "start": 192, - "end": 199 - } + "range": [ + 192, + 199 + ] }, { "type": "Identifier", "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 206 - } + "range": [ + 201, + 206 + ] } ], "loc": null, - "range": { - "start": 182, - "end": 207 - } + "range": [ + 182, + 207 + ] } ], "loc": null, - "range": { - "start": 175, - "end": 221 - } + "range": [ + 175, + 221 + ] }, { "type": "TemplateLiteral", @@ -411,18 +411,18 @@ Output: "raw": "Label for the number of items" }, "loc": null, - "range": { - "start": 231, - "end": 262 - } + "range": [ + 231, + 262 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 231, - "end": 262 - } + "range": [ + 231, + 262 + ] }, { "type": "ObjectExpression", @@ -434,59 +434,59 @@ Output: "name": "project", "typeAnnotation": null, "loc": null, - "range": { - "start": 274, - "end": 281 - } + "range": [ + 274, + 281 + ] }, "value": { "type": "StringLiteral", "value": "public", "loc": null, - "range": { - "start": 283, - "end": 291 - } + "range": [ + 283, + 291 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 274, - "end": 291 - } + "range": [ + 274, + 291 + ] } ], "loc": null, - "range": { - "start": 272, - "end": 293 - } + "range": [ + 272, + 293 + ] } ], "loc": null, - "range": { - "start": 162, - "end": 301 - } + "range": [ + 162, + 301 + ] }, "loc": null, - "range": { - "start": 161, - "end": 302 - } + "range": [ + 161, + 302 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 302, - "end": 307 - } + "range": [ + 302, + 307 + ] } ], "closingElement": { @@ -495,62 +495,62 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 309, - "end": 313 - } + "range": [ + 309, + 313 + ] }, "loc": null, - "range": { - "start": 307, - "end": 314 - } + "range": [ + 307, + 314 + ] }, "loc": null, - "range": { - "start": 148, - "end": 314 - } + "range": [ + 148, + 314 + ] }, "loc": null, - "range": { - "start": 135, - "end": 319 - } + "range": [ + 135, + 319 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 321 - } + "range": [ + 57, + 321 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 31, - "end": 321 - }, + "range": [ + 31, + 321 + ], "loc": null, - "range": { - "start": 31, - "end": 321 - } + "range": [ + 31, + 321 + ] }, "specifiers": [], "source": null, "loc": null, - "range": { - "start": 24, - "end": 321 - } + "range": [ + 24, + 321 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 321 - } + "range": [ + 0, + 321 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-empty-update-with-continue.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-empty-update-with-continue.js.snap index 3e27cf695f..3a131221fd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-empty-update-with-continue.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-empty-update-with-continue.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "ForStatement", @@ -97,32 +97,32 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 57 - } + "range": [ + 48, + 57 + ] }, "test": { "type": "BinaryExpression", @@ -131,10 +131,10 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "operator": "<", "right": { @@ -144,33 +144,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "property": { "type": "Identifier", "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 74 - } + "range": [ + 63, + 74 + ] }, "loc": null, - "range": { - "start": 59, - "end": 74 - } + "range": [ + 59, + 74 + ] }, "update": null, "body": { @@ -186,33 +186,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "right": { "type": "Identifier", "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "loc": null, - "range": { - "start": 84, - "end": 90 - } + "range": [ + 84, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 84, - "end": 91 - } + "range": [ + 84, + 91 + ] }, { "type": "ExpressionStatement", @@ -224,54 +224,54 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "loc": null, - "range": { - "start": 96, - "end": 102 - } + "range": [ + 96, + 102 + ] }, "directive": null, "loc": null, - "range": { - "start": 96, - "end": 103 - } + "range": [ + 96, + 103 + ] }, { "type": "ContinueStatement", "label": null, "loc": null, - "range": { - "start": 108, - "end": 117 - } + "range": [ + 108, + 117 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 121 - } + "range": [ + 78, + 121 + ] }, "loc": null, - "range": { - "start": 43, - "end": 121 - } + "range": [ + 43, + 121 + ] }, { "type": "ReturnStatement", @@ -280,42 +280,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 132 - } + "range": [ + 131, + 132 + ] }, "loc": null, - "range": { - "start": 124, - "end": 133 - } + "range": [ + 124, + 133 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 135 - } + "range": [ + 26, + 135 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 135 - }, + "range": [ + 0, + 135 + ], "loc": null, - "range": { - "start": 0, - "end": 135 - } + "range": [ + 0, + 135 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 135 - } + "range": [ + 0, + 135 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-empty-update.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-empty-update.js.snap index c275b961e5..60e5b00573 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-empty-update.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-empty-update.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,32 +58,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "ForStatement", @@ -98,32 +98,32 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 57 - } + "range": [ + 48, + 57 + ] }, "test": { "type": "BinaryExpression", @@ -132,10 +132,10 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "operator": "<", "right": { @@ -145,33 +145,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "property": { "type": "Identifier", "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 74 - } + "range": [ + 63, + 74 + ] }, "loc": null, - "range": { - "start": 59, - "end": 74 - } + "range": [ + 59, + 74 + ] }, "update": null, "body": { @@ -187,33 +187,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "right": { "type": "Identifier", "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "loc": null, - "range": { - "start": 84, - "end": 90 - } + "range": [ + 84, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 84, - "end": 91 - } + "range": [ + 84, + 91 + ] }, { "type": "IfStatement", @@ -224,26 +224,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "operator": ">", "right": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 104, - "end": 106 - } + "range": [ + 104, + 106 + ] }, "loc": null, - "range": { - "start": 100, - "end": 106 - } + "range": [ + 100, + 106 + ] }, "consequent": { "type": "BlockStatement", @@ -252,37 +252,37 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 116, - "end": 122 - } + "range": [ + 116, + 122 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 128 - } + "range": [ + 108, + 128 + ] }, "alternate": null, "loc": null, - "range": { - "start": 96, - "end": 128 - } + "range": [ + 96, + 128 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 132 - } + "range": [ + 78, + 132 + ] }, "loc": null, - "range": { - "start": 43, - "end": 132 - } + "range": [ + 43, + 132 + ] }, { "type": "ReturnStatement", @@ -291,42 +291,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "loc": null, - "range": { - "start": 135, - "end": 144 - } + "range": [ + 135, + 144 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 146 - } + "range": [ + 26, + 146 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 146 - }, + "range": [ + 0, + 146 + ], "loc": null, - "range": { - "start": 0, - "end": 146 - } + "range": [ + 0, + 146 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 146 - } + "range": [ + 0, + 146 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-logical.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-logical.js.snap index df86cc0df8..9b41d40313 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-logical.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-logical.js.snap @@ -29,10 +29,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -60,32 +60,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "loc": null, - "range": { - "start": 28, - "end": 33 - } + "range": [ + 28, + 33 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 34 - } + "range": [ + 24, + 34 + ] }, { "type": "ForStatement", @@ -100,32 +100,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 56 - } + "range": [ + 47, + 56 + ] }, "test": { "type": "LogicalExpression", @@ -137,10 +137,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "operator": ">", "right": { @@ -150,33 +150,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] }, "property": { "type": "Identifier", "name": "min", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 75 - } + "range": [ + 72, + 75 + ] }, "computed": false, "loc": null, - "range": { - "start": 66, - "end": 75 - } + "range": [ + 66, + 75 + ] }, "loc": null, - "range": { - "start": 62, - "end": 75 - } + "range": [ + 62, + 75 + ] }, "right": { "type": "BinaryExpression", @@ -185,10 +185,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "operator": "<", "right": { @@ -198,39 +198,39 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 88 - } + "range": [ + 83, + 88 + ] }, "property": { "type": "Identifier", "name": "max", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 83, - "end": 92 - } + "range": [ + 83, + 92 + ] }, "loc": null, - "range": { - "start": 79, - "end": 92 - } + "range": [ + 79, + 92 + ] }, "loc": null, - "range": { - "start": 62, - "end": 92 - } + "range": [ + 62, + 92 + ] }, "update": { "type": "AssignmentExpression", @@ -240,10 +240,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "right": { "type": "ConditionalExpression", @@ -254,36 +254,36 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 113 - } + "range": [ + 109, + 113 + ] }, "computed": false, "loc": null, - "range": { - "start": 103, - "end": 113 - } + "range": [ + 103, + 113 + ] }, "alternate": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] }, "consequent": { "type": "MemberExpression", @@ -292,39 +292,39 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 121 - } + "range": [ + 116, + 121 + ] }, "property": { "type": "Identifier", "name": "increment", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 131 - } + "range": [ + 122, + 131 + ] }, "computed": false, "loc": null, - "range": { - "start": 116, - "end": 131 - } + "range": [ + 116, + 131 + ] }, "loc": null, - "range": { - "start": 103, - "end": 135 - } + "range": [ + 103, + 135 + ] }, "loc": null, - "range": { - "start": 98, - "end": 135 - } + "range": [ + 98, + 135 + ] }, "body": { "type": "BlockStatement", @@ -339,32 +339,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 147 - } + "range": [ + 146, + 147 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] }, "loc": null, - "range": { - "start": 146, - "end": 152 - } + "range": [ + 146, + 152 + ] }, "directive": null, "loc": null, - "range": { - "start": 146, - "end": 153 - } + "range": [ + 146, + 153 + ] }, { "type": "ExpressionStatement", @@ -376,46 +376,46 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 159 - } + "range": [ + 158, + 159 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 164 - } + "range": [ + 163, + 164 + ] }, "loc": null, - "range": { - "start": 158, - "end": 164 - } + "range": [ + 158, + 164 + ] }, "directive": null, "loc": null, - "range": { - "start": 158, - "end": 165 - } + "range": [ + 158, + 165 + ] } ], "loc": null, - "range": { - "start": 140, - "end": 169 - } + "range": [ + 140, + 169 + ] }, "loc": null, - "range": { - "start": 37, - "end": 169 - } + "range": [ + 37, + 169 + ] }, { "type": "ReturnStatement", @@ -424,42 +424,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 179, - "end": 180 - } + "range": [ + 179, + 180 + ] }, "loc": null, - "range": { - "start": 172, - "end": 181 - } + "range": [ + 172, + 181 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 183 - } + "range": [ + 20, + 183 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 183 - }, + "range": [ + 0, + 183 + ], "loc": null, - "range": { - "start": 0, - "end": 183 - } + "range": [ + 0, + 183 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 183 - } + "range": [ + 0, + 183 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-break.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-break.js.snap index 7a85a6112e..d95bb52b3e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-break.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-break.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 35, - "end": 37 - } + "range": [ + 35, + 37 + ] }, "loc": null, - "range": { - "start": 31, - "end": 37 - } + "range": [ + 31, + 37 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 38 - } + "range": [ + 25, + 38 + ] }, { "type": "ForOfStatement", @@ -85,24 +85,24 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] }, "init": null, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 56 - } + "range": [ + 46, + 56 + ] }, "right": { "type": "ArrayExpression", @@ -111,26 +111,26 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 66 - } + "range": [ + 60, + 66 + ] }, "body": { "type": "BlockStatement", @@ -139,23 +139,23 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 74, - "end": 80 - } + "range": [ + 74, + 80 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 84 - } + "range": [ + 68, + 84 + ] }, "loc": null, - "range": { - "start": 41, - "end": 84 - } + "range": [ + 41, + 84 + ] }, { "type": "ReturnStatement", @@ -164,42 +164,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 98 - } + "range": [ + 21, + 98 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 98 - }, + "range": [ + 0, + 98 + ], "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-conditional-break.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-conditional-break.js.snap index 9b21b014b1..be779b3bcd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-conditional-break.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-conditional-break.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -47,32 +47,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 35, - "end": 37 - } + "range": [ + 35, + 37 + ] }, "loc": null, - "range": { - "start": 31, - "end": 37 - } + "range": [ + 31, + 37 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 38 - } + "range": [ + 25, + 38 + ] }, { "type": "ForOfStatement", @@ -88,24 +88,24 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] }, "init": null, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 56 - } + "range": [ + 46, + 56 + ] }, "right": { "type": "ArrayExpression", @@ -114,26 +114,26 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 66 - } + "range": [ + 60, + 66 + ] }, "body": { "type": "BlockStatement", @@ -147,26 +147,26 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 82 - } + "range": [ + 78, + 82 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "loc": null, - "range": { - "start": 78, - "end": 88 - } + "range": [ + 78, + 88 + ] }, "consequent": { "type": "BlockStatement", @@ -175,24 +175,24 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 98, - "end": 104 - } + "range": [ + 98, + 104 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 110 - } + "range": [ + 90, + 110 + ] }, "alternate": null, "loc": null, - "range": { - "start": 74, - "end": 110 - } + "range": [ + 74, + 110 + ] }, { "type": "ExpressionStatement", @@ -205,27 +205,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 121 - } + "range": [ + 117, + 121 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 121 - } + "range": [ + 115, + 121 + ] }, "arguments": [ { @@ -233,37 +233,37 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 126 - } + "range": [ + 122, + 126 + ] } ], "loc": null, - "range": { - "start": 115, - "end": 127 - } + "range": [ + 115, + 127 + ] }, "directive": null, "loc": null, - "range": { - "start": 115, - "end": 128 - } + "range": [ + 115, + 128 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 132 - } + "range": [ + 68, + 132 + ] }, "loc": null, - "range": { - "start": 41, - "end": 132 - } + "range": [ + 41, + 132 + ] }, { "type": "ReturnStatement", @@ -272,42 +272,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "loc": null, - "range": { - "start": 135, - "end": 144 - } + "range": [ + 135, + 144 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 146 - } + "range": [ + 21, + 146 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 146 - }, + "range": [ + 0, + 146 + ], "loc": null, - "range": { - "start": 0, - "end": 146 - } + "range": [ + 0, + 146 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 146 - } + "range": [ + 0, + 146 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-continue.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-continue.js.snap index c65c7b0879..4da351a8a8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-continue.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-continue.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -48,10 +48,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": { "type": "ArrayExpression", @@ -60,57 +60,57 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 47 - } + "range": [ + 35, + 47 + ] }, "loc": null, - "range": { - "start": 31, - "end": 47 - } + "range": [ + 31, + 47 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 48 - } + "range": [ + 25, + 48 + ] }, { "type": "VariableDeclaration", @@ -123,32 +123,32 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 63, - "end": 65 - } + "range": [ + 63, + 65 + ] }, "loc": null, - "range": { - "start": 57, - "end": 65 - } + "range": [ + 57, + 65 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 66 - } + "range": [ + 51, + 66 + ] }, { "type": "ForOfStatement", @@ -164,34 +164,34 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] }, "init": null, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 84 - } + "range": [ + 74, + 84 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "body": { "type": "BlockStatement", @@ -205,26 +205,26 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 105 - } + "range": [ + 101, + 105 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "loc": null, - "range": { - "start": 101, - "end": 111 - } + "range": [ + 101, + 111 + ] }, "consequent": { "type": "BlockStatement", @@ -233,24 +233,24 @@ Output: "type": "ContinueStatement", "label": null, "loc": null, - "range": { - "start": 121, - "end": 130 - } + "range": [ + 121, + 130 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 136 - } + "range": [ + 113, + 136 + ] }, "alternate": null, "loc": null, - "range": { - "start": 97, - "end": 136 - } + "range": [ + 97, + 136 + ] }, { "type": "ExpressionStatement", @@ -263,27 +263,27 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 144 - } + "range": [ + 141, + 144 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 149 - } + "range": [ + 145, + 149 + ] }, "computed": false, "loc": null, - "range": { - "start": 141, - "end": 149 - } + "range": [ + 141, + 149 + ] }, "arguments": [ { @@ -293,53 +293,53 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 154 - } + "range": [ + 150, + 154 + ] }, "operator": "/", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "loc": null, - "range": { - "start": 150, - "end": 158 - } + "range": [ + 150, + 158 + ] } ], "loc": null, - "range": { - "start": 141, - "end": 159 - } + "range": [ + 141, + 159 + ] }, "directive": null, "loc": null, - "range": { - "start": 141, - "end": 160 - } + "range": [ + 141, + 160 + ] } ], "loc": null, - "range": { - "start": 91, - "end": 164 - } + "range": [ + 91, + 164 + ] }, "loc": null, - "range": { - "start": 69, - "end": 164 - } + "range": [ + 69, + 164 + ] }, { "type": "ReturnStatement", @@ -348,42 +348,42 @@ Output: "name": "ret", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 177 - } + "range": [ + 174, + 177 + ] }, "loc": null, - "range": { - "start": 167, - "end": 178 - } + "range": [ + 167, + 178 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 180 - } + "range": [ + 21, + 180 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 180 - }, + "range": [ + 0, + 180 + ], "loc": null, - "range": { - "start": 0, - "end": 180 - } + "range": [ + 0, + 180 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 180 - } + "range": [ + 0, + 180 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-destructure.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-destructure.js.snap index e80070d3e5..b77c3eda16 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-destructure.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-destructure.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 33, - "end": 35 - } + "range": [ + 33, + 35 + ] }, "loc": null, - "range": { - "start": 29, - "end": 35 - } + "range": [ + 29, + 35 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 36 - } + "range": [ + 25, + 36 + ] }, { "type": "VariableDeclaration", @@ -83,10 +83,10 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "init": { "type": "ArrayExpression", @@ -101,36 +101,36 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "value": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 58 - } + "range": [ + 54, + 58 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 60 - } + "range": [ + 52, + 60 + ] }, { "type": "ObjectExpression", @@ -142,36 +142,36 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "value": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 64, - "end": 68 - } + "range": [ + 64, + 68 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 70 - } + "range": [ + 62, + 70 + ] }, { "type": "ObjectExpression", @@ -183,56 +183,56 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "value": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 74, - "end": 78 - } + "range": [ + 74, + 78 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 80 - } + "range": [ + 72, + 80 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 81 - } + "range": [ + 51, + 81 + ] }, "loc": null, - "range": { - "start": 43, - "end": 81 - } + "range": [ + 43, + 81 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 82 - } + "range": [ + 39, + 82 + ] }, { "type": "ForOfStatement", @@ -253,61 +253,61 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "value": { "type": "Identifier", "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 101 - } + "range": [ + 96, + 101 + ] }, "init": null, "loc": null, - "range": { - "start": 96, - "end": 101 - } + "range": [ + 96, + 101 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 101 - } + "range": [ + 90, + 101 + ] }, "right": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 110 - } + "range": [ + 105, + 110 + ] }, "body": { "type": "BlockStatement", @@ -323,27 +323,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 124 - } + "range": [ + 120, + 124 + ] }, "computed": false, "loc": null, - "range": { - "start": 118, - "end": 124 - } + "range": [ + 118, + 124 + ] }, "arguments": [ { @@ -353,53 +353,53 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "operator": "*", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 129, - "end": 130 - } + "range": [ + 129, + 130 + ] }, "loc": null, - "range": { - "start": 125, - "end": 130 - } + "range": [ + 125, + 130 + ] } ], "loc": null, - "range": { - "start": 118, - "end": 131 - } + "range": [ + 118, + 131 + ] }, "directive": null, "loc": null, - "range": { - "start": 118, - "end": 132 - } + "range": [ + 118, + 132 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 136 - } + "range": [ + 112, + 136 + ] }, "loc": null, - "range": { - "start": 85, - "end": 136 - } + "range": [ + 85, + 136 + ] }, { "type": "ReturnStatement", @@ -408,42 +408,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 147 - } + "range": [ + 146, + 147 + ] }, "loc": null, - "range": { - "start": 139, - "end": 148 - } + "range": [ + 139, + 148 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 150 - } + "range": [ + 21, + 150 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 150 - }, + "range": [ + 0, + 150 + ], "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-mutate.js.snap index 166a49e882..4874e38800 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-mutate.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "collection", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 46 - } + "range": [ + 36, + 46 + ] }, "init": { "type": "ArrayExpression", @@ -71,37 +71,37 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 60 - } + "range": [ + 50, + 60 + ] }, "arguments": [], "loc": null, - "range": { - "start": 50, - "end": 62 - } + "range": [ + 50, + 62 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 63 - } + "range": [ + 49, + 63 + ] }, "loc": null, - "range": { - "start": 36, - "end": 63 - } + "range": [ + 36, + 63 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 64 - } + "range": [ + 30, + 64 + ] }, { "type": "VariableDeclaration", @@ -114,32 +114,32 @@ Output: "name": "results", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 80 - } + "range": [ + 73, + 80 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 83, - "end": 85 - } + "range": [ + 83, + 85 + ] }, "loc": null, - "range": { - "start": 73, - "end": 85 - } + "range": [ + 73, + 85 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 86 - } + "range": [ + 67, + 86 + ] }, { "type": "ForOfStatement", @@ -155,34 +155,34 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 104 - } + "range": [ + 100, + 104 + ] }, "init": null, "loc": null, - "range": { - "start": 100, - "end": 104 - } + "range": [ + 100, + 104 + ] } ], "loc": null, - "range": { - "start": 94, - "end": 104 - } + "range": [ + 94, + 104 + ] }, "right": { "type": "Identifier", "name": "collection", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 118 - } + "range": [ + 108, + 118 + ] }, "body": { "type": "BlockStatement", @@ -198,27 +198,27 @@ Output: "name": "results", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 133 - } + "range": [ + 126, + 133 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 138 - } + "range": [ + 134, + 138 + ] }, "computed": false, "loc": null, - "range": { - "start": 126, - "end": 138 - } + "range": [ + 126, + 138 + ] }, "arguments": [ { @@ -229,18 +229,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 140, - "end": 143 - } + "range": [ + 140, + 143 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 139, - "end": 144 - } + "range": [ + 139, + 144 + ] }, "children": [ { @@ -252,10 +252,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 151 - } + "range": [ + 145, + 151 + ] }, "arguments": [ { @@ -263,23 +263,23 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 156 - } + "range": [ + 152, + 156 + ] } ], "loc": null, - "range": { - "start": 145, - "end": 157 - } + "range": [ + 145, + 157 + ] }, "loc": null, - "range": { - "start": 144, - "end": 158 - } + "range": [ + 144, + 158 + ] } ], "closingElement": { @@ -288,49 +288,49 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 160, - "end": 163 - } + "range": [ + 160, + 163 + ] }, "loc": null, - "range": { - "start": 158, - "end": 164 - } + "range": [ + 158, + 164 + ] }, "loc": null, - "range": { - "start": 139, - "end": 164 - } + "range": [ + 139, + 164 + ] } ], "loc": null, - "range": { - "start": 126, - "end": 165 - } + "range": [ + 126, + 165 + ] }, "directive": null, "loc": null, - "range": { - "start": 126, - "end": 166 - } + "range": [ + 126, + 166 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 170 - } + "range": [ + 120, + 170 + ] }, "loc": null, - "range": { - "start": 89, - "end": 170 - } + "range": [ + 89, + 170 + ] }, { "type": "ReturnStatement", @@ -342,18 +342,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 181, - "end": 184 - } + "range": [ + 181, + 184 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 180, - "end": 185 - } + "range": [ + 180, + 185 + ] }, "children": [ { @@ -363,16 +363,16 @@ Output: "name": "results", "typeAnnotation": null, "loc": null, - "range": { - "start": 186, - "end": 193 - } + "range": [ + 186, + 193 + ] }, "loc": null, - "range": { - "start": 185, - "end": 194 - } + "range": [ + 185, + 194 + ] } ], "closingElement": { @@ -381,54 +381,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 196, - "end": 199 - } + "range": [ + 196, + 199 + ] }, "loc": null, - "range": { - "start": 194, - "end": 200 - } + "range": [ + 194, + 200 + ] }, "loc": null, - "range": { - "start": 180, - "end": 200 - } + "range": [ + 180, + 200 + ] }, "loc": null, - "range": { - "start": 173, - "end": 201 - } + "range": [ + 173, + 201 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 203 - } + "range": [ + 26, + 203 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 203 - }, + "range": [ + 0, + 203 + ], "loc": null, - "range": { - "start": 0, - "end": 203 - } + "range": [ + 0, + 203 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 203 - } + "range": [ + 0, + 203 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-simple.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-simple.js.snap index 5ea91d0b19..a2d37ce0af 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-simple.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-of-simple.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 33, - "end": 35 - } + "range": [ + 33, + 35 + ] }, "loc": null, - "range": { - "start": 29, - "end": 35 - } + "range": [ + 29, + 35 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 36 - } + "range": [ + 25, + 36 + ] }, { "type": "VariableDeclaration", @@ -83,10 +83,10 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "init": { "type": "ArrayExpression", @@ -95,48 +95,48 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 60 - } + "range": [ + 51, + 60 + ] }, "loc": null, - "range": { - "start": 43, - "end": 60 - } + "range": [ + 43, + 60 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 61 - } + "range": [ + 39, + 61 + ] }, { "type": "ForOfStatement", @@ -152,34 +152,34 @@ Output: "name": "ii", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 77 - } + "range": [ + 75, + 77 + ] }, "init": null, "loc": null, - "range": { - "start": 75, - "end": 77 - } + "range": [ + 75, + 77 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 77 - } + "range": [ + 69, + 77 + ] }, "right": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "body": { "type": "BlockStatement", @@ -195,27 +195,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 100 - } + "range": [ + 96, + 100 + ] }, "computed": false, "loc": null, - "range": { - "start": 94, - "end": 100 - } + "range": [ + 94, + 100 + ] }, "arguments": [ { @@ -225,53 +225,53 @@ Output: "name": "ii", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 103 - } + "range": [ + 101, + 103 + ] }, "operator": "*", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "loc": null, - "range": { - "start": 101, - "end": 107 - } + "range": [ + 101, + 107 + ] } ], "loc": null, - "range": { - "start": 94, - "end": 108 - } + "range": [ + 94, + 108 + ] }, "directive": null, "loc": null, - "range": { - "start": 94, - "end": 109 - } + "range": [ + 94, + 109 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 113 - } + "range": [ + 88, + 113 + ] }, "loc": null, - "range": { - "start": 64, - "end": 113 - } + "range": [ + 64, + 113 + ] }, { "type": "ReturnStatement", @@ -280,42 +280,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 124 - } + "range": [ + 123, + 124 + ] }, "loc": null, - "range": { - "start": 116, - "end": 125 - } + "range": [ + 116, + 125 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 127 - } + "range": [ + 21, + 127 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 127 - }, + "range": [ + 0, + 127 + ], "loc": null, - "range": { - "start": 0, - "end": 127 - } + "range": [ + 0, + 127 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 127 - } + "range": [ + 0, + 127 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-return.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-return.js.snap index 7773333d6b..f8b8bb43cd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-return.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@for-return.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "loc": null, - "range": { - "start": 39, - "end": 44 - } + "range": [ + 39, + 44 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 44 - } + "range": [ + 35, + 44 + ] }, "test": { "type": "BinaryExpression", @@ -89,10 +89,10 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "operator": "<", "right": { @@ -102,33 +102,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "property": { "type": "Identifier", "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] }, "computed": false, "loc": null, - "range": { - "start": 50, - "end": 61 - } + "range": [ + 50, + 61 + ] }, "loc": null, - "range": { - "start": 46, - "end": 61 - } + "range": [ + 46, + 61 + ] }, "update": { "type": "UpdateExpression", @@ -138,17 +138,17 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "prefix": false, "loc": null, - "range": { - "start": 63, - "end": 66 - } + "range": [ + 63, + 66 + ] }, "body": { "type": "BlockStatement", @@ -157,49 +157,49 @@ Output: "type": "ReturnStatement", "argument": null, "loc": null, - "range": { - "start": 74, - "end": 81 - } + "range": [ + 74, + 81 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 85 - } + "range": [ + 68, + 85 + ] }, "loc": null, - "range": { - "start": 30, - "end": 85 - } + "range": [ + 30, + 85 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 87 - } + "range": [ + 26, + 87 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 87 - }, + "range": [ + 0, + 87 + ], "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@frozen-after-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@frozen-after-alias.js.snap index 5ba91e2721..bc2203e54e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@frozen-after-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@frozen-after-alias.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -47,32 +47,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 35, - "end": 37 - } + "range": [ + 35, + 37 + ] }, "loc": null, - "range": { - "start": 31, - "end": 37 - } + "range": [ + 31, + 37 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 38 - } + "range": [ + 25, + 38 + ] }, { "type": "VariableDeclaration", @@ -85,33 +85,33 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "loc": null, - "range": { - "start": 47, - "end": 52 - } + "range": [ + 47, + 52 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 53 - } + "range": [ + 41, + 53 + ] }, { "type": "ExpressionStatement", @@ -122,10 +122,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 65 - } + "range": [ + 56, + 65 + ] }, "arguments": [ { @@ -133,24 +133,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 68 - } + "range": [ + 56, + 68 + ] }, "directive": null, "loc": null, - "range": { - "start": 56, - "end": 69 - } + "range": [ + 56, + 69 + ] }, { "type": "ExpressionStatement", @@ -161,10 +161,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 75 - } + "range": [ + 72, + 75 + ] }, "arguments": [ { @@ -172,24 +172,24 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 78 - } + "range": [ + 72, + 78 + ] }, "directive": null, "loc": null, - "range": { - "start": 72, - "end": 79 - } + "range": [ + 72, + 79 + ] }, { "type": "ReturnStatement", @@ -198,36 +198,36 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 150 - } + "range": [ + 149, + 150 + ] }, "loc": null, - "range": { - "start": 142, - "end": 151 - } + "range": [ + 142, + 151 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 153 - } + "range": [ + 21, + 153 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 153 - }, + "range": [ + 0, + 153 + ], "loc": null, - "range": { - "start": 0, - "end": 153 - } + "range": [ + 0, + 153 + ] }, { "type": "FunctionDeclaration", @@ -236,33 +236,33 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 173 - } + "range": [ + 164, + 173 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 176, - "end": 178 - } + "range": [ + 176, + 178 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 155, - "end": 178 - }, + "range": [ + 155, + 178 + ], "loc": null, - "range": { - "start": 155, - "end": 178 - } + "range": [ + 155, + 178 + ] }, { "type": "FunctionDeclaration", @@ -271,10 +271,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 191 - } + "range": [ + 188, + 191 + ] }, "params": [ { @@ -282,39 +282,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 195, - "end": 197 - } + "range": [ + 195, + 197 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 179, - "end": 197 - }, + "range": [ + 179, + 197 + ], "loc": null, - "range": { - "start": 179, - "end": 197 - } + "range": [ + 179, + 197 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 197 - } + "range": [ + 0, + 197 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-reassign.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-reassign.js.snap index 489775c8a3..9cee8b25c3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-reassign.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-reassign.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -40,10 +40,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "params": [ { @@ -51,10 +51,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "body": { @@ -71,61 +71,61 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 50 - } + "range": [ + 47, + 50 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 45, - "end": 52 - } + "range": [ + 45, + 52 + ] }, "directive": null, "loc": null, - "range": { - "start": 45, - "end": 53 - } + "range": [ + 45, + 53 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 57 - } + "range": [ + 39, + 57 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 25, - "end": 57 - }, + "range": [ + 25, + 57 + ], "loc": null, - "range": { - "start": 25, - "end": 57 - } + "range": [ + 25, + 57 + ] }, { "type": "ExpressionStatement", @@ -137,32 +137,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 64, - "end": 66 - } + "range": [ + 64, + 66 + ] }, "loc": null, - "range": { - "start": 60, - "end": 66 - } + "range": [ + 60, + 66 + ] }, "directive": null, "loc": null, - "range": { - "start": 60, - "end": 67 - } + "range": [ + 60, + 67 + ] }, { "type": "ReturnStatement", @@ -171,42 +171,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "loc": null, - "range": { - "start": 70, - "end": 79 - } + "range": [ + 70, + 79 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 81 - } + "range": [ + 21, + 81 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 81 - }, + "range": [ + 0, + 81 + ], "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-redeclare.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-redeclare.js.snap index d79d643ad3..c83900f9ec 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-redeclare.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-redeclare.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -40,10 +40,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "params": [ { @@ -51,10 +51,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "body": { @@ -71,61 +71,61 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 50 - } + "range": [ + 47, + 50 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 45, - "end": 52 - } + "range": [ + 45, + 52 + ] }, "directive": null, "loc": null, - "range": { - "start": 45, - "end": 53 - } + "range": [ + 45, + 53 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 57 - } + "range": [ + 39, + 57 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 25, - "end": 57 - }, + "range": [ + 25, + 57 + ], "loc": null, - "range": { - "start": 25, - "end": 57 - } + "range": [ + 25, + 57 + ] }, { "type": "FunctionDeclaration", @@ -134,33 +134,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 73, - "end": 75 - } + "range": [ + 73, + 75 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 60, - "end": 75 - }, + "range": [ + 60, + 75 + ], "loc": null, - "range": { - "start": 60, - "end": 75 - } + "range": [ + 60, + 75 + ] }, { "type": "ReturnStatement", @@ -169,42 +169,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "loc": null, - "range": { - "start": 78, - "end": 87 - } + "range": [ + 78, + 87 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 89 - } + "range": [ + 21, + 89 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 89 - }, + "range": [ + 0, + 89 + ], "loc": null, - "range": { - "start": 0, - "end": 89 - } + "range": [ + 0, + 89 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 89 - } + "range": [ + 0, + 89 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-simple.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-simple.js.snap index 10b8022a56..b5a6256844 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-simple.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-declaration-simple.js.snap @@ -25,10 +25,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -71,50 +71,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "FunctionDeclaration", @@ -123,10 +123,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "params": [ { @@ -134,10 +134,10 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] } ], "body": { @@ -154,61 +154,61 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 68 - } + "range": [ + 65, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "arguments": [], "loc": null, - "range": { - "start": 63, - "end": 70 - } + "range": [ + 63, + 70 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 71 - } + "range": [ + 63, + 71 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 75 - } + "range": [ + 57, + 75 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 43, - "end": 75 - }, + "range": [ + 43, + 75 + ], "loc": null, - "range": { - "start": 43, - "end": 75 - } + "range": [ + 43, + 75 + ] }, { "type": "ExpressionStatement", @@ -219,10 +219,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "arguments": [ { @@ -230,24 +230,24 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 82 - } + "range": [ + 78, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, { "type": "ReturnStatement", @@ -256,42 +256,42 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 97 - } + "range": [ + 22, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 97 - }, + "range": [ + 0, + 97 + ], "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-captures-value-later-frozen-jsx.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-captures-value-later-frozen-jsx.js.snap index 0c2244c96f..c1c0fa3b2a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-captures-value-later-frozen-jsx.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-captures-value-later-frozen-jsx.js.snap @@ -29,10 +29,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,32 +60,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -98,10 +98,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 195 - } + "range": [ + 187, + 195 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -112,10 +112,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 200 - } + "range": [ + 199, + 200 + ] } ], "body": { @@ -130,10 +130,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 222 - } + "range": [ + 211, + 222 + ] }, "arguments": [ { @@ -141,10 +141,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 224 - } + "range": [ + 223, + 224 + ] }, { "type": "MemberExpression", @@ -155,92 +155,92 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 226, - "end": 227 - } + "range": [ + 226, + 227 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 228, - "end": 234 - } + "range": [ + 228, + 234 + ] }, "computed": false, "loc": null, - "range": { - "start": 226, - "end": 234 - } + "range": [ + 226, + 234 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 235, - "end": 240 - } + "range": [ + 235, + 240 + ] }, "computed": false, "loc": null, - "range": { - "start": 226, - "end": 240 - } + "range": [ + 226, + 240 + ] } ], "loc": null, - "range": { - "start": 211, - "end": 241 - } + "range": [ + 211, + 241 + ] }, "directive": null, "loc": null, - "range": { - "start": 211, - "end": 242 - } + "range": [ + 211, + 242 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 246 - } + "range": [ + 205, + 246 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 198, - "end": 246 - }, + "range": [ + 198, + 246 + ], "expression": false, "loc": null, - "range": { - "start": 198, - "end": 246 - } + "range": [ + 198, + 246 + ] }, "loc": null, - "range": { - "start": 187, - "end": 246 - } + "range": [ + 187, + 246 + ] } ], "loc": null, - "range": { - "start": 181, - "end": 247 - } + "range": [ + 181, + 247 + ] }, { "type": "IfStatement", @@ -251,27 +251,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 259 - } + "range": [ + 254, + 259 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 264 - } + "range": [ + 260, + 264 + ] }, "computed": false, "loc": null, - "range": { - "start": 254, - "end": 264 - } + "range": [ + 254, + 264 + ] }, "consequent": { "type": "BlockStatement", @@ -286,18 +286,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 273, - "end": 276 - } + "range": [ + 273, + 276 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 272, - "end": 277 - } + "range": [ + 272, + 277 + ] }, "children": [ { @@ -307,16 +307,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 278, - "end": 279 - } + "range": [ + 278, + 279 + ] }, "loc": null, - "range": { - "start": 277, - "end": 280 - } + "range": [ + 277, + 280 + ] } ], "closingElement": { @@ -325,43 +325,43 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 282, - "end": 285 - } + "range": [ + 282, + 285 + ] }, "loc": null, - "range": { - "start": 280, - "end": 286 - } + "range": [ + 280, + 286 + ] }, "loc": null, - "range": { - "start": 272, - "end": 286 - } + "range": [ + 272, + 286 + ] }, "directive": null, "loc": null, - "range": { - "start": 272, - "end": 287 - } + "range": [ + 272, + 287 + ] } ], "loc": null, - "range": { - "start": 266, - "end": 291 - } + "range": [ + 266, + 291 + ] }, "alternate": null, "loc": null, - "range": { - "start": 250, - "end": 291 - } + "range": [ + 250, + 291 + ] }, { "type": "ReturnStatement", @@ -373,10 +373,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 302, - "end": 305 - } + "range": [ + 302, + 305 + ] }, "attributes": [ { @@ -385,10 +385,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 306, - "end": 311 - } + "range": [ + 306, + 311 + ] }, "value": { "type": "JSXExpressionContainer", @@ -397,22 +397,22 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 313, - "end": 314 - } + "range": [ + 313, + 314 + ] }, "loc": null, - "range": { - "start": 312, - "end": 315 - } + "range": [ + 312, + 315 + ] }, "loc": null, - "range": { - "start": 306, - "end": 315 - } + "range": [ + 306, + 315 + ] }, { "type": "JSXAttribute", @@ -420,10 +420,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 316, - "end": 324 - } + "range": [ + 316, + 324 + ] }, "value": { "type": "JSXExpressionContainer", @@ -432,70 +432,70 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 326, - "end": 334 - } + "range": [ + 326, + 334 + ] }, "loc": null, - "range": { - "start": 325, - "end": 335 - } + "range": [ + 325, + 335 + ] }, "loc": null, - "range": { - "start": 316, - "end": 335 - } + "range": [ + 316, + 335 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 301, - "end": 338 - } + "range": [ + 301, + 338 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 301, - "end": 338 - } + "range": [ + 301, + 338 + ] }, "loc": null, - "range": { - "start": 294, - "end": 339 - } + "range": [ + 294, + 339 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 341 - } + "range": [ + 26, + 341 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 341 - }, + "range": [ + 0, + 341 + ], "loc": null, - "range": { - "start": 0, - "end": 341 - } + "range": [ + 0, + 341 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 341 - } + "range": [ + 0, + 341 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-maybe-mutates-hook-return-value.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-maybe-mutates-hook-return-value.js.snap index ebebfda140..8c06b1b18a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-maybe-mutates-hook-return-value.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-maybe-mutates-hook-return-value.js.snap @@ -29,10 +29,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,10 +60,10 @@ Output: "name": "id", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 38 - } + "range": [ + 36, + 38 + ] }, "init": { "type": "CallExpression", @@ -72,30 +72,30 @@ Output: "name": "useSelectedEntitytId", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 61 - } + "range": [ + 41, + 61 + ] }, "arguments": [], "loc": null, - "range": { - "start": 41, - "end": 63 - } + "range": [ + 41, + 63 + ] }, "loc": null, - "range": { - "start": 36, - "end": 63 - } + "range": [ + 36, + 63 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 64 - } + "range": [ + 30, + 64 + ] }, { "type": "VariableDeclaration", @@ -108,10 +108,10 @@ Output: "name": "onLoad", "typeAnnotation": null, "loc": null, - "range": { - "start": 418, - "end": 424 - } + "range": [ + 418, + 424 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -129,10 +129,10 @@ Output: "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 439, - "end": 442 - } + "range": [ + 439, + 442 + ] }, "arguments": [ { @@ -140,58 +140,58 @@ Output: "name": "id", "typeAnnotation": null, "loc": null, - "range": { - "start": 443, - "end": 445 - } + "range": [ + 443, + 445 + ] } ], "loc": null, - "range": { - "start": 439, - "end": 446 - } + "range": [ + 439, + 446 + ] }, "directive": null, "loc": null, - "range": { - "start": 439, - "end": 447 - } + "range": [ + 439, + 447 + ] } ], "loc": null, - "range": { - "start": 433, - "end": 451 - } + "range": [ + 433, + 451 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 427, - "end": 451 - }, + "range": [ + 427, + 451 + ], "expression": false, "loc": null, - "range": { - "start": 427, - "end": 451 - } + "range": [ + 427, + 451 + ] }, "loc": null, - "range": { - "start": 418, - "end": 451 - } + "range": [ + 418, + 451 + ] } ], "loc": null, - "range": { - "start": 412, - "end": 452 - } + "range": [ + 412, + 452 + ] }, { "type": "ReturnStatement", @@ -203,10 +203,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 463, - "end": 466 - } + "range": [ + 463, + 466 + ] }, "attributes": [ { @@ -215,10 +215,10 @@ Output: "type": "JSXIdentifier", "name": "onLoad", "loc": null, - "range": { - "start": 467, - "end": 473 - } + "range": [ + 467, + 473 + ] }, "value": { "type": "JSXExpressionContainer", @@ -227,70 +227,70 @@ Output: "name": "onLoad", "typeAnnotation": null, "loc": null, - "range": { - "start": 475, - "end": 481 - } + "range": [ + 475, + 481 + ] }, "loc": null, - "range": { - "start": 474, - "end": 482 - } + "range": [ + 474, + 482 + ] }, "loc": null, - "range": { - "start": 467, - "end": 482 - } + "range": [ + 467, + 482 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 462, - "end": 485 - } + "range": [ + 462, + 485 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 462, - "end": 485 - } + "range": [ + 462, + 485 + ] }, "loc": null, - "range": { - "start": 455, - "end": 486 - } + "range": [ + 455, + 486 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 488 - } + "range": [ + 26, + 488 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 488 - }, + "range": [ + 0, + 488 + ], "loc": null, - "range": { - "start": 0, - "end": 488 - } + "range": [ + 0, + 488 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 488 - } + "range": [ + 0, + 488 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-with-store-to-parameter.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-with-store-to-parameter.js.snap index 044b4179c2..8ae799ce34 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-with-store-to-parameter.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-expression-with-store-to-parameter.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -71,30 +71,30 @@ Output: "name": "object", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 52 - } + "range": [ + 46, + 52 + ] }, { "type": "Identifier", "name": "key", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 57 - } + "range": [ + 54, + 57 + ] }, { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] } ], "body": { @@ -112,49 +112,49 @@ Output: "name": "object", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 81 - } + "range": [ + 75, + 81 + ] }, "property": { "type": "Identifier", "name": "updated", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 89 - } + "range": [ + 82, + 89 + ] }, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 89 - } + "range": [ + 75, + 89 + ] }, "right": { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 92, - "end": 96 - } + "range": [ + 92, + 96 + ] }, "loc": null, - "range": { - "start": 75, - "end": 96 - } + "range": [ + 75, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 75, - "end": 97 - } + "range": [ + 75, + 97 + ] }, { "type": "ExpressionStatement", @@ -168,84 +168,84 @@ Output: "name": "object", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 108 - } + "range": [ + 102, + 108 + ] }, "property": { "type": "Identifier", "name": "key", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 112 - } + "range": [ + 109, + 112 + ] }, "computed": true, "loc": null, - "range": { - "start": 102, - "end": 113 - } + "range": [ + 102, + 113 + ] }, "right": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 121 - } + "range": [ + 116, + 121 + ] }, "loc": null, - "range": { - "start": 102, - "end": 121 - } + "range": [ + 102, + 121 + ] }, "directive": null, "loc": null, - "range": { - "start": 102, - "end": 122 - } + "range": [ + 102, + 122 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 126 - } + "range": [ + 69, + 126 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 45, - "end": 126 - }, + "range": [ + 45, + 126 + ], "expression": false, "loc": null, - "range": { - "start": 45, - "end": 126 - } + "range": [ + 45, + 126 + ] }, "loc": null, - "range": { - "start": 36, - "end": 126 - } + "range": [ + 36, + 126 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 127 - } + "range": [ + 30, + 127 + ] }, { "type": "VariableDeclaration", @@ -258,10 +258,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 137 - } + "range": [ + 136, + 137 + ] }, "init": { "type": "CallExpression", @@ -270,10 +270,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 150 - } + "range": [ + 140, + 150 + ] }, "arguments": [ { @@ -281,30 +281,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 156 - } + "range": [ + 151, + 156 + ] } ], "loc": null, - "range": { - "start": 140, - "end": 157 - } + "range": [ + 140, + 157 + ] }, "loc": null, - "range": { - "start": 136, - "end": 157 - } + "range": [ + 136, + 157 + ] } ], "loc": null, - "range": { - "start": 130, - "end": 158 - } + "range": [ + 130, + 158 + ] }, { "type": "ExpressionStatement", @@ -315,10 +315,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 167 - } + "range": [ + 161, + 167 + ] }, "arguments": [ { @@ -326,24 +326,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] } ], "loc": null, - "range": { - "start": 161, - "end": 170 - } + "range": [ + 161, + 170 + ] }, "directive": null, "loc": null, - "range": { - "start": 161, - "end": 171 - } + "range": [ + 161, + 171 + ] }, { "type": "ReturnStatement", @@ -352,42 +352,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "loc": null, - "range": { - "start": 174, - "end": 183 - } + "range": [ + 174, + 183 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 185 - } + "range": [ + 26, + 185 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 185 - }, + "range": [ + 0, + 185 + ], "loc": null, - "range": { - "start": 0, - "end": 185 - } + "range": [ + 0, + 185 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 185 - } + "range": [ + 0, + 185 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-param-assignment-pattern.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-param-assignment-pattern.js.snap index fab6e2cc2d..03722c456e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-param-assignment-pattern.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@function-param-assignment-pattern.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,25 +33,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, "right": { "type": "StringLiteral", "value": "default", "loc": null, - "range": { - "start": 23, - "end": 32 - } + "range": [ + 23, + 32 + ] }, "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "AssignmentPattern", @@ -60,10 +60,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "right": { "type": "ArrayExpression", @@ -72,23 +72,23 @@ Output: "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 39, - "end": 41 - } + "range": [ + 39, + 41 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 42 - } + "range": [ + 38, + 42 + ] }, "loc": null, - "range": { - "start": 34, - "end": 42 - } + "range": [ + 34, + 42 + ] } ], "body": { @@ -104,59 +104,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 61 - } + "range": [ + 55, + 61 + ] }, "loc": null, - "range": { - "start": 48, - "end": 62 - } + "range": [ + 48, + 62 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 64 - } + "range": [ + 44, + 64 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 64 - }, + "range": [ + 0, + 64 + ], "loc": null, - "range": { - "start": 0, - "end": 64 - } + "range": [ + 0, + 64 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 64 - } + "range": [ + 0, + 64 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-default-function.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-default-function.js.snap index 8e4665145d..c55d0e0201 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-default-function.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-default-function.js.snap @@ -33,10 +33,10 @@ Output: "name": "Bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 55 - } + "range": [ + 52, + 55 + ] }, "params": [ { @@ -44,10 +44,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] } ], "body": { @@ -59,17 +59,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 67, - "end": 79 - } + "range": [ + 67, + 79 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 80 - } + "range": [ + 67, + 80 + ] }, { "type": "ReturnStatement", @@ -81,18 +81,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 91, - "end": 94 - } + "range": [ + 91, + 94 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] }, "children": [ { @@ -104,33 +104,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 101 - } + "range": [ + 96, + 101 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 105 - } + "range": [ + 102, + 105 + ] }, "computed": false, "loc": null, - "range": { - "start": 96, - "end": 105 - } + "range": [ + 96, + 105 + ] }, "loc": null, - "range": { - "start": 95, - "end": 106 - } + "range": [ + 95, + 106 + ] } ], "closingElement": { @@ -139,54 +139,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 108, - "end": 111 - } + "range": [ + 108, + 111 + ] }, "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] }, "loc": null, - "range": { - "start": 90, - "end": 112 - } + "range": [ + 90, + 112 + ] }, "loc": null, - "range": { - "start": 83, - "end": 113 - } + "range": [ + 83, + 113 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 115 - } + "range": [ + 63, + 115 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 43, - "end": 115 - }, + "range": [ + 43, + 115 + ], "loc": null, - "range": { - "start": 43, - "end": 115 - } + "range": [ + 43, + 115 + ] }, "loc": null, - "range": { - "start": 28, - "end": 115 - } + "range": [ + 28, + 115 + ] }, { "type": "FunctionDeclaration", @@ -195,10 +195,10 @@ Output: "name": "NoForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 134 - } + "range": [ + 126, + 134 + ] }, "params": [ { @@ -206,10 +206,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 140 - } + "range": [ + 135, + 140 + ] } ], "body": { @@ -225,18 +225,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 154, - "end": 157 - } + "range": [ + 154, + 157 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 153, - "end": 158 - } + "range": [ + 153, + 158 + ] }, "children": [ { @@ -248,33 +248,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 164 - } + "range": [ + 159, + 164 + ] }, "property": { "type": "Identifier", "name": "noForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 173 - } + "range": [ + 165, + 173 + ] }, "computed": false, "loc": null, - "range": { - "start": 159, - "end": 173 - } + "range": [ + 159, + 173 + ] }, "loc": null, - "range": { - "start": 158, - "end": 174 - } + "range": [ + 158, + 174 + ] } ], "closingElement": { @@ -283,48 +283,48 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 176, - "end": 179 - } + "range": [ + 176, + 179 + ] }, "loc": null, - "range": { - "start": 174, - "end": 180 - } + "range": [ + 174, + 180 + ] }, "loc": null, - "range": { - "start": 153, - "end": 180 - } + "range": [ + 153, + 180 + ] }, "loc": null, - "range": { - "start": 146, - "end": 181 - } + "range": [ + 146, + 181 + ] } ], "loc": null, - "range": { - "start": 142, - "end": 183 - } + "range": [ + 142, + 183 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 117, - "end": 183 - }, + "range": [ + 117, + 183 + ], "loc": null, - "range": { - "start": 117, - "end": 183 - } + "range": [ + 117, + 183 + ] }, { "type": "FunctionDeclaration", @@ -333,10 +333,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 197 - } + "range": [ + 194, + 197 + ] }, "params": [ { @@ -344,10 +344,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 203 - } + "range": [ + 198, + 203 + ] } ], "body": { @@ -359,17 +359,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 209, - "end": 221 - } + "range": [ + 209, + 221 + ] }, "directive": null, "loc": null, - "range": { - "start": 209, - "end": 222 - } + "range": [ + 209, + 222 + ] }, { "type": "ReturnStatement", @@ -381,18 +381,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 233, - "end": 236 - } + "range": [ + 233, + 236 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 232, - "end": 237 - } + "range": [ + 232, + 237 + ] }, "children": [ { @@ -404,33 +404,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 243 - } + "range": [ + 238, + 243 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 247 - } + "range": [ + 244, + 247 + ] }, "computed": false, "loc": null, - "range": { - "start": 238, - "end": 247 - } + "range": [ + 238, + 247 + ] }, "loc": null, - "range": { - "start": 237, - "end": 248 - } + "range": [ + 237, + 248 + ] } ], "closingElement": { @@ -439,54 +439,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 250, - "end": 253 - } + "range": [ + 250, + 253 + ] }, "loc": null, - "range": { - "start": 248, - "end": 254 - } + "range": [ + 248, + 254 + ] }, "loc": null, - "range": { - "start": 232, - "end": 254 - } + "range": [ + 232, + 254 + ] }, "loc": null, - "range": { - "start": 225, - "end": 255 - } + "range": [ + 225, + 255 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 257 - } + "range": [ + 205, + 257 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 185, - "end": 257 - }, + "range": [ + 185, + 257 + ], "loc": null, - "range": { - "start": 185, - "end": 257 - } + "range": [ + 185, + 257 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 28, - "end": 257 - } + "range": [ + 28, + 257 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-function-and-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-function-and-default.js.snap index 53f0f664ce..77e8930dec 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-function-and-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-function-and-default.js.snap @@ -33,10 +33,10 @@ Output: "name": "Bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 55 - } + "range": [ + 52, + 55 + ] }, "params": [ { @@ -44,10 +44,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] } ], "body": { @@ -59,17 +59,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 67, - "end": 79 - } + "range": [ + 67, + 79 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 80 - } + "range": [ + 67, + 80 + ] }, { "type": "ReturnStatement", @@ -81,18 +81,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 91, - "end": 94 - } + "range": [ + 91, + 94 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] }, "children": [ { @@ -104,33 +104,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 101 - } + "range": [ + 96, + 101 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 105 - } + "range": [ + 102, + 105 + ] }, "computed": false, "loc": null, - "range": { - "start": 96, - "end": 105 - } + "range": [ + 96, + 105 + ] }, "loc": null, - "range": { - "start": 95, - "end": 106 - } + "range": [ + 95, + 106 + ] } ], "closingElement": { @@ -139,54 +139,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 108, - "end": 111 - } + "range": [ + 108, + 111 + ] }, "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] }, "loc": null, - "range": { - "start": 90, - "end": 112 - } + "range": [ + 90, + 112 + ] }, "loc": null, - "range": { - "start": 83, - "end": 113 - } + "range": [ + 83, + 113 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 115 - } + "range": [ + 63, + 115 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 43, - "end": 115 - }, + "range": [ + 43, + 115 + ], "loc": null, - "range": { - "start": 43, - "end": 115 - } + "range": [ + 43, + 115 + ] }, "loc": null, - "range": { - "start": 28, - "end": 115 - } + "range": [ + 28, + 115 + ] }, { "type": "FunctionDeclaration", @@ -195,10 +195,10 @@ Output: "name": "NoForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 134 - } + "range": [ + 126, + 134 + ] }, "params": [ { @@ -206,10 +206,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 140 - } + "range": [ + 135, + 140 + ] } ], "body": { @@ -225,18 +225,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 154, - "end": 157 - } + "range": [ + 154, + 157 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 153, - "end": 158 - } + "range": [ + 153, + 158 + ] }, "children": [ { @@ -248,33 +248,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 164 - } + "range": [ + 159, + 164 + ] }, "property": { "type": "Identifier", "name": "noForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 173 - } + "range": [ + 165, + 173 + ] }, "computed": false, "loc": null, - "range": { - "start": 159, - "end": 173 - } + "range": [ + 159, + 173 + ] }, "loc": null, - "range": { - "start": 158, - "end": 174 - } + "range": [ + 158, + 174 + ] } ], "closingElement": { @@ -283,48 +283,48 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 176, - "end": 179 - } + "range": [ + 176, + 179 + ] }, "loc": null, - "range": { - "start": 174, - "end": 180 - } + "range": [ + 174, + 180 + ] }, "loc": null, - "range": { - "start": 153, - "end": 180 - } + "range": [ + 153, + 180 + ] }, "loc": null, - "range": { - "start": 146, - "end": 181 - } + "range": [ + 146, + 181 + ] } ], "loc": null, - "range": { - "start": 142, - "end": 183 - } + "range": [ + 142, + 183 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 117, - "end": 183 - }, + "range": [ + 117, + 183 + ], "loc": null, - "range": { - "start": 117, - "end": 183 - } + "range": [ + 117, + 183 + ] }, { "type": "ExportNamedDeclaration", @@ -335,10 +335,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 204 - } + "range": [ + 201, + 204 + ] }, "params": [ { @@ -346,10 +346,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 210 - } + "range": [ + 205, + 210 + ] } ], "body": { @@ -361,17 +361,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 216, - "end": 228 - } + "range": [ + 216, + 228 + ] }, "directive": null, "loc": null, - "range": { - "start": 216, - "end": 229 - } + "range": [ + 216, + 229 + ] }, { "type": "ReturnStatement", @@ -383,18 +383,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 240, - "end": 243 - } + "range": [ + 240, + 243 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 239, - "end": 244 - } + "range": [ + 239, + 244 + ] }, "children": [ { @@ -406,33 +406,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 245, - "end": 250 - } + "range": [ + 245, + 250 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 251, - "end": 254 - } + "range": [ + 251, + 254 + ] }, "computed": false, "loc": null, - "range": { - "start": 245, - "end": 254 - } + "range": [ + 245, + 254 + ] }, "loc": null, - "range": { - "start": 244, - "end": 255 - } + "range": [ + 244, + 255 + ] } ], "closingElement": { @@ -441,62 +441,62 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 257, - "end": 260 - } + "range": [ + 257, + 260 + ] }, "loc": null, - "range": { - "start": 255, - "end": 261 - } + "range": [ + 255, + 261 + ] }, "loc": null, - "range": { - "start": 239, - "end": 261 - } + "range": [ + 239, + 261 + ] }, "loc": null, - "range": { - "start": 232, - "end": 262 - } + "range": [ + 232, + 262 + ] } ], "loc": null, - "range": { - "start": 212, - "end": 264 - } + "range": [ + 212, + 264 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 192, - "end": 264 - }, + "range": [ + 192, + 264 + ], "loc": null, - "range": { - "start": 192, - "end": 264 - } + "range": [ + 192, + 264 + ] }, "specifiers": [], "source": null, "loc": null, - "range": { - "start": 185, - "end": 264 - } + "range": [ + 185, + 264 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 28, - "end": 264 - } + "range": [ + 28, + 264 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-function.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-function.js.snap index 5b151989e2..17ad34cab2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-function.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test-export-function.js.snap @@ -33,10 +33,10 @@ Output: "name": "Bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 47 - } + "range": [ + 44, + 47 + ] }, "params": [ { @@ -44,10 +44,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 53 - } + "range": [ + 48, + 53 + ] } ], "body": { @@ -59,17 +59,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 59, - "end": 71 - } + "range": [ + 59, + 71 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 72 - } + "range": [ + 59, + 72 + ] }, { "type": "ReturnStatement", @@ -81,18 +81,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 83, - "end": 86 - } + "range": [ + 83, + 86 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] }, "children": [ { @@ -104,33 +104,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 97 - } + "range": [ + 94, + 97 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] }, "loc": null, - "range": { - "start": 87, - "end": 98 - } + "range": [ + 87, + 98 + ] } ], "closingElement": { @@ -139,56 +139,56 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 100, - "end": 103 - } + "range": [ + 100, + 103 + ] }, "loc": null, - "range": { - "start": 98, - "end": 104 - } + "range": [ + 98, + 104 + ] }, "loc": null, - "range": { - "start": 82, - "end": 104 - } + "range": [ + 82, + 104 + ] }, "loc": null, - "range": { - "start": 75, - "end": 105 - } + "range": [ + 75, + 105 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 107 - } + "range": [ + 55, + 107 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 35, - "end": 107 - }, + "range": [ + 35, + 107 + ], "loc": null, - "range": { - "start": 35, - "end": 107 - } + "range": [ + 35, + 107 + ] }, "specifiers": [], "source": null, "loc": null, - "range": { - "start": 28, - "end": 107 - } + "range": [ + 28, + 107 + ] }, { "type": "ExportNamedDeclaration", @@ -199,10 +199,10 @@ Output: "name": "NoForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 133 - } + "range": [ + 125, + 133 + ] }, "params": [ { @@ -210,10 +210,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 139 - } + "range": [ + 134, + 139 + ] } ], "body": { @@ -229,18 +229,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 153, - "end": 156 - } + "range": [ + 153, + 156 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 152, - "end": 157 - } + "range": [ + 152, + 157 + ] }, "children": [ { @@ -252,33 +252,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 163 - } + "range": [ + 158, + 163 + ] }, "property": { "type": "Identifier", "name": "noForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 172 - } + "range": [ + 164, + 172 + ] }, "computed": false, "loc": null, - "range": { - "start": 158, - "end": 172 - } + "range": [ + 158, + 172 + ] }, "loc": null, - "range": { - "start": 157, - "end": 173 - } + "range": [ + 157, + 173 + ] } ], "closingElement": { @@ -287,56 +287,56 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 175, - "end": 178 - } + "range": [ + 175, + 178 + ] }, "loc": null, - "range": { - "start": 173, - "end": 179 - } + "range": [ + 173, + 179 + ] }, "loc": null, - "range": { - "start": 152, - "end": 179 - } + "range": [ + 152, + 179 + ] }, "loc": null, - "range": { - "start": 145, - "end": 180 - } + "range": [ + 145, + 180 + ] } ], "loc": null, - "range": { - "start": 141, - "end": 182 - } + "range": [ + 141, + 182 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 116, - "end": 182 - }, + "range": [ + 116, + 182 + ], "loc": null, - "range": { - "start": 116, - "end": 182 - } + "range": [ + 116, + 182 + ] }, "specifiers": [], "source": null, "loc": null, - "range": { - "start": 109, - "end": 182 - } + "range": [ + 109, + 182 + ] }, { "type": "ExportNamedDeclaration", @@ -347,10 +347,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 203 - } + "range": [ + 200, + 203 + ] }, "params": [ { @@ -358,10 +358,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 204, - "end": 209 - } + "range": [ + 204, + 209 + ] } ], "body": { @@ -373,17 +373,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 215, - "end": 227 - } + "range": [ + 215, + 227 + ] }, "directive": null, "loc": null, - "range": { - "start": 215, - "end": 228 - } + "range": [ + 215, + 228 + ] }, { "type": "ReturnStatement", @@ -395,18 +395,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 239, - "end": 242 - } + "range": [ + 239, + 242 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 238, - "end": 243 - } + "range": [ + 238, + 243 + ] }, "children": [ { @@ -418,33 +418,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 249 - } + "range": [ + 244, + 249 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 250, - "end": 253 - } + "range": [ + 250, + 253 + ] }, "computed": false, "loc": null, - "range": { - "start": 244, - "end": 253 - } + "range": [ + 244, + 253 + ] }, "loc": null, - "range": { - "start": 243, - "end": 254 - } + "range": [ + 243, + 254 + ] } ], "closingElement": { @@ -453,62 +453,62 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 256, - "end": 259 - } + "range": [ + 256, + 259 + ] }, "loc": null, - "range": { - "start": 254, - "end": 260 - } + "range": [ + 254, + 260 + ] }, "loc": null, - "range": { - "start": 238, - "end": 260 - } + "range": [ + 238, + 260 + ] }, "loc": null, - "range": { - "start": 231, - "end": 261 - } + "range": [ + 231, + 261 + ] } ], "loc": null, - "range": { - "start": 211, - "end": 263 - } + "range": [ + 211, + 263 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 191, - "end": 263 - }, + "range": [ + 191, + 263 + ], "loc": null, - "range": { - "start": 191, - "end": 263 - } + "range": [ + 191, + 263 + ] }, "specifiers": [], "source": null, "loc": null, - "range": { - "start": 184, - "end": 263 - } + "range": [ + 184, + 263 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 28, - "end": 263 - } + "range": [ + 28, + 263 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test.js.snap index c9bbc8207a..81ba3cd59f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@gating-test.js.snap @@ -31,10 +31,10 @@ Output: "name": "Bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 40 - } + "range": [ + 37, + 40 + ] }, "params": [ { @@ -42,10 +42,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] } ], "body": { @@ -57,17 +57,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 52, - "end": 64 - } + "range": [ + 52, + 64 + ] }, "directive": null, "loc": null, - "range": { - "start": 52, - "end": 65 - } + "range": [ + 52, + 65 + ] }, { "type": "ReturnStatement", @@ -79,18 +79,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 75, - "end": 80 - } + "range": [ + 75, + 80 + ] }, "children": [ { @@ -102,33 +102,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 90 - } + "range": [ + 87, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 81, - "end": 90 - } + "range": [ + 81, + 90 + ] }, "loc": null, - "range": { - "start": 80, - "end": 91 - } + "range": [ + 80, + 91 + ] } ], "closingElement": { @@ -137,48 +137,48 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 93, - "end": 96 - } + "range": [ + 93, + 96 + ] }, "loc": null, - "range": { - "start": 91, - "end": 97 - } + "range": [ + 91, + 97 + ] }, "loc": null, - "range": { - "start": 75, - "end": 97 - } + "range": [ + 75, + 97 + ] }, "loc": null, - "range": { - "start": 68, - "end": 98 - } + "range": [ + 68, + 98 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 100 - } + "range": [ + 48, + 100 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 28, - "end": 100 - }, + "range": [ + 28, + 100 + ], "loc": null, - "range": { - "start": 28, - "end": 100 - } + "range": [ + 28, + 100 + ] }, { "type": "FunctionDeclaration", @@ -187,10 +187,10 @@ Output: "name": "NoForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 119 - } + "range": [ + 111, + 119 + ] }, "params": [ { @@ -198,10 +198,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 125 - } + "range": [ + 120, + 125 + ] } ], "body": { @@ -217,18 +217,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 139, - "end": 142 - } + "range": [ + 139, + 142 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 138, - "end": 143 - } + "range": [ + 138, + 143 + ] }, "children": [ { @@ -240,33 +240,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 149 - } + "range": [ + 144, + 149 + ] }, "property": { "type": "Identifier", "name": "noForget", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 158 - } + "range": [ + 150, + 158 + ] }, "computed": false, "loc": null, - "range": { - "start": 144, - "end": 158 - } + "range": [ + 144, + 158 + ] }, "loc": null, - "range": { - "start": 143, - "end": 159 - } + "range": [ + 143, + 159 + ] } ], "closingElement": { @@ -275,48 +275,48 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 161, - "end": 164 - } + "range": [ + 161, + 164 + ] }, "loc": null, - "range": { - "start": 159, - "end": 165 - } + "range": [ + 159, + 165 + ] }, "loc": null, - "range": { - "start": 138, - "end": 165 - } + "range": [ + 138, + 165 + ] }, "loc": null, - "range": { - "start": 131, - "end": 166 - } + "range": [ + 131, + 166 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 168 - } + "range": [ + 127, + 168 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 102, - "end": 168 - }, + "range": [ + 102, + 168 + ], "loc": null, - "range": { - "start": 102, - "end": 168 - } + "range": [ + 102, + 168 + ] }, { "type": "FunctionDeclaration", @@ -325,10 +325,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 179, - "end": 182 - } + "range": [ + 179, + 182 + ] }, "params": [ { @@ -336,10 +336,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 188 - } + "range": [ + 183, + 188 + ] } ], "body": { @@ -351,17 +351,17 @@ Output: "type": "StringLiteral", "value": "use forget", "loc": null, - "range": { - "start": 194, - "end": 206 - } + "range": [ + 194, + 206 + ] }, "directive": null, "loc": null, - "range": { - "start": 194, - "end": 207 - } + "range": [ + 194, + 207 + ] }, { "type": "ReturnStatement", @@ -373,18 +373,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 218, - "end": 221 - } + "range": [ + 218, + 221 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 217, - "end": 222 - } + "range": [ + 217, + 222 + ] }, "children": [ { @@ -396,33 +396,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 228 - } + "range": [ + 223, + 228 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 229, - "end": 232 - } + "range": [ + 229, + 232 + ] }, "computed": false, "loc": null, - "range": { - "start": 223, - "end": 232 - } + "range": [ + 223, + 232 + ] }, "loc": null, - "range": { - "start": 222, - "end": 233 - } + "range": [ + 222, + 233 + ] } ], "closingElement": { @@ -431,54 +431,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 235, - "end": 238 - } + "range": [ + 235, + 238 + ] }, "loc": null, - "range": { - "start": 233, - "end": 239 - } + "range": [ + 233, + 239 + ] }, "loc": null, - "range": { - "start": 217, - "end": 239 - } + "range": [ + 217, + 239 + ] }, "loc": null, - "range": { - "start": 210, - "end": 240 - } + "range": [ + 210, + 240 + ] } ], "loc": null, - "range": { - "start": 190, - "end": 242 - } + "range": [ + 190, + 242 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 170, - "end": 242 - }, + "range": [ + 170, + 242 + ], "loc": null, - "range": { - "start": 170, - "end": 242 - } + "range": [ + 170, + 242 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 28, - "end": 242 - } + "range": [ + 28, + 242 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@global-jsx-tag-lowered-between-mutations.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@global-jsx-tag-lowered-between-mutations.js.snap index aba5504bb5..2e6c3c9407 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@global-jsx-tag-lowered-between-mutations.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@global-jsx-tag-lowered-between-mutations.js.snap @@ -32,10 +32,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -43,10 +43,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -63,10 +63,10 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] }, "init": { "type": "NewExpression", @@ -75,30 +75,30 @@ Output: "name": "MaybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "arguments": [], "loc": null, - "range": { - "start": 51, - "end": 69 - } + "range": [ + 51, + 69 + ] }, "loc": null, - "range": { - "start": 36, - "end": 69 - } + "range": [ + 36, + 69 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 70 - } + "range": [ + 30, + 70 + ] }, { "type": "ReturnStatement", @@ -110,18 +110,18 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 722, - "end": 726 - } + "range": [ + 722, + 726 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 721, - "end": 727 - } + "range": [ + 721, + 727 + ] }, "children": [ { @@ -133,10 +133,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 728, - "end": 739 - } + "range": [ + 728, + 739 + ] }, "arguments": [ { @@ -144,23 +144,23 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 740, - "end": 752 - } + "range": [ + 740, + 752 + ] } ], "loc": null, - "range": { - "start": 728, - "end": 753 - } + "range": [ + 728, + 753 + ] }, "loc": null, - "range": { - "start": 727, - "end": 754 - } + "range": [ + 727, + 754 + ] } ], "closingElement": { @@ -169,54 +169,54 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 756, - "end": 760 - } + "range": [ + 756, + 760 + ] }, "loc": null, - "range": { - "start": 754, - "end": 761 - } + "range": [ + 754, + 761 + ] }, "loc": null, - "range": { - "start": 721, - "end": 761 - } + "range": [ + 721, + 761 + ] }, "loc": null, - "range": { - "start": 714, - "end": 762 - } + "range": [ + 714, + 762 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 764 - } + "range": [ + 26, + 764 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 764 - }, + "range": [ + 0, + 764 + ], "loc": null, - "range": { - "start": 0, - "end": 764 - } + "range": [ + 0, + 764 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 764 - } + "range": [ + 0, + 764 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-Boolean.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-Boolean.js.snap index ff050c7876..10a32256ce 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-Boolean.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-Boolean.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,32 +53,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "VariableDeclaration", @@ -91,10 +91,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "CallExpression", @@ -103,10 +103,10 @@ Output: "name": "Boolean", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 63 - } + "range": [ + 56, + 63 + ] }, "arguments": [ { @@ -114,30 +114,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 66 - } + "range": [ + 56, + 66 + ] }, "loc": null, - "range": { - "start": 52, - "end": 66 - } + "range": [ + 52, + 66 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 67 - } + "range": [ + 46, + 67 + ] }, { "type": "ReturnStatement", @@ -149,59 +149,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 83 - } + "range": [ + 77, + 83 + ] }, "loc": null, - "range": { - "start": 70, - "end": 84 - } + "range": [ + 70, + 84 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 86 - } + "range": [ + 26, + 86 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 86 - }, + "range": [ + 0, + 86 + ], "loc": null, - "range": { - "start": 0, - "end": 86 - } + "range": [ + 0, + 86 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 86 - } + "range": [ + 0, + 86 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-Number.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-Number.js.snap index 828db1768a..97d9b4fb4e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-Number.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-Number.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,32 +53,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "VariableDeclaration", @@ -91,10 +91,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "CallExpression", @@ -103,10 +103,10 @@ Output: "name": "Number", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 62 - } + "range": [ + 56, + 62 + ] }, "arguments": [ { @@ -114,30 +114,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 65 - } + "range": [ + 56, + 65 + ] }, "loc": null, - "range": { - "start": 52, - "end": 65 - } + "range": [ + 52, + 65 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 66 - } + "range": [ + 46, + 66 + ] }, { "type": "ReturnStatement", @@ -149,59 +149,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "loc": null, - "range": { - "start": 69, - "end": 83 - } + "range": [ + 69, + 83 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 85 - } + "range": [ + 26, + 85 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 85 - }, + "range": [ + 0, + 85 + ], "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-String.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-String.js.snap index 50fdf85cd8..a0a73d4ca7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-String.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@globals-String.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,32 +53,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "VariableDeclaration", @@ -91,10 +91,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "CallExpression", @@ -103,10 +103,10 @@ Output: "name": "String", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 62 - } + "range": [ + 56, + 62 + ] }, "arguments": [ { @@ -114,30 +114,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 65 - } + "range": [ + 56, + 65 + ] }, "loc": null, - "range": { - "start": 52, - "end": 65 - } + "range": [ + 52, + 65 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 66 - } + "range": [ + 46, + 66 + ] }, { "type": "ReturnStatement", @@ -149,59 +149,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "loc": null, - "range": { - "start": 69, - "end": 83 - } + "range": [ + 69, + 83 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 85 - } + "range": [ + 26, + 85 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 85 - }, + "range": [ + 0, + 85 + ], "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-expr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-expr.js.snap index c2e00f1d3a..c7477d35d2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-expr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-expr.js.snap @@ -21,10 +21,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 16 - } + "range": [ + 11, + 16 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "init": { "type": "ArrayExpression", @@ -66,40 +66,40 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 36 - } + "range": [ + 33, + 36 + ] }, { "type": "Identifier", "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 44 - } + "range": [ + 30, + 44 + ] }, "loc": null, - "range": { - "start": 26, - "end": 44 - } + "range": [ + 26, + 44 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 45 - } + "range": [ + 22, + 45 + ] }, { "type": "ReturnStatement", @@ -108,42 +108,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "loc": null, - "range": { - "start": 48, - "end": 57 - } + "range": [ + 48, + 57 + ] } ], "loc": null, - "range": { - "start": 18, - "end": 59 - } + "range": [ + 18, + 59 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 59 - }, + "range": [ + 0, + 59 + ], "loc": null, - "range": { - "start": 0, - "end": 59 - } + "range": [ + 0, + 59 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 59 - } + "range": [ + 0, + 59 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-pattern-dce-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-pattern-dce-2.js.snap index cf6e457d15..4288686d06 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-pattern-dce-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-pattern-dce-2.js.snap @@ -21,10 +21,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 16 - } + "range": [ + 11, + 16 + ] } ], "body": { @@ -55,51 +55,51 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 30 - } + "range": [ + 27, + 30 + ] }, { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 35 - } + "range": [ + 32, + 35 + ] }, null ], "loc": null, - "range": { - "start": 26, - "end": 39 - } + "range": [ + 26, + 39 + ] }, "init": { "type": "Identifier", "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 47 - } + "range": [ + 42, + 47 + ] }, "loc": null, - "range": { - "start": 26, - "end": 47 - } + "range": [ + 26, + 47 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 48 - } + "range": [ + 22, + 48 + ] }, { "type": "ReturnStatement", @@ -108,42 +108,42 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 61 - } + "range": [ + 58, + 61 + ] }, "loc": null, - "range": { - "start": 51, - "end": 62 - } + "range": [ + 51, + 62 + ] } ], "loc": null, - "range": { - "start": 18, - "end": 64 - } + "range": [ + 18, + 64 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 64 - }, + "range": [ + 0, + 64 + ], "loc": null, - "range": { - "start": 0, - "end": 64 - } + "range": [ + 0, + 64 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 64 - } + "range": [ + 0, + 64 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-pattern-dce.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-pattern-dce.js.snap index ce60752784..4957fd2ed3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-pattern-dce.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array-pattern-dce.js.snap @@ -21,10 +21,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 16 - } + "range": [ + 11, + 16 + ] } ], "body": { @@ -56,50 +56,50 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 32 - } + "range": [ + 29, + 32 + ] }, { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 37 - } + "range": [ + 34, + 37 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 38 - } + "range": [ + 26, + 38 + ] }, "init": { "type": "Identifier", "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "loc": null, - "range": { - "start": 26, - "end": 46 - } + "range": [ + 26, + 46 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 47 - } + "range": [ + 22, + 47 + ] }, { "type": "ReturnStatement", @@ -108,42 +108,42 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] }, "loc": null, - "range": { - "start": 50, - "end": 61 - } + "range": [ + 50, + 61 + ] } ], "loc": null, - "range": { - "start": 18, - "end": 63 - } + "range": [ + 18, + 63 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 63 - }, + "range": [ + 0, + 63 + ], "loc": null, - "range": { - "start": 0, - "end": 63 - } + "range": [ + 0, + 63 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 63 - } + "range": [ + 0, + 63 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array.js.snap index 54bb9bcc75..630120344d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@holey-array.js.snap @@ -22,10 +22,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 16 - } + "range": [ + 11, + 16 + ] } ], "body": { @@ -57,17 +57,17 @@ Output: "name": "setstate", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 37 - } + "range": [ + 29, + 37 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 38 - } + "range": [ + 26, + 38 + ] }, "init": { "type": "CallExpression", @@ -76,30 +76,30 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 49 - } + "range": [ + 41, + 49 + ] }, "arguments": [], "loc": null, - "range": { - "start": 41, - "end": 51 - } + "range": [ + 41, + 51 + ] }, "loc": null, - "range": { - "start": 26, - "end": 51 - } + "range": [ + 26, + 51 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 52 - } + "range": [ + 22, + 52 + ] }, { "type": "ExpressionStatement", @@ -110,34 +110,34 @@ Output: "name": "setstate", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 63 - } + "range": [ + 55, + 63 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 66 - } + "range": [ + 55, + 66 + ] }, "directive": null, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, { "type": "ReturnStatement", @@ -148,59 +148,59 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 82 - } + "range": [ + 77, + 82 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 86 - } + "range": [ + 83, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] }, "loc": null, - "range": { - "start": 70, - "end": 87 - } + "range": [ + 70, + 87 + ] } ], "loc": null, - "range": { - "start": 18, - "end": 89 - } + "range": [ + 18, + 89 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 89 - }, + "range": [ + 0, + 89 + ], "loc": null, - "range": { - "start": 0, - "end": 89 - } + "range": [ + 0, + 89 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 89 - } + "range": [ + 0, + 89 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hook-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hook-call.js.snap index 22632a0ae7..8bfce95f5f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hook-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hook-call.js.snap @@ -31,33 +31,33 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 21, - "end": 23 - } + "range": [ + 21, + 23 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 23 - }, + "range": [ + 0, + 23 + ], "loc": null, - "range": { - "start": 0, - "end": 23 - } + "range": [ + 0, + 23 + ] }, { "type": "FunctionDeclaration", @@ -66,33 +66,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 36 - } + "range": [ + 33, + 36 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 39, - "end": 41 - } + "range": [ + 39, + 41 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 24, - "end": 41 - }, + "range": [ + 24, + 41 + ], "loc": null, - "range": { - "start": 24, - "end": 41 - } + "range": [ + 24, + 41 + ] }, { "type": "FunctionDeclaration", @@ -101,10 +101,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 61 - } + "range": [ + 52, + 61 + ] }, "params": [ { @@ -112,10 +112,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] } ], "body": { @@ -132,32 +132,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 83, - "end": 85 - } + "range": [ + 83, + 85 + ] }, "loc": null, - "range": { - "start": 79, - "end": 85 - } + "range": [ + 79, + 85 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 86 - } + "range": [ + 73, + 86 + ] }, { "type": "VariableDeclaration", @@ -170,10 +170,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "init": { "type": "CallExpression", @@ -182,10 +182,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 108 - } + "range": [ + 99, + 108 + ] }, "arguments": [ { @@ -193,30 +193,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 111 - } + "range": [ + 99, + 111 + ] }, "loc": null, - "range": { - "start": 95, - "end": 111 - } + "range": [ + 95, + 111 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 112 - } + "range": [ + 89, + 112 + ] }, { "type": "ExpressionStatement", @@ -227,10 +227,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 118 - } + "range": [ + 115, + 118 + ] }, "arguments": [ { @@ -238,34 +238,34 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] } ], "loc": null, - "range": { - "start": 115, - "end": 124 - } + "range": [ + 115, + 124 + ] }, "directive": null, "loc": null, - "range": { - "start": 115, - "end": 125 - } + "range": [ + 115, + 125 + ] }, { "type": "ReturnStatement", @@ -277,18 +277,18 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 142, - "end": 151 - } + "range": [ + 142, + 151 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 141, - "end": 152 - } + "range": [ + 141, + 152 + ] }, "children": [ { @@ -296,10 +296,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 152, - "end": 159 - } + "range": [ + 152, + 159 + ] }, { "type": "JSXExpressionContainer", @@ -308,26 +308,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 161 - } + "range": [ + 160, + 161 + ] }, "loc": null, - "range": { - "start": 159, - "end": 162 - } + "range": [ + 159, + 162 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 162, - "end": 169 - } + "range": [ + 162, + 169 + ] }, { "type": "JSXExpressionContainer", @@ -336,26 +336,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 171 - } + "range": [ + 170, + 171 + ] }, "loc": null, - "range": { - "start": 169, - "end": 172 - } + "range": [ + 169, + 172 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 172, - "end": 177 - } + "range": [ + 172, + 177 + ] } ], "closingElement": { @@ -364,54 +364,54 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 179, - "end": 188 - } + "range": [ + 179, + 188 + ] }, "loc": null, - "range": { - "start": 177, - "end": 189 - } + "range": [ + 177, + 189 + ] }, "loc": null, - "range": { - "start": 141, - "end": 189 - } + "range": [ + 141, + 189 + ] }, "loc": null, - "range": { - "start": 128, - "end": 194 - } + "range": [ + 128, + 194 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 196 - } + "range": [ + 69, + 196 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 43, - "end": 196 - }, + "range": [ + 43, + 196 + ], "loc": null, - "range": { - "start": 43, - "end": 196 - } + "range": [ + 43, + 196 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 196 - } + "range": [ + 0, + 196 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hook-inside-logical-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hook-inside-logical-expression.js.snap index 46945249e6..8d3b47ac66 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hook-inside-logical-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hook-inside-logical-expression.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "LogicalExpression", @@ -67,10 +67,10 @@ Output: "name": "useFragment", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, "arguments": [ { @@ -80,10 +80,10 @@ Output: "name": "graphql", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 62 - } + "range": [ + 55, + 62 + ] }, "quasi": { "type": "TemplateLiteral", @@ -96,24 +96,24 @@ Output: "raw": "..." }, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, { "type": "MemberExpression", @@ -122,62 +122,62 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "property": { "type": "Identifier", "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 79 - } + "range": [ + 69, + 79 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 80 - } + "range": [ + 43, + 80 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 84, - "end": 86 - } + "range": [ + 84, + 86 + ] }, "loc": null, - "range": { - "start": 43, - "end": 86 - } + "range": [ + 43, + 86 + ] }, "loc": null, - "range": { - "start": 36, - "end": 86 - } + "range": [ + 36, + 86 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 87 - } + "range": [ + 30, + 87 + ] }, { "type": "ReturnStatement", @@ -188,59 +188,59 @@ Output: "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 101 - } + "range": [ + 97, + 101 + ] }, "property": { "type": "Identifier", "name": "name", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 106 - } + "range": [ + 102, + 106 + ] }, "computed": false, "loc": null, - "range": { - "start": 97, - "end": 106 - } + "range": [ + 97, + 106 + ] }, "loc": null, - "range": { - "start": 90, - "end": 107 - } + "range": [ + 90, + 107 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 109 - } + "range": [ + 26, + 109 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 109 - }, + "range": [ + 0, + 109 + ], "loc": null, - "range": { - "start": 0, - "end": 109 - } + "range": [ + 0, + 109 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 109 - } + "range": [ + 0, + 109 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hooks-freeze-arguments.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hooks-freeze-arguments.js.snap index d6c1fa3cc7..03ec8908c5 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hooks-freeze-arguments.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hooks-freeze-arguments.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -47,32 +47,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 35, - "end": 37 - } + "range": [ + 35, + 37 + ] }, "loc": null, - "range": { - "start": 31, - "end": 37 - } + "range": [ + 31, + 37 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 38 - } + "range": [ + 25, + 38 + ] }, { "type": "ExpressionStatement", @@ -83,10 +83,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 50 - } + "range": [ + 41, + 50 + ] }, "arguments": [ { @@ -94,24 +94,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 53 - } + "range": [ + 41, + 53 + ] }, "directive": null, "loc": null, - "range": { - "start": 41, - "end": 54 - } + "range": [ + 41, + 54 + ] }, { "type": "ExpressionStatement", @@ -122,10 +122,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 83 - } + "range": [ + 74, + 83 + ] }, "arguments": [ { @@ -133,24 +133,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 86 - } + "range": [ + 74, + 86 + ] }, "directive": null, "loc": null, - "range": { - "start": 74, - "end": 87 - } + "range": [ + 74, + 87 + ] }, { "type": "ExpressionStatement", @@ -161,10 +161,10 @@ Output: "name": "call", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 116 - } + "range": [ + 112, + 116 + ] }, "arguments": [ { @@ -172,24 +172,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 119 - } + "range": [ + 112, + 119 + ] }, "directive": null, "loc": null, - "range": { - "start": 112, - "end": 120 - } + "range": [ + 112, + 120 + ] }, { "type": "ReturnStatement", @@ -198,36 +198,36 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] }, "loc": null, - "range": { - "start": 145, - "end": 154 - } + "range": [ + 145, + 154 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 156 - } + "range": [ + 21, + 156 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 156 - }, + "range": [ + 0, + 156 + ], "loc": null, - "range": { - "start": 0, - "end": 156 - } + "range": [ + 0, + 156 + ] }, { "type": "FunctionDeclaration", @@ -236,10 +236,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 167, - "end": 176 - } + "range": [ + 167, + 176 + ] }, "params": [ { @@ -247,33 +247,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 178 - } + "range": [ + 177, + 178 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 180, - "end": 182 - } + "range": [ + 180, + 182 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 158, - "end": 182 - }, + "range": [ + 158, + 182 + ], "loc": null, - "range": { - "start": 158, - "end": 182 - } + "range": [ + 158, + 182 + ] }, { "type": "FunctionDeclaration", @@ -282,10 +282,10 @@ Output: "name": "call", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 196 - } + "range": [ + 192, + 196 + ] }, "params": [ { @@ -293,39 +293,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 198 - } + "range": [ + 197, + 198 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 200, - "end": 202 - } + "range": [ + 200, + 202 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 183, - "end": 202 - }, + "range": [ + 183, + 202 + ], "loc": null, - "range": { - "start": 183, - "end": 202 - } + "range": [ + 183, + 202 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 202 - } + "range": [ + 0, + 202 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hooks-freeze-possibly-mutable-arguments.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hooks-freeze-possibly-mutable-arguments.js.snap index 7711f11440..6663a66a56 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hooks-freeze-possibly-mutable-arguments.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@hooks-freeze-possibly-mutable-arguments.js.snap @@ -34,10 +34,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -45,10 +45,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -65,10 +65,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "MemberExpression", @@ -77,40 +77,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] }, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 53 - } + "range": [ + 43, + 53 + ] }, "loc": null, - "range": { - "start": 36, - "end": 53 - } + "range": [ + 36, + 53 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 54 - } + "range": [ + 30, + 54 + ] }, { "type": "VariableDeclaration", @@ -123,10 +123,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "init": { "type": "MemberExpression", @@ -135,40 +135,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 67, - "end": 74 - } + "range": [ + 67, + 74 + ] }, "loc": null, - "range": { - "start": 63, - "end": 74 - } + "range": [ + 63, + 74 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 75 - } + "range": [ + 57, + 75 + ] }, { "type": "VariableDeclaration", @@ -181,24 +181,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "init": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] }, { "type": "IfStatement", @@ -207,10 +207,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 95 - } + "range": [ + 91, + 95 + ] }, "consequent": { "type": "BlockStatement", @@ -225,40 +225,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] }, "directive": null, "loc": null, - "range": { - "start": 103, - "end": 109 - } + "range": [ + 103, + 109 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 113 - } + "range": [ + 97, + 113 + ] }, "alternate": { "type": "BlockStatement", @@ -273,45 +273,45 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 129, - "end": 131 - } + "range": [ + 129, + 131 + ] }, "loc": null, - "range": { - "start": 125, - "end": 131 - } + "range": [ + 125, + 131 + ] }, "directive": null, "loc": null, - "range": { - "start": 125, - "end": 132 - } + "range": [ + 125, + 132 + ] } ], "loc": null, - "range": { - "start": 119, - "end": 136 - } + "range": [ + 119, + 136 + ] }, "loc": null, - "range": { - "start": 87, - "end": 136 - } + "range": [ + 87, + 136 + ] }, { "type": "ExpressionStatement", @@ -322,10 +322,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 148 - } + "range": [ + 139, + 148 + ] }, "arguments": [ { @@ -333,24 +333,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 150 - } + "range": [ + 149, + 150 + ] } ], "loc": null, - "range": { - "start": 139, - "end": 151 - } + "range": [ + 139, + 151 + ] }, "directive": null, "loc": null, - "range": { - "start": 139, - "end": 152 - } + "range": [ + 139, + 152 + ] }, { "type": "ExpressionStatement", @@ -361,10 +361,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 205 - } + "range": [ + 196, + 205 + ] }, "arguments": [ { @@ -372,24 +372,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 207 - } + "range": [ + 206, + 207 + ] } ], "loc": null, - "range": { - "start": 196, - "end": 208 - } + "range": [ + 196, + 208 + ] }, "directive": null, "loc": null, - "range": { - "start": 196, - "end": 209 - } + "range": [ + 196, + 209 + ] }, { "type": "ExpressionStatement", @@ -400,10 +400,10 @@ Output: "name": "call", "typeAnnotation": null, "loc": null, - "range": { - "start": 234, - "end": 238 - } + "range": [ + 234, + 238 + ] }, "arguments": [ { @@ -411,24 +411,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 239, - "end": 240 - } + "range": [ + 239, + 240 + ] } ], "loc": null, - "range": { - "start": 234, - "end": 241 - } + "range": [ + 234, + 241 + ] }, "directive": null, "loc": null, - "range": { - "start": 234, - "end": 242 - } + "range": [ + 234, + 242 + ] }, { "type": "ReturnStatement", @@ -437,36 +437,36 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 274, - "end": 275 - } + "range": [ + 274, + 275 + ] }, "loc": null, - "range": { - "start": 267, - "end": 276 - } + "range": [ + 267, + 276 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 278 - } + "range": [ + 26, + 278 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 278 - }, + "range": [ + 0, + 278 + ], "loc": null, - "range": { - "start": 0, - "end": 278 - } + "range": [ + 0, + 278 + ] }, { "type": "FunctionDeclaration", @@ -475,10 +475,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 289, - "end": 298 - } + "range": [ + 289, + 298 + ] }, "params": [ { @@ -486,33 +486,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 299, - "end": 300 - } + "range": [ + 299, + 300 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 302, - "end": 304 - } + "range": [ + 302, + 304 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 280, - "end": 304 - }, + "range": [ + 280, + 304 + ], "loc": null, - "range": { - "start": 280, - "end": 304 - } + "range": [ + 280, + 304 + ] }, { "type": "FunctionDeclaration", @@ -521,10 +521,10 @@ Output: "name": "call", "typeAnnotation": null, "loc": null, - "range": { - "start": 314, - "end": 318 - } + "range": [ + 314, + 318 + ] }, "params": [ { @@ -532,39 +532,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 319, - "end": 320 - } + "range": [ + 319, + 320 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 322, - "end": 324 - } + "range": [ + 322, + 324 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 305, - "end": 324 - }, + "range": [ + 305, + 324 + ], "loc": null, - "range": { - "start": 305, - "end": 324 - } + "range": [ + 305, + 324 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 324 - } + "range": [ + 0, + 324 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@immutable-hooks.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@immutable-hooks.js.snap index df1ee5dfb0..43aa764ac0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@immutable-hooks.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@immutable-hooks.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 63 - } + "range": [ + 54, + 63 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 85, - "end": 87 - } + "range": [ + 85, + 87 + ] }, "loc": null, - "range": { - "start": 81, - "end": 87 - } + "range": [ + 81, + 87 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 88 - } + "range": [ + 75, + 88 + ] }, { "type": "VariableDeclaration", @@ -95,10 +95,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 198 - } + "range": [ + 197, + 198 + ] }, "init": { "type": "CallExpression", @@ -107,10 +107,10 @@ Output: "name": "useFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 207 - } + "range": [ + 201, + 207 + ] }, "arguments": [ { @@ -118,30 +118,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 208, - "end": 209 - } + "range": [ + 208, + 209 + ] } ], "loc": null, - "range": { - "start": 201, - "end": 210 - } + "range": [ + 201, + 210 + ] }, "loc": null, - "range": { - "start": 197, - "end": 210 - } + "range": [ + 197, + 210 + ] } ], "loc": null, - "range": { - "start": 191, - "end": 211 - } + "range": [ + 191, + 211 + ] }, { "type": "ExpressionStatement", @@ -152,10 +152,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 290, - "end": 293 - } + "range": [ + 290, + 293 + ] }, "arguments": [ { @@ -163,34 +163,34 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 294, - "end": 295 - } + "range": [ + 294, + 295 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 297, - "end": 298 - } + "range": [ + 297, + 298 + ] } ], "loc": null, - "range": { - "start": 290, - "end": 299 - } + "range": [ + 290, + 299 + ] }, "directive": null, "loc": null, - "range": { - "start": 290, - "end": 300 - } + "range": [ + 290, + 300 + ] }, { "type": "ReturnStatement", @@ -202,59 +202,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 311, - "end": 312 - } + "range": [ + 311, + 312 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 314, - "end": 315 - } + "range": [ + 314, + 315 + ] } ], "loc": null, - "range": { - "start": 310, - "end": 316 - } + "range": [ + 310, + 316 + ] }, "loc": null, - "range": { - "start": 303, - "end": 317 - } + "range": [ + 303, + 317 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 319 - } + "range": [ + 71, + 319 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 45, - "end": 319 - }, + "range": [ + 45, + 319 + ], "loc": null, - "range": { - "start": 45, - "end": 319 - } + "range": [ + 45, + 319 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 45, - "end": 319 - } + "range": [ + 45, + 319 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inadvertent-mutability-readonly-class.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inadvertent-mutability-readonly-class.js.snap index ea2838ebe1..32095a527c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inadvertent-mutability-readonly-class.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inadvertent-mutability-readonly-class.js.snap @@ -32,10 +32,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -43,10 +43,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -63,10 +63,10 @@ Output: "name": "env", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "init": { "type": "CallExpression", @@ -75,30 +75,30 @@ Output: "name": "useRelayEnvironment", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 61 - } + "range": [ + 42, + 61 + ] }, "arguments": [], "loc": null, - "range": { - "start": 42, - "end": 63 - } + "range": [ + 42, + 63 + ] }, "loc": null, - "range": { - "start": 36, - "end": 63 - } + "range": [ + 36, + 63 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 64 - } + "range": [ + 30, + 64 + ] }, { "type": "VariableDeclaration", @@ -111,10 +111,10 @@ Output: "name": "mutator", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 170 - } + "range": [ + 163, + 170 + ] }, "init": { "type": "NewExpression", @@ -123,10 +123,10 @@ Output: "name": "Mutator", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 184 - } + "range": [ + 177, + 184 + ] }, "arguments": [ { @@ -134,30 +134,30 @@ Output: "name": "env", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 188 - } + "range": [ + 185, + 188 + ] } ], "loc": null, - "range": { - "start": 173, - "end": 189 - } + "range": [ + 173, + 189 + ] }, "loc": null, - "range": { - "start": 163, - "end": 189 - } + "range": [ + 163, + 189 + ] } ], "loc": null, - "range": { - "start": 157, - "end": 190 - } + "range": [ + 157, + 190 + ] }, { "type": "ExpressionStatement", @@ -168,24 +168,24 @@ Output: "name": "useOtherHook", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 206 - } + "range": [ + 194, + 206 + ] }, "arguments": [], "loc": null, - "range": { - "start": 194, - "end": 208 - } + "range": [ + 194, + 208 + ] }, "directive": null, "loc": null, - "range": { - "start": 194, - "end": 209 - } + "range": [ + 194, + 209 + ] }, { "type": "VariableDeclaration", @@ -198,32 +198,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 319, - "end": 320 - } + "range": [ + 319, + 320 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 323, - "end": 325 - } + "range": [ + 323, + 325 + ] }, "loc": null, - "range": { - "start": 319, - "end": 325 - } + "range": [ + 319, + 325 + ] } ], "loc": null, - "range": { - "start": 313, - "end": 326 - } + "range": [ + 313, + 326 + ] }, { "type": "ExpressionStatement", @@ -234,10 +234,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 329, - "end": 332 - } + "range": [ + 329, + 332 + ] }, "arguments": [ { @@ -245,34 +245,34 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 333, - "end": 334 - } + "range": [ + 333, + 334 + ] }, { "type": "Identifier", "name": "mutator", "typeAnnotation": null, "loc": null, - "range": { - "start": 336, - "end": 343 - } + "range": [ + 336, + 343 + ] } ], "loc": null, - "range": { - "start": 329, - "end": 344 - } + "range": [ + 329, + 344 + ] }, "directive": null, "loc": null, - "range": { - "start": 329, - "end": 345 - } + "range": [ + 329, + 345 + ] }, { "type": "ReturnStatement", @@ -281,36 +281,36 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 355, - "end": 356 - } + "range": [ + 355, + 356 + ] }, "loc": null, - "range": { - "start": 348, - "end": 357 - } + "range": [ + 348, + 357 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 359 - } + "range": [ + 26, + 359 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 359 - }, + "range": [ + 0, + 359 + ], "loc": null, - "range": { - "start": 0, - "end": 359 - } + "range": [ + 0, + 359 + ] }, { "type": "ClassDeclaration", @@ -319,32 +319,32 @@ Output: "name": "Mutator", "typeAnnotation": null, "loc": null, - "range": { - "start": 367, - "end": 374 - } + "range": [ + 367, + 374 + ] }, "superClass": null, "body": { "type": "ClassBody", "body": [], "loc": null, - "range": { - "start": 375, - "end": 377 - } + "range": [ + 375, + 377 + ] }, "loc": null, - "range": { - "start": 361, - "end": 377 - } + "range": [ + 361, + 377 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 377 - } + "range": [ + 0, + 377 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inadvertent-mutability-readonly-lambda.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inadvertent-mutability-readonly-lambda.js.snap index edf2550491..46df5fe13f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inadvertent-mutability-readonly-lambda.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inadvertent-mutability-readonly-lambda.js.snap @@ -30,10 +30,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -41,10 +41,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -64,27 +64,27 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, { "type": "Identifier", "name": "setValue", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 52 - } + "range": [ + 44, + 52 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 53 - } + "range": [ + 36, + 53 + ] }, "init": { "type": "CallExpression", @@ -93,39 +93,39 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 64 - } + "range": [ + 56, + 64 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 65, - "end": 69 - } + "range": [ + 65, + 69 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 70 - } + "range": [ + 56, + 70 + ] }, "loc": null, - "range": { - "start": 36, - "end": 70 - } + "range": [ + 36, + 70 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 71 - } + "range": [ + 30, + 71 + ] }, { "type": "VariableDeclaration", @@ -138,10 +138,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 215 - } + "range": [ + 207, + 215 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -152,10 +152,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 219, - "end": 220 - } + "range": [ + 219, + 220 + ] } ], "body": { @@ -165,10 +165,10 @@ Output: "name": "setValue", "typeAnnotation": null, "loc": null, - "range": { - "start": 225, - "end": 233 - } + "range": [ + 225, + 233 + ] }, "arguments": [ { @@ -180,10 +180,10 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 235, - "end": 240 - } + "range": [ + 235, + 240 + ] } ], "body": { @@ -193,10 +193,10 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 245, - "end": 250 - } + "range": [ + 245, + 250 + ] }, "operator": "+", "right": { @@ -208,98 +208,98 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 254 - } + "range": [ + 253, + 254 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 261 - } + "range": [ + 255, + 261 + ] }, "computed": false, "loc": null, - "range": { - "start": 253, - "end": 261 - } + "range": [ + 253, + 261 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 262, - "end": 267 - } + "range": [ + 262, + 267 + ] }, "computed": false, "loc": null, - "range": { - "start": 253, - "end": 267 - } + "range": [ + 253, + 267 + ] }, "loc": null, - "range": { - "start": 245, - "end": 267 - } + "range": [ + 245, + 267 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 234, - "end": 267 - }, + "range": [ + 234, + 267 + ], "expression": true, "loc": null, - "range": { - "start": 234, - "end": 267 - } + "range": [ + 234, + 267 + ] } ], "loc": null, - "range": { - "start": 225, - "end": 268 - } + "range": [ + 225, + 268 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 218, - "end": 268 - }, + "range": [ + 218, + 268 + ], "expression": true, "loc": null, - "range": { - "start": 218, - "end": 268 - } + "range": [ + 218, + 268 + ] }, "loc": null, - "range": { - "start": 207, - "end": 268 - } + "range": [ + 207, + 268 + ] } ], "loc": null, - "range": { - "start": 201, - "end": 269 - } + "range": [ + 201, + 269 + ] }, { "type": "ExpressionStatement", @@ -310,24 +310,24 @@ Output: "name": "useOtherHook", "typeAnnotation": null, "loc": null, - "range": { - "start": 273, - "end": 285 - } + "range": [ + 273, + 285 + ] }, "arguments": [], "loc": null, - "range": { - "start": 273, - "end": 287 - } + "range": [ + 273, + 287 + ] }, "directive": null, "loc": null, - "range": { - "start": 273, - "end": 288 - } + "range": [ + 273, + 288 + ] }, { "type": "VariableDeclaration", @@ -340,32 +340,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 388, - "end": 389 - } + "range": [ + 388, + 389 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 392, - "end": 394 - } + "range": [ + 392, + 394 + ] }, "loc": null, - "range": { - "start": 388, - "end": 394 - } + "range": [ + 388, + 394 + ] } ], "loc": null, - "range": { - "start": 382, - "end": 395 - } + "range": [ + 382, + 395 + ] }, { "type": "ExpressionStatement", @@ -376,10 +376,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 398, - "end": 401 - } + "range": [ + 398, + 401 + ] }, "arguments": [ { @@ -387,34 +387,34 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 402, - "end": 403 - } + "range": [ + 402, + 403 + ] }, { "type": "Identifier", "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 405, - "end": 413 - } + "range": [ + 405, + 413 + ] } ], "loc": null, - "range": { - "start": 398, - "end": 414 - } + "range": [ + 398, + 414 + ] }, "directive": null, "loc": null, - "range": { - "start": 398, - "end": 415 - } + "range": [ + 398, + 415 + ] }, { "type": "ReturnStatement", @@ -423,42 +423,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 425, - "end": 426 - } + "range": [ + 425, + 426 + ] }, "loc": null, - "range": { - "start": 418, - "end": 427 - } + "range": [ + 418, + 427 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 429 - } + "range": [ + 26, + 429 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 429 - }, + "range": [ + 0, + 429 + ], "loc": null, - "range": { - "start": 0, - "end": 429 - } + "range": [ + 0, + 429 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 429 - } + "range": [ + 0, + 429 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independent-across-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independent-across-if.js.snap index 1637f21635..78820b8b34 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independent-across-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independent-across-if.js.snap @@ -45,33 +45,33 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 16 - } + "range": [ + 9, + 16 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 19, - "end": 21 - } + "range": [ + 19, + 21 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 21 - }, + "range": [ + 0, + 21 + ], "loc": null, - "range": { - "start": 0, - "end": 21 - } + "range": [ + 0, + 21 + ] }, { "type": "FunctionDeclaration", @@ -80,33 +80,33 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 37 - } + "range": [ + 31, + 37 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 22, - "end": 42 - }, + "range": [ + 22, + 42 + ], "loc": null, - "range": { - "start": 22, - "end": 42 - } + "range": [ + 22, + 42 + ] }, { "type": "FunctionDeclaration", @@ -115,33 +115,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 55 - } + "range": [ + 52, + 55 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 58, - "end": 60 - } + "range": [ + 58, + 60 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 43, - "end": 60 - }, + "range": [ + 43, + 60 + ], "loc": null, - "range": { - "start": 43, - "end": 60 - } + "range": [ + 43, + 60 + ] }, { "type": "FunctionDeclaration", @@ -150,33 +150,33 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 76, - "end": 78 - } + "range": [ + 76, + 78 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 61, - "end": 78 - }, + "range": [ + 61, + 78 + ], "loc": null, - "range": { - "start": 61, - "end": 78 - } + "range": [ + 61, + 78 + ] }, { "type": "FunctionDeclaration", @@ -185,10 +185,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 408, - "end": 417 - } + "range": [ + 408, + 417 + ] }, "params": [ { @@ -196,10 +196,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 418, - "end": 423 - } + "range": [ + 418, + 423 + ] } ], "body": { @@ -216,10 +216,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 435, - "end": 436 - } + "range": [ + 435, + 436 + ] }, "init": { "type": "CallExpression", @@ -228,10 +228,10 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 439, - "end": 446 - } + "range": [ + 439, + 446 + ] }, "arguments": [ { @@ -241,47 +241,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 447, - "end": 452 - } + "range": [ + 447, + 452 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 453, - "end": 454 - } + "range": [ + 453, + 454 + ] }, "computed": false, "loc": null, - "range": { - "start": 447, - "end": 454 - } + "range": [ + 447, + 454 + ] } ], "loc": null, - "range": { - "start": 439, - "end": 455 - } + "range": [ + 439, + 455 + ] }, "loc": null, - "range": { - "start": 435, - "end": 455 - } + "range": [ + 435, + 455 + ] } ], "loc": null, - "range": { - "start": 429, - "end": 456 - } + "range": [ + 429, + 456 + ] }, { "type": "VariableDeclaration", @@ -294,10 +294,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 465, - "end": 466 - } + "range": [ + 465, + 466 + ] }, "init": { "type": "CallExpression", @@ -306,10 +306,10 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 469, - "end": 476 - } + "range": [ + 469, + 476 + ] }, "arguments": [ { @@ -319,47 +319,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 477, - "end": 482 - } + "range": [ + 477, + 482 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 483, - "end": 484 - } + "range": [ + 483, + 484 + ] }, "computed": false, "loc": null, - "range": { - "start": 477, - "end": 484 - } + "range": [ + 477, + 484 + ] } ], "loc": null, - "range": { - "start": 469, - "end": 485 - } + "range": [ + 469, + 485 + ] }, "loc": null, - "range": { - "start": 465, - "end": 485 - } + "range": [ + 465, + 485 + ] } ], "loc": null, - "range": { - "start": 459, - "end": 486 - } + "range": [ + 459, + 486 + ] }, { "type": "IfStatement", @@ -370,27 +370,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 493, - "end": 498 - } + "range": [ + 493, + 498 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 499, - "end": 500 - } + "range": [ + 499, + 500 + ] }, "computed": false, "loc": null, - "range": { - "start": 493, - "end": 500 - } + "range": [ + 493, + 500 + ] }, "consequent": { "type": "BlockStatement", @@ -404,10 +404,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 508, - "end": 514 - } + "range": [ + 508, + 514 + ] }, "arguments": [ { @@ -415,24 +415,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 515, - "end": 516 - } + "range": [ + 515, + 516 + ] } ], "loc": null, - "range": { - "start": 508, - "end": 517 - } + "range": [ + 508, + 517 + ] }, "directive": null, "loc": null, - "range": { - "start": 508, - "end": 518 - } + "range": [ + 508, + 518 + ] }, { "type": "ExpressionStatement", @@ -443,10 +443,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 523, - "end": 529 - } + "range": [ + 523, + 529 + ] }, "arguments": [ { @@ -454,38 +454,38 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 530, - "end": 531 - } + "range": [ + 530, + 531 + ] } ], "loc": null, - "range": { - "start": 523, - "end": 532 - } + "range": [ + 523, + 532 + ] }, "directive": null, "loc": null, - "range": { - "start": 523, - "end": 533 - } + "range": [ + 523, + 533 + ] } ], "loc": null, - "range": { - "start": 502, - "end": 537 - } + "range": [ + 502, + 537 + ] }, "alternate": null, "loc": null, - "range": { - "start": 489, - "end": 537 - } + "range": [ + 489, + 537 + ] }, { "type": "ReturnStatement", @@ -497,10 +497,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 548, - "end": 551 - } + "range": [ + 548, + 551 + ] }, "attributes": [ { @@ -509,10 +509,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 552, - "end": 553 - } + "range": [ + 552, + 553 + ] }, "value": { "type": "JSXExpressionContainer", @@ -521,22 +521,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 555, - "end": 556 - } + "range": [ + 555, + 556 + ] }, "loc": null, - "range": { - "start": 554, - "end": 557 - } + "range": [ + 554, + 557 + ] }, "loc": null, - "range": { - "start": 552, - "end": 557 - } + "range": [ + 552, + 557 + ] }, { "type": "JSXAttribute", @@ -544,10 +544,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 558, - "end": 559 - } + "range": [ + 558, + 559 + ] }, "value": { "type": "JSXExpressionContainer", @@ -556,70 +556,70 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 561, - "end": 562 - } + "range": [ + 561, + 562 + ] }, "loc": null, - "range": { - "start": 560, - "end": 563 - } + "range": [ + 560, + 563 + ] }, "loc": null, - "range": { - "start": 558, - "end": 563 - } + "range": [ + 558, + 563 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 547, - "end": 566 - } + "range": [ + 547, + 566 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 547, - "end": 566 - } + "range": [ + 547, + 566 + ] }, "loc": null, - "range": { - "start": 540, - "end": 567 - } + "range": [ + 540, + 567 + ] } ], "loc": null, - "range": { - "start": 425, - "end": 569 - } + "range": [ + 425, + 569 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 399, - "end": 569 - }, + "range": [ + 399, + 569 + ], "loc": null, - "range": { - "start": 399, - "end": 569 - } + "range": [ + 399, + 569 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 569 - } + "range": [ + 0, + 569 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independent.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independent.js.snap index 6e542211de..964e6d1ad7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independent.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independent.js.snap @@ -36,10 +36,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 247 - } + "range": [ + 238, + 247 + ] }, "params": [ { @@ -47,10 +47,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 248, - "end": 253 - } + "range": [ + 248, + 253 + ] } ], "body": { @@ -67,10 +67,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 266 - } + "range": [ + 265, + 266 + ] }, "init": { "type": "CallExpression", @@ -79,10 +79,10 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 269, - "end": 276 - } + "range": [ + 269, + 276 + ] }, "arguments": [ { @@ -92,47 +92,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 277, - "end": 282 - } + "range": [ + 277, + 282 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 283, - "end": 284 - } + "range": [ + 283, + 284 + ] }, "computed": false, "loc": null, - "range": { - "start": 277, - "end": 284 - } + "range": [ + 277, + 284 + ] } ], "loc": null, - "range": { - "start": 269, - "end": 285 - } + "range": [ + 269, + 285 + ] }, "loc": null, - "range": { - "start": 265, - "end": 285 - } + "range": [ + 265, + 285 + ] } ], "loc": null, - "range": { - "start": 259, - "end": 286 - } + "range": [ + 259, + 286 + ] }, { "type": "VariableDeclaration", @@ -145,10 +145,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 295, - "end": 296 - } + "range": [ + 295, + 296 + ] }, "init": { "type": "CallExpression", @@ -157,10 +157,10 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 299, - "end": 306 - } + "range": [ + 299, + 306 + ] }, "arguments": [ { @@ -170,47 +170,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 307, - "end": 312 - } + "range": [ + 307, + 312 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 313, - "end": 314 - } + "range": [ + 313, + 314 + ] }, "computed": false, "loc": null, - "range": { - "start": 307, - "end": 314 - } + "range": [ + 307, + 314 + ] } ], "loc": null, - "range": { - "start": 299, - "end": 315 - } + "range": [ + 299, + 315 + ] }, "loc": null, - "range": { - "start": 295, - "end": 315 - } + "range": [ + 295, + 315 + ] } ], "loc": null, - "range": { - "start": 289, - "end": 316 - } + "range": [ + 289, + 316 + ] }, { "type": "ReturnStatement", @@ -222,10 +222,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 327, - "end": 330 - } + "range": [ + 327, + 330 + ] }, "attributes": [ { @@ -234,10 +234,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 331, - "end": 332 - } + "range": [ + 331, + 332 + ] }, "value": { "type": "JSXExpressionContainer", @@ -246,22 +246,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 334, - "end": 335 - } + "range": [ + 334, + 335 + ] }, "loc": null, - "range": { - "start": 333, - "end": 336 - } + "range": [ + 333, + 336 + ] }, "loc": null, - "range": { - "start": 331, - "end": 336 - } + "range": [ + 331, + 336 + ] }, { "type": "JSXAttribute", @@ -269,10 +269,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 337, - "end": 338 - } + "range": [ + 337, + 338 + ] }, "value": { "type": "JSXExpressionContainer", @@ -281,64 +281,64 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 340, - "end": 341 - } + "range": [ + 340, + 341 + ] }, "loc": null, - "range": { - "start": 339, - "end": 342 - } + "range": [ + 339, + 342 + ] }, "loc": null, - "range": { - "start": 337, - "end": 342 - } + "range": [ + 337, + 342 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 326, - "end": 345 - } + "range": [ + 326, + 345 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 326, - "end": 345 - } + "range": [ + 326, + 345 + ] }, "loc": null, - "range": { - "start": 319, - "end": 346 - } + "range": [ + 319, + 346 + ] } ], "loc": null, - "range": { - "start": 255, - "end": 348 - } + "range": [ + 255, + 348 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 229, - "end": 348 - }, + "range": [ + 229, + 348 + ], "loc": null, - "range": { - "start": 229, - "end": 348 - } + "range": [ + 229, + 348 + ] }, { "type": "FunctionDeclaration", @@ -347,33 +347,33 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 359, - "end": 366 - } + "range": [ + 359, + 366 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 369, - "end": 371 - } + "range": [ + 369, + 371 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 350, - "end": 371 - }, + "range": [ + 350, + 371 + ], "loc": null, - "range": { - "start": 350, - "end": 371 - } + "range": [ + 350, + 371 + ] }, { "type": "FunctionDeclaration", @@ -382,33 +382,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 381, - "end": 384 - } + "range": [ + 381, + 384 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 387, - "end": 389 - } + "range": [ + 387, + 389 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 372, - "end": 389 - }, + "range": [ + 372, + 389 + ], "loc": null, - "range": { - "start": 372, - "end": 389 - } + "range": [ + 372, + 389 + ] }, { "type": "FunctionDeclaration", @@ -417,39 +417,39 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 399, - "end": 402 - } + "range": [ + 399, + 402 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 405, - "end": 407 - } + "range": [ + 405, + 407 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 390, - "end": 407 - }, + "range": [ + 390, + 407 + ], "loc": null, - "range": { - "start": 390, - "end": 407 - } + "range": [ + 390, + 407 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 229, - "end": 407 - } + "range": [ + 229, + 407 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independently-memoize-object-property.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independently-memoize-object-property.js.snap index 1c71b1195e..218d68e976 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independently-memoize-object-property.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@independently-memoize-object-property.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,30 +35,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -75,10 +75,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "init": { "type": "ObjectExpression", @@ -90,50 +90,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 42 - } + "range": [ + 38, + 42 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] }, "loc": null, - "range": { - "start": 32, - "end": 44 - } + "range": [ + 32, + 44 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 45 - } + "range": [ + 26, + 45 + ] }, { "type": "ExpressionStatement", @@ -147,27 +147,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "computed": false, "loc": null, - "range": { - "start": 126, - "end": 129 - } + "range": [ + 126, + 129 + ] }, "right": { "type": "ArrayExpression", @@ -177,40 +177,40 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 137 - } + "range": [ + 136, + 137 + ] } ], "loc": null, - "range": { - "start": 132, - "end": 138 - } + "range": [ + 132, + 138 + ] }, "loc": null, - "range": { - "start": 126, - "end": 138 - } + "range": [ + 126, + 138 + ] }, "directive": null, "loc": null, - "range": { - "start": 126, - "end": 139 - } + "range": [ + 126, + 139 + ] }, { "type": "ReturnStatement", @@ -219,42 +219,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "loc": null, - "range": { - "start": 143, - "end": 152 - } + "range": [ + 143, + 152 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 154 - } + "range": [ + 22, + 154 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 154 - }, + "range": [ + 0, + 154 + ], "loc": null, - "range": { - "start": 0, - "end": 154 - } + "range": [ + 0, + 154 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 154 - } + "range": [ + 0, + 154 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-computed-delete.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-computed-delete.js.snap index e476e934f3..f8603cbdfd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-computed-delete.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-computed-delete.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 28 - } + "range": [ + 19, + 28 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 34 - } + "range": [ + 29, + 34 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "init": { "type": "CallExpression", @@ -66,30 +66,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 60 - } + "range": [ + 50, + 60 + ] }, "arguments": [], "loc": null, - "range": { - "start": 50, - "end": 62 - } + "range": [ + 50, + 62 + ] }, "loc": null, - "range": { - "start": 46, - "end": 62 - } + "range": [ + 46, + 62 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 63 - } + "range": [ + 40, + 63 + ] }, { "type": "VariableDeclaration", @@ -102,10 +102,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "init": { "type": "UnaryExpression", @@ -118,10 +118,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] }, "property": { "type": "MemberExpression", @@ -130,53 +130,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 90 - } + "range": [ + 85, + 90 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 96 - } + "range": [ + 91, + 96 + ] }, "computed": false, "loc": null, - "range": { - "start": 85, - "end": 96 - } + "range": [ + 85, + 96 + ] }, "computed": true, "loc": null, - "range": { - "start": 83, - "end": 97 - } + "range": [ + 83, + 97 + ] }, "loc": null, - "range": { - "start": 76, - "end": 97 - } + "range": [ + 76, + 97 + ] }, "loc": null, - "range": { - "start": 72, - "end": 97 - } + "range": [ + 72, + 97 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 98 - } + "range": [ + 66, + 98 + ] }, { "type": "ReturnStatement", @@ -185,42 +185,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 112 - } + "range": [ + 36, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 10, - "end": 112 - }, + "range": [ + 10, + 112 + ], "loc": null, - "range": { - "start": 10, - "end": 112 - } + "range": [ + 10, + 112 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 10, - "end": 112 - } + "range": [ + 10, + 112 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-global-object.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-global-object.js.snap index 39b6172277..71bad42453 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-global-object.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-global-object.js.snap @@ -30,10 +30,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 113 - } + "range": [ + 104, + 113 + ] }, "params": [ { @@ -41,10 +41,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 119 - } + "range": [ + 114, + 119 + ] } ], "body": { @@ -61,10 +61,10 @@ Output: "name": "neverAliasedOrMutated", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 150 - } + "range": [ + 129, + 150 + ] }, "init": { "type": "CallExpression", @@ -73,10 +73,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 156 - } + "range": [ + 153, + 156 + ] }, "arguments": [ { @@ -86,47 +86,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 162 - } + "range": [ + 157, + 162 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 164 - } + "range": [ + 163, + 164 + ] }, "computed": false, "loc": null, - "range": { - "start": 157, - "end": 164 - } + "range": [ + 157, + 164 + ] } ], "loc": null, - "range": { - "start": 153, - "end": 165 - } + "range": [ + 153, + 165 + ] }, "loc": null, - "range": { - "start": 129, - "end": 165 - } + "range": [ + 129, + 165 + ] } ], "loc": null, - "range": { - "start": 125, - "end": 166 - } + "range": [ + 125, + 166 + ] }, { "type": "VariableDeclaration", @@ -139,10 +139,10 @@ Output: "name": "primitiveVal1", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 186 - } + "range": [ + 173, + 186 + ] }, "init": { "type": "CallExpression", @@ -153,27 +153,27 @@ Output: "name": "Math", "typeAnnotation": null, "loc": null, - "range": { - "start": 189, - "end": 193 - } + "range": [ + 189, + 193 + ] }, "property": { "type": "Identifier", "name": "max", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 197 - } + "range": [ + 194, + 197 + ] }, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 197 - } + "range": [ + 189, + 197 + ] }, "arguments": [ { @@ -183,57 +183,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 203 - } + "range": [ + 198, + 203 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 204, - "end": 205 - } + "range": [ + 204, + 205 + ] }, "computed": false, "loc": null, - "range": { - "start": 198, - "end": 205 - } + "range": [ + 198, + 205 + ] }, { "type": "Identifier", "name": "neverAliasedOrMutated", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 228 - } + "range": [ + 207, + 228 + ] } ], "loc": null, - "range": { - "start": 189, - "end": 229 - } + "range": [ + 189, + 229 + ] }, "loc": null, - "range": { - "start": 173, - "end": 229 - } + "range": [ + 173, + 229 + ] } ], "loc": null, - "range": { - "start": 169, - "end": 230 - } + "range": [ + 169, + 230 + ] }, { "type": "VariableDeclaration", @@ -246,33 +246,33 @@ Output: "name": "primitiveVal2", "typeAnnotation": null, "loc": null, - "range": { - "start": 237, - "end": 250 - } + "range": [ + 237, + 250 + ] }, "init": { "type": "Identifier", "name": "Infinity", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 261 - } + "range": [ + 253, + 261 + ] }, "loc": null, - "range": { - "start": 237, - "end": 261 - } + "range": [ + 237, + 261 + ] } ], "loc": null, - "range": { - "start": 233, - "end": 262 - } + "range": [ + 233, + 262 + ] }, { "type": "VariableDeclaration", @@ -285,10 +285,10 @@ Output: "name": "primitiveVal3", "typeAnnotation": null, "loc": null, - "range": { - "start": 269, - "end": 282 - } + "range": [ + 269, + 282 + ] }, "init": { "type": "MemberExpression", @@ -299,57 +299,57 @@ Output: "name": "globaThis", "typeAnnotation": null, "loc": null, - "range": { - "start": 285, - "end": 294 - } + "range": [ + 285, + 294 + ] }, "property": { "type": "Identifier", "name": "globalThis", "typeAnnotation": null, "loc": null, - "range": { - "start": 295, - "end": 305 - } + "range": [ + 295, + 305 + ] }, "computed": false, "loc": null, - "range": { - "start": 285, - "end": 305 - } + "range": [ + 285, + 305 + ] }, "property": { "type": "Identifier", "name": "NaN", "typeAnnotation": null, "loc": null, - "range": { - "start": 306, - "end": 309 - } + "range": [ + 306, + 309 + ] }, "computed": false, "loc": null, - "range": { - "start": 285, - "end": 309 - } + "range": [ + 285, + 309 + ] }, "loc": null, - "range": { - "start": 269, - "end": 309 - } + "range": [ + 269, + 309 + ] } ], "loc": null, - "range": { - "start": 265, - "end": 310 - } + "range": [ + 265, + 310 + ] }, { "type": "ExpressionStatement", @@ -360,10 +360,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 444, - "end": 447 - } + "range": [ + 444, + 447 + ] }, "arguments": [ { @@ -371,44 +371,44 @@ Output: "name": "primitiveVal1", "typeAnnotation": null, "loc": null, - "range": { - "start": 448, - "end": 461 - } + "range": [ + 448, + 461 + ] }, { "type": "Identifier", "name": "primitiveVal2", "typeAnnotation": null, "loc": null, - "range": { - "start": 463, - "end": 476 - } + "range": [ + 463, + 476 + ] }, { "type": "Identifier", "name": "primitiveVal3", "typeAnnotation": null, "loc": null, - "range": { - "start": 478, - "end": 491 - } + "range": [ + 478, + 491 + ] } ], "loc": null, - "range": { - "start": 444, - "end": 492 - } + "range": [ + 444, + 492 + ] }, "directive": null, "loc": null, - "range": { - "start": 444, - "end": 493 - } + "range": [ + 444, + 493 + ] }, { "type": "ReturnStatement", @@ -422,30 +422,30 @@ Output: "name": "primitiveVal1", "typeAnnotation": null, "loc": null, - "range": { - "start": 505, - "end": 518 - } + "range": [ + 505, + 518 + ] }, "value": { "type": "Identifier", "name": "primitiveVal1", "typeAnnotation": null, "loc": null, - "range": { - "start": 505, - "end": 518 - } + "range": [ + 505, + 518 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 505, - "end": 518 - } + "range": [ + 505, + 518 + ] }, { "type": "Property", @@ -454,30 +454,30 @@ Output: "name": "primitiveVal2", "typeAnnotation": null, "loc": null, - "range": { - "start": 520, - "end": 533 - } + "range": [ + 520, + 533 + ] }, "value": { "type": "Identifier", "name": "primitiveVal2", "typeAnnotation": null, "loc": null, - "range": { - "start": 520, - "end": 533 - } + "range": [ + 520, + 533 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 520, - "end": 533 - } + "range": [ + 520, + 533 + ] }, { "type": "Property", @@ -486,69 +486,69 @@ Output: "name": "primitiveVal3", "typeAnnotation": null, "loc": null, - "range": { - "start": 535, - "end": 548 - } + "range": [ + 535, + 548 + ] }, "value": { "type": "Identifier", "name": "primitiveVal3", "typeAnnotation": null, "loc": null, - "range": { - "start": 535, - "end": 548 - } + "range": [ + 535, + 548 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 535, - "end": 548 - } + "range": [ + 535, + 548 + ] } ], "loc": null, - "range": { - "start": 503, - "end": 550 - } + "range": [ + 503, + 550 + ] }, "loc": null, - "range": { - "start": 496, - "end": 551 - } + "range": [ + 496, + 551 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 553 - } + "range": [ + 121, + 553 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 95, - "end": 553 - }, + "range": [ + 95, + 553 + ], "loc": null, - "range": { - "start": 95, - "end": 553 - } + "range": [ + 95, + 553 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 95, - "end": 553 - } + "range": [ + 95, + 553 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-phi-primitive.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-phi-primitive.js.snap index ace3c8f1fa..15304cbeb3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-phi-primitive.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-phi-primitive.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -69,24 +69,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "init": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 29 - } + "range": [ + 23, + 29 + ] }, { "type": "IfStatement", @@ -95,10 +95,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "consequent": { "type": "BlockStatement", @@ -113,39 +113,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "directive": null, "loc": null, - "range": { - "start": 45, - "end": 51 - } + "range": [ + 45, + 51 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 55 - } + "range": [ + 39, + 55 + ] }, "alternate": { "type": "BlockStatement", @@ -160,45 +160,45 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 73 - } + "range": [ + 67, + 73 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 77 - } + "range": [ + 61, + 77 + ] }, "loc": null, - "range": { - "start": 32, - "end": 77 - } + "range": [ + 32, + 77 + ] }, { "type": "VariableDeclaration", @@ -211,33 +211,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "loc": null, - "range": { - "start": 85, - "end": 90 - } + "range": [ + 85, + 90 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 91 - } + "range": [ + 81, + 91 + ] }, { "type": "ReturnStatement", @@ -246,42 +246,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "loc": null, - "range": { - "start": 94, - "end": 103 - } + "range": [ + 94, + 103 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 105 - } + "range": [ + 19, + 105 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 105 - }, + "range": [ + 0, + 105 + ], "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-property-delete.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-property-delete.js.snap index f4b2b45ead..c59872887b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-property-delete.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-property-delete.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -65,30 +65,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "VariableDeclaration", @@ -101,10 +101,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "init": { "type": "UnaryExpression", @@ -117,46 +117,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 80 - } + "range": [ + 75, + 80 + ] }, "computed": false, "loc": null, - "range": { - "start": 73, - "end": 80 - } + "range": [ + 73, + 80 + ] }, "loc": null, - "range": { - "start": 66, - "end": 80 - } + "range": [ + 66, + 80 + ] }, "loc": null, - "range": { - "start": 62, - "end": 80 - } + "range": [ + 62, + 80 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 81 - } + "range": [ + 56, + 81 + ] }, { "type": "ReturnStatement", @@ -165,42 +165,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "loc": null, - "range": { - "start": 84, - "end": 93 - } + "range": [ + 84, + 93 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 95 - } + "range": [ + 26, + 95 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 95 - }, + "range": [ + 0, + 95 + ], "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-types-through-type-cast.flow.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-types-through-type-cast.flow.js.snap index e4ecce0afd..9ff1af4d7c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-types-through-type-cast.flow.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@infer-types-through-type-cast.flow.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 18, - "end": 27 - } + "range": [ + 18, + 27 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 33 - } + "range": [ + 28, + 33 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "init": { "type": "CallExpression", @@ -68,30 +68,30 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 161 - } + "range": [ + 158, + 161 + ] }, "arguments": [], "loc": null, - "range": { - "start": 158, - "end": 163 - } + "range": [ + 158, + 163 + ] }, "loc": null, - "range": { - "start": 154, - "end": 163 - } + "range": [ + 154, + 163 + ] } ], "loc": null, - "range": { - "start": 148, - "end": 164 - } + "range": [ + 148, + 164 + ] }, { "type": "VariableDeclaration", @@ -104,10 +104,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 174 - } + "range": [ + 173, + 174 + ] }, "init": { "type": "CoverTypedIdentifier", @@ -116,37 +116,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 178, - "end": 179 - } + "range": [ + 178, + 179 + ] }, "right": { "type": "TSTypeAnnotation", "loc": null, - "range": { - "start": 179, - "end": 184 - } + "range": [ + 179, + 184 + ] }, "loc": null, - "range": { - "start": 178, - "end": 184 - } + "range": [ + 178, + 184 + ] }, "loc": null, - "range": { - "start": 173, - "end": 185 - } + "range": [ + 173, + 185 + ] } ], "loc": null, - "range": { - "start": 167, - "end": 186 - } + "range": [ + 167, + 186 + ] }, { "type": "ExpressionStatement", @@ -157,33 +157,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 189, - "end": 190 - } + "range": [ + 189, + 190 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 193, - "end": 194 - } + "range": [ + 193, + 194 + ] }, "loc": null, - "range": { - "start": 189, - "end": 194 - } + "range": [ + 189, + 194 + ] }, "directive": null, "loc": null, - "range": { - "start": 189, - "end": 195 - } + "range": [ + 189, + 195 + ] }, { "type": "ReturnStatement", @@ -192,42 +192,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 206 - } + "range": [ + 205, + 206 + ] }, "loc": null, - "range": { - "start": 198, - "end": 207 - } + "range": [ + 198, + 207 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 209 - } + "range": [ + 35, + 209 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 9, - "end": 209 - }, + "range": [ + 9, + 209 + ], "loc": null, - "range": { - "start": 9, - "end": 209 - } + "range": [ + 9, + 209 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 9, - "end": 209 - } + "range": [ + 9, + 209 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inner-memo-value-not-promoted-to-outer-scope-dynamic.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inner-memo-value-not-promoted-to-outer-scope-dynamic.js.snap index b41837a922..c73d87284c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inner-memo-value-not-promoted-to-outer-scope-dynamic.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inner-memo-value-not-promoted-to-outer-scope-dynamic.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -42,10 +42,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -62,10 +62,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "CallExpression", @@ -74,10 +74,10 @@ Output: "name": "useFragment", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, "arguments": [ { @@ -85,10 +85,10 @@ Output: "name": "FRAGMENT", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 63 - } + "range": [ + 55, + 63 + ] }, { "type": "MemberExpression", @@ -97,47 +97,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "property": { "type": "Identifier", "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 75 - } + "range": [ + 71, + 75 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 75 - } + "range": [ + 65, + 75 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 76 - } + "range": [ + 43, + 76 + ] }, "loc": null, - "range": { - "start": 36, - "end": 76 - } + "range": [ + 36, + 76 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 77 - } + "range": [ + 30, + 77 + ] }, { "type": "ExpressionStatement", @@ -148,10 +148,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 89 - } + "range": [ + 80, + 89 + ] }, "arguments": [ { @@ -159,24 +159,24 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 94 - } + "range": [ + 90, + 94 + ] } ], "loc": null, - "range": { - "start": 80, - "end": 95 - } + "range": [ + 80, + 95 + ] }, "directive": null, "loc": null, - "range": { - "start": 80, - "end": 96 - } + "range": [ + 80, + 96 + ] }, { "type": "VariableDeclaration", @@ -189,10 +189,10 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 111 - } + "range": [ + 106, + 111 + ] }, "init": { "type": "NewExpression", @@ -201,10 +201,10 @@ Output: "name": "MaybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 130 - } + "range": [ + 118, + 130 + ] }, "arguments": [ { @@ -212,30 +212,30 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 135 - } + "range": [ + 131, + 135 + ] } ], "loc": null, - "range": { - "start": 114, - "end": 136 - } + "range": [ + 114, + 136 + ] }, "loc": null, - "range": { - "start": 106, - "end": 136 - } + "range": [ + 106, + 136 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 137 - } + "range": [ + 100, + 137 + ] }, { "type": "ReturnStatement", @@ -247,18 +247,18 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 154, - "end": 158 - } + "range": [ + 154, + 158 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 153, - "end": 159 - } + "range": [ + 153, + 159 + ] }, "children": [ { @@ -266,10 +266,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 159, - "end": 166 - } + "range": [ + 159, + 166 + ] }, { "type": "JSXElement", @@ -279,18 +279,18 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 167, - "end": 171 - } + "range": [ + 167, + 171 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 166, - "end": 172 - } + "range": [ + 166, + 172 + ] }, "children": [ { @@ -298,10 +298,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 172, - "end": 181 - } + "range": [ + 172, + 181 + ] }, { "type": "JSXExpressionContainer", @@ -313,18 +313,18 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 183, - "end": 187 - } + "range": [ + 183, + 187 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 182, - "end": 188 - } + "range": [ + 182, + 188 + ] }, "children": [ { @@ -332,10 +332,10 @@ Output: "value": "Text", "raw": "Text", "loc": null, - "range": { - "start": 188, - "end": 192 - } + "range": [ + 188, + 192 + ] } ], "closingElement": { @@ -344,38 +344,38 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 194, - "end": 198 - } + "range": [ + 194, + 198 + ] }, "loc": null, - "range": { - "start": 192, - "end": 199 - } + "range": [ + 192, + 199 + ] }, "loc": null, - "range": { - "start": 182, - "end": 199 - } + "range": [ + 182, + 199 + ] }, "loc": null, - "range": { - "start": 181, - "end": 200 - } + "range": [ + 181, + 200 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 200, - "end": 209 - } + "range": [ + 200, + 209 + ] }, { "type": "JSXExpressionContainer", @@ -387,18 +387,18 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 211, - "end": 215 - } + "range": [ + 211, + 215 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 210, - "end": 216 - } + "range": [ + 210, + 216 + ] }, "children": [ { @@ -410,10 +410,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 217, - "end": 228 - } + "range": [ + 217, + 228 + ] }, "arguments": [ { @@ -421,23 +421,23 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 229, - "end": 234 - } + "range": [ + 229, + 234 + ] } ], "loc": null, - "range": { - "start": 217, - "end": 235 - } + "range": [ + 217, + 235 + ] }, "loc": null, - "range": { - "start": 216, - "end": 236 - } + "range": [ + 216, + 236 + ] } ], "closingElement": { @@ -446,38 +446,38 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 238, - "end": 242 - } + "range": [ + 238, + 242 + ] }, "loc": null, - "range": { - "start": 236, - "end": 243 - } + "range": [ + 236, + 243 + ] }, "loc": null, - "range": { - "start": 210, - "end": 243 - } + "range": [ + 210, + 243 + ] }, "loc": null, - "range": { - "start": 209, - "end": 244 - } + "range": [ + 209, + 244 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 244, - "end": 251 - } + "range": [ + 244, + 251 + ] } ], "closingElement": { @@ -486,32 +486,32 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 253, - "end": 257 - } + "range": [ + 253, + 257 + ] }, "loc": null, - "range": { - "start": 251, - "end": 258 - } + "range": [ + 251, + 258 + ] }, "loc": null, - "range": { - "start": 166, - "end": 258 - } + "range": [ + 166, + 258 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 258, - "end": 263 - } + "range": [ + 258, + 263 + ] } ], "closingElement": { @@ -520,54 +520,54 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 265, - "end": 269 - } + "range": [ + 265, + 269 + ] }, "loc": null, - "range": { - "start": 263, - "end": 270 - } + "range": [ + 263, + 270 + ] }, "loc": null, - "range": { - "start": 153, - "end": 270 - } + "range": [ + 153, + 270 + ] }, "loc": null, - "range": { - "start": 140, - "end": 275 - } + "range": [ + 140, + 275 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 277 - } + "range": [ + 26, + 277 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 277 - }, + "range": [ + 0, + 277 + ], "loc": null, - "range": { - "start": 0, - "end": 277 - } + "range": [ + 0, + 277 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 277 - } + "range": [ + 0, + 277 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inner-memo-value-not-promoted-to-outer-scope-static.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inner-memo-value-not-promoted-to-outer-scope-static.js.snap index 53f012c6af..f91bf7ef64 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inner-memo-value-not-promoted-to-outer-scope-static.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inner-memo-value-not-promoted-to-outer-scope-static.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -59,10 +59,10 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] }, "init": { "type": "NewExpression", @@ -71,30 +71,30 @@ Output: "name": "MaybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 60 - } + "range": [ + 48, + 60 + ] }, "arguments": [], "loc": null, - "range": { - "start": 44, - "end": 62 - } + "range": [ + 44, + 62 + ] }, "loc": null, - "range": { - "start": 36, - "end": 62 - } + "range": [ + 36, + 62 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 63 - } + "range": [ + 30, + 63 + ] }, { "type": "ReturnStatement", @@ -106,18 +106,18 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 79, - "end": 85 - } + "range": [ + 79, + 85 + ] }, "children": [ { @@ -125,10 +125,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 85, - "end": 92 - } + "range": [ + 85, + 92 + ] }, { "type": "JSXElement", @@ -138,18 +138,18 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 93, - "end": 97 - } + "range": [ + 93, + 97 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 92, - "end": 98 - } + "range": [ + 92, + 98 + ] }, "children": [ { @@ -157,10 +157,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 98, - "end": 107 - } + "range": [ + 98, + 107 + ] }, { "type": "JSXExpressionContainer", @@ -172,18 +172,18 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 109, - "end": 113 - } + "range": [ + 109, + 113 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 108, - "end": 114 - } + "range": [ + 108, + 114 + ] }, "children": [ { @@ -191,10 +191,10 @@ Output: "value": "Text", "raw": "Text", "loc": null, - "range": { - "start": 114, - "end": 118 - } + "range": [ + 114, + 118 + ] } ], "closingElement": { @@ -203,38 +203,38 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 120, - "end": 124 - } + "range": [ + 120, + 124 + ] }, "loc": null, - "range": { - "start": 118, - "end": 125 - } + "range": [ + 118, + 125 + ] }, "loc": null, - "range": { - "start": 108, - "end": 125 - } + "range": [ + 108, + 125 + ] }, "loc": null, - "range": { - "start": 107, - "end": 126 - } + "range": [ + 107, + 126 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 126, - "end": 135 - } + "range": [ + 126, + 135 + ] }, { "type": "JSXExpressionContainer", @@ -246,18 +246,18 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 137, - "end": 141 - } + "range": [ + 137, + 141 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 136, - "end": 142 - } + "range": [ + 136, + 142 + ] }, "children": [ { @@ -269,10 +269,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 154 - } + "range": [ + 143, + 154 + ] }, "arguments": [ { @@ -280,23 +280,23 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 160 - } + "range": [ + 155, + 160 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 161 - } + "range": [ + 143, + 161 + ] }, "loc": null, - "range": { - "start": 142, - "end": 162 - } + "range": [ + 142, + 162 + ] } ], "closingElement": { @@ -305,38 +305,38 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 164, - "end": 168 - } + "range": [ + 164, + 168 + ] }, "loc": null, - "range": { - "start": 162, - "end": 169 - } + "range": [ + 162, + 169 + ] }, "loc": null, - "range": { - "start": 136, - "end": 169 - } + "range": [ + 136, + 169 + ] }, "loc": null, - "range": { - "start": 135, - "end": 170 - } + "range": [ + 135, + 170 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 170, - "end": 177 - } + "range": [ + 170, + 177 + ] } ], "closingElement": { @@ -345,32 +345,32 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 179, - "end": 183 - } + "range": [ + 179, + 183 + ] }, "loc": null, - "range": { - "start": 177, - "end": 184 - } + "range": [ + 177, + 184 + ] }, "loc": null, - "range": { - "start": 92, - "end": 184 - } + "range": [ + 92, + 184 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 184, - "end": 189 - } + "range": [ + 184, + 189 + ] } ], "closingElement": { @@ -379,54 +379,54 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 191, - "end": 195 - } + "range": [ + 191, + 195 + ] }, "loc": null, - "range": { - "start": 189, - "end": 196 - } + "range": [ + 189, + 196 + ] }, "loc": null, - "range": { - "start": 79, - "end": 196 - } + "range": [ + 79, + 196 + ] }, "loc": null, - "range": { - "start": 66, - "end": 201 - } + "range": [ + 66, + 201 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 203 - } + "range": [ + 26, + 203 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 203 - }, + "range": [ + 0, + 203 + ], "loc": null, - "range": { - "start": 0, - "end": 203 - } + "range": [ + 0, + 203 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 203 - } + "range": [ + 0, + 203 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@interdependent-across-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@interdependent-across-if.js.snap index 7ff1e9fd5c..ffff052aca 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@interdependent-across-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@interdependent-across-if.js.snap @@ -39,33 +39,33 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 16 - } + "range": [ + 9, + 16 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 19, - "end": 21 - } + "range": [ + 19, + 21 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 21 - }, + "range": [ + 0, + 21 + ], "loc": null, - "range": { - "start": 0, - "end": 21 - } + "range": [ + 0, + 21 + ] }, { "type": "FunctionDeclaration", @@ -74,33 +74,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 34 - } + "range": [ + 31, + 34 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 37, - "end": 39 - } + "range": [ + 37, + 39 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 22, - "end": 39 - }, + "range": [ + 22, + 39 + ], "loc": null, - "range": { - "start": 22, - "end": 39 - } + "range": [ + 22, + 39 + ] }, { "type": "FunctionDeclaration", @@ -109,33 +109,33 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 52 - } + "range": [ + 49, + 52 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 55, - "end": 57 - } + "range": [ + 55, + 57 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 40, - "end": 57 - }, + "range": [ + 40, + 57 + ], "loc": null, - "range": { - "start": 40, - "end": 57 - } + "range": [ + 40, + 57 + ] }, { "type": "FunctionDeclaration", @@ -144,10 +144,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 304, - "end": 313 - } + "range": [ + 304, + 313 + ] }, "params": [ { @@ -155,10 +155,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 314, - "end": 319 - } + "range": [ + 314, + 319 + ] } ], "body": { @@ -175,10 +175,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 331, - "end": 332 - } + "range": [ + 331, + 332 + ] }, "init": { "type": "CallExpression", @@ -187,10 +187,10 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 335, - "end": 342 - } + "range": [ + 335, + 342 + ] }, "arguments": [ { @@ -200,47 +200,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 343, - "end": 348 - } + "range": [ + 343, + 348 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 349, - "end": 350 - } + "range": [ + 349, + 350 + ] }, "computed": false, "loc": null, - "range": { - "start": 343, - "end": 350 - } + "range": [ + 343, + 350 + ] } ], "loc": null, - "range": { - "start": 335, - "end": 351 - } + "range": [ + 335, + 351 + ] }, "loc": null, - "range": { - "start": 331, - "end": 351 - } + "range": [ + 331, + 351 + ] } ], "loc": null, - "range": { - "start": 325, - "end": 352 - } + "range": [ + 325, + 352 + ] }, { "type": "VariableDeclaration", @@ -253,10 +253,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 361, - "end": 362 - } + "range": [ + 361, + 362 + ] }, "init": { "type": "CallExpression", @@ -265,10 +265,10 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 365, - "end": 372 - } + "range": [ + 365, + 372 + ] }, "arguments": [ { @@ -278,47 +278,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 373, - "end": 378 - } + "range": [ + 373, + 378 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 379, - "end": 380 - } + "range": [ + 379, + 380 + ] }, "computed": false, "loc": null, - "range": { - "start": 373, - "end": 380 - } + "range": [ + 373, + 380 + ] } ], "loc": null, - "range": { - "start": 365, - "end": 381 - } + "range": [ + 365, + 381 + ] }, "loc": null, - "range": { - "start": 361, - "end": 381 - } + "range": [ + 361, + 381 + ] } ], "loc": null, - "range": { - "start": 355, - "end": 382 - } + "range": [ + 355, + 382 + ] }, { "type": "IfStatement", @@ -329,27 +329,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 389, - "end": 394 - } + "range": [ + 389, + 394 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 395, - "end": 396 - } + "range": [ + 395, + 396 + ] }, "computed": false, "loc": null, - "range": { - "start": 389, - "end": 396 - } + "range": [ + 389, + 396 + ] }, "consequent": { "type": "BlockStatement", @@ -363,10 +363,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 404, - "end": 407 - } + "range": [ + 404, + 407 + ] }, "arguments": [ { @@ -374,48 +374,48 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 408, - "end": 409 - } + "range": [ + 408, + 409 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 411, - "end": 412 - } + "range": [ + 411, + 412 + ] } ], "loc": null, - "range": { - "start": 404, - "end": 413 - } + "range": [ + 404, + 413 + ] }, "directive": null, "loc": null, - "range": { - "start": 404, - "end": 414 - } + "range": [ + 404, + 414 + ] } ], "loc": null, - "range": { - "start": 398, - "end": 418 - } + "range": [ + 398, + 418 + ] }, "alternate": null, "loc": null, - "range": { - "start": 385, - "end": 418 - } + "range": [ + 385, + 418 + ] }, { "type": "ReturnStatement", @@ -427,10 +427,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 429, - "end": 432 - } + "range": [ + 429, + 432 + ] }, "attributes": [ { @@ -439,10 +439,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 433, - "end": 434 - } + "range": [ + 433, + 434 + ] }, "value": { "type": "JSXExpressionContainer", @@ -451,22 +451,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 436, - "end": 437 - } + "range": [ + 436, + 437 + ] }, "loc": null, - "range": { - "start": 435, - "end": 438 - } + "range": [ + 435, + 438 + ] }, "loc": null, - "range": { - "start": 433, - "end": 438 - } + "range": [ + 433, + 438 + ] }, { "type": "JSXAttribute", @@ -474,10 +474,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 439, - "end": 440 - } + "range": [ + 439, + 440 + ] }, "value": { "type": "JSXExpressionContainer", @@ -486,70 +486,70 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 442, - "end": 443 - } + "range": [ + 442, + 443 + ] }, "loc": null, - "range": { - "start": 441, - "end": 444 - } + "range": [ + 441, + 444 + ] }, "loc": null, - "range": { - "start": 439, - "end": 444 - } + "range": [ + 439, + 444 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 428, - "end": 447 - } + "range": [ + 428, + 447 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 428, - "end": 447 - } + "range": [ + 428, + 447 + ] }, "loc": null, - "range": { - "start": 421, - "end": 448 - } + "range": [ + 421, + 448 + ] } ], "loc": null, - "range": { - "start": 321, - "end": 450 - } + "range": [ + 321, + 450 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 295, - "end": 450 - }, + "range": [ + 295, + 450 + ], "loc": null, - "range": { - "start": 295, - "end": 450 - } + "range": [ + 295, + 450 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 450 - } + "range": [ + 0, + 450 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@interdependent.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@interdependent.js.snap index 6f9bd56296..024e12ca46 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@interdependent.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@interdependent.js.snap @@ -36,10 +36,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 215, - "end": 224 - } + "range": [ + 215, + 224 + ] }, "params": [ { @@ -47,10 +47,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 225, - "end": 230 - } + "range": [ + 225, + 230 + ] } ], "body": { @@ -67,10 +67,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 242, - "end": 243 - } + "range": [ + 242, + 243 + ] }, "init": { "type": "CallExpression", @@ -79,10 +79,10 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 246, - "end": 253 - } + "range": [ + 246, + 253 + ] }, "arguments": [ { @@ -92,47 +92,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 259 - } + "range": [ + 254, + 259 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 261 - } + "range": [ + 260, + 261 + ] }, "computed": false, "loc": null, - "range": { - "start": 254, - "end": 261 - } + "range": [ + 254, + 261 + ] } ], "loc": null, - "range": { - "start": 246, - "end": 262 - } + "range": [ + 246, + 262 + ] }, "loc": null, - "range": { - "start": 242, - "end": 262 - } + "range": [ + 242, + 262 + ] } ], "loc": null, - "range": { - "start": 236, - "end": 263 - } + "range": [ + 236, + 263 + ] }, { "type": "VariableDeclaration", @@ -145,10 +145,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 272, - "end": 273 - } + "range": [ + 272, + 273 + ] }, "init": { "type": "CallExpression", @@ -157,10 +157,10 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 276, - "end": 283 - } + "range": [ + 276, + 283 + ] }, "arguments": [ { @@ -170,47 +170,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 284, - "end": 289 - } + "range": [ + 284, + 289 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 290, - "end": 291 - } + "range": [ + 290, + 291 + ] }, "computed": false, "loc": null, - "range": { - "start": 284, - "end": 291 - } + "range": [ + 284, + 291 + ] } ], "loc": null, - "range": { - "start": 276, - "end": 292 - } + "range": [ + 276, + 292 + ] }, "loc": null, - "range": { - "start": 272, - "end": 292 - } + "range": [ + 272, + 292 + ] } ], "loc": null, - "range": { - "start": 266, - "end": 293 - } + "range": [ + 266, + 293 + ] }, { "type": "ExpressionStatement", @@ -221,10 +221,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 296, - "end": 299 - } + "range": [ + 296, + 299 + ] }, "arguments": [ { @@ -232,34 +232,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 300, - "end": 301 - } + "range": [ + 300, + 301 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 303, - "end": 304 - } + "range": [ + 303, + 304 + ] } ], "loc": null, - "range": { - "start": 296, - "end": 305 - } + "range": [ + 296, + 305 + ] }, "directive": null, "loc": null, - "range": { - "start": 296, - "end": 306 - } + "range": [ + 296, + 306 + ] }, { "type": "ReturnStatement", @@ -271,10 +271,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 317, - "end": 320 - } + "range": [ + 317, + 320 + ] }, "attributes": [ { @@ -283,10 +283,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 321, - "end": 322 - } + "range": [ + 321, + 322 + ] }, "value": { "type": "JSXExpressionContainer", @@ -295,22 +295,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 324, - "end": 325 - } + "range": [ + 324, + 325 + ] }, "loc": null, - "range": { - "start": 323, - "end": 326 - } + "range": [ + 323, + 326 + ] }, "loc": null, - "range": { - "start": 321, - "end": 326 - } + "range": [ + 321, + 326 + ] }, { "type": "JSXAttribute", @@ -318,10 +318,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 327, - "end": 328 - } + "range": [ + 327, + 328 + ] }, "value": { "type": "JSXExpressionContainer", @@ -330,64 +330,64 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 330, - "end": 331 - } + "range": [ + 330, + 331 + ] }, "loc": null, - "range": { - "start": 329, - "end": 332 - } + "range": [ + 329, + 332 + ] }, "loc": null, - "range": { - "start": 327, - "end": 332 - } + "range": [ + 327, + 332 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 316, - "end": 335 - } + "range": [ + 316, + 335 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 316, - "end": 335 - } + "range": [ + 316, + 335 + ] }, "loc": null, - "range": { - "start": 309, - "end": 336 - } + "range": [ + 309, + 336 + ] } ], "loc": null, - "range": { - "start": 232, - "end": 338 - } + "range": [ + 232, + 338 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 206, - "end": 338 - }, + "range": [ + 206, + 338 + ], "loc": null, - "range": { - "start": 206, - "end": 338 - } + "range": [ + 206, + 338 + ] }, { "type": "FunctionDeclaration", @@ -396,33 +396,33 @@ Output: "name": "compute", "typeAnnotation": null, "loc": null, - "range": { - "start": 349, - "end": 356 - } + "range": [ + 349, + 356 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 359, - "end": 361 - } + "range": [ + 359, + 361 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 340, - "end": 361 - }, + "range": [ + 340, + 361 + ], "loc": null, - "range": { - "start": 340, - "end": 361 - } + "range": [ + 340, + 361 + ] }, { "type": "FunctionDeclaration", @@ -431,33 +431,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 371, - "end": 374 - } + "range": [ + 371, + 374 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 377, - "end": 379 - } + "range": [ + 377, + 379 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 362, - "end": 379 - }, + "range": [ + 362, + 379 + ], "loc": null, - "range": { - "start": 362, - "end": 379 - } + "range": [ + 362, + 379 + ] }, { "type": "FunctionDeclaration", @@ -466,39 +466,39 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 389, - "end": 392 - } + "range": [ + 389, + 392 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 395, - "end": 397 - } + "range": [ + 395, + 397 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 380, - "end": 397 - }, + "range": [ + 380, + 397 + ], "loc": null, - "range": { - "start": 380, - "end": 397 - } + "range": [ + 380, + 397 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 206, - "end": 397 - } + "range": [ + 206, + 397 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inverted-if-else.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inverted-if-else.js.snap index 90f81b3fce..44c5f920d7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inverted-if-else.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inverted-if-else.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,30 +39,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -79,31 +79,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "NullLiteral", "loc": null, - "range": { - "start": 34, - "end": 38 - } + "range": [ + 34, + 38 + ] }, "loc": null, - "range": { - "start": 30, - "end": 38 - } + "range": [ + 30, + 38 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 39 - } + "range": [ + 26, + 39 + ] }, { "type": "LabeledStatement", @@ -112,10 +112,10 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 47 - } + "range": [ + 42, + 47 + ] }, "body": { "type": "BlockStatement", @@ -127,10 +127,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "consequent": { "type": "BlockStatement", @@ -145,33 +145,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 70, - "end": 75 - } + "range": [ + 70, + 75 + ] }, "directive": null, "loc": null, - "range": { - "start": 70, - "end": 76 - } + "range": [ + 70, + 76 + ] }, { "type": "BreakStatement", @@ -180,30 +180,30 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 94 - } + "range": [ + 89, + 94 + ] }, "loc": null, - "range": { - "start": 83, - "end": 95 - } + "range": [ + 83, + 95 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 101 - } + "range": [ + 62, + 101 + ] }, "alternate": null, "loc": null, - "range": { - "start": 55, - "end": 101 - } + "range": [ + 55, + 101 + ] }, { "type": "ExpressionStatement", @@ -215,46 +215,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "loc": null, - "range": { - "start": 106, - "end": 111 - } + "range": [ + 106, + 111 + ] }, "directive": null, "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 116 - } + "range": [ + 49, + 116 + ] }, "loc": null, - "range": { - "start": 42, - "end": 116 - } + "range": [ + 42, + 116 + ] }, { "type": "ReturnStatement", @@ -263,42 +263,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "loc": null, - "range": { - "start": 119, - "end": 128 - } + "range": [ + 119, + 128 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 130 - } + "range": [ + 22, + 130 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 130 - }, + "range": [ + 0, + 130 + ], "loc": null, - "range": { - "start": 0, - "end": 130 - } + "range": [ + 0, + 130 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 130 - } + "range": [ + 0, + 130 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inverted-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inverted-if.js.snap index 0ac851b65a..296f7bfe38 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inverted-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@inverted-if.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,40 +39,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -89,32 +89,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 37, - "end": 39 - } + "range": [ + 37, + 39 + ] }, "loc": null, - "range": { - "start": 33, - "end": 39 - } + "range": [ + 33, + 39 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 40 - } + "range": [ + 29, + 40 + ] }, { "type": "LabeledStatement", @@ -123,10 +123,10 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "body": { "type": "IfStatement", @@ -135,10 +135,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "consequent": { "type": "BlockStatement", @@ -150,10 +150,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "consequent": { "type": "BlockStatement", @@ -169,27 +169,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] }, "arguments": [ { @@ -197,24 +197,24 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 87 - } + "range": [ + 78, + 87 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 88 - } + "range": [ + 78, + 88 + ] }, { "type": "BreakStatement", @@ -223,30 +223,30 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 106 - } + "range": [ + 101, + 106 + ] }, "loc": null, - "range": { - "start": 95, - "end": 107 - } + "range": [ + 95, + 107 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 113 - } + "range": [ + 70, + 113 + ] }, "alternate": null, "loc": null, - "range": { - "start": 63, - "end": 113 - } + "range": [ + 63, + 113 + ] }, { "type": "ExpressionStatement", @@ -259,27 +259,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 124 - } + "range": [ + 120, + 124 + ] }, "computed": false, "loc": null, - "range": { - "start": 118, - "end": 124 - } + "range": [ + 118, + 124 + ] }, "arguments": [ { @@ -287,44 +287,44 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] } ], "loc": null, - "range": { - "start": 118, - "end": 127 - } + "range": [ + 118, + 127 + ] }, "directive": null, "loc": null, - "range": { - "start": 118, - "end": 128 - } + "range": [ + 118, + 128 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 132 - } + "range": [ + 57, + 132 + ] }, "alternate": null, "loc": null, - "range": { - "start": 50, - "end": 132 - } + "range": [ + 50, + 132 + ] }, "loc": null, - "range": { - "start": 43, - "end": 132 - } + "range": [ + 43, + 132 + ] }, { "type": "ReturnStatement", @@ -333,42 +333,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "loc": null, - "range": { - "start": 135, - "end": 144 - } + "range": [ + 135, + 144 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 146 - } + "range": [ + 25, + 146 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 146 - }, + "range": [ + 0, + 146 + ], "loc": null, - "range": { - "start": 0, - "end": 146 - } + "range": [ + 0, + 146 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 146 - } + "range": [ + 0, + 146 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@issue852.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@issue852.js.snap index 0d8b93bd9e..a02ee1805c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@issue852.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@issue852.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -69,50 +69,50 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "ExpressionStatement", @@ -123,10 +123,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 49 - } + "range": [ + 43, + 49 + ] }, "arguments": [ { @@ -134,24 +134,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 52 - } + "range": [ + 43, + 52 + ] }, "directive": null, "loc": null, - "range": { - "start": 43, - "end": 53 - } + "range": [ + 43, + 53 + ] }, { "type": "VariableDeclaration", @@ -164,33 +164,33 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 66 - } + "range": [ + 56, + 66 + ] }, { "type": "VariableDeclaration", @@ -203,59 +203,59 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "init": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "loc": null, - "range": { - "start": 73, - "end": 78 - } + "range": [ + 73, + 78 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 79 - } + "range": [ + 69, + 79 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 81 - } + "range": [ + 22, + 81 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 81 - }, + "range": [ + 0, + 81 + ], "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@issue933-disjoint-set-infinite-loop.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@issue933-disjoint-set-infinite-loop.js.snap index 0e5f1c8d38..65c4be6b93 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@issue933-disjoint-set-infinite-loop.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@issue933-disjoint-set-infinite-loop.js.snap @@ -25,10 +25,10 @@ Output: "name": "MyApp", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "init": { "type": "CallExpression", @@ -68,30 +68,30 @@ Output: "name": "makeObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 91 - } + "range": [ + 84, + 91 + ] }, "arguments": [], "loc": null, - "range": { - "start": 84, - "end": 93 - } + "range": [ + 84, + 93 + ] }, "loc": null, - "range": { - "start": 80, - "end": 93 - } + "range": [ + 80, + 93 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 94 - } + "range": [ + 74, + 94 + ] }, { "type": "VariableDeclaration", @@ -104,10 +104,10 @@ Output: "name": "tmp", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 106 - } + "range": [ + 103, + 106 + ] }, "init": { "type": "MemberExpression", @@ -116,40 +116,40 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 112 - } + "range": [ + 109, + 112 + ] }, "loc": null, - "range": { - "start": 103, - "end": 112 - } + "range": [ + 103, + 112 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 113 - } + "range": [ + 97, + 113 + ] }, { "type": "VariableDeclaration", @@ -162,10 +162,10 @@ Output: "name": "tmp2", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 126 - } + "range": [ + 122, + 126 + ] }, "init": { "type": "MemberExpression", @@ -174,40 +174,40 @@ Output: "name": "tmp", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 132 - } + "range": [ + 129, + 132 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "computed": false, "loc": null, - "range": { - "start": 129, - "end": 134 - } + "range": [ + 129, + 134 + ] }, "loc": null, - "range": { - "start": 122, - "end": 134 - } + "range": [ + 122, + 134 + ] } ], "loc": null, - "range": { - "start": 116, - "end": 135 - } + "range": [ + 116, + 135 + ] }, { "type": "ExpressionStatement", @@ -220,27 +220,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 138, - "end": 139 - } + "range": [ + 138, + 139 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 144 - } + "range": [ + 140, + 144 + ] }, "computed": false, "loc": null, - "range": { - "start": 138, - "end": 144 - } + "range": [ + 138, + 144 + ] }, "arguments": [ { @@ -248,24 +248,24 @@ Output: "name": "tmp2", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 149 - } + "range": [ + 145, + 149 + ] } ], "loc": null, - "range": { - "start": 138, - "end": 150 - } + "range": [ + 138, + 150 + ] }, "directive": null, "loc": null, - "range": { - "start": 138, - "end": 151 - } + "range": [ + 138, + 151 + ] }, { "type": "ReturnStatement", @@ -274,42 +274,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "loc": null, - "range": { - "start": 154, - "end": 163 - } + "range": [ + 154, + 163 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 165 - } + "range": [ + 70, + 165 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 165 - }, + "range": [ + 48, + 165 + ], "loc": null, - "range": { - "start": 48, - "end": 165 - } + "range": [ + 48, + 165 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 48, - "end": 165 - } + "range": [ + 48, + 165 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-empty-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-empty-expression.js.snap index 6c7902d1ba..0bad9cdd7a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-empty-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-empty-expression.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 25 - } + "range": [ + 16, + 25 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 31 - } + "range": [ + 26, + 31 + ] } ], "body": { @@ -57,18 +57,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "children": [ { @@ -76,36 +76,36 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 55, - "end": 62 - } + "range": [ + 55, + 62 + ] }, { "type": "JSXExpressionContainer", "expression": { "type": "JSXEmptyExpression", "loc": null, - "range": { - "start": 63, - "end": 63 - } + "range": [ + 63, + 63 + ] }, "loc": null, - "range": { - "start": 62, - "end": 64 - } + "range": [ + 62, + 64 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 64, - "end": 71 - } + "range": [ + 64, + 71 + ] }, { "type": "JSXExpressionContainer", @@ -116,43 +116,43 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 77 - } + "range": [ + 72, + 77 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 72, - "end": 79 - } + "range": [ + 72, + 79 + ] }, "loc": null, - "range": { - "start": 71, - "end": 80 - } + "range": [ + 71, + 80 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] } ], "closingElement": { @@ -161,62 +161,62 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 87, - "end": 90 - } + "range": [ + 87, + 90 + ] }, "loc": null, - "range": { - "start": 85, - "end": 91 - } + "range": [ + 85, + 91 + ] }, "loc": null, - "range": { - "start": 50, - "end": 91 - } + "range": [ + 50, + 91 + ] }, "loc": null, - "range": { - "start": 37, - "end": 96 - } + "range": [ + 37, + 96 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 98 - } + "range": [ + 33, + 98 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 7, - "end": 98 - }, + "range": [ + 7, + 98 + ], "loc": null, - "range": { - "start": 7, - "end": 98 - } + "range": [ + 7, + 98 + ] }, "specifiers": [], "source": null, "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-fragment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-fragment.js.snap index 8a6338accf..5f00dfe079 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-fragment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-fragment.js.snap @@ -27,10 +27,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "openingFragment": { "type": "JSXOpeningFragment", "loc": null, - "range": { - "start": 37, - "end": 39 - } + "range": [ + 37, + 39 + ] }, "children": [ { @@ -65,10 +65,10 @@ Output: "value": "\n Hello ", "raw": "\n Hello ", "loc": null, - "range": { - "start": 39, - "end": 52 - } + "range": [ + 39, + 52 + ] }, { "type": "JSXExpressionContainer", @@ -79,33 +79,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 58 - } + "range": [ + 53, + 58 + ] }, "property": { "type": "Identifier", "name": "greeting", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 67 - } + "range": [ + 59, + 67 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 67 - } + "range": [ + 53, + 67 + ] }, "loc": null, - "range": { - "start": 52, - "end": 68 - } + "range": [ + 52, + 68 + ] }, { "type": "JSXExpressionContainer", @@ -113,26 +113,26 @@ Output: "type": "StringLiteral", "value": " ", "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 73, - "end": 80 - } + "range": [ + 73, + 80 + ] }, { "type": "JSXElement", @@ -142,18 +142,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "children": [ { @@ -161,20 +161,20 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 85, - "end": 94 - } + "range": [ + 85, + 94 + ] }, { "type": "JSXFragment", "openingFragment": { "type": "JSXOpeningFragment", "loc": null, - "range": { - "start": 94, - "end": 96 - } + "range": [ + 94, + 96 + ] }, "children": [ { @@ -182,35 +182,35 @@ Output: "value": "Text", "raw": "Text", "loc": null, - "range": { - "start": 96, - "end": 100 - } + "range": [ + 96, + 100 + ] } ], "closingFragment": { "type": "JSXClosingFragment", "loc": null, - "range": { - "start": 100, - "end": 103 - } + "range": [ + 100, + 103 + ] }, "loc": null, - "range": { - "start": 94, - "end": 103 - } + "range": [ + 94, + 103 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 103, - "end": 110 - } + "range": [ + 103, + 110 + ] } ], "closingElement": { @@ -219,79 +219,79 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 112, - "end": 115 - } + "range": [ + 112, + 115 + ] }, "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] }, "loc": null, - "range": { - "start": 80, - "end": 116 - } + "range": [ + 80, + 116 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 116, - "end": 121 - } + "range": [ + 116, + 121 + ] } ], "closingFragment": { "type": "JSXClosingFragment", "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] }, "loc": null, - "range": { - "start": 37, - "end": 124 - } + "range": [ + 37, + 124 + ] }, "loc": null, - "range": { - "start": 24, - "end": 129 - } + "range": [ + 24, + 129 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 131 - } + "range": [ + 20, + 131 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 131 - }, + "range": [ + 0, + 131 + ], "loc": null, - "range": { - "start": 0, - "end": 131 - } + "range": [ + 0, + 131 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 131 - } + "range": [ + 0, + 131 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-member-expression-tag-grouping.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-member-expression-tag-grouping.js.snap index b2a7c4998e..6b8ab39f74 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-member-expression-tag-grouping.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-member-expression-tag-grouping.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] }, "init": { "type": "NewExpression", @@ -64,30 +64,30 @@ Output: "name": "MaybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "arguments": [], "loc": null, - "range": { - "start": 51, - "end": 69 - } + "range": [ + 51, + 69 + ] }, "loc": null, - "range": { - "start": 36, - "end": 69 - } + "range": [ + 36, + 69 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 70 - } + "range": [ + 30, + 70 + ] }, { "type": "ReturnStatement", @@ -101,33 +101,33 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "property": { "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 85, - "end": 88 - } + "range": [ + 85, + 88 + ] }, "loc": null, - "range": { - "start": 81, - "end": 88 - } + "range": [ + 81, + 88 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 80, - "end": 89 - } + "range": [ + 80, + 89 + ] }, "children": [ { @@ -139,10 +139,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 101 - } + "range": [ + 90, + 101 + ] }, "arguments": [ { @@ -150,23 +150,23 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 114 - } + "range": [ + 102, + 114 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 115 - } + "range": [ + 90, + 115 + ] }, "loc": null, - "range": { - "start": 89, - "end": 116 - } + "range": [ + 89, + 116 + ] } ], "closingElement": { @@ -177,69 +177,69 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "property": { "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 122, - "end": 125 - } + "range": [ + 122, + 125 + ] }, "loc": null, - "range": { - "start": 118, - "end": 125 - } + "range": [ + 118, + 125 + ] }, "loc": null, - "range": { - "start": 116, - "end": 126 - } + "range": [ + 116, + 126 + ] }, "loc": null, - "range": { - "start": 80, - "end": 126 - } + "range": [ + 80, + 126 + ] }, "loc": null, - "range": { - "start": 73, - "end": 127 - } + "range": [ + 73, + 127 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 129 - } + "range": [ + 26, + 129 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 129 - }, + "range": [ + 0, + 129 + ], "loc": null, - "range": { - "start": 0, - "end": 129 - } + "range": [ + 0, + 129 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 129 - } + "range": [ + 0, + 129 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-member-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-member-expression.js.snap index 69e5b165e8..6d6788f533 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-member-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-member-expression.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,48 +58,48 @@ Output: "type": "JSXIdentifier", "name": "Sathya", "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] }, "property": { "type": "JSXIdentifier", "name": "Codes", "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "loc": null, - "range": { - "start": 44, - "end": 56 - } + "range": [ + 44, + 56 + ] }, "property": { "type": "JSXIdentifier", "name": "Forget", "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] }, "loc": null, - "range": { - "start": 44, - "end": 63 - } + "range": [ + 44, + 63 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 43, - "end": 64 - } + "range": [ + 43, + 64 + ] }, "children": [ { @@ -107,10 +107,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 64, - "end": 71 - } + "range": [ + 64, + 71 + ] }, { "type": "JSXElement", @@ -124,66 +124,66 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 72, - "end": 75 - } + "range": [ + 72, + 75 + ] }, "property": { "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "loc": null, - "range": { - "start": 72, - "end": 79 - } + "range": [ + 72, + 79 + ] }, "property": { "type": "JSXIdentifier", "name": "Baz", "loc": null, - "range": { - "start": 80, - "end": 83 - } + "range": [ + 80, + 83 + ] }, "loc": null, - "range": { - "start": 72, - "end": 83 - } + "range": [ + 72, + 83 + ] }, "attributes": [], "selfClosing": true, "loc": null, - "range": { - "start": 71, - "end": 86 - } + "range": [ + 71, + 86 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 71, - "end": 86 - } + "range": [ + 71, + 86 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 86, - "end": 91 - } + "range": [ + 86, + 91 + ] } ], "closingElement": { @@ -196,84 +196,84 @@ Output: "type": "JSXIdentifier", "name": "Sathya", "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "property": { "type": "JSXIdentifier", "name": "Codes", "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "loc": null, - "range": { - "start": 93, - "end": 105 - } + "range": [ + 93, + 105 + ] }, "property": { "type": "JSXIdentifier", "name": "Forget", "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] }, "loc": null, - "range": { - "start": 93, - "end": 112 - } + "range": [ + 93, + 112 + ] }, "loc": null, - "range": { - "start": 91, - "end": 113 - } + "range": [ + 91, + 113 + ] }, "loc": null, - "range": { - "start": 43, - "end": 113 - } + "range": [ + 43, + 113 + ] }, "loc": null, - "range": { - "start": 30, - "end": 118 - } + "range": [ + 30, + 118 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 120 - } + "range": [ + 26, + 120 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 120 - }, + "range": [ + 0, + 120 + ], "loc": null, - "range": { - "start": 0, - "end": 120 - } + "range": [ + 0, + 120 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 120 - } + "range": [ + 0, + 120 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-namespaced-name.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-namespaced-name.js.snap index de80e6fbe0..53dba9c854 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-namespaced-name.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-namespaced-name.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -31,10 +31,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,25 +52,25 @@ Output: "type": "JSXIdentifier", "name": "xml", "loc": null, - "range": { - "start": 38, - "end": 41 - } + "range": [ + 38, + 41 + ] }, "name": { "type": "JSXIdentifier", "name": "http", "loc": null, - "range": { - "start": 42, - "end": 46 - } + "range": [ + 42, + 46 + ] }, "loc": null, - "range": { - "start": 38, - "end": 46 - } + "range": [ + 38, + 46 + ] }, "attributes": [ { @@ -81,25 +81,25 @@ Output: "type": "JSXIdentifier", "name": "protocol", "loc": null, - "range": { - "start": 47, - "end": 55 - } + "range": [ + 47, + 55 + ] }, "name": { "type": "JSXIdentifier", "name": "version", "loc": null, - "range": { - "start": 56, - "end": 63 - } + "range": [ + 56, + 63 + ] }, "loc": null, - "range": { - "start": 47, - "end": 63 - } + "range": [ + 47, + 63 + ] }, "value": { "type": "JSXExpressionContainer", @@ -110,87 +110,87 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "property": { "type": "Identifier", "name": "version", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 78 - } + "range": [ + 71, + 78 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 78 - } + "range": [ + 65, + 78 + ] }, "loc": null, - "range": { - "start": 64, - "end": 79 - } + "range": [ + 64, + 79 + ] }, "loc": null, - "range": { - "start": 47, - "end": 79 - } + "range": [ + 47, + 79 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 37, - "end": 82 - } + "range": [ + 37, + 82 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 37, - "end": 82 - } + "range": [ + 37, + 82 + ] }, "loc": null, - "range": { - "start": 30, - "end": 83 - } + "range": [ + 30, + 83 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 85 - } + "range": [ + 26, + 85 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 85 - }, + "range": [ + 0, + 85 + ], "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-spread.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-spread.js.snap index a8f02afba5..2200c2b801 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-spread.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-spread.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 44, - "end": 53 - } + "range": [ + 44, + 53 + ] }, "attributes": [ { @@ -65,16 +65,16 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 63 - } + "range": [ + 58, + 63 + ] }, "loc": null, - "range": { - "start": 54, - "end": 64 - } + "range": [ + 54, + 64 + ] }, { "type": "JSXSpreadAttribute", @@ -88,10 +88,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 74 - } + "range": [ + 71, + 74 + ] }, "value": { "type": "ConditionalExpression", @@ -102,27 +102,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 81 - } + "range": [ + 76, + 81 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 86 - } + "range": [ + 82, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, "alternate": { "type": "MemberExpression", @@ -131,27 +131,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 106 - } + "range": [ + 101, + 106 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 110 - } + "range": [ + 107, + 110 + ] }, "computed": false, "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] }, "consequent": { "type": "MemberExpression", @@ -160,104 +160,104 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 94 - } + "range": [ + 89, + 94 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 98 - } + "range": [ + 95, + 98 + ] }, "computed": false, "loc": null, - "range": { - "start": 89, - "end": 98 - } + "range": [ + 89, + 98 + ] }, "loc": null, - "range": { - "start": 76, - "end": 110 - } + "range": [ + 76, + 110 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 71, - "end": 110 - } + "range": [ + 71, + 110 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 112 - } + "range": [ + 69, + 112 + ] }, "loc": null, - "range": { - "start": 65, - "end": 113 - } + "range": [ + 65, + 113 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 43, - "end": 116 - } + "range": [ + 43, + 116 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 43, - "end": 116 - } + "range": [ + 43, + 116 + ] }, "loc": null, - "range": { - "start": 30, - "end": 121 - } + "range": [ + 30, + 121 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 123 - } + "range": [ + 26, + 123 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 123 - }, + "range": [ + 0, + 123 + ], "loc": null, - "range": { - "start": 0, - "end": 123 - } + "range": [ + 0, + 123 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 123 - } + "range": [ + 0, + 123 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-tag-evaluation-order-non-global.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-tag-evaluation-order-non-global.js.snap index 82fef61465..15c61b7840 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-tag-evaluation-order-non-global.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-tag-evaluation-order-non-global.js.snap @@ -30,10 +30,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -41,10 +41,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -61,10 +61,10 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] }, "init": { "type": "NewExpression", @@ -73,30 +73,30 @@ Output: "name": "MaybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "arguments": [], "loc": null, - "range": { - "start": 51, - "end": 69 - } + "range": [ + 51, + 69 + ] }, "loc": null, - "range": { - "start": 36, - "end": 69 - } + "range": [ + 36, + 69 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 70 - } + "range": [ + 30, + 70 + ] }, { "type": "VariableDeclaration", @@ -109,10 +109,10 @@ Output: "name": "Tag", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 80 - } + "range": [ + 77, + 80 + ] }, "init": { "type": "MemberExpression", @@ -121,40 +121,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 88 - } + "range": [ + 83, + 88 + ] }, "property": { "type": "Identifier", "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 98 - } + "range": [ + 89, + 98 + ] }, "computed": false, "loc": null, - "range": { - "start": 83, - "end": 98 - } + "range": [ + 83, + 98 + ] }, "loc": null, - "range": { - "start": 77, - "end": 98 - } + "range": [ + 77, + 98 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 99 - } + "range": [ + 73, + 99 + ] }, { "type": "ReturnStatement", @@ -166,18 +166,18 @@ Output: "type": "JSXIdentifier", "name": "Tag", "loc": null, - "range": { - "start": 295, - "end": 298 - } + "range": [ + 295, + 298 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 294, - "end": 299 - } + "range": [ + 294, + 299 + ] }, "children": [ { @@ -185,10 +185,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 299, - "end": 306 - } + "range": [ + 299, + 306 + ] }, { "type": "JSXExpressionContainer", @@ -203,10 +203,10 @@ Output: "name": "Tag", "typeAnnotation": null, "loc": null, - "range": { - "start": 309, - "end": 312 - } + "range": [ + 309, + 312 + ] }, "right": { "type": "MemberExpression", @@ -215,33 +215,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 315, - "end": 320 - } + "range": [ + 315, + 320 + ] }, "property": { "type": "Identifier", "name": "alternateComponent", "typeAnnotation": null, "loc": null, - "range": { - "start": 321, - "end": 339 - } + "range": [ + 321, + 339 + ] }, "computed": false, "loc": null, - "range": { - "start": 315, - "end": 339 - } + "range": [ + 315, + 339 + ] }, "loc": null, - "range": { - "start": 309, - "end": 339 - } + "range": [ + 309, + 339 + ] }, { "type": "CallExpression", @@ -250,10 +250,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 342, - "end": 353 - } + "range": [ + 342, + 353 + ] }, "arguments": [ { @@ -261,40 +261,40 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 354, - "end": 366 - } + "range": [ + 354, + 366 + ] } ], "loc": null, - "range": { - "start": 342, - "end": 367 - } + "range": [ + 342, + 367 + ] } ], "loc": null, - "range": { - "start": 308, - "end": 367 - } + "range": [ + 308, + 367 + ] }, "loc": null, - "range": { - "start": 306, - "end": 369 - } + "range": [ + 306, + 369 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 369, - "end": 376 - } + "range": [ + 369, + 376 + ] }, { "type": "JSXElement", @@ -304,36 +304,36 @@ Output: "type": "JSXIdentifier", "name": "Tag", "loc": null, - "range": { - "start": 377, - "end": 380 - } + "range": [ + 377, + 380 + ] }, "attributes": [], "selfClosing": true, "loc": null, - "range": { - "start": 376, - "end": 383 - } + "range": [ + 376, + 383 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 376, - "end": 383 - } + "range": [ + 376, + 383 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 383, - "end": 388 - } + "range": [ + 383, + 388 + ] } ], "closingElement": { @@ -342,54 +342,54 @@ Output: "type": "JSXIdentifier", "name": "Tag", "loc": null, - "range": { - "start": 390, - "end": 393 - } + "range": [ + 390, + 393 + ] }, "loc": null, - "range": { - "start": 388, - "end": 394 - } + "range": [ + 388, + 394 + ] }, "loc": null, - "range": { - "start": 294, - "end": 394 - } + "range": [ + 294, + 394 + ] }, "loc": null, - "range": { - "start": 281, - "end": 399 - } + "range": [ + 281, + 399 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 401 - } + "range": [ + 26, + 401 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 401 - }, + "range": [ + 0, + 401 + ], "loc": null, - "range": { - "start": 0, - "end": 401 - } + "range": [ + 0, + 401 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 401 - } + "range": [ + 0, + 401 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-tag-evaluation-order.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-tag-evaluation-order.js.snap index 3e76301b77..7b6ac0043a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-tag-evaluation-order.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@jsx-tag-evaluation-order.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,33 +57,33 @@ Output: "name": "Tag", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 37 - } + "range": [ + 34, + 37 + ] }, "init": { "type": "Identifier", "name": "View", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "loc": null, - "range": { - "start": 34, - "end": 44 - } + "range": [ + 34, + 44 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 45 - } + "range": [ + 30, + 45 + ] }, { "type": "ReturnStatement", @@ -95,18 +95,18 @@ Output: "type": "JSXIdentifier", "name": "Tag", "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "children": [ { @@ -114,10 +114,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] }, { "type": "JSXExpressionContainer", @@ -132,26 +132,26 @@ Output: "name": "Tag", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "right": { "type": "Identifier", "name": "HScroll", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 89 - } + "range": [ + 82, + 89 + ] }, "loc": null, - "range": { - "start": 76, - "end": 89 - } + "range": [ + 76, + 89 + ] }, { "type": "MemberExpression", @@ -160,50 +160,50 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 97 - } + "range": [ + 92, + 97 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 103 - } + "range": [ + 98, + 103 + ] }, "computed": false, "loc": null, - "range": { - "start": 92, - "end": 103 - } + "range": [ + 92, + 103 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 103 - } + "range": [ + 75, + 103 + ] }, "loc": null, - "range": { - "start": 73, - "end": 105 - } + "range": [ + 73, + 105 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 105, - "end": 112 - } + "range": [ + 105, + 112 + ] }, { "type": "JSXElement", @@ -213,36 +213,36 @@ Output: "type": "JSXIdentifier", "name": "Tag", "loc": null, - "range": { - "start": 113, - "end": 116 - } + "range": [ + 113, + 116 + ] }, "attributes": [], "selfClosing": true, "loc": null, - "range": { - "start": 112, - "end": 119 - } + "range": [ + 112, + 119 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 112, - "end": 119 - } + "range": [ + 112, + 119 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 119, - "end": 124 - } + "range": [ + 119, + 124 + ] } ], "closingElement": { @@ -251,54 +251,54 @@ Output: "type": "JSXIdentifier", "name": "Tag", "loc": null, - "range": { - "start": 126, - "end": 129 - } + "range": [ + 126, + 129 + ] }, "loc": null, - "range": { - "start": 124, - "end": 130 - } + "range": [ + 124, + 130 + ] }, "loc": null, - "range": { - "start": 61, - "end": 130 - } + "range": [ + 61, + 130 + ] }, "loc": null, - "range": { - "start": 48, - "end": 135 - } + "range": [ + 48, + 135 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 137 - } + "range": [ + 26, + 137 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 137 - }, + "range": [ + 0, + 137 + ], "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-capture-returned-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-capture-returned-alias.js.snap index b8cbeae991..43e4f1dea5 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-capture-returned-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-capture-returned-alias.js.snap @@ -35,10 +35,10 @@ Output: "name": "CaptureNotMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 374, - "end": 390 - } + "range": [ + 374, + 390 + ] }, "params": [ { @@ -46,10 +46,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 391, - "end": 396 - } + "range": [ + 391, + 396 + ] } ], "body": { @@ -66,10 +66,10 @@ Output: "name": "idx", "typeAnnotation": null, "loc": null, - "range": { - "start": 408, - "end": 411 - } + "range": [ + 408, + 411 + ] }, "init": { "type": "CallExpression", @@ -78,10 +78,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 414, - "end": 417 - } + "range": [ + 414, + 417 + ] }, "arguments": [ { @@ -91,47 +91,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 418, - "end": 423 - } + "range": [ + 418, + 423 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 424, - "end": 425 - } + "range": [ + 424, + 425 + ] }, "computed": false, "loc": null, - "range": { - "start": 418, - "end": 425 - } + "range": [ + 418, + 425 + ] } ], "loc": null, - "range": { - "start": 414, - "end": 426 - } + "range": [ + 414, + 426 + ] }, "loc": null, - "range": { - "start": 408, - "end": 426 - } + "range": [ + 408, + 426 + ] } ], "loc": null, - "range": { - "start": 402, - "end": 427 - } + "range": [ + 402, + 427 + ] }, { "type": "VariableDeclaration", @@ -144,10 +144,10 @@ Output: "name": "element", "typeAnnotation": null, "loc": null, - "range": { - "start": 436, - "end": 443 - } + "range": [ + 436, + 443 + ] }, "init": { "type": "CallExpression", @@ -156,10 +156,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 446, - "end": 449 - } + "range": [ + 446, + 449 + ] }, "arguments": [ { @@ -169,47 +169,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 450, - "end": 455 - } + "range": [ + 450, + 455 + ] }, "property": { "type": "Identifier", "name": "el", "typeAnnotation": null, "loc": null, - "range": { - "start": 456, - "end": 458 - } + "range": [ + 456, + 458 + ] }, "computed": false, "loc": null, - "range": { - "start": 450, - "end": 458 - } + "range": [ + 450, + 458 + ] } ], "loc": null, - "range": { - "start": 446, - "end": 459 - } + "range": [ + 446, + 459 + ] }, "loc": null, - "range": { - "start": 436, - "end": 459 - } + "range": [ + 436, + 459 + ] } ], "loc": null, - "range": { - "start": 430, - "end": 460 - } + "range": [ + 430, + 460 + ] }, { "type": "VariableDeclaration", @@ -222,10 +222,10 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 470, - "end": 472 - } + "range": [ + 470, + 472 + ] }, "init": { "type": "FunctionExpression", @@ -245,10 +245,10 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 499, - "end": 502 - } + "range": [ + 499, + 502 + ] }, "init": { "type": "ObjectExpression", @@ -260,50 +260,50 @@ Output: "name": "element", "typeAnnotation": null, "loc": null, - "range": { - "start": 507, - "end": 514 - } + "range": [ + 507, + 514 + ] }, "value": { "type": "Identifier", "name": "element", "typeAnnotation": null, "loc": null, - "range": { - "start": 507, - "end": 514 - } + "range": [ + 507, + 514 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 507, - "end": 514 - } + "range": [ + 507, + 514 + ] } ], "loc": null, - "range": { - "start": 505, - "end": 516 - } + "range": [ + 505, + 516 + ] }, "loc": null, - "range": { - "start": 499, - "end": 516 - } + "range": [ + 499, + 516 + ] } ], "loc": null, - "range": { - "start": 493, - "end": 517 - } + "range": [ + 493, + 517 + ] }, { "type": "ReturnStatement", @@ -314,66 +314,66 @@ Output: "name": "arr", "typeAnnotation": null, "loc": null, - "range": { - "start": 529, - "end": 532 - } + "range": [ + 529, + 532 + ] }, "property": { "type": "Identifier", "name": "idx", "typeAnnotation": null, "loc": null, - "range": { - "start": 533, - "end": 536 - } + "range": [ + 533, + 536 + ] }, "computed": true, "loc": null, - "range": { - "start": 529, - "end": 537 - } + "range": [ + 529, + 537 + ] }, "loc": null, - "range": { - "start": 522, - "end": 538 - } + "range": [ + 522, + 538 + ] } ], "loc": null, - "range": { - "start": 487, - "end": 542 - } + "range": [ + 487, + 542 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 475, - "end": 542 - }, + "range": [ + 475, + 542 + ], "loc": null, - "range": { - "start": 475, - "end": 542 - } + "range": [ + 475, + 542 + ] }, "loc": null, - "range": { - "start": 470, - "end": 542 - } + "range": [ + 470, + 542 + ] } ], "loc": null, - "range": { - "start": 464, - "end": 543 - } + "range": [ + 464, + 543 + ] }, { "type": "VariableDeclaration", @@ -386,10 +386,10 @@ Output: "name": "aliasedElement", "typeAnnotation": null, "loc": null, - "range": { - "start": 552, - "end": 566 - } + "range": [ + 552, + 566 + ] }, "init": { "type": "CallExpression", @@ -398,30 +398,30 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 569, - "end": 571 - } + "range": [ + 569, + 571 + ] }, "arguments": [], "loc": null, - "range": { - "start": 569, - "end": 573 - } + "range": [ + 569, + 573 + ] }, "loc": null, - "range": { - "start": 552, - "end": 573 - } + "range": [ + 552, + 573 + ] } ], "loc": null, - "range": { - "start": 546, - "end": 574 - } + "range": [ + 546, + 574 + ] }, { "type": "ExpressionStatement", @@ -432,10 +432,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 577, - "end": 583 - } + "range": [ + 577, + 583 + ] }, "arguments": [ { @@ -443,24 +443,24 @@ Output: "name": "aliasedElement", "typeAnnotation": null, "loc": null, - "range": { - "start": 584, - "end": 598 - } + "range": [ + 584, + 598 + ] } ], "loc": null, - "range": { - "start": 577, - "end": 599 - } + "range": [ + 577, + 599 + ] }, "directive": null, "loc": null, - "range": { - "start": 577, - "end": 600 - } + "range": [ + 577, + 600 + ] }, { "type": "ReturnStatement", @@ -469,42 +469,42 @@ Output: "name": "aliasedElement", "typeAnnotation": null, "loc": null, - "range": { - "start": 610, - "end": 624 - } + "range": [ + 610, + 624 + ] }, "loc": null, - "range": { - "start": 603, - "end": 625 - } + "range": [ + 603, + 625 + ] } ], "loc": null, - "range": { - "start": 398, - "end": 627 - } + "range": [ + 398, + 627 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 365, - "end": 627 - }, + "range": [ + 365, + 627 + ], "loc": null, - "range": { - "start": 365, - "end": 627 - } + "range": [ + 365, + 627 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 365, - "end": 627 - } + "range": [ + 365, + 627 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutate-shadowed-object.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutate-shadowed-object.js.snap index 087a01a2bf..941bc76d22 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutate-shadowed-object.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutate-shadowed-object.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -48,32 +48,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 35, - "end": 37 - } + "range": [ + 35, + 37 + ] }, "loc": null, - "range": { - "start": 31, - "end": 37 - } + "range": [ + 31, + 37 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 38 - } + "range": [ + 25, + 38 + ] }, { "type": "BlockStatement", @@ -89,32 +89,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 57, - "end": 59 - } + "range": [ + 57, + 59 + ] }, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 60 - } + "range": [ + 47, + 60 + ] }, { "type": "VariableDeclaration", @@ -127,10 +127,10 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 73 - } + "range": [ + 71, + 73 + ] }, "init": { "type": "FunctionExpression", @@ -148,10 +148,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 102 - } + "range": [ + 96, + 102 + ] }, "arguments": [ { @@ -159,57 +159,57 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 105 - } + "range": [ + 96, + 105 + ] }, "directive": null, "loc": null, - "range": { - "start": 96, - "end": 106 - } + "range": [ + 96, + 106 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 112 - } + "range": [ + 88, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 76, - "end": 112 - }, + "range": [ + 76, + 112 + ], "loc": null, - "range": { - "start": 76, - "end": 112 - } + "range": [ + 76, + 112 + ] }, "loc": null, - "range": { - "start": 71, - "end": 112 - } + "range": [ + 71, + 112 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 113 - } + "range": [ + 65, + 113 + ] }, { "type": "ExpressionStatement", @@ -220,31 +220,31 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 120 - } + "range": [ + 118, + 120 + ] }, "arguments": [], "loc": null, - "range": { - "start": 118, - "end": 122 - } + "range": [ + 118, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 118, - "end": 123 - } + "range": [ + 118, + 123 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 127 - } + "range": [ + 41, + 127 + ] }, { "type": "ReturnStatement", @@ -253,42 +253,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "loc": null, - "range": { - "start": 130, - "end": 139 - } + "range": [ + 130, + 139 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 161 - } + "range": [ + 21, + 161 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 161 - }, + "range": [ + 0, + 161 + ], "loc": null, - "range": { - "start": 0, - "end": 161 - } + "range": [ + 0, + 161 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 161 - } + "range": [ + 0, + 161 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutated-non-reactive-to-reactive.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutated-non-reactive-to-reactive.js.snap index b88b524ccd..379b5f169d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutated-non-reactive-to-reactive.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutated-non-reactive-to-reactive.js.snap @@ -24,10 +24,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 12 - } + "range": [ + 11, + 12 + ] } ], "body": { @@ -55,24 +55,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] }, "init": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "loc": null, - "range": { - "start": 18, - "end": 24 - } + "range": [ + 18, + 24 + ] }, { "type": "ExpressionStatement", @@ -95,10 +95,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "right": { "type": "ObjectExpression", @@ -110,85 +110,85 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "directive": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 54 - } + "range": [ + 34, + 54 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 28, - "end": 54 - }, + "range": [ + 28, + 54 + ], "expression": false, "loc": null, - "range": { - "start": 28, - "end": 54 - } + "range": [ + 28, + 54 + ] }, "arguments": [], "loc": null, - "range": { - "start": 27, - "end": 57 - } + "range": [ + 27, + 57 + ] }, "directive": null, "loc": null, - "range": { - "start": 27, - "end": 58 - } + "range": [ + 27, + 58 + ] }, { "type": "ReturnStatement", @@ -200,10 +200,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "attributes": [ { @@ -212,10 +212,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "value": { "type": "JSXExpressionContainer", @@ -224,70 +224,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "loc": null, - "range": { - "start": 75, - "end": 78 - } + "range": [ + 75, + 78 + ] }, "loc": null, - "range": { - "start": 73, - "end": 78 - } + "range": [ + 73, + 78 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 68, - "end": 81 - } + "range": [ + 68, + 81 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 68, - "end": 81 - } + "range": [ + 68, + 81 + ] }, "loc": null, - "range": { - "start": 61, - "end": 82 - } + "range": [ + 61, + 82 + ] } ], "loc": null, - "range": { - "start": 14, - "end": 84 - } + "range": [ + 14, + 84 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 84 - }, + "range": [ + 0, + 84 + ], "loc": null, - "range": { - "start": 0, - "end": 84 - } + "range": [ + 0, + 84 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 84 - } + "range": [ + 0, + 84 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutated-ref-non-reactive.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutated-ref-non-reactive.js.snap index a15e44fcd3..2a80d9d8f3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutated-ref-non-reactive.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-mutated-ref-non-reactive.js.snap @@ -25,10 +25,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 12 - } + "range": [ + 11, + 12 + ] } ], "body": { @@ -56,24 +56,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] }, "init": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "loc": null, - "range": { - "start": 18, - "end": 24 - } + "range": [ + 18, + 24 + ] }, { "type": "ExpressionStatement", @@ -96,67 +96,67 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 44, - "end": 46 - } + "range": [ + 44, + 46 + ] }, "loc": null, - "range": { - "start": 40, - "end": 46 - } + "range": [ + 40, + 46 + ] }, "directive": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 51 - } + "range": [ + 34, + 51 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 28, - "end": 51 - }, + "range": [ + 28, + 51 + ], "expression": false, "loc": null, - "range": { - "start": 28, - "end": 51 - } + "range": [ + 28, + 51 + ] }, "arguments": [], "loc": null, - "range": { - "start": 27, - "end": 54 - } + "range": [ + 27, + 54 + ] }, "directive": null, "loc": null, - "range": { - "start": 27, - "end": 55 - } + "range": [ + 27, + 55 + ] }, { "type": "ReturnStatement", @@ -168,10 +168,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 124, - "end": 127 - } + "range": [ + 124, + 127 + ] }, "attributes": [ { @@ -180,10 +180,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "value": { "type": "JSXExpressionContainer", @@ -192,70 +192,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 132 - } + "range": [ + 131, + 132 + ] }, "loc": null, - "range": { - "start": 130, - "end": 133 - } + "range": [ + 130, + 133 + ] }, "loc": null, - "range": { - "start": 128, - "end": 133 - } + "range": [ + 128, + 133 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 123, - "end": 136 - } + "range": [ + 123, + 136 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 123, - "end": 136 - } + "range": [ + 123, + 136 + ] }, "loc": null, - "range": { - "start": 116, - "end": 137 - } + "range": [ + 116, + 137 + ] } ], "loc": null, - "range": { - "start": 14, - "end": 139 - } + "range": [ + 14, + 139 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 139 - }, + "range": [ + 0, + 139 + ], "loc": null, - "range": { - "start": 0, - "end": 139 - } + "range": [ + 0, + 139 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 139 - } + "range": [ + 0, + 139 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-reassign-primitive.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-reassign-primitive.js.snap index 64b645a583..5fa0f56707 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-reassign-primitive.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-reassign-primitive.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 235, - "end": 244 - } + "range": [ + 235, + 244 + ] }, "params": [], "body": { @@ -51,32 +51,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 256 - } + "range": [ + 255, + 256 + ] }, "init": { "type": "NumericLiteral", "value": 40.0, "loc": null, - "range": { - "start": 259, - "end": 261 - } + "range": [ + 259, + 261 + ] }, "loc": null, - "range": { - "start": 255, - "end": 261 - } + "range": [ + 255, + 261 + ] } ], "loc": null, - "range": { - "start": 251, - "end": 262 - } + "range": [ + 251, + 262 + ] }, { "type": "VariableDeclaration", @@ -89,10 +89,10 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 272, - "end": 274 - } + "range": [ + 272, + 274 + ] }, "init": { "type": "FunctionExpression", @@ -111,10 +111,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 295, - "end": 296 - } + "range": [ + 295, + 296 + ] }, "right": { "type": "BinaryExpression", @@ -123,72 +123,72 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 299, - "end": 300 - } + "range": [ + 299, + 300 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 303, - "end": 304 - } + "range": [ + 303, + 304 + ] }, "loc": null, - "range": { - "start": 299, - "end": 304 - } + "range": [ + 299, + 304 + ] }, "loc": null, - "range": { - "start": 295, - "end": 304 - } + "range": [ + 295, + 304 + ] }, "directive": null, "loc": null, - "range": { - "start": 295, - "end": 305 - } + "range": [ + 295, + 305 + ] } ], "loc": null, - "range": { - "start": 289, - "end": 309 - } + "range": [ + 289, + 309 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 277, - "end": 309 - }, + "range": [ + 277, + 309 + ], "loc": null, - "range": { - "start": 277, - "end": 309 - } + "range": [ + 277, + 309 + ] }, "loc": null, - "range": { - "start": 272, - "end": 309 - } + "range": [ + 272, + 309 + ] } ], "loc": null, - "range": { - "start": 266, - "end": 310 - } + "range": [ + 266, + 310 + ] }, { "type": "ExpressionStatement", @@ -199,24 +199,24 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 313, - "end": 315 - } + "range": [ + 313, + 315 + ] }, "arguments": [], "loc": null, - "range": { - "start": 313, - "end": 317 - } + "range": [ + 313, + 317 + ] }, "directive": null, "loc": null, - "range": { - "start": 313, - "end": 318 - } + "range": [ + 313, + 318 + ] }, { "type": "ReturnStatement", @@ -225,42 +225,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 328, - "end": 329 - } + "range": [ + 328, + 329 + ] }, "loc": null, - "range": { - "start": 321, - "end": 330 - } + "range": [ + 321, + 330 + ] } ], "loc": null, - "range": { - "start": 247, - "end": 332 - } + "range": [ + 247, + 332 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 226, - "end": 332 - }, + "range": [ + 226, + 332 + ], "loc": null, - "range": { - "start": 226, - "end": 332 - } + "range": [ + 226, + 332 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 226, - "end": 332 - } + "range": [ + 226, + 332 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-reassign-shadowed-primitive.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-reassign-shadowed-primitive.js.snap index ff22a46068..b678c1ee62 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-reassign-shadowed-primitive.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-reassign-shadowed-primitive.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -48,32 +48,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 35, - "end": 37 - } + "range": [ + 35, + 37 + ] }, "loc": null, - "range": { - "start": 31, - "end": 37 - } + "range": [ + 31, + 37 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 38 - } + "range": [ + 25, + 38 + ] }, { "type": "BlockStatement", @@ -89,32 +89,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "init": { "type": "NumericLiteral", "value": 56.0, "loc": null, - "range": { - "start": 55, - "end": 57 - } + "range": [ + 55, + 57 + ] }, "loc": null, - "range": { - "start": 51, - "end": 57 - } + "range": [ + 51, + 57 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 58 - } + "range": [ + 47, + 58 + ] }, { "type": "VariableDeclaration", @@ -127,10 +127,10 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 71 - } + "range": [ + 69, + 71 + ] }, "init": { "type": "FunctionExpression", @@ -149,65 +149,65 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "right": { "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 98, - "end": 100 - } + "range": [ + 98, + 100 + ] }, "loc": null, - "range": { - "start": 94, - "end": 100 - } + "range": [ + 94, + 100 + ] }, "directive": null, "loc": null, - "range": { - "start": 94, - "end": 101 - } + "range": [ + 94, + 101 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 107 - } + "range": [ + 86, + 107 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 74, - "end": 107 - }, + "range": [ + 74, + 107 + ], "loc": null, - "range": { - "start": 74, - "end": 107 - } + "range": [ + 74, + 107 + ] }, "loc": null, - "range": { - "start": 69, - "end": 107 - } + "range": [ + 69, + 107 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 108 - } + "range": [ + 63, + 108 + ] }, { "type": "ExpressionStatement", @@ -218,31 +218,31 @@ Output: "name": "fn", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 115 - } + "range": [ + 113, + 115 + ] }, "arguments": [], "loc": null, - "range": { - "start": 113, - "end": 117 - } + "range": [ + 113, + 117 + ] }, "directive": null, "loc": null, - "range": { - "start": 113, - "end": 118 - } + "range": [ + 113, + 118 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 122 - } + "range": [ + 41, + 122 + ] }, { "type": "ReturnStatement", @@ -251,42 +251,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "loc": null, - "range": { - "start": 125, - "end": 134 - } + "range": [ + 125, + 134 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 156 - } + "range": [ + 21, + 156 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 156 - }, + "range": [ + 0, + 156 + ], "loc": null, - "range": { - "start": 0, - "end": 156 - } + "range": [ + 0, + 156 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 156 - } + "range": [ + 0, + 156 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-with-fbt.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-with-fbt.js.snap index ea22b29167..5449c3e8a2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-with-fbt.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@lambda-with-fbt.js.snap @@ -50,42 +50,42 @@ Output: "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "local": { "type": "Identifier", "name": "fbt", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] } ], "source": { "type": "StringLiteral", "value": "fbt", "loc": null, - "range": { - "start": 20, - "end": 25 - } + "range": [ + 20, + 25 + ] }, "loc": null, - "range": { - "start": 0, - "end": 26 - } + "range": [ + 0, + 26 + ] }, { "type": "FunctionDeclaration", @@ -94,10 +94,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 46 - } + "range": [ + 37, + 46 + ] }, "params": [], "body": { @@ -114,10 +114,10 @@ Output: "name": "buttonLabel", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 70 - } + "range": [ + 59, + 70 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -137,16 +137,16 @@ Output: "name": "someCondition", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 103 - } + "range": [ + 90, + 103 + ] }, "loc": null, - "range": { - "start": 89, - "end": 103 - } + "range": [ + 89, + 103 + ] }, "consequent": { "type": "BlockStatement", @@ -161,10 +161,10 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] }, "attributes": [ { @@ -173,34 +173,34 @@ Output: "type": "JSXIdentifier", "name": "desc", "loc": null, - "range": { - "start": 125, - "end": 129 - } + "range": [ + 125, + 129 + ] }, "value": { "type": "JSXStringLiteral", "value": "My label", "raw": "\"My label\"", "loc": null, - "range": { - "start": 130, - "end": 140 - } + "range": [ + 130, + 140 + ] }, "loc": null, - "range": { - "start": 125, - "end": 140 - } + "range": [ + 125, + 140 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 120, - "end": 141 - } + "range": [ + 120, + 141 + ] }, "children": [ { @@ -209,16 +209,16 @@ Output: "type": "StringLiteral", "value": "Purchase as a gift", "loc": null, - "range": { - "start": 142, - "end": 162 - } + "range": [ + 142, + 162 + ] }, "loc": null, - "range": { - "start": 141, - "end": 163 - } + "range": [ + 141, + 163 + ] } ], "closingElement": { @@ -227,35 +227,35 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 165, - "end": 168 - } + "range": [ + 165, + 168 + ] }, "loc": null, - "range": { - "start": 163, - "end": 169 - } + "range": [ + 163, + 169 + ] }, "loc": null, - "range": { - "start": 120, - "end": 169 - } + "range": [ + 120, + 169 + ] }, "loc": null, - "range": { - "start": 113, - "end": 170 - } + "range": [ + 113, + 170 + ] } ], "loc": null, - "range": { - "start": 105, - "end": 176 - } + "range": [ + 105, + 176 + ] }, "alternate": { "type": "IfStatement", @@ -274,32 +274,32 @@ Output: "name": "iconOnly", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 202 - } + "range": [ + 194, + 202 + ] }, "loc": null, - "range": { - "start": 193, - "end": 202 - } + "range": [ + 193, + 202 + ] }, "right": { "type": "Identifier", "name": "showPrice", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 221 - } + "range": [ + 212, + 221 + ] }, "loc": null, - "range": { - "start": 193, - "end": 221 - } + "range": [ + 193, + 221 + ] }, "right": { "type": "BinaryExpression", @@ -314,85 +314,85 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 231, - "end": 235 - } + "range": [ + 231, + 235 + ] }, "property": { "type": "Identifier", "name": "current_gift_offer", "typeAnnotation": null, "loc": null, - "range": { - "start": 237, - "end": 255 - } + "range": [ + 237, + 255 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 231, - "end": 255 - } + "range": [ + 231, + 255 + ] }, "property": { "type": "Identifier", "name": "price", "typeAnnotation": null, "loc": null, - "range": { - "start": 257, - "end": 262 - } + "range": [ + 257, + 262 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 231, - "end": 262 - } + "range": [ + 231, + 262 + ] }, "property": { "type": "Identifier", "name": "formatted", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 273 - } + "range": [ + 264, + 273 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 231, - "end": 273 - } + "range": [ + 231, + 273 + ] }, "operator": "!=", "right": { "type": "NullLiteral", "loc": null, - "range": { - "start": 277, - "end": 281 - } + "range": [ + 277, + 281 + ] }, "loc": null, - "range": { - "start": 231, - "end": 281 - } + "range": [ + 231, + 281 + ] }, "loc": null, - "range": { - "start": 193, - "end": 281 - } + "range": [ + 193, + 281 + ] }, "consequent": { "type": "BlockStatement", @@ -407,10 +407,10 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 314, - "end": 317 - } + "range": [ + 314, + 317 + ] }, "attributes": [ { @@ -419,34 +419,34 @@ Output: "type": "JSXIdentifier", "name": "desc", "loc": null, - "range": { - "start": 318, - "end": 322 - } + "range": [ + 318, + 322 + ] }, "value": { "type": "JSXStringLiteral", "value": "Gift button's label", "raw": "\"Gift button's label\"", "loc": null, - "range": { - "start": 323, - "end": 344 - } + "range": [ + 323, + 344 + ] }, "loc": null, - "range": { - "start": 318, - "end": 344 - } + "range": [ + 318, + 344 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 313, - "end": 345 - } + "range": [ + 313, + 345 + ] }, "children": [ { @@ -454,10 +454,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 345, - "end": 356 - } + "range": [ + 345, + 356 + ] }, { "type": "JSXExpressionContainer", @@ -465,26 +465,26 @@ Output: "type": "StringLiteral", "value": "Gift | ", "loc": null, - "range": { - "start": 357, - "end": 366 - } + "range": [ + 357, + 366 + ] }, "loc": null, - "range": { - "start": 356, - "end": 367 - } + "range": [ + 356, + 367 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 367, - "end": 378 - } + "range": [ + 367, + 378 + ] }, { "type": "JSXElement", @@ -496,25 +496,25 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 379, - "end": 382 - } + "range": [ + 379, + 382 + ] }, "name": { "type": "JSXIdentifier", "name": "param", "loc": null, - "range": { - "start": 383, - "end": 388 - } + "range": [ + 383, + 388 + ] }, "loc": null, - "range": { - "start": 379, - "end": 388 - } + "range": [ + 379, + 388 + ] }, "attributes": [ { @@ -523,34 +523,34 @@ Output: "type": "JSXIdentifier", "name": "name", "loc": null, - "range": { - "start": 389, - "end": 393 - } + "range": [ + 389, + 393 + ] }, "value": { "type": "JSXStringLiteral", "value": "price", "raw": "\"price\"", "loc": null, - "range": { - "start": 394, - "end": 401 - } + "range": [ + 394, + 401 + ] }, "loc": null, - "range": { - "start": 389, - "end": 401 - } + "range": [ + 389, + 401 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 378, - "end": 402 - } + "range": [ + 378, + 402 + ] }, "children": [ { @@ -558,10 +558,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 402, - "end": 415 - } + "range": [ + 402, + 415 + ] }, { "type": "JSXExpressionContainer", @@ -576,80 +576,80 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 416, - "end": 420 - } + "range": [ + 416, + 420 + ] }, "property": { "type": "Identifier", "name": "current_gift_offer", "typeAnnotation": null, "loc": null, - "range": { - "start": 422, - "end": 440 - } + "range": [ + 422, + 440 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 416, - "end": 440 - } + "range": [ + 416, + 440 + ] }, "property": { "type": "Identifier", "name": "price", "typeAnnotation": null, "loc": null, - "range": { - "start": 442, - "end": 447 - } + "range": [ + 442, + 447 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 416, - "end": 447 - } + "range": [ + 416, + 447 + ] }, "property": { "type": "Identifier", "name": "formatted", "typeAnnotation": null, "loc": null, - "range": { - "start": 449, - "end": 458 - } + "range": [ + 449, + 458 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 416, - "end": 458 - } + "range": [ + 416, + 458 + ] }, "loc": null, - "range": { - "start": 415, - "end": 459 - } + "range": [ + 415, + 459 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 459, - "end": 470 - } + "range": [ + 459, + 470 + ] } ], "closingElement": { @@ -660,47 +660,47 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 472, - "end": 475 - } + "range": [ + 472, + 475 + ] }, "name": { "type": "JSXIdentifier", "name": "param", "loc": null, - "range": { - "start": 476, - "end": 481 - } + "range": [ + 476, + 481 + ] }, "loc": null, - "range": { - "start": 472, - "end": 481 - } + "range": [ + 472, + 481 + ] }, "loc": null, - "range": { - "start": 470, - "end": 482 - } + "range": [ + 470, + 482 + ] }, "loc": null, - "range": { - "start": 378, - "end": 482 - } + "range": [ + 378, + 482 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 482, - "end": 491 - } + "range": [ + 482, + 491 + ] } ], "closingElement": { @@ -709,35 +709,35 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 493, - "end": 496 - } + "range": [ + 493, + 496 + ] }, "loc": null, - "range": { - "start": 491, - "end": 497 - } + "range": [ + 491, + 497 + ] }, "loc": null, - "range": { - "start": 313, - "end": 497 - } + "range": [ + 313, + 497 + ] }, "loc": null, - "range": { - "start": 296, - "end": 506 - } + "range": [ + 296, + 506 + ] } ], "loc": null, - "range": { - "start": 288, - "end": 512 - } + "range": [ + 288, + 512 + ] }, "alternate": { "type": "IfStatement", @@ -753,16 +753,16 @@ Output: "name": "iconOnly", "typeAnnotation": null, "loc": null, - "range": { - "start": 523, - "end": 531 - } + "range": [ + 523, + 531 + ] }, "loc": null, - "range": { - "start": 522, - "end": 531 - } + "range": [ + 522, + 531 + ] }, "right": { "type": "UnaryExpression", @@ -773,22 +773,22 @@ Output: "name": "showPrice", "typeAnnotation": null, "loc": null, - "range": { - "start": 536, - "end": 545 - } + "range": [ + 536, + 545 + ] }, "loc": null, - "range": { - "start": 535, - "end": 545 - } + "range": [ + 535, + 545 + ] }, "loc": null, - "range": { - "start": 522, - "end": 545 - } + "range": [ + 522, + 545 + ] }, "consequent": { "type": "BlockStatement", @@ -803,10 +803,10 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 563, - "end": 566 - } + "range": [ + 563, + 566 + ] }, "attributes": [ { @@ -815,34 +815,34 @@ Output: "type": "JSXIdentifier", "name": "desc", "loc": null, - "range": { - "start": 567, - "end": 571 - } + "range": [ + 567, + 571 + ] }, "value": { "type": "JSXStringLiteral", "value": "Gift button's label", "raw": "\"Gift button's label\"", "loc": null, - "range": { - "start": 572, - "end": 593 - } + "range": [ + 572, + 593 + ] }, "loc": null, - "range": { - "start": 567, - "end": 593 - } + "range": [ + 567, + 593 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 562, - "end": 594 - } + "range": [ + 562, + 594 + ] }, "children": [ { @@ -851,16 +851,16 @@ Output: "type": "StringLiteral", "value": "Gift", "loc": null, - "range": { - "start": 595, - "end": 601 - } + "range": [ + 595, + 601 + ] }, "loc": null, - "range": { - "start": 594, - "end": 602 - } + "range": [ + 594, + 602 + ] } ], "closingElement": { @@ -869,88 +869,88 @@ Output: "type": "JSXIdentifier", "name": "fbt", "loc": null, - "range": { - "start": 604, - "end": 607 - } + "range": [ + 604, + 607 + ] }, "loc": null, - "range": { - "start": 602, - "end": 608 - } + "range": [ + 602, + 608 + ] }, "loc": null, - "range": { - "start": 562, - "end": 608 - } + "range": [ + 562, + 608 + ] }, "loc": null, - "range": { - "start": 555, - "end": 609 - } + "range": [ + 555, + 609 + ] } ], "loc": null, - "range": { - "start": 547, - "end": 615 - } + "range": [ + 547, + 615 + ] }, "alternate": null, "loc": null, - "range": { - "start": 518, - "end": 615 - } + "range": [ + 518, + 615 + ] }, "loc": null, - "range": { - "start": 182, - "end": 615 - } + "range": [ + 182, + 615 + ] }, "loc": null, - "range": { - "start": 85, - "end": 615 - } + "range": [ + 85, + 615 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 619 - } + "range": [ + 79, + 619 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 73, - "end": 619 - }, + "range": [ + 73, + 619 + ], "expression": false, "loc": null, - "range": { - "start": 73, - "end": 619 - } + "range": [ + 73, + 619 + ] }, "loc": null, - "range": { - "start": 59, - "end": 619 - } + "range": [ + 59, + 619 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 620 - } + "range": [ + 53, + 620 + ] }, { "type": "ReturnStatement", @@ -962,18 +962,18 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 638, - "end": 642 - } + "range": [ + 638, + 642 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 637, - "end": 643 - } + "range": [ + 637, + 643 + ] }, "children": [ { @@ -981,10 +981,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 643, - "end": 650 - } + "range": [ + 643, + 650 + ] }, { "type": "JSXElement", @@ -994,10 +994,10 @@ Output: "type": "JSXIdentifier", "name": "Button", "loc": null, - "range": { - "start": 651, - "end": 657 - } + "range": [ + 651, + 657 + ] }, "attributes": [ { @@ -1006,10 +1006,10 @@ Output: "type": "JSXIdentifier", "name": "text", "loc": null, - "range": { - "start": 658, - "end": 662 - } + "range": [ + 658, + 662 + ] }, "value": { "type": "JSXExpressionContainer", @@ -1020,55 +1020,55 @@ Output: "name": "buttonLabel", "typeAnnotation": null, "loc": null, - "range": { - "start": 664, - "end": 675 - } + "range": [ + 664, + 675 + ] }, "arguments": [], "loc": null, - "range": { - "start": 664, - "end": 677 - } + "range": [ + 664, + 677 + ] }, "loc": null, - "range": { - "start": 663, - "end": 678 - } + "range": [ + 663, + 678 + ] }, "loc": null, - "range": { - "start": 658, - "end": 678 - } + "range": [ + 658, + 678 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 650, - "end": 681 - } + "range": [ + 650, + 681 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 650, - "end": 681 - } + "range": [ + 650, + 681 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 681, - "end": 686 - } + "range": [ + 681, + 686 + ] } ], "closingElement": { @@ -1077,54 +1077,54 @@ Output: "type": "JSXIdentifier", "name": "View", "loc": null, - "range": { - "start": 688, - "end": 692 - } + "range": [ + 688, + 692 + ] }, "loc": null, - "range": { - "start": 686, - "end": 693 - } + "range": [ + 686, + 693 + ] }, "loc": null, - "range": { - "start": 637, - "end": 693 - } + "range": [ + 637, + 693 + ] }, "loc": null, - "range": { - "start": 624, - "end": 698 - } + "range": [ + 624, + 698 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 700 - } + "range": [ + 49, + 700 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 28, - "end": 700 - }, + "range": [ + 28, + 700 + ], "loc": null, - "range": { - "start": 28, - "end": 700 - } + "range": [ + 28, + 700 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 700 - } + "range": [ + 0, + 700 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@logical-expression-object.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@logical-expression-object.js.snap index 5f4750bf8e..c169167bb5 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@logical-expression-object.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@logical-expression-object.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 422, - "end": 423 - } + "range": [ + 422, + 423 + ] }, "init": { "type": "LogicalExpression", @@ -73,27 +73,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 426, - "end": 431 - } + "range": [ + 426, + 431 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 432, - "end": 433 - } + "range": [ + 432, + 433 + ] }, "computed": false, "loc": null, - "range": { - "start": 426, - "end": 433 - } + "range": [ + 426, + 433 + ] }, "right": { "type": "LogicalExpression", @@ -108,27 +108,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 438, - "end": 443 - } + "range": [ + 438, + 443 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 444, - "end": 445 - } + "range": [ + 444, + 445 + ] }, "computed": false, "loc": null, - "range": { - "start": 438, - "end": 445 - } + "range": [ + 438, + 445 + ] }, "right": { "type": "MemberExpression", @@ -137,33 +137,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 449, - "end": 454 - } + "range": [ + 449, + 454 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 455, - "end": 456 - } + "range": [ + 455, + 456 + ] }, "computed": false, "loc": null, - "range": { - "start": 449, - "end": 456 - } + "range": [ + 449, + 456 + ] }, "loc": null, - "range": { - "start": 438, - "end": 456 - } + "range": [ + 438, + 456 + ] }, "right": { "type": "MemberExpression", @@ -172,52 +172,52 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 460, - "end": 465 - } + "range": [ + 460, + 465 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 466, - "end": 467 - } + "range": [ + 466, + 467 + ] }, "computed": false, "loc": null, - "range": { - "start": 460, - "end": 467 - } + "range": [ + 460, + 467 + ] }, "loc": null, - "range": { - "start": 438, - "end": 467 - } + "range": [ + 438, + 467 + ] }, "loc": null, - "range": { - "start": 426, - "end": 468 - } + "range": [ + 426, + 468 + ] }, "loc": null, - "range": { - "start": 422, - "end": 468 - } + "range": [ + 422, + 468 + ] } ], "loc": null, - "range": { - "start": 418, - "end": 469 - } + "range": [ + 418, + 469 + ] }, { "type": "VariableDeclaration", @@ -230,10 +230,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 476, - "end": 477 - } + "range": [ + 476, + 477 + ] }, "init": { "type": "LogicalExpression", @@ -251,27 +251,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 481, - "end": 486 - } + "range": [ + 481, + 486 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 487, - "end": 488 - } + "range": [ + 487, + 488 + ] }, "computed": false, "loc": null, - "range": { - "start": 481, - "end": 488 - } + "range": [ + 481, + 488 + ] }, "right": { "type": "MemberExpression", @@ -280,33 +280,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 492, - "end": 497 - } + "range": [ + 492, + 497 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 498, - "end": 499 - } + "range": [ + 498, + 499 + ] }, "computed": false, "loc": null, - "range": { - "start": 492, - "end": 499 - } + "range": [ + 492, + 499 + ] }, "loc": null, - "range": { - "start": 481, - "end": 499 - } + "range": [ + 481, + 499 + ] }, "right": { "type": "MemberExpression", @@ -315,33 +315,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 503, - "end": 508 - } + "range": [ + 503, + 508 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 509, - "end": 510 - } + "range": [ + 509, + 510 + ] }, "computed": false, "loc": null, - "range": { - "start": 503, - "end": 510 - } + "range": [ + 503, + 510 + ] }, "loc": null, - "range": { - "start": 481, - "end": 510 - } + "range": [ + 481, + 510 + ] }, "right": { "type": "MemberExpression", @@ -350,46 +350,46 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 515, - "end": 520 - } + "range": [ + 515, + 520 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 521, - "end": 522 - } + "range": [ + 521, + 522 + ] }, "computed": false, "loc": null, - "range": { - "start": 515, - "end": 522 - } + "range": [ + 515, + 522 + ] }, "loc": null, - "range": { - "start": 480, - "end": 522 - } + "range": [ + 480, + 522 + ] }, "loc": null, - "range": { - "start": 476, - "end": 522 - } + "range": [ + 476, + 522 + ] } ], "loc": null, - "range": { - "start": 472, - "end": 523 - } + "range": [ + 472, + 523 + ] }, { "type": "ReturnStatement", @@ -403,30 +403,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 535, - "end": 536 - } + "range": [ + 535, + 536 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 535, - "end": 536 - } + "range": [ + 535, + 536 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 535, - "end": 536 - } + "range": [ + 535, + 536 + ] }, { "type": "Property", @@ -435,69 +435,69 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 538, - "end": 539 - } + "range": [ + 538, + 539 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 538, - "end": 539 - } + "range": [ + 538, + 539 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 538, - "end": 539 - } + "range": [ + 538, + 539 + ] } ], "loc": null, - "range": { - "start": 533, - "end": 541 - } + "range": [ + 533, + 541 + ] }, "loc": null, - "range": { - "start": 526, - "end": 542 - } + "range": [ + 526, + 542 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 544 - } + "range": [ + 26, + 544 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 544 - }, + "range": [ + 0, + 544 + ], "loc": null, - "range": { - "start": 0, - "end": 544 - } + "range": [ + 0, + 544 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 544 - } + "range": [ + 0, + 544 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@logical-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@logical-expression.js.snap index 271a953ab6..2ef745709c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@logical-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@logical-expression.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "LogicalExpression", @@ -68,27 +68,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 45 - } + "range": [ + 38, + 45 + ] }, "right": { "type": "LogicalExpression", @@ -103,27 +103,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 50, - "end": 57 - } + "range": [ + 50, + 57 + ] }, "right": { "type": "MemberExpression", @@ -132,33 +132,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 68 - } + "range": [ + 61, + 68 + ] }, "loc": null, - "range": { - "start": 50, - "end": 68 - } + "range": [ + 50, + 68 + ] }, "right": { "type": "MemberExpression", @@ -167,52 +167,52 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 77 - } + "range": [ + 72, + 77 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 72, - "end": 79 - } + "range": [ + 72, + 79 + ] }, "loc": null, - "range": { - "start": 50, - "end": 79 - } + "range": [ + 50, + 79 + ] }, "loc": null, - "range": { - "start": 38, - "end": 80 - } + "range": [ + 38, + 80 + ] }, "loc": null, - "range": { - "start": 34, - "end": 80 - } + "range": [ + 34, + 80 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 81 - } + "range": [ + 30, + 81 + ] }, { "type": "VariableDeclaration", @@ -225,10 +225,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "init": { "type": "LogicalExpression", @@ -246,27 +246,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 98 - } + "range": [ + 93, + 98 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "computed": false, "loc": null, - "range": { - "start": 93, - "end": 100 - } + "range": [ + 93, + 100 + ] }, "right": { "type": "MemberExpression", @@ -275,33 +275,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 109 - } + "range": [ + 104, + 109 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "computed": false, "loc": null, - "range": { - "start": 104, - "end": 111 - } + "range": [ + 104, + 111 + ] }, "loc": null, - "range": { - "start": 93, - "end": 111 - } + "range": [ + 93, + 111 + ] }, "right": { "type": "MemberExpression", @@ -310,33 +310,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 122 - } + "range": [ + 115, + 122 + ] }, "loc": null, - "range": { - "start": 93, - "end": 122 - } + "range": [ + 93, + 122 + ] }, "right": { "type": "MemberExpression", @@ -345,46 +345,46 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 132 - } + "range": [ + 127, + 132 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "computed": false, "loc": null, - "range": { - "start": 127, - "end": 134 - } + "range": [ + 127, + 134 + ] }, "loc": null, - "range": { - "start": 92, - "end": 134 - } + "range": [ + 92, + 134 + ] }, "loc": null, - "range": { - "start": 88, - "end": 134 - } + "range": [ + 88, + 134 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 135 - } + "range": [ + 84, + 135 + ] }, { "type": "ReturnStatement", @@ -395,10 +395,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "alternate": { "type": "MemberExpression", @@ -407,75 +407,75 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 158 - } + "range": [ + 153, + 158 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "computed": false, "loc": null, - "range": { - "start": 153, - "end": 160 - } + "range": [ + 153, + 160 + ] }, "consequent": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 150 - } + "range": [ + 149, + 150 + ] }, "loc": null, - "range": { - "start": 145, - "end": 160 - } + "range": [ + 145, + 160 + ] }, "loc": null, - "range": { - "start": 138, - "end": 161 - } + "range": [ + 138, + 161 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 163 - } + "range": [ + 26, + 163 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 163 - }, + "range": [ + 0, + 163 + ], "loc": null, - "range": { - "start": 0, - "end": 163 - } + "range": [ + 0, + 163 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 163 - } + "range": [ + 0, + 163 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call-computed.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call-computed.js.snap index 66c736a2a9..b534e9540f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call-computed.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call-computed.js.snap @@ -30,10 +30,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -41,30 +41,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -81,10 +81,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "init": { "type": "CallExpression", @@ -93,10 +93,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 77 - } + "range": [ + 67, + 77 + ] }, "arguments": [ { @@ -104,30 +104,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 80 - } + "range": [ + 67, + 80 + ] }, "loc": null, - "range": { - "start": 63, - "end": 80 - } + "range": [ + 63, + 80 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 81 - } + "range": [ + 57, + 81 + ] }, { "type": "VariableDeclaration", @@ -140,10 +140,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "init": { "type": "CallExpression", @@ -152,10 +152,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 104 - } + "range": [ + 94, + 104 + ] }, "arguments": [ { @@ -163,30 +163,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] } ], "loc": null, - "range": { - "start": 94, - "end": 107 - } + "range": [ + 94, + 107 + ] }, "loc": null, - "range": { - "start": 90, - "end": 107 - } + "range": [ + 90, + 107 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 108 - } + "range": [ + 84, + 108 + ] }, { "type": "ExpressionStatement", @@ -198,18 +198,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 112, - "end": 115 - } + "range": [ + 112, + 115 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] }, "children": [ { @@ -217,10 +217,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 116, - "end": 121 - } + "range": [ + 116, + 121 + ] }, { "type": "JSXExpressionContainer", @@ -229,26 +229,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 124, - "end": 129 - } + "range": [ + 124, + 129 + ] }, { "type": "JSXExpressionContainer", @@ -257,26 +257,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "loc": null, - "range": { - "start": 129, - "end": 132 - } + "range": [ + 129, + 132 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 132, - "end": 135 - } + "range": [ + 132, + 135 + ] } ], "closingElement": { @@ -285,29 +285,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 137, - "end": 140 - } + "range": [ + 137, + 140 + ] }, "loc": null, - "range": { - "start": 135, - "end": 141 - } + "range": [ + 135, + 141 + ] }, "loc": null, - "range": { - "start": 111, - "end": 141 - } + "range": [ + 111, + 141 + ] }, "directive": null, "loc": null, - "range": { - "start": 111, - "end": 142 - } + "range": [ + 111, + 142 + ] }, { "type": "VariableDeclaration", @@ -320,10 +320,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] }, "init": { "type": "CallExpression", @@ -334,10 +334,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 206 - } + "range": [ + 205, + 206 + ] }, "property": { "type": "MemberExpression", @@ -346,34 +346,34 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 208 - } + "range": [ + 207, + 208 + ] }, "property": { "type": "Identifier", "name": "method", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 215 - } + "range": [ + 209, + 215 + ] }, "computed": false, "loc": null, - "range": { - "start": 207, - "end": 215 - } + "range": [ + 207, + 215 + ] }, "computed": true, "loc": null, - "range": { - "start": 205, - "end": 216 - } + "range": [ + 205, + 216 + ] }, "arguments": [ { @@ -381,30 +381,30 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 217, - "end": 218 - } + "range": [ + 217, + 218 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 219 - } + "range": [ + 205, + 219 + ] }, "loc": null, - "range": { - "start": 201, - "end": 219 - } + "range": [ + 201, + 219 + ] } ], "loc": null, - "range": { - "start": 195, - "end": 220 - } + "range": [ + 195, + 220 + ] }, { "type": "ReturnStatement", @@ -413,42 +413,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 230, - "end": 231 - } + "range": [ + 230, + 231 + ] }, "loc": null, - "range": { - "start": 223, - "end": 232 - } + "range": [ + 223, + 232 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 234 - } + "range": [ + 22, + 234 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 234 - }, + "range": [ + 0, + 234 + ], "loc": null, - "range": { - "start": 0, - "end": 234 - } + "range": [ + 0, + 234 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 234 - } + "range": [ + 0, + 234 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call-fn-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call-fn-call.js.snap index 95529bad4b..6ef608be65 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call-fn-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call-fn-call.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,30 +38,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -78,10 +78,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "init": { "type": "CallExpression", @@ -90,10 +90,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] }, "arguments": [ { @@ -101,30 +101,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 77 - } + "range": [ + 64, + 77 + ] }, "loc": null, - "range": { - "start": 60, - "end": 77 - } + "range": [ + 60, + 77 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 78 - } + "range": [ + 54, + 78 + ] }, { "type": "ExpressionStatement", @@ -136,18 +136,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "children": [ { @@ -157,16 +157,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "loc": null, - "range": { - "start": 86, - "end": 89 - } + "range": [ + 86, + 89 + ] } ], "closingElement": { @@ -175,29 +175,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 91, - "end": 94 - } + "range": [ + 91, + 94 + ] }, "loc": null, - "range": { - "start": 89, - "end": 95 - } + "range": [ + 89, + 95 + ] }, "loc": null, - "range": { - "start": 81, - "end": 95 - } + "range": [ + 81, + 95 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 96 - } + "range": [ + 81, + 96 + ] }, { "type": "VariableDeclaration", @@ -210,10 +210,10 @@ Output: "name": "method", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 148 - } + "range": [ + 142, + 148 + ] }, "init": { "type": "MemberExpression", @@ -222,40 +222,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] }, "property": { "type": "Identifier", "name": "method", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 159 - } + "range": [ + 153, + 159 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 159 - } + "range": [ + 151, + 159 + ] }, "loc": null, - "range": { - "start": 142, - "end": 159 - } + "range": [ + 142, + 159 + ] } ], "loc": null, - "range": { - "start": 136, - "end": 160 - } + "range": [ + 136, + 160 + ] }, { "type": "VariableDeclaration", @@ -268,10 +268,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 170 - } + "range": [ + 169, + 170 + ] }, "init": { "type": "CallExpression", @@ -282,27 +282,27 @@ Output: "name": "method", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 179 - } + "range": [ + 173, + 179 + ] }, "property": { "type": "Identifier", "name": "call", "typeAnnotation": null, "loc": null, - "range": { - "start": 180, - "end": 184 - } + "range": [ + 180, + 184 + ] }, "computed": false, "loc": null, - "range": { - "start": 173, - "end": 184 - } + "range": [ + 173, + 184 + ] }, "arguments": [ { @@ -310,40 +310,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 189 - } + "range": [ + 188, + 189 + ] } ], "loc": null, - "range": { - "start": 173, - "end": 190 - } + "range": [ + 173, + 190 + ] }, "loc": null, - "range": { - "start": 169, - "end": 190 - } + "range": [ + 169, + 190 + ] } ], "loc": null, - "range": { - "start": 163, - "end": 191 - } + "range": [ + 163, + 191 + ] }, { "type": "ReturnStatement", @@ -352,42 +352,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] }, "loc": null, - "range": { - "start": 194, - "end": 203 - } + "range": [ + 194, + 203 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 205 - } + "range": [ + 22, + 205 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 205 - }, + "range": [ + 0, + 205 + ], "loc": null, - "range": { - "start": 0, - "end": 205 - } + "range": [ + 0, + 205 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 205 - } + "range": [ + 0, + 205 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call.js.snap index 3968aec50a..7e9349a3cf 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@method-call.js.snap @@ -26,10 +26,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -37,30 +37,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -77,10 +77,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "init": { "type": "CallExpression", @@ -89,10 +89,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] }, "arguments": [ { @@ -100,30 +100,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 77 - } + "range": [ + 64, + 77 + ] }, "loc": null, - "range": { - "start": 60, - "end": 77 - } + "range": [ + 60, + 77 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 78 - } + "range": [ + 54, + 78 + ] }, { "type": "ExpressionStatement", @@ -135,18 +135,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "children": [ { @@ -156,16 +156,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "loc": null, - "range": { - "start": 86, - "end": 89 - } + "range": [ + 86, + 89 + ] } ], "closingElement": { @@ -174,29 +174,29 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 91, - "end": 94 - } + "range": [ + 91, + 94 + ] }, "loc": null, - "range": { - "start": 89, - "end": 95 - } + "range": [ + 89, + 95 + ] }, "loc": null, - "range": { - "start": 81, - "end": 95 - } + "range": [ + 81, + 95 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 96 - } + "range": [ + 81, + 96 + ] }, { "type": "VariableDeclaration", @@ -209,10 +209,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "init": { "type": "CallExpression", @@ -223,27 +223,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 147 - } + "range": [ + 146, + 147 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 151 - } + "range": [ + 148, + 151 + ] }, "computed": false, "loc": null, - "range": { - "start": 146, - "end": 151 - } + "range": [ + 146, + 151 + ] }, "arguments": [ { @@ -251,30 +251,30 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] } ], "loc": null, - "range": { - "start": 146, - "end": 154 - } + "range": [ + 146, + 154 + ] }, "loc": null, - "range": { - "start": 142, - "end": 154 - } + "range": [ + 142, + 154 + ] } ], "loc": null, - "range": { - "start": 136, - "end": 155 - } + "range": [ + 136, + 155 + ] }, { "type": "ReturnStatement", @@ -283,42 +283,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 166 - } + "range": [ + 165, + 166 + ] }, "loc": null, - "range": { - "start": 158, - "end": 167 - } + "range": [ + 158, + 167 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 169 - } + "range": [ + 22, + 169 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 169 - }, + "range": [ + 0, + 169 + ], "loc": null, - "range": { - "start": 0, - "end": 169 - } + "range": [ + 0, + 169 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 169 - } + "range": [ + 0, + 169 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@multi-arrow-expr-export-gating-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@multi-arrow-expr-export-gating-test.js.snap index 9ea317abc4..d1b8cbd290 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@multi-arrow-expr-export-gating-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@multi-arrow-expr-export-gating-test.js.snap @@ -30,10 +30,10 @@ Output: "name": "ErrorView", "typeAnnotation": null, "loc": null, - "range": { - "start": 17, - "end": 26 - } + "range": [ + 17, + 26 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -44,20 +44,20 @@ Output: "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] }, { "type": "Identifier", "name": "_retry", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 43 - } + "range": [ + 37, + 43 + ] } ], "body": { @@ -68,10 +68,10 @@ Output: "type": "JSXIdentifier", "name": "MessageBox", "loc": null, - "range": { - "start": 49, - "end": 59 - } + "range": [ + 49, + 59 + ] }, "attributes": [ { @@ -80,10 +80,10 @@ Output: "type": "JSXIdentifier", "name": "error", "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "value": { "type": "JSXExpressionContainer", @@ -92,30 +92,30 @@ Output: "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] }, "loc": null, - "range": { - "start": 60, - "end": 73 - } + "range": [ + 60, + 73 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 48, - "end": 74 - } + "range": [ + 48, + 74 + ] }, "children": [], "closingElement": { @@ -124,49 +124,49 @@ Output: "type": "JSXIdentifier", "name": "MessageBox", "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, "loc": null, - "range": { - "start": 74, - "end": 87 - } + "range": [ + 74, + 87 + ] }, "loc": null, - "range": { - "start": 48, - "end": 87 - } + "range": [ + 48, + 87 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 29, - "end": 87 - }, + "range": [ + 29, + 87 + ], "expression": true, "loc": null, - "range": { - "start": 29, - "end": 87 - } + "range": [ + 29, + 87 + ] }, "loc": null, - "range": { - "start": 17, - "end": 87 - } + "range": [ + 17, + 87 + ] } ], "loc": null, - "range": { - "start": 11, - "end": 88 - } + "range": [ + 11, + 88 + ] }, { "type": "ExportNamedDeclaration", @@ -181,10 +181,10 @@ Output: "name": "Renderer", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 111 - } + "range": [ + 103, + 111 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -195,10 +195,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] } ], "body": { @@ -209,18 +209,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 130, - "end": 133 - } + "range": [ + 130, + 133 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 129, - "end": 134 - } + "range": [ + 129, + 134 + ] }, "children": [ { @@ -228,10 +228,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 134, - "end": 139 - } + "range": [ + 134, + 139 + ] }, { "type": "JSXElement", @@ -241,18 +241,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 140, - "end": 143 - } + "range": [ + 140, + 143 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 139, - "end": 144 - } + "range": [ + 139, + 144 + ] }, "children": [], "closingElement": { @@ -261,32 +261,32 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 146, - "end": 149 - } + "range": [ + 146, + 149 + ] }, "loc": null, - "range": { - "start": 144, - "end": 150 - } + "range": [ + 144, + 150 + ] }, "loc": null, - "range": { - "start": 139, - "end": 150 - } + "range": [ + 139, + 150 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 150, - "end": 155 - } + "range": [ + 150, + 155 + ] }, { "type": "JSXElement", @@ -296,18 +296,18 @@ Output: "type": "JSXIdentifier", "name": "ErrorView", "loc": null, - "range": { - "start": 156, - "end": 165 - } + "range": [ + 156, + 165 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 155, - "end": 166 - } + "range": [ + 155, + 166 + ] }, "children": [], "closingElement": { @@ -316,32 +316,32 @@ Output: "type": "JSXIdentifier", "name": "ErrorView", "loc": null, - "range": { - "start": 168, - "end": 177 - } + "range": [ + 168, + 177 + ] }, "loc": null, - "range": { - "start": 166, - "end": 178 - } + "range": [ + 166, + 178 + ] }, "loc": null, - "range": { - "start": 155, - "end": 178 - } + "range": [ + 155, + 178 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 178, - "end": 181 - } + "range": [ + 178, + 181 + ] } ], "closingElement": { @@ -350,63 +350,63 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 183, - "end": 186 - } + "range": [ + 183, + 186 + ] }, "loc": null, - "range": { - "start": 181, - "end": 187 - } + "range": [ + 181, + 187 + ] }, "loc": null, - "range": { - "start": 129, - "end": 187 - } + "range": [ + 129, + 187 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 114, - "end": 189 - }, + "range": [ + 114, + 189 + ], "expression": true, "loc": null, - "range": { - "start": 114, - "end": 189 - } + "range": [ + 114, + 189 + ] }, "loc": null, - "range": { - "start": 103, - "end": 189 - } + "range": [ + 103, + 189 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 190 - } + "range": [ + 97, + 190 + ] }, "specifiers": [], "source": null, "loc": null, - "range": { - "start": 90, - "end": 190 - } + "range": [ + 90, + 190 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 11, - "end": 190 - } + "range": [ + 11, + 190 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@multi-arrow-expr-gating-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@multi-arrow-expr-gating-test.js.snap index aba2bcbbe2..1268ed3fa6 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@multi-arrow-expr-gating-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@multi-arrow-expr-gating-test.js.snap @@ -32,10 +32,10 @@ Output: "name": "ErrorView", "typeAnnotation": null, "loc": null, - "range": { - "start": 17, - "end": 26 - } + "range": [ + 17, + 26 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -46,20 +46,20 @@ Output: "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] }, { "type": "Identifier", "name": "_retry", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 43 - } + "range": [ + 37, + 43 + ] } ], "body": { @@ -70,10 +70,10 @@ Output: "type": "JSXIdentifier", "name": "MessageBox", "loc": null, - "range": { - "start": 49, - "end": 59 - } + "range": [ + 49, + 59 + ] }, "attributes": [ { @@ -82,10 +82,10 @@ Output: "type": "JSXIdentifier", "name": "error", "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "value": { "type": "JSXExpressionContainer", @@ -94,30 +94,30 @@ Output: "name": "error", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] }, "loc": null, - "range": { - "start": 60, - "end": 73 - } + "range": [ + 60, + 73 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 48, - "end": 74 - } + "range": [ + 48, + 74 + ] }, "children": [], "closingElement": { @@ -126,49 +126,49 @@ Output: "type": "JSXIdentifier", "name": "MessageBox", "loc": null, - "range": { - "start": 76, - "end": 86 - } + "range": [ + 76, + 86 + ] }, "loc": null, - "range": { - "start": 74, - "end": 87 - } + "range": [ + 74, + 87 + ] }, "loc": null, - "range": { - "start": 48, - "end": 87 - } + "range": [ + 48, + 87 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 29, - "end": 87 - }, + "range": [ + 29, + 87 + ], "expression": true, "loc": null, - "range": { - "start": 29, - "end": 87 - } + "range": [ + 29, + 87 + ] }, "loc": null, - "range": { - "start": 17, - "end": 87 - } + "range": [ + 17, + 87 + ] } ], "loc": null, - "range": { - "start": 11, - "end": 88 - } + "range": [ + 11, + 88 + ] }, { "type": "VariableDeclaration", @@ -181,10 +181,10 @@ Output: "name": "Renderer", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 104 - } + "range": [ + 96, + 104 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -195,10 +195,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 113 - } + "range": [ + 108, + 113 + ] } ], "body": { @@ -209,18 +209,18 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 123, - "end": 126 - } + "range": [ + 123, + 126 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 122, - "end": 127 - } + "range": [ + 122, + 127 + ] }, "children": [ { @@ -228,10 +228,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 127, - "end": 132 - } + "range": [ + 127, + 132 + ] }, { "type": "JSXElement", @@ -241,18 +241,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 133, - "end": 136 - } + "range": [ + 133, + 136 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 132, - "end": 137 - } + "range": [ + 132, + 137 + ] }, "children": [], "closingElement": { @@ -261,32 +261,32 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 139, - "end": 142 - } + "range": [ + 139, + 142 + ] }, "loc": null, - "range": { - "start": 137, - "end": 143 - } + "range": [ + 137, + 143 + ] }, "loc": null, - "range": { - "start": 132, - "end": 143 - } + "range": [ + 132, + 143 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 143, - "end": 148 - } + "range": [ + 143, + 148 + ] }, { "type": "JSXElement", @@ -296,18 +296,18 @@ Output: "type": "JSXIdentifier", "name": "ErrorView", "loc": null, - "range": { - "start": 149, - "end": 158 - } + "range": [ + 149, + 158 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 148, - "end": 159 - } + "range": [ + 148, + 159 + ] }, "children": [], "closingElement": { @@ -316,32 +316,32 @@ Output: "type": "JSXIdentifier", "name": "ErrorView", "loc": null, - "range": { - "start": 161, - "end": 170 - } + "range": [ + 161, + 170 + ] }, "loc": null, - "range": { - "start": 159, - "end": 171 - } + "range": [ + 159, + 171 + ] }, "loc": null, - "range": { - "start": 148, - "end": 171 - } + "range": [ + 148, + 171 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 171, - "end": 174 - } + "range": [ + 171, + 174 + ] } ], "closingElement": { @@ -350,49 +350,49 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 176, - "end": 179 - } + "range": [ + 176, + 179 + ] }, "loc": null, - "range": { - "start": 174, - "end": 180 - } + "range": [ + 174, + 180 + ] }, "loc": null, - "range": { - "start": 122, - "end": 180 - } + "range": [ + 122, + 180 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 107, - "end": 182 - }, + "range": [ + 107, + 182 + ], "expression": true, "loc": null, - "range": { - "start": 107, - "end": 182 - } + "range": [ + 107, + 182 + ] }, "loc": null, - "range": { - "start": 96, - "end": 182 - } + "range": [ + 96, + 182 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 183 - } + "range": [ + 90, + 183 + ] }, { "type": "ExportDefaultDeclaration", @@ -401,22 +401,22 @@ Output: "name": "Renderer", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 208 - } + "range": [ + 200, + 208 + ] }, "loc": null, - "range": { - "start": 185, - "end": 209 - } + "range": [ + 185, + 209 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 11, - "end": 209 - } + "range": [ + 11, + 209 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-lifetime-loops.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-lifetime-loops.js.snap index 67f7f3764f..029f851196 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-lifetime-loops.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-lifetime-loops.js.snap @@ -51,10 +51,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 15 - } + "range": [ + 9, + 15 + ] }, "params": [ { @@ -62,43 +62,43 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 22, - "end": 24 - } + "range": [ + 22, + 24 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 24 - }, + "range": [ + 0, + 24 + ], "loc": null, - "range": { - "start": 0, - "end": 24 - } + "range": [ + 0, + 24 + ] }, { "type": "FunctionDeclaration", @@ -107,10 +107,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 38 - } + "range": [ + 34, + 38 + ] }, "params": [ { @@ -118,33 +118,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 42, - "end": 44 - } + "range": [ + 42, + 44 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 25, - "end": 44 - }, + "range": [ + 25, + 44 + ], "loc": null, - "range": { - "start": 25, - "end": 44 - } + "range": [ + 25, + 44 + ] }, { "type": "FunctionDeclaration", @@ -153,10 +153,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 64 - } + "range": [ + 55, + 64 + ] }, "params": [ { @@ -164,10 +164,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] } ], "body": { @@ -184,32 +184,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 84, - "end": 86 - } + "range": [ + 84, + 86 + ] }, "loc": null, - "range": { - "start": 80, - "end": 86 - } + "range": [ + 80, + 86 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 87 - } + "range": [ + 76, + 87 + ] }, { "type": "VariableDeclaration", @@ -222,32 +222,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 98, - "end": 100 - } + "range": [ + 98, + 100 + ] }, "loc": null, - "range": { - "start": 94, - "end": 100 - } + "range": [ + 94, + 100 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 101 - } + "range": [ + 90, + 101 + ] }, { "type": "VariableDeclaration", @@ -260,32 +260,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 112, - "end": 114 - } + "range": [ + 112, + 114 + ] }, "loc": null, - "range": { - "start": 108, - "end": 114 - } + "range": [ + 108, + 114 + ] } ], "loc": null, - "range": { - "start": 104, - "end": 115 - } + "range": [ + 104, + 115 + ] }, { "type": "VariableDeclaration", @@ -298,32 +298,32 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 126, - "end": 128 - } + "range": [ + 126, + 128 + ] }, "loc": null, - "range": { - "start": 122, - "end": 128 - } + "range": [ + 122, + 128 + ] } ], "loc": null, - "range": { - "start": 118, - "end": 129 - } + "range": [ + 118, + 129 + ] }, { "type": "WhileStatement", @@ -331,10 +331,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 139, - "end": 143 - } + "range": [ + 139, + 143 + ] }, "body": { "type": "BlockStatement", @@ -350,33 +350,33 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "init": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "loc": null, - "range": { - "start": 155, - "end": 160 - } + "range": [ + 155, + 160 + ] } ], "loc": null, - "range": { - "start": 151, - "end": 161 - } + "range": [ + 151, + 161 + ] }, { "type": "ExpressionStatement", @@ -388,33 +388,33 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 167 - } + "range": [ + 166, + 167 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 171 - } + "range": [ + 170, + 171 + ] }, "loc": null, - "range": { - "start": 166, - "end": 171 - } + "range": [ + 166, + 171 + ] }, "directive": null, "loc": null, - "range": { - "start": 166, - "end": 172 - } + "range": [ + 166, + 172 + ] }, { "type": "ExpressionStatement", @@ -426,33 +426,33 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 178 - } + "range": [ + 177, + 178 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "loc": null, - "range": { - "start": 177, - "end": 182 - } + "range": [ + 177, + 182 + ] }, "directive": null, "loc": null, - "range": { - "start": 177, - "end": 183 - } + "range": [ + 177, + 183 + ] }, { "type": "ExpressionStatement", @@ -464,33 +464,33 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 189 - } + "range": [ + 188, + 189 + ] }, "right": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, "loc": null, - "range": { - "start": 188, - "end": 193 - } + "range": [ + 188, + 193 + ] }, "directive": null, "loc": null, - "range": { - "start": 188, - "end": 194 - } + "range": [ + 188, + 194 + ] }, { "type": "ExpressionStatement", @@ -502,33 +502,33 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 200 - } + "range": [ + 199, + 200 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 203, - "end": 204 - } + "range": [ + 203, + 204 + ] }, "loc": null, - "range": { - "start": 199, - "end": 204 - } + "range": [ + 199, + 204 + ] }, "directive": null, "loc": null, - "range": { - "start": 199, - "end": 205 - } + "range": [ + 199, + 205 + ] }, { "type": "ExpressionStatement", @@ -539,10 +539,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 216 - } + "range": [ + 210, + 216 + ] }, "arguments": [ { @@ -550,34 +550,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 217, - "end": 218 - } + "range": [ + 217, + 218 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 220, - "end": 221 - } + "range": [ + 220, + 221 + ] } ], "loc": null, - "range": { - "start": 210, - "end": 222 - } + "range": [ + 210, + 222 + ] }, "directive": null, "loc": null, - "range": { - "start": 210, - "end": 223 - } + "range": [ + 210, + 223 + ] }, { "type": "IfStatement", @@ -588,10 +588,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 232, - "end": 236 - } + "range": [ + 232, + 236 + ] }, "arguments": [ { @@ -599,17 +599,17 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 237, - "end": 238 - } + "range": [ + 237, + 238 + ] } ], "loc": null, - "range": { - "start": 232, - "end": 239 - } + "range": [ + 232, + 239 + ] }, "consequent": { "type": "BlockStatement", @@ -618,37 +618,37 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 249, - "end": 255 - } + "range": [ + 249, + 255 + ] } ], "loc": null, - "range": { - "start": 241, - "end": 261 - } + "range": [ + 241, + 261 + ] }, "alternate": null, "loc": null, - "range": { - "start": 228, - "end": 261 - } + "range": [ + 228, + 261 + ] } ], "loc": null, - "range": { - "start": 145, - "end": 265 - } + "range": [ + 145, + 265 + ] }, "loc": null, - "range": { - "start": 132, - "end": 265 - } + "range": [ + 132, + 265 + ] }, { "type": "IfStatement", @@ -657,26 +657,26 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 484, - "end": 485 - } + "range": [ + 484, + 485 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 487, - "end": 492 - } + "range": [ + 487, + 492 + ] }, "alternate": null, "loc": null, - "range": { - "start": 480, - "end": 492 - } + "range": [ + 480, + 492 + ] }, { "type": "IfStatement", @@ -685,26 +685,26 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 499, - "end": 500 - } + "range": [ + 499, + 500 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 502, - "end": 507 - } + "range": [ + 502, + 507 + ] }, "alternate": null, "loc": null, - "range": { - "start": 495, - "end": 507 - } + "range": [ + 495, + 507 + ] }, { "type": "IfStatement", @@ -713,26 +713,26 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 514, - "end": 515 - } + "range": [ + 514, + 515 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 517, - "end": 522 - } + "range": [ + 517, + 522 + ] }, "alternate": null, "loc": null, - "range": { - "start": 510, - "end": 522 - } + "range": [ + 510, + 522 + ] }, { "type": "IfStatement", @@ -741,26 +741,26 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 529, - "end": 530 - } + "range": [ + 529, + 530 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 532, - "end": 537 - } + "range": [ + 532, + 537 + ] }, "alternate": null, "loc": null, - "range": { - "start": 525, - "end": 537 - } + "range": [ + 525, + 537 + ] }, { "type": "ExpressionStatement", @@ -771,10 +771,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 541, - "end": 547 - } + "range": [ + 541, + 547 + ] }, "arguments": [ { @@ -782,58 +782,58 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 548, - "end": 549 - } + "range": [ + 548, + 549 + ] }, { "type": "NullLiteral", "loc": null, - "range": { - "start": 551, - "end": 555 - } + "range": [ + 551, + 555 + ] } ], "loc": null, - "range": { - "start": 541, - "end": 556 - } + "range": [ + 541, + 556 + ] }, "directive": null, "loc": null, - "range": { - "start": 541, - "end": 557 - } + "range": [ + 541, + 557 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 559 - } + "range": [ + 72, + 559 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 46, - "end": 559 - }, + "range": [ + 46, + 559 + ], "loc": null, - "range": { - "start": 46, - "end": 559 - } + "range": [ + 46, + 559 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 559 - } + "range": [ + 0, + 559 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-lifetime-with-aliasing.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-lifetime-with-aliasing.js.snap index 5be96357b2..01629cae96 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-lifetime-with-aliasing.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-lifetime-with-aliasing.js.snap @@ -47,10 +47,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 15 - } + "range": [ + 9, + 15 + ] }, "params": [ { @@ -58,43 +58,43 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 22, - "end": 24 - } + "range": [ + 22, + 24 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 24 - }, + "range": [ + 0, + 24 + ], "loc": null, - "range": { - "start": 0, - "end": 24 - } + "range": [ + 0, + 24 + ] }, { "type": "FunctionDeclaration", @@ -103,10 +103,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 35, - "end": 44 - } + "range": [ + 35, + 44 + ] }, "params": [ { @@ -114,10 +114,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] } ], "body": { @@ -134,32 +134,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 66, - "end": 68 - } + "range": [ + 66, + 68 + ] }, "loc": null, - "range": { - "start": 62, - "end": 68 - } + "range": [ + 62, + 68 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 69 - } + "range": [ + 56, + 69 + ] }, { "type": "VariableDeclaration", @@ -172,10 +172,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "init": { "type": "ArrayExpression", @@ -185,30 +185,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "loc": null, - "range": { - "start": 78, - "end": 85 - } + "range": [ + 78, + 85 + ] } ], "loc": null, - "range": { - "start": 72, - "end": 86 - } + "range": [ + 72, + 86 + ] }, { "type": "VariableDeclaration", @@ -221,32 +221,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 123, - "end": 125 - } + "range": [ + 123, + 125 + ] }, "loc": null, - "range": { - "start": 119, - "end": 125 - } + "range": [ + 119, + 125 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 126 - } + "range": [ + 113, + 126 + ] }, { "type": "VariableDeclaration", @@ -259,10 +259,10 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "init": { "type": "ObjectExpression", @@ -274,50 +274,50 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "value": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] } ], "loc": null, - "range": { - "start": 139, - "end": 144 - } + "range": [ + 139, + 144 + ] }, "loc": null, - "range": { - "start": 135, - "end": 144 - } + "range": [ + 135, + 144 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 145 - } + "range": [ + 129, + 145 + ] }, { "type": "VariableDeclaration", @@ -330,32 +330,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 224 - } + "range": [ + 223, + 224 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 227, - "end": 229 - } + "range": [ + 227, + 229 + ] }, "loc": null, - "range": { - "start": 223, - "end": 229 - } + "range": [ + 223, + 229 + ] } ], "loc": null, - "range": { - "start": 217, - "end": 230 - } + "range": [ + 217, + 230 + ] }, { "type": "ExpressionStatement", @@ -369,50 +369,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 233, - "end": 234 - } + "range": [ + 233, + 234 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 235, - "end": 236 - } + "range": [ + 235, + 236 + ] }, "computed": false, "loc": null, - "range": { - "start": 233, - "end": 236 - } + "range": [ + 233, + 236 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 239, - "end": 240 - } + "range": [ + 239, + 240 + ] }, "loc": null, - "range": { - "start": 233, - "end": 240 - } + "range": [ + 233, + 240 + ] }, "directive": null, "loc": null, - "range": { - "start": 233, - "end": 241 - } + "range": [ + 233, + 241 + ] }, { "type": "VariableDeclaration", @@ -425,10 +425,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 250, - "end": 251 - } + "range": [ + 250, + 251 + ] }, "init": { "type": "CallExpression", @@ -437,10 +437,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 260 - } + "range": [ + 254, + 260 + ] }, "arguments": [ { @@ -448,40 +448,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 262 - } + "range": [ + 261, + 262 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 265 - } + "range": [ + 264, + 265 + ] } ], "loc": null, - "range": { - "start": 254, - "end": 266 - } + "range": [ + 254, + 266 + ] }, "loc": null, - "range": { - "start": 250, - "end": 266 - } + "range": [ + 250, + 266 + ] } ], "loc": null, - "range": { - "start": 244, - "end": 267 - } + "range": [ + 244, + 267 + ] }, { "type": "IfStatement", @@ -490,26 +490,26 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 531, - "end": 532 - } + "range": [ + 531, + 532 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 534, - "end": 539 - } + "range": [ + 534, + 539 + ] }, "alternate": null, "loc": null, - "range": { - "start": 527, - "end": 539 - } + "range": [ + 527, + 539 + ] }, { "type": "IfStatement", @@ -518,26 +518,26 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 546, - "end": 547 - } + "range": [ + 546, + 547 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 549, - "end": 554 - } + "range": [ + 549, + 554 + ] }, "alternate": null, "loc": null, - "range": { - "start": 542, - "end": 554 - } + "range": [ + 542, + 554 + ] }, { "type": "IfStatement", @@ -546,26 +546,26 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 561, - "end": 562 - } + "range": [ + 561, + 562 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 564, - "end": 569 - } + "range": [ + 564, + 569 + ] }, "alternate": null, "loc": null, - "range": { - "start": 557, - "end": 569 - } + "range": [ + 557, + 569 + ] }, { "type": "IfStatement", @@ -574,26 +574,26 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 576, - "end": 577 - } + "range": [ + 576, + 577 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 579, - "end": 584 - } + "range": [ + 579, + 584 + ] }, "alternate": null, "loc": null, - "range": { - "start": 572, - "end": 584 - } + "range": [ + 572, + 584 + ] }, { "type": "IfStatement", @@ -602,26 +602,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 591, - "end": 592 - } + "range": [ + 591, + 592 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 594, - "end": 599 - } + "range": [ + 594, + 599 + ] }, "alternate": null, "loc": null, - "range": { - "start": 587, - "end": 599 - } + "range": [ + 587, + 599 + ] }, { "type": "ExpressionStatement", @@ -632,10 +632,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 692, - "end": 698 - } + "range": [ + 692, + 698 + ] }, "arguments": [ { @@ -643,58 +643,58 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 699, - "end": 700 - } + "range": [ + 699, + 700 + ] }, { "type": "NullLiteral", "loc": null, - "range": { - "start": 702, - "end": 706 - } + "range": [ + 702, + 706 + ] } ], "loc": null, - "range": { - "start": 692, - "end": 707 - } + "range": [ + 692, + 707 + ] }, "directive": null, "loc": null, - "range": { - "start": 692, - "end": 708 - } + "range": [ + 692, + 708 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 710 - } + "range": [ + 52, + 710 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 26, - "end": 710 - }, + "range": [ + 26, + 710 + ], "loc": null, - "range": { - "start": 26, - "end": 710 - } + "range": [ + 26, + 710 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 710 - } + "range": [ + 0, + 710 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-liverange-loop.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-liverange-loop.js.snap index df52a71c53..6d4bf41f7b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-liverange-loop.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@mutable-liverange-loop.js.snap @@ -46,33 +46,33 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 15 - } + "range": [ + 9, + 15 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 18, - "end": 20 - } + "range": [ + 18, + 20 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 20 - }, + "range": [ + 0, + 20 + ], "loc": null, - "range": { - "start": 0, - "end": 20 - } + "range": [ + 0, + 20 + ] }, { "type": "FunctionDeclaration", @@ -81,33 +81,33 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 34 - } + "range": [ + 30, + 34 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 37, - "end": 39 - } + "range": [ + 37, + 39 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 21, - "end": 39 - }, + "range": [ + 21, + 39 + ], "loc": null, - "range": { - "start": 21, - "end": 39 - } + "range": [ + 21, + 39 + ] }, { "type": "FunctionDeclaration", @@ -116,10 +116,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 59 - } + "range": [ + 50, + 59 + ] }, "params": [ { @@ -127,10 +127,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] } ], "body": { @@ -147,32 +147,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 79, - "end": 81 - } + "range": [ + 79, + 81 + ] }, "loc": null, - "range": { - "start": 75, - "end": 81 - } + "range": [ + 75, + 81 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 82 - } + "range": [ + 71, + 82 + ] }, { "type": "VariableDeclaration", @@ -185,32 +185,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 93, - "end": 95 - } + "range": [ + 93, + 95 + ] }, "loc": null, - "range": { - "start": 89, - "end": 95 - } + "range": [ + 89, + 95 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 96 - } + "range": [ + 85, + 96 + ] }, { "type": "VariableDeclaration", @@ -223,32 +223,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 107, - "end": 109 - } + "range": [ + 107, + 109 + ] }, "loc": null, - "range": { - "start": 103, - "end": 109 - } + "range": [ + 103, + 109 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 110 - } + "range": [ + 99, + 110 + ] }, { "type": "VariableDeclaration", @@ -261,32 +261,32 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 121, - "end": 123 - } + "range": [ + 121, + 123 + ] }, "loc": null, - "range": { - "start": 117, - "end": 123 - } + "range": [ + 117, + 123 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 124 - } + "range": [ + 113, + 124 + ] }, { "type": "WhileStatement", @@ -294,10 +294,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 134, - "end": 138 - } + "range": [ + 134, + 138 + ] }, "body": { "type": "BlockStatement", @@ -311,10 +311,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 152 - } + "range": [ + 146, + 152 + ] }, "arguments": [ { @@ -322,34 +322,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 154 - } + "range": [ + 153, + 154 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 157 - } + "range": [ + 156, + 157 + ] } ], "loc": null, - "range": { - "start": 146, - "end": 158 - } + "range": [ + 146, + 158 + ] }, "directive": null, "loc": null, - "range": { - "start": 146, - "end": 159 - } + "range": [ + 146, + 159 + ] }, { "type": "IfStatement", @@ -360,10 +360,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 172 - } + "range": [ + 168, + 172 + ] }, "arguments": [ { @@ -371,17 +371,17 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 174 - } + "range": [ + 173, + 174 + ] } ], "loc": null, - "range": { - "start": 168, - "end": 175 - } + "range": [ + 168, + 175 + ] }, "consequent": { "type": "BlockStatement", @@ -390,37 +390,37 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 185, - "end": 191 - } + "range": [ + 185, + 191 + ] } ], "loc": null, - "range": { - "start": 177, - "end": 197 - } + "range": [ + 177, + 197 + ] }, "alternate": null, "loc": null, - "range": { - "start": 164, - "end": 197 - } + "range": [ + 164, + 197 + ] } ], "loc": null, - "range": { - "start": 140, - "end": 201 - } + "range": [ + 140, + 201 + ] }, "loc": null, - "range": { - "start": 127, - "end": 201 - } + "range": [ + 127, + 201 + ] }, { "type": "IfStatement", @@ -429,26 +429,26 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 420, - "end": 421 - } + "range": [ + 420, + 421 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 423, - "end": 428 - } + "range": [ + 423, + 428 + ] }, "alternate": null, "loc": null, - "range": { - "start": 416, - "end": 428 - } + "range": [ + 416, + 428 + ] }, { "type": "IfStatement", @@ -457,26 +457,26 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 435, - "end": 436 - } + "range": [ + 435, + 436 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 438, - "end": 443 - } + "range": [ + 438, + 443 + ] }, "alternate": null, "loc": null, - "range": { - "start": 431, - "end": 443 - } + "range": [ + 431, + 443 + ] }, { "type": "IfStatement", @@ -485,26 +485,26 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 450, - "end": 451 - } + "range": [ + 450, + 451 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 453, - "end": 458 - } + "range": [ + 453, + 458 + ] }, "alternate": null, "loc": null, - "range": { - "start": 446, - "end": 458 - } + "range": [ + 446, + 458 + ] }, { "type": "IfStatement", @@ -513,26 +513,26 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 465, - "end": 466 - } + "range": [ + 465, + 466 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 468, - "end": 473 - } + "range": [ + 468, + 473 + ] }, "alternate": null, "loc": null, - "range": { - "start": 461, - "end": 473 - } + "range": [ + 461, + 473 + ] }, { "type": "ExpressionStatement", @@ -543,10 +543,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 477, - "end": 483 - } + "range": [ + 477, + 483 + ] }, "arguments": [ { @@ -554,58 +554,58 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 484, - "end": 485 - } + "range": [ + 484, + 485 + ] }, { "type": "NullLiteral", "loc": null, - "range": { - "start": 487, - "end": 491 - } + "range": [ + 487, + 491 + ] } ], "loc": null, - "range": { - "start": 477, - "end": 492 - } + "range": [ + 477, + 492 + ] }, "directive": null, "loc": null, - "range": { - "start": 477, - "end": 493 - } + "range": [ + 477, + 493 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 495 - } + "range": [ + 67, + 495 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 41, - "end": 495 - }, + "range": [ + 41, + 495 + ], "loc": null, - "range": { - "start": 41, - "end": 495 - } + "range": [ + 41, + 495 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 495 - } + "range": [ + 0, + 495 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-function-shadowed-identifiers.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-function-shadowed-identifiers.js.snap index 9ad9cbbee7..8152561002 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-function-shadowed-identifiers.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-function-shadowed-identifiers.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -61,27 +61,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 45 - } + "range": [ + 36, + 45 + ] }, "init": { "type": "CallExpression", @@ -90,39 +90,39 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 56 - } + "range": [ + 48, + 56 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 57, - "end": 61 - } + "range": [ + 57, + 61 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 62 - } + "range": [ + 48, + 62 + ] }, "loc": null, - "range": { - "start": 36, - "end": 62 - } + "range": [ + 36, + 62 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 63 - } + "range": [ + 30, + 63 + ] }, { "type": "VariableDeclaration", @@ -135,10 +135,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 81 - } + "range": [ + 73, + 81 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -149,10 +149,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] } ], "body": { @@ -169,31 +169,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "init": { "type": "NullLiteral", "loc": null, - "range": { - "start": 105, - "end": 109 - } + "range": [ + 105, + 109 + ] }, "loc": null, - "range": { - "start": 101, - "end": 109 - } + "range": [ + 101, + 109 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 110 - } + "range": [ + 97, + 110 + ] }, { "type": "ExpressionStatement", @@ -204,10 +204,10 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 158 - } + "range": [ + 154, + 158 + ] }, "arguments": [ { @@ -219,10 +219,10 @@ Output: "name": "currentX", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 168 - } + "range": [ + 160, + 168 + ] } ], "body": { @@ -232,10 +232,10 @@ Output: "name": "currentX", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 181 - } + "range": [ + 173, + 181 + ] }, "operator": "+", "right": { @@ -243,78 +243,78 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, "loc": null, - "range": { - "start": 173, - "end": 185 - } + "range": [ + 173, + 185 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 159, - "end": 185 - }, + "range": [ + 159, + 185 + ], "expression": true, "loc": null, - "range": { - "start": 159, - "end": 185 - } + "range": [ + 159, + 185 + ] } ], "loc": null, - "range": { - "start": 154, - "end": 186 - } + "range": [ + 154, + 186 + ] }, "directive": null, "loc": null, - "range": { - "start": 154, - "end": 187 - } + "range": [ + 154, + 187 + ] } ], "loc": null, - "range": { - "start": 91, - "end": 228 - } + "range": [ + 91, + 228 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 84, - "end": 228 - }, + "range": [ + 84, + 228 + ], "expression": false, "loc": null, - "range": { - "start": 84, - "end": 228 - } + "range": [ + 84, + 228 + ] }, "loc": null, - "range": { - "start": 73, - "end": 228 - } + "range": [ + 73, + 228 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 229 - } + "range": [ + 67, + 229 + ] }, { "type": "ReturnStatement", @@ -326,10 +326,10 @@ Output: "type": "JSXIdentifier", "name": "input", "loc": null, - "range": { - "start": 241, - "end": 246 - } + "range": [ + 241, + 246 + ] }, "attributes": [ { @@ -338,10 +338,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 247, - "end": 252 - } + "range": [ + 247, + 252 + ] }, "value": { "type": "JSXExpressionContainer", @@ -350,22 +350,22 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 255 - } + "range": [ + 254, + 255 + ] }, "loc": null, - "range": { - "start": 253, - "end": 256 - } + "range": [ + 253, + 256 + ] }, "loc": null, - "range": { - "start": 247, - "end": 256 - } + "range": [ + 247, + 256 + ] }, { "type": "JSXAttribute", @@ -373,10 +373,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 257, - "end": 265 - } + "range": [ + 257, + 265 + ] }, "value": { "type": "JSXExpressionContainer", @@ -385,70 +385,70 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 267, - "end": 275 - } + "range": [ + 267, + 275 + ] }, "loc": null, - "range": { - "start": 266, - "end": 276 - } + "range": [ + 266, + 276 + ] }, "loc": null, - "range": { - "start": 257, - "end": 276 - } + "range": [ + 257, + 276 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 240, - "end": 279 - } + "range": [ + 240, + 279 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 240, - "end": 279 - } + "range": [ + 240, + 279 + ] }, "loc": null, - "range": { - "start": 233, - "end": 280 - } + "range": [ + 233, + 280 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 282 - } + "range": [ + 26, + 282 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 282 - }, + "range": [ + 0, + 282 + ], "loc": null, - "range": { - "start": 0, - "end": 282 - } + "range": [ + 0, + 282 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 282 - } + "range": [ + 0, + 282 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-optional-member-expr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-optional-member-expr.js.snap index 3b97263de6..6e9b11e927 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-optional-member-expr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-optional-member-expr.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 126 - } + "range": [ + 117, + 126 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 132 - } + "range": [ + 127, + 132 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "init": { "type": "CallExpression", @@ -66,10 +66,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 149 - } + "range": [ + 146, + 149 + ] }, "arguments": [ { @@ -85,101 +85,101 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 155 - } + "range": [ + 150, + 155 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 157 - } + "range": [ + 156, + 157 + ] }, "computed": false, "loc": null, - "range": { - "start": 150, - "end": 157 - } + "range": [ + 150, + 157 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 150, - "end": 160 - } + "range": [ + 150, + 160 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "computed": false, "optional": false, "loc": null, - "range": { - "start": 150, - "end": 162 - } + "range": [ + 150, + 162 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 164 - } + "range": [ + 163, + 164 + ] }, "computed": false, "optional": false, "loc": null, - "range": { - "start": 150, - "end": 164 - } + "range": [ + 150, + 164 + ] } ], "loc": null, - "range": { - "start": 146, - "end": 165 - } + "range": [ + 146, + 165 + ] }, "loc": null, - "range": { - "start": 142, - "end": 165 - } + "range": [ + 142, + 165 + ] } ], "loc": null, - "range": { - "start": 138, - "end": 166 - } + "range": [ + 138, + 166 + ] }, { "type": "ReturnStatement", @@ -188,42 +188,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 176, - "end": 177 - } + "range": [ + 176, + 177 + ] }, "loc": null, - "range": { - "start": 169, - "end": 178 - } + "range": [ + 169, + 178 + ] } ], "loc": null, - "range": { - "start": 134, - "end": 180 - } + "range": [ + 134, + 180 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 108, - "end": 180 - }, + "range": [ + 108, + 180 + ], "loc": null, - "range": { - "start": 108, - "end": 180 - } + "range": [ + 108, + 180 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 108, - "end": 180 - } + "range": [ + 108, + 180 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-scopes-hook-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-scopes-hook-call.js.snap index 4bc87f2beb..ff7b644bee 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-scopes-hook-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nested-scopes-hook-call.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -93,32 +93,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 52, - "end": 54 - } + "range": [ + 52, + 54 + ] }, "loc": null, - "range": { - "start": 48, - "end": 54 - } + "range": [ + 48, + 54 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 55 - } + "range": [ + 44, + 55 + ] }, { "type": "ExpressionStatement", @@ -131,27 +131,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 64 - } + "range": [ + 60, + 64 + ] }, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 64 - } + "range": [ + 58, + 64 + ] }, "arguments": [ { @@ -161,10 +161,10 @@ Output: "name": "useHook", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] }, "arguments": [ { @@ -174,48 +174,48 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 78 - } + "range": [ + 73, + 78 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 82 - } + "range": [ + 79, + 82 + ] }, "computed": false, "loc": null, - "range": { - "start": 73, - "end": 82 - } + "range": [ + 73, + 82 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 83 - } + "range": [ + 65, + 83 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 84 - } + "range": [ + 58, + 84 + ] }, "directive": null, "loc": null, - "range": { - "start": 58, - "end": 85 - } + "range": [ + 58, + 85 + ] }, { "type": "ExpressionStatement", @@ -228,27 +228,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 94 - } + "range": [ + 90, + 94 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 94 - } + "range": [ + 88, + 94 + ] }, "arguments": [ { @@ -256,24 +256,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 98 - } + "range": [ + 88, + 98 + ] }, { "type": "ReturnStatement", @@ -282,42 +282,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 112 - } + "range": [ + 26, + 112 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 112 - }, + "range": [ + 0, + 112 + ], "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 112 - } + "range": [ + 0, + 112 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@new-spread.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@new-spread.js.snap index c2ac4424eb..80eecba88e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@new-spread.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@new-spread.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NewExpression", @@ -64,10 +64,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 47 - } + "range": [ + 44, + 47 + ] }, "arguments": [ { @@ -79,41 +79,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 60 - } + "range": [ + 51, + 60 + ] }, "loc": null, - "range": { - "start": 48, - "end": 60 - } + "range": [ + 48, + 60 + ] }, { "type": "NullLiteral", "loc": null, - "range": { - "start": 62, - "end": 66 - } + "range": [ + 62, + 66 + ] }, { "type": "SpreadElement", @@ -127,60 +127,60 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 77 - } + "range": [ + 72, + 77 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 72, - "end": 81 - } + "range": [ + 72, + 81 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 82 - } + "range": [ + 71, + 82 + ] }, "loc": null, - "range": { - "start": 68, - "end": 82 - } + "range": [ + 68, + 82 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 83 - } + "range": [ + 40, + 83 + ] }, "loc": null, - "range": { - "start": 36, - "end": 83 - } + "range": [ + 36, + 83 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 84 - } + "range": [ + 30, + 84 + ] }, { "type": "ReturnStatement", @@ -189,42 +189,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 98 - } + "range": [ + 26, + 98 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 98 - }, + "range": [ + 0, + 98 + ], "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nonoptional-load-from-optional-memberexpr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nonoptional-load-from-optional-memberexpr.js.snap index b7583c5ed8..4d7824c7ab 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nonoptional-load-from-optional-memberexpr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@nonoptional-load-from-optional-memberexpr.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 182, - "end": 191 - } + "range": [ + 182, + 191 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 197 - } + "range": [ + 192, + 197 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 208 - } + "range": [ + 207, + 208 + ] }, "init": { "type": "MemberExpression", @@ -70,58 +70,58 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 217 - } + "range": [ + 212, + 217 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 219, - "end": 220 - } + "range": [ + 219, + 220 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 212, - "end": 220 - } + "range": [ + 212, + 220 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 222, - "end": 223 - } + "range": [ + 222, + 223 + ] }, "computed": false, "loc": null, - "range": { - "start": 211, - "end": 223 - } + "range": [ + 211, + 223 + ] }, "loc": null, - "range": { - "start": 207, - "end": 223 - } + "range": [ + 207, + 223 + ] } ], "loc": null, - "range": { - "start": 203, - "end": 224 - } + "range": [ + 203, + 224 + ] }, { "type": "ReturnStatement", @@ -130,42 +130,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 234, - "end": 235 - } + "range": [ + 234, + 235 + ] }, "loc": null, - "range": { - "start": 227, - "end": 236 - } + "range": [ + 227, + 236 + ] } ], "loc": null, - "range": { - "start": 199, - "end": 238 - } + "range": [ + 199, + 238 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 173, - "end": 238 - }, + "range": [ + 173, + 238 + ], "loc": null, - "range": { - "start": 173, - "end": 238 - } + "range": [ + 173, + 238 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 173, - "end": 238 - } + "range": [ + 173, + 238 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-literal-cached-in-if-else.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-literal-cached-in-if-else.js.snap index 177215a47e..304b7418a4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-literal-cached-in-if-else.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-literal-cached-in-if-else.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,40 +38,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -88,32 +88,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 37, - "end": 39 - } + "range": [ + 37, + 39 + ] }, "loc": null, - "range": { - "start": 33, - "end": 39 - } + "range": [ + 33, + 39 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 40 - } + "range": [ + 29, + 40 + ] }, { "type": "IfStatement", @@ -122,10 +122,10 @@ Output: "name": "someVal", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 54 - } + "range": [ + 47, + 54 + ] }, "consequent": { "type": "BlockStatement", @@ -140,10 +140,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "right": { "type": "ObjectExpression", @@ -155,57 +155,57 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] }, "loc": null, - "range": { - "start": 62, - "end": 71 - } + "range": [ + 62, + 71 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 72 - } + "range": [ + 62, + 72 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 76 - } + "range": [ + 56, + 76 + ] }, "alternate": { "type": "BlockStatement", @@ -220,10 +220,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "right": { "type": "ObjectExpression", @@ -235,63 +235,63 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "value": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 97 - } + "range": [ + 92, + 97 + ] }, "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 98 - } + "range": [ + 88, + 98 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 102 - } + "range": [ + 82, + 102 + ] }, "loc": null, - "range": { - "start": 43, - "end": 102 - } + "range": [ + 43, + 102 + ] }, { "type": "ReturnStatement", @@ -300,42 +300,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 117 - } + "range": [ + 25, + 117 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 117 - }, + "range": [ + 0, + 117 + ], "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-literal-mutated-after-if-else.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-literal-mutated-after-if-else.js.snap index 37f1aa4887..a7c3b294f6 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-literal-mutated-after-if-else.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-literal-mutated-after-if-else.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,40 +39,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -89,32 +89,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 37, - "end": 39 - } + "range": [ + 37, + 39 + ] }, "loc": null, - "range": { - "start": 33, - "end": 39 - } + "range": [ + 33, + 39 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 40 - } + "range": [ + 29, + 40 + ] }, { "type": "IfStatement", @@ -123,10 +123,10 @@ Output: "name": "someVal", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 54 - } + "range": [ + 47, + 54 + ] }, "consequent": { "type": "BlockStatement", @@ -141,10 +141,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "right": { "type": "ObjectExpression", @@ -156,57 +156,57 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] }, "loc": null, - "range": { - "start": 62, - "end": 71 - } + "range": [ + 62, + 71 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 72 - } + "range": [ + 62, + 72 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 76 - } + "range": [ + 56, + 76 + ] }, "alternate": { "type": "BlockStatement", @@ -221,10 +221,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "right": { "type": "ObjectExpression", @@ -236,63 +236,63 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "value": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 97 - } + "range": [ + 92, + 97 + ] }, "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 98 - } + "range": [ + 88, + 98 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 102 - } + "range": [ + 82, + 102 + ] }, "loc": null, - "range": { - "start": 43, - "end": 102 - } + "range": [ + 43, + 102 + ] }, { "type": "ExpressionStatement", @@ -306,49 +306,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 106, - "end": 109 - } + "range": [ + 106, + 109 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "loc": null, - "range": { - "start": 106, - "end": 113 - } + "range": [ + 106, + 113 + ] }, "directive": null, "loc": null, - "range": { - "start": 106, - "end": 114 - } + "range": [ + 106, + 114 + ] }, { "type": "ReturnStatement", @@ -357,42 +357,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "loc": null, - "range": { - "start": 117, - "end": 126 - } + "range": [ + 117, + 126 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 128 - } + "range": [ + 25, + 128 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 128 - }, + "range": [ + 0, + 128 + ], "loc": null, - "range": { - "start": 0, - "end": 128 - } + "range": [ + 0, + 128 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 128 - } + "range": [ + 0, + 128 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else-with-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else-with-alias.js.snap index 48c7371370..77cc25b31c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else-with-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else-with-alias.js.snap @@ -30,10 +30,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -41,40 +41,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -91,10 +91,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "CallExpression", @@ -103,30 +103,30 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 44 - } + "range": [ + 37, + 44 + ] }, "arguments": [], "loc": null, - "range": { - "start": 37, - "end": 46 - } + "range": [ + 37, + 46 + ] }, "loc": null, - "range": { - "start": 33, - "end": 46 - } + "range": [ + 33, + 46 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 47 - } + "range": [ + 29, + 47 + ] }, { "type": "IfStatement", @@ -135,10 +135,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "consequent": { "type": "BlockStatement", @@ -154,10 +154,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "init": { "type": "CallExpression", @@ -166,30 +166,30 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 80 - } + "range": [ + 73, + 80 + ] }, "arguments": [], "loc": null, - "range": { - "start": 73, - "end": 82 - } + "range": [ + 73, + 82 + ] }, "loc": null, - "range": { - "start": 69, - "end": 82 - } + "range": [ + 69, + 82 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 83 - } + "range": [ + 63, + 83 + ] }, { "type": "VariableDeclaration", @@ -202,33 +202,33 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "loc": null, - "range": { - "start": 94, - "end": 99 - } + "range": [ + 94, + 99 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 100 - } + "range": [ + 88, + 100 + ] }, { "type": "ExpressionStatement", @@ -240,40 +240,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "loc": null, - "range": { - "start": 105, - "end": 110 - } + "range": [ + 105, + 110 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 111 - } + "range": [ + 105, + 111 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 115 - } + "range": [ + 57, + 115 + ] }, "alternate": { "type": "BlockStatement", @@ -288,10 +288,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "right": { "type": "CallExpression", @@ -300,43 +300,43 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 138 - } + "range": [ + 131, + 138 + ] }, "arguments": [], "loc": null, - "range": { - "start": 131, - "end": 140 - } + "range": [ + 131, + 140 + ] }, "loc": null, - "range": { - "start": 127, - "end": 140 - } + "range": [ + 127, + 140 + ] }, "directive": null, "loc": null, - "range": { - "start": 127, - "end": 141 - } + "range": [ + 127, + 141 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 145 - } + "range": [ + 121, + 145 + ] }, "loc": null, - "range": { - "start": 50, - "end": 145 - } + "range": [ + 50, + 145 + ] }, { "type": "ExpressionStatement", @@ -350,49 +350,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 150 - } + "range": [ + 149, + 150 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] }, "computed": false, "loc": null, - "range": { - "start": 149, - "end": 152 - } + "range": [ + 149, + 152 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "loc": null, - "range": { - "start": 149, - "end": 156 - } + "range": [ + 149, + 156 + ] }, "directive": null, "loc": null, - "range": { - "start": 149, - "end": 157 - } + "range": [ + 149, + 157 + ] }, { "type": "ReturnStatement", @@ -401,42 +401,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 167, - "end": 168 - } + "range": [ + 167, + 168 + ] }, "loc": null, - "range": { - "start": 160, - "end": 169 - } + "range": [ + 160, + 169 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 171 - } + "range": [ + 25, + 171 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 171 - }, + "range": [ + 0, + 171 + ], "loc": null, - "range": { - "start": 0, - "end": 171 - } + "range": [ + 0, + 171 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 171 - } + "range": [ + 0, + 171 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else.js.snap index 31958847e3..a0d463d14e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-if-else.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,40 +39,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -89,10 +89,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "CallExpression", @@ -101,30 +101,30 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 44 - } + "range": [ + 37, + 44 + ] }, "arguments": [], "loc": null, - "range": { - "start": 37, - "end": 46 - } + "range": [ + 37, + 46 + ] }, "loc": null, - "range": { - "start": 33, - "end": 46 - } + "range": [ + 33, + 46 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 47 - } + "range": [ + 29, + 47 + ] }, { "type": "IfStatement", @@ -133,10 +133,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "consequent": { "type": "BlockStatement", @@ -151,10 +151,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "right": { "type": "CallExpression", @@ -163,37 +163,37 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 74 - } + "range": [ + 67, + 74 + ] }, "arguments": [], "loc": null, - "range": { - "start": 67, - "end": 76 - } + "range": [ + 67, + 76 + ] }, "loc": null, - "range": { - "start": 63, - "end": 76 - } + "range": [ + 63, + 76 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 77 - } + "range": [ + 63, + 77 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 81 - } + "range": [ + 57, + 81 + ] }, "alternate": { "type": "BlockStatement", @@ -208,10 +208,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "right": { "type": "CallExpression", @@ -220,43 +220,43 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 104 - } + "range": [ + 97, + 104 + ] }, "arguments": [], "loc": null, - "range": { - "start": 97, - "end": 106 - } + "range": [ + 97, + 106 + ] }, "loc": null, - "range": { - "start": 93, - "end": 106 - } + "range": [ + 93, + 106 + ] }, "directive": null, "loc": null, - "range": { - "start": 93, - "end": 107 - } + "range": [ + 93, + 107 + ] } ], "loc": null, - "range": { - "start": 87, - "end": 111 - } + "range": [ + 87, + 111 + ] }, "loc": null, - "range": { - "start": 50, - "end": 111 - } + "range": [ + 50, + 111 + ] }, { "type": "ExpressionStatement", @@ -270,49 +270,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 118 - } + "range": [ + 115, + 118 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "loc": null, - "range": { - "start": 115, - "end": 122 - } + "range": [ + 115, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 115, - "end": 123 - } + "range": [ + 115, + 123 + ] }, { "type": "ReturnStatement", @@ -321,42 +321,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "loc": null, - "range": { - "start": 126, - "end": 135 - } + "range": [ + 126, + 135 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 137 - } + "range": [ + 25, + 137 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 137 - }, + "range": [ + 0, + 137 + ], "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-nested-if-else-with-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-nested-if-else-with-alias.js.snap index 49ff0ff253..d6638c60cf 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-nested-if-else-with-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@obj-mutated-after-nested-if-else-with-alias.js.snap @@ -36,10 +36,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -47,40 +47,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -97,10 +97,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "CallExpression", @@ -109,30 +109,30 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 44 - } + "range": [ + 37, + 44 + ] }, "arguments": [], "loc": null, - "range": { - "start": 37, - "end": 46 - } + "range": [ + 37, + 46 + ] }, "loc": null, - "range": { - "start": 33, - "end": 46 - } + "range": [ + 33, + 46 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 47 - } + "range": [ + 29, + 47 + ] }, { "type": "IfStatement", @@ -141,10 +141,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "consequent": { "type": "BlockStatement", @@ -160,24 +160,24 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "init": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] } ], "loc": null, - "range": { - "start": 63, - "end": 69 - } + "range": [ + 63, + 69 + ] }, { "type": "IfStatement", @@ -186,10 +186,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "consequent": { "type": "BlockStatement", @@ -205,10 +205,10 @@ Output: "name": "w", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "init": { "type": "CallExpression", @@ -217,30 +217,30 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 106 - } + "range": [ + 99, + 106 + ] }, "arguments": [], "loc": null, - "range": { - "start": 99, - "end": 108 - } + "range": [ + 99, + 108 + ] }, "loc": null, - "range": { - "start": 95, - "end": 108 - } + "range": [ + 95, + 108 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 109 - } + "range": [ + 89, + 109 + ] }, { "type": "ExpressionStatement", @@ -252,40 +252,40 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "right": { "type": "Identifier", "name": "w", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "loc": null, - "range": { - "start": 116, - "end": 121 - } + "range": [ + 116, + 121 + ] }, "directive": null, "loc": null, - "range": { - "start": 116, - "end": 122 - } + "range": [ + 116, + 122 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 128 - } + "range": [ + 81, + 128 + ] }, "alternate": { "type": "BlockStatement", @@ -300,10 +300,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "right": { "type": "CallExpression", @@ -312,43 +312,43 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 153 - } + "range": [ + 146, + 153 + ] }, "arguments": [], "loc": null, - "range": { - "start": 146, - "end": 155 - } + "range": [ + 146, + 155 + ] }, "loc": null, - "range": { - "start": 142, - "end": 155 - } + "range": [ + 142, + 155 + ] }, "directive": null, "loc": null, - "range": { - "start": 142, - "end": 156 - } + "range": [ + 142, + 156 + ] } ], "loc": null, - "range": { - "start": 134, - "end": 162 - } + "range": [ + 134, + 162 + ] }, "loc": null, - "range": { - "start": 74, - "end": 162 - } + "range": [ + 74, + 162 + ] }, { "type": "VariableDeclaration", @@ -361,33 +361,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 174 - } + "range": [ + 173, + 174 + ] }, "init": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 178 - } + "range": [ + 177, + 178 + ] }, "loc": null, - "range": { - "start": 173, - "end": 178 - } + "range": [ + 173, + 178 + ] } ], "loc": null, - "range": { - "start": 167, - "end": 179 - } + "range": [ + 167, + 179 + ] }, { "type": "ExpressionStatement", @@ -399,40 +399,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 189 - } + "range": [ + 188, + 189 + ] }, "loc": null, - "range": { - "start": 184, - "end": 189 - } + "range": [ + 184, + 189 + ] }, "directive": null, "loc": null, - "range": { - "start": 184, - "end": 190 - } + "range": [ + 184, + 190 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 194 - } + "range": [ + 57, + 194 + ] }, "alternate": { "type": "BlockStatement", @@ -447,10 +447,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 207 - } + "range": [ + 206, + 207 + ] }, "right": { "type": "CallExpression", @@ -459,43 +459,43 @@ Output: "name": "someObj", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 217 - } + "range": [ + 210, + 217 + ] }, "arguments": [], "loc": null, - "range": { - "start": 210, - "end": 219 - } + "range": [ + 210, + 219 + ] }, "loc": null, - "range": { - "start": 206, - "end": 219 - } + "range": [ + 206, + 219 + ] }, "directive": null, "loc": null, - "range": { - "start": 206, - "end": 220 - } + "range": [ + 206, + 220 + ] } ], "loc": null, - "range": { - "start": 200, - "end": 224 - } + "range": [ + 200, + 224 + ] }, "loc": null, - "range": { - "start": 50, - "end": 224 - } + "range": [ + 50, + 224 + ] }, { "type": "ExpressionStatement", @@ -509,49 +509,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 228, - "end": 229 - } + "range": [ + 228, + 229 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 230, - "end": 231 - } + "range": [ + 230, + 231 + ] }, "computed": false, "loc": null, - "range": { - "start": 228, - "end": 231 - } + "range": [ + 228, + 231 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 234, - "end": 235 - } + "range": [ + 234, + 235 + ] }, "loc": null, - "range": { - "start": 228, - "end": 235 - } + "range": [ + 228, + 235 + ] }, "directive": null, "loc": null, - "range": { - "start": 228, - "end": 236 - } + "range": [ + 228, + 236 + ] }, { "type": "ReturnStatement", @@ -560,42 +560,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 246, - "end": 247 - } + "range": [ + 246, + 247 + ] }, "loc": null, - "range": { - "start": 239, - "end": 248 - } + "range": [ + 239, + 248 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 250 - } + "range": [ + 25, + 250 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 250 - }, + "range": [ + 0, + 250 + ], "loc": null, - "range": { - "start": 0, - "end": 250 - } + "range": [ + 0, + 250 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 250 - } + "range": [ + 0, + 250 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-computed-access-assignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-computed-access-assignment.js.snap index d4d65a3799..5e6efeb026 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-computed-access-assignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-computed-access-assignment.js.snap @@ -22,10 +22,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -33,30 +33,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -73,10 +73,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "init": { "type": "ObjectExpression", @@ -88,36 +88,36 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "loc": null, - "range": { - "start": 38, - "end": 42 - } + "range": [ + 38, + 42 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] }, "loc": null, - "range": { - "start": 32, - "end": 44 - } + "range": [ + 32, + 44 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 45 - } + "range": [ + 26, + 45 + ] }, { "type": "ExpressionStatement", @@ -131,27 +131,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "computed": true, "loc": null, - "range": { - "start": 48, - "end": 52 - } + "range": [ + 48, + 52 + ] }, "right": { "type": "MemberExpression", @@ -160,40 +160,40 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "computed": true, "loc": null, - "range": { - "start": 55, - "end": 59 - } + "range": [ + 55, + 59 + ] }, "loc": null, - "range": { - "start": 48, - "end": 59 - } + "range": [ + 48, + 59 + ] }, "directive": null, "loc": null, - "range": { - "start": 48, - "end": 60 - } + "range": [ + 48, + 60 + ] }, { "type": "ExpressionStatement", @@ -207,10 +207,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "property": { "type": "BinaryExpression", @@ -218,33 +218,33 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "computed": true, "loc": null, - "range": { - "start": 63, - "end": 71 - } + "range": [ + 63, + 71 + ] }, "right": { "type": "MemberExpression", @@ -253,10 +253,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "property": { "type": "BinaryExpression", @@ -265,72 +265,72 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "operator": "*", "right": { "type": "NumericLiteral", "value": 4.0, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "loc": null, - "range": { - "start": 76, - "end": 81 - } + "range": [ + 76, + 81 + ] }, "computed": true, "loc": null, - "range": { - "start": 74, - "end": 82 - } + "range": [ + 74, + 82 + ] }, "loc": null, - "range": { - "start": 63, - "end": 82 - } + "range": [ + 63, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 83 - } + "range": [ + 63, + 83 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 85 - } + "range": [ + 22, + 85 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 85 - }, + "range": [ + 0, + 85 + ], "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-expression-string-literal-key.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-expression-string-literal-key.js.snap index 59a9c7f2e5..24b7daaf8b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-expression-string-literal-key.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-expression-string-literal-key.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", @@ -66,10 +66,10 @@ Output: "type": "StringLiteral", "value": "foo", "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "value": { "type": "MemberExpression", @@ -78,57 +78,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 60 - } + "range": [ + 51, + 60 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": true, "loc": null, - "range": { - "start": 42, - "end": 60 - } + "range": [ + 42, + 60 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 62 - } + "range": [ + 40, + 62 + ] }, "loc": null, - "range": { - "start": 36, - "end": 62 - } + "range": [ + 36, + 62 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 63 - } + "range": [ + 30, + 63 + ] }, { "type": "ReturnStatement", @@ -137,42 +137,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 66, - "end": 75 - } + "range": [ + 66, + 75 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 77 - } + "range": [ + 26, + 77 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 77 - }, + "range": [ + 0, + 77 + ], "loc": null, - "range": { - "start": 0, - "end": 77 - } + "range": [ + 0, + 77 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 77 - } + "range": [ + 0, + 77 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-literal-spread-element.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-literal-spread-element.js.snap index 6e61d54ad4..933dc9a6a4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-literal-spread-element.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-literal-spread-element.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", @@ -69,53 +69,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] }, "loc": null, - "range": { - "start": 42, - "end": 54 - } + "range": [ + 42, + 54 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 56 - } + "range": [ + 40, + 56 + ] }, "loc": null, - "range": { - "start": 36, - "end": 56 - } + "range": [ + 36, + 56 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 57 - } + "range": [ + 30, + 57 + ] }, { "type": "ReturnStatement", @@ -124,42 +124,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "loc": null, - "range": { - "start": 60, - "end": 69 - } + "range": [ + 60, + 69 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 71 - } + "range": [ + 26, + 71 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 71 - }, + "range": [ + 0, + 71 + ], "loc": null, - "range": { - "start": 0, - "end": 71 - } + "range": [ + 0, + 71 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 71 - } + "range": [ + 0, + 71 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-pattern-params.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-pattern-params.js.snap index 87af8c9ed6..d2041e7887 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-pattern-params.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-pattern-params.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,30 +38,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 22 - } + "range": [ + 21, + 22 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 21, - "end": 22 - } + "range": [ + 21, + 22 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 21, - "end": 22 - } + "range": [ + 21, + 22 + ] }, { "type": "Property", @@ -70,37 +70,37 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 27 - } + "range": [ + 19, + 27 + ] } ], "body": { @@ -117,10 +117,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "init": { "type": "ObjectExpression", @@ -132,50 +132,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] }, "loc": null, - "range": { - "start": 37, - "end": 46 - } + "range": [ + 37, + 46 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 47 - } + "range": [ + 33, + 47 + ] }, { "type": "VariableDeclaration", @@ -188,10 +188,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "init": { "type": "ObjectExpression", @@ -203,50 +203,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 63 - } + "range": [ + 58, + 63 + ] }, "loc": null, - "range": { - "start": 54, - "end": 63 - } + "range": [ + 54, + 63 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 64 - } + "range": [ + 50, + 64 + ] }, { "type": "ReturnStatement", @@ -260,30 +260,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, { "type": "Property", @@ -292,69 +292,69 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "value": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 82 - } + "range": [ + 74, + 82 + ] }, "loc": null, - "range": { - "start": 67, - "end": 83 - } + "range": [ + 67, + 83 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 85 - } + "range": [ + 29, + 85 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 85 - }, + "range": [ + 0, + 85 + ], "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-properties.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-properties.js.snap index 878da48a7f..af1263658d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-properties.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@object-properties.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,30 +35,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -75,10 +75,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "init": { "type": "MemberExpression", @@ -87,40 +87,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "loc": null, - "range": { - "start": 32, - "end": 39 - } + "range": [ + 32, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "VariableDeclaration", @@ -133,10 +133,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "init": { "type": "ObjectExpression", @@ -152,70 +152,70 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 61 - } + "range": [ + 58, + 61 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "computed": false, "loc": null, - "range": { - "start": 58, - "end": 63 - } + "range": [ + 58, + 63 + ] }, "loc": null, - "range": { - "start": 55, - "end": 63 - } + "range": [ + 55, + 63 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 65 - } + "range": [ + 53, + 65 + ] }, "loc": null, - "range": { - "start": 49, - "end": 65 - } + "range": [ + 49, + 65 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 66 - } + "range": [ + 43, + 66 + ] }, { "type": "ExpressionStatement", @@ -229,27 +229,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "right": { "type": "MemberExpression", @@ -260,57 +260,57 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 78 - } + "range": [ + 75, + 78 + ] }, "property": { "type": "Identifier", "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 80 - } + "range": [ + 75, + 80 + ] }, "loc": null, - "range": { - "start": 69, - "end": 80 - } + "range": [ + 69, + 80 + ] }, "directive": null, "loc": null, - "range": { - "start": 69, - "end": 81 - } + "range": [ + 69, + 81 + ] }, { "type": "ExpressionStatement", @@ -321,10 +321,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 87 - } + "range": [ + 84, + 87 + ] }, "arguments": [ { @@ -336,58 +336,58 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 91 - } + "range": [ + 88, + 91 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 94 - } + "range": [ + 84, + 94 + ] }, "directive": null, "loc": null, - "range": { - "start": 84, - "end": 95 - } + "range": [ + 84, + 95 + ] }, { "type": "ExpressionStatement", @@ -403,84 +403,84 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "computed": false, "loc": null, - "range": { - "start": 99, - "end": 102 - } + "range": [ + 99, + 102 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "computed": false, "loc": null, - "range": { - "start": 99, - "end": 104 - } + "range": [ + 99, + 104 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 105 - } + "range": [ + 98, + 105 + ] }, "directive": null, "loc": null, - "range": { - "start": 98, - "end": 106 - } + "range": [ + 98, + 106 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 108 - } + "range": [ + 22, + 108 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 108 - }, + "range": [ + 0, + 108 + ], "loc": null, - "range": { - "start": 0, - "end": 108 - } + "range": [ + 0, + 108 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 108 - } + "range": [ + 0, + 108 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-chained.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-chained.js.snap index 02b54184ad..c73f034c2e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-chained.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-chained.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -31,10 +31,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "call", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 41 - } + "range": [ + 37, + 41 + ] }, "arguments": [ { @@ -66,35 +66,35 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "computed": false, "loc": null, - "range": { - "start": 44, - "end": 51 - } + "range": [ + 44, + 51 + ] } ], "optional": true, "loc": null, - "range": { - "start": 37, - "end": 52 - } + "range": [ + 37, + 52 + ] }, "arguments": [ { @@ -104,35 +104,35 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 60 - } + "range": [ + 55, + 60 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "computed": false, "loc": null, - "range": { - "start": 55, - "end": 62 - } + "range": [ + 55, + 62 + ] } ], "optional": true, "loc": null, - "range": { - "start": 37, - "end": 63 - } + "range": [ + 37, + 63 + ] }, "arguments": [ { @@ -142,67 +142,67 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "computed": false, "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] } ], "optional": true, "loc": null, - "range": { - "start": 37, - "end": 74 - } + "range": [ + 37, + 74 + ] }, "loc": null, - "range": { - "start": 30, - "end": 75 - } + "range": [ + 30, + 75 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 77 - } + "range": [ + 26, + 77 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 77 - }, + "range": [ + 0, + 77 + ], "loc": null, - "range": { - "start": 0, - "end": 77 - } + "range": [ + 0, + 77 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 77 - } + "range": [ + 0, + 77 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-logical.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-logical.js.snap index 97403168c6..387fefb28b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-logical.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-logical.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "CallExpression", @@ -64,10 +64,10 @@ Output: "name": "useFragment", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, "arguments": [ { @@ -77,10 +77,10 @@ Output: "name": "graphql", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 62 - } + "range": [ + 55, + 62 + ] }, "quasi": { "type": "TemplateLiteral", @@ -93,24 +93,24 @@ Output: "raw": "..." }, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, { "type": "MemberExpression", @@ -119,47 +119,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "property": { "type": "Identifier", "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 79 - } + "range": [ + 69, + 79 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 80 - } + "range": [ + 43, + 80 + ] }, "loc": null, - "range": { - "start": 36, - "end": 80 - } + "range": [ + 36, + 80 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 81 - } + "range": [ + 30, + 81 + ] }, { "type": "ReturnStatement", @@ -177,45 +177,45 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 95 - } + "range": [ + 91, + 95 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 101 - } + "range": [ + 96, + 101 + ] }, "computed": false, "loc": null, - "range": { - "start": 91, - "end": 101 - } + "range": [ + 91, + 101 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 106 - } + "range": [ + 103, + 106 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 91, - "end": 106 - } + "range": [ + 91, + 106 + ] }, "arguments": [ { @@ -227,10 +227,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 112 - } + "range": [ + 108, + 112 + ] } ], "body": { @@ -240,10 +240,10 @@ Output: "name": "renderItem", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 127 - } + "range": [ + 117, + 127 + ] }, "arguments": [ { @@ -251,86 +251,86 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 132 - } + "range": [ + 128, + 132 + ] } ], "loc": null, - "range": { - "start": 117, - "end": 133 - } + "range": [ + 117, + 133 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 107, - "end": 133 - }, + "range": [ + 107, + 133 + ], "expression": true, "loc": null, - "range": { - "start": 107, - "end": 133 - } + "range": [ + 107, + 133 + ] } ], "optional": false, "loc": null, - "range": { - "start": 91, - "end": 134 - } + "range": [ + 91, + 134 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 138, - "end": 140 - } + "range": [ + 138, + 140 + ] }, "loc": null, - "range": { - "start": 91, - "end": 140 - } + "range": [ + 91, + 140 + ] }, "loc": null, - "range": { - "start": 84, - "end": 141 - } + "range": [ + 84, + 141 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 143 - } + "range": [ + 26, + 143 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 143 - }, + "range": [ + 0, + 143 + ], "loc": null, - "range": { - "start": 0, - "end": 143 - } + "range": [ + 0, + 143 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 143 - } + "range": [ + 0, + 143 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-simple.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-simple.js.snap index fdcec7779c..4499d8c566 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-simple.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-simple.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -31,10 +31,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -49,10 +49,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 40 - } + "range": [ + 37, + 40 + ] }, "arguments": [ { @@ -60,50 +60,50 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] } ], "optional": true, "loc": null, - "range": { - "start": 37, - "end": 49 - } + "range": [ + 37, + 49 + ] }, "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 52 - } + "range": [ + 26, + 52 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 52 - }, + "range": [ + 0, + 52 + ], "loc": null, - "range": { - "start": 0, - "end": 52 - } + "range": [ + 0, + 52 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 52 - } + "range": [ + 0, + 52 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-with-independently-memoizable-arg.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-with-independently-memoizable-arg.js.snap index a8ebc2338e..25b9c4ab8b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-with-independently-memoizable-arg.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-with-independently-memoizable-arg.js.snap @@ -30,10 +30,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -41,10 +41,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -61,10 +61,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -73,10 +73,10 @@ Output: "name": "makeOptionalFunction", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 60 - } + "range": [ + 40, + 60 + ] }, "arguments": [ { @@ -84,30 +84,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 67 - } + "range": [ + 40, + 67 + ] }, "loc": null, - "range": { - "start": 36, - "end": 67 - } + "range": [ + 36, + 67 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 68 - } + "range": [ + 30, + 68 + ] }, { "type": "VariableDeclaration", @@ -120,10 +120,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 351, - "end": 352 - } + "range": [ + 351, + 352 + ] }, "init": { "type": "OptionalCallExpression", @@ -132,10 +132,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 355, - "end": 356 - } + "range": [ + 355, + 356 + ] }, "arguments": [ { @@ -146,18 +146,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 365, - "end": 368 - } + "range": [ + 365, + 368 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 364, - "end": 369 - } + "range": [ + 364, + 369 + ] }, "children": [ { @@ -165,10 +165,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 369, - "end": 376 - } + "range": [ + 369, + 376 + ] }, { "type": "JSXElement", @@ -178,18 +178,18 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 377, - "end": 381 - } + "range": [ + 377, + 381 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 376, - "end": 382 - } + "range": [ + 376, + 382 + ] }, "children": [ { @@ -201,33 +201,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 383, - "end": 388 - } + "range": [ + 383, + 388 + ] }, "property": { "type": "Identifier", "name": "text", "typeAnnotation": null, "loc": null, - "range": { - "start": 389, - "end": 393 - } + "range": [ + 389, + 393 + ] }, "computed": false, "loc": null, - "range": { - "start": 383, - "end": 393 - } + "range": [ + 383, + 393 + ] }, "loc": null, - "range": { - "start": 382, - "end": 394 - } + "range": [ + 382, + 394 + ] } ], "closingElement": { @@ -236,32 +236,32 @@ Output: "type": "JSXIdentifier", "name": "span", "loc": null, - "range": { - "start": 396, - "end": 400 - } + "range": [ + 396, + 400 + ] }, "loc": null, - "range": { - "start": 394, - "end": 401 - } + "range": [ + 394, + 401 + ] }, "loc": null, - "range": { - "start": 376, - "end": 401 - } + "range": [ + 376, + 401 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 401, - "end": 406 - } + "range": [ + 401, + 406 + ] } ], "closingElement": { @@ -270,43 +270,43 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 408, - "end": 411 - } + "range": [ + 408, + 411 + ] }, "loc": null, - "range": { - "start": 406, - "end": 412 - } + "range": [ + 406, + 412 + ] }, "loc": null, - "range": { - "start": 364, - "end": 412 - } + "range": [ + 364, + 412 + ] } ], "optional": true, "loc": null, - "range": { - "start": 355, - "end": 416 - } + "range": [ + 355, + 416 + ] }, "loc": null, - "range": { - "start": 351, - "end": 416 - } + "range": [ + 351, + 416 + ] } ], "loc": null, - "range": { - "start": 345, - "end": 417 - } + "range": [ + 345, + 417 + ] }, { "type": "ReturnStatement", @@ -315,42 +315,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 427, - "end": 428 - } + "range": [ + 427, + 428 + ] }, "loc": null, - "range": { - "start": 420, - "end": 429 - } + "range": [ + 420, + 429 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 431 - } + "range": [ + 26, + 431 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 431 - }, + "range": [ + 0, + 431 + ], "loc": null, - "range": { - "start": 0, - "end": 431 - } + "range": [ + 0, + 431 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 431 - } + "range": [ + 0, + 431 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-with-optional-property-load.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-with-optional-property-load.js.snap index c07cefc96e..70c06a4067 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-with-optional-property-load.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call-with-optional-property-load.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -31,10 +31,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,46 +60,46 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 37, - "end": 49 - } + "range": [ + 37, + 49 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 37, - "end": 54 - } + "range": [ + 37, + 54 + ] }, "arguments": [ { @@ -107,36 +107,36 @@ Output: "name": "render", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] } ], "optional": true, "loc": null, - "range": { - "start": 37, - "end": 64 - } + "range": [ + 37, + 64 + ] }, "property": { "type": "Identifier", "name": "filter", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 72 - } + "range": [ + 66, + 72 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 37, - "end": 72 - } + "range": [ + 37, + 72 + ] }, "arguments": [ { @@ -144,65 +144,65 @@ Output: "name": "Boolean", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 80 - } + "range": [ + 73, + 80 + ] } ], "optional": false, "loc": null, - "range": { - "start": 37, - "end": 81 - } + "range": [ + 37, + 81 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 85, - "end": 87 - } + "range": [ + 85, + 87 + ] }, "loc": null, - "range": { - "start": 37, - "end": 87 - } + "range": [ + 37, + 87 + ] }, "loc": null, - "range": { - "start": 30, - "end": 88 - } + "range": [ + 30, + 88 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 90 - } + "range": [ + 26, + 90 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 90 - }, + "range": [ + 0, + 90 + ], "loc": null, - "range": { - "start": 0, - "end": 90 - } + "range": [ + 0, + 90 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 90 - } + "range": [ + 0, + 90 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call.js.snap index 37edb087c6..72dc624baf 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-call.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -66,10 +66,10 @@ Output: "name": "makeOptionalFunction", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 60 - } + "range": [ + 40, + 60 + ] }, "arguments": [ { @@ -77,30 +77,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 67 - } + "range": [ + 40, + 67 + ] }, "loc": null, - "range": { - "start": 36, - "end": 67 - } + "range": [ + 36, + 67 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 68 - } + "range": [ + 30, + 68 + ] }, { "type": "VariableDeclaration", @@ -113,10 +113,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "CallExpression", @@ -125,10 +125,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 91 - } + "range": [ + 81, + 91 + ] }, "arguments": [ { @@ -136,30 +136,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 97 - } + "range": [ + 92, + 97 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 98 - } + "range": [ + 81, + 98 + ] }, "loc": null, - "range": { - "start": 77, - "end": 98 - } + "range": [ + 77, + 98 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 99 - } + "range": [ + 71, + 99 + ] }, { "type": "VariableDeclaration", @@ -172,10 +172,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "init": { "type": "OptionalCallExpression", @@ -184,10 +184,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "arguments": [ { @@ -197,27 +197,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 116, - "end": 119 - } + "range": [ + 116, + 119 + ] }, { "type": "MemberExpression", @@ -226,27 +226,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 126 - } + "range": [ + 121, + 126 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "computed": false, "loc": null, - "range": { - "start": 121, - "end": 128 - } + "range": [ + 121, + 128 + ] }, { "type": "CallExpression", @@ -255,10 +255,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 133 - } + "range": [ + 130, + 133 + ] }, "arguments": [ { @@ -268,34 +268,34 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 137 - } + "range": [ + 136, + 137 + ] }, "computed": false, "loc": null, - "range": { - "start": 134, - "end": 137 - } + "range": [ + 134, + 137 + ] } ], "loc": null, - "range": { - "start": 130, - "end": 138 - } + "range": [ + 130, + 138 + ] }, { "type": "CallExpression", @@ -304,10 +304,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 143 - } + "range": [ + 140, + 143 + ] }, "arguments": [ { @@ -317,55 +317,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 149 - } + "range": [ + 144, + 149 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "computed": false, "loc": null, - "range": { - "start": 144, - "end": 151 - } + "range": [ + 144, + 151 + ] } ], "loc": null, - "range": { - "start": 140, - "end": 152 - } + "range": [ + 140, + 152 + ] } ], "optional": true, "loc": null, - "range": { - "start": 112, - "end": 153 - } + "range": [ + 112, + 153 + ] }, "loc": null, - "range": { - "start": 108, - "end": 153 - } + "range": [ + 108, + 153 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 154 - } + "range": [ + 102, + 154 + ] }, { "type": "ReturnStatement", @@ -374,42 +374,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 165 - } + "range": [ + 164, + 165 + ] }, "loc": null, - "range": { - "start": 157, - "end": 166 - } + "range": [ + 157, + 166 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 168 - } + "range": [ + 26, + 168 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 168 - }, + "range": [ + 0, + 168 + ], "loc": null, - "range": { - "start": 0, - "end": 168 - } + "range": [ + 0, + 168 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 168 - } + "range": [ + 0, + 168 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-computed-load-static.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-computed-load-static.js.snap index e6f80d2047..a3c153ffed 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-computed-load-static.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-computed-load-static.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "OptionalMemberExpression", @@ -68,76 +68,76 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 38, - "end": 42 - } + "range": [ + 38, + 42 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "computed": false, "optional": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "computed": true, "optional": false, "loc": null, - "range": { - "start": 38, - "end": 47 - } + "range": [ + 38, + 47 + ] }, "loc": null, - "range": { - "start": 34, - "end": 47 - } + "range": [ + 34, + 47 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 48 - } + "range": [ + 30, + 48 + ] }, { "type": "ReturnStatement", @@ -146,42 +146,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "loc": null, - "range": { - "start": 51, - "end": 60 - } + "range": [ + 51, + 60 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 62 - } + "range": [ + 26, + 62 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 62 - }, + "range": [ + 0, + 62 + ], "loc": null, - "range": { - "start": 0, - "end": 62 - } + "range": [ + 0, + 62 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 62 - } + "range": [ + 0, + 62 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-computed-member-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-computed-member-expression.js.snap index efd0c7f10f..916578f438 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-computed-member-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-computed-member-expression.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "object", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] }, "init": { "type": "CallExpression", @@ -64,10 +64,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 55 - } + "range": [ + 45, + 55 + ] }, "arguments": [ { @@ -75,30 +75,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 62 - } + "range": [ + 45, + 62 + ] }, "loc": null, - "range": { - "start": 36, - "end": 62 - } + "range": [ + 36, + 62 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 63 - } + "range": [ + 30, + 63 + ] }, { "type": "ReturnStatement", @@ -109,10 +109,10 @@ Output: "name": "object", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 79 - } + "range": [ + 73, + 79 + ] }, "property": { "type": "MemberExpression", @@ -121,67 +121,67 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] }, "property": { "type": "Identifier", "name": "key", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 91 - } + "range": [ + 88, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 91 - } + "range": [ + 82, + 91 + ] }, "computed": true, "optional": true, "loc": null, - "range": { - "start": 73, - "end": 92 - } + "range": [ + 73, + 92 + ] }, "loc": null, - "range": { - "start": 66, - "end": 93 - } + "range": [ + 66, + 93 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 95 - } + "range": [ + 26, + 95 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 95 - }, + "range": [ + 0, + 95 + ], "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 95 - } + "range": [ + 0, + 95 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-call-as-property.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-call-as-property.js.snap index 7bc5393f1a..595856c455 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-call-as-property.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-call-as-property.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -64,30 +64,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "ReturnStatement", @@ -98,10 +98,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "property": { "type": "CallExpression", @@ -110,10 +110,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] }, "arguments": [ { @@ -123,74 +123,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 76 - } + "range": [ + 71, + 76 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 82 - } + "range": [ + 77, + 82 + ] }, "computed": false, "loc": null, - "range": { - "start": 71, - "end": 82 - } + "range": [ + 71, + 82 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 83 - } + "range": [ + 67, + 83 + ] }, "computed": true, "optional": true, "loc": null, - "range": { - "start": 63, - "end": 84 - } + "range": [ + 63, + 84 + ] }, "loc": null, - "range": { - "start": 56, - "end": 85 - } + "range": [ + 56, + 85 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 87 - } + "range": [ + 26, + 87 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 87 - }, + "range": [ + 0, + 87 + ], "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-chain.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-chain.js.snap index 6778ef6dce..09b9e0ac0d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-chain.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-chain.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 134 - } + "range": [ + 125, + 134 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 140 - } + "range": [ + 135, + 140 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "init": { "type": "OptionalMemberExpression", @@ -69,59 +69,59 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 159 - } + "range": [ + 154, + 159 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 154, - "end": 162 - } + "range": [ + 154, + 162 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 164 - } + "range": [ + 163, + 164 + ] }, "computed": false, "optional": false, "loc": null, - "range": { - "start": 154, - "end": 164 - } + "range": [ + 154, + 164 + ] }, "loc": null, - "range": { - "start": 150, - "end": 164 - } + "range": [ + 150, + 164 + ] } ], "loc": null, - "range": { - "start": 146, - "end": 165 - } + "range": [ + 146, + 165 + ] }, { "type": "VariableDeclaration", @@ -134,10 +134,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 173 - } + "range": [ + 172, + 173 + ] }, "init": { "type": "OptionalMemberExpression", @@ -158,149 +158,149 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 176, - "end": 181 - } + "range": [ + 176, + 181 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 176, - "end": 184 - } + "range": [ + 176, + 184 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "computed": false, "optional": false, "loc": null, - "range": { - "start": 176, - "end": 186 - } + "range": [ + 176, + 186 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 188 - } + "range": [ + 187, + 188 + ] }, "computed": false, "optional": false, "loc": null, - "range": { - "start": 176, - "end": 188 - } + "range": [ + 176, + 188 + ] }, "property": { "type": "Identifier", "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 191 - } + "range": [ + 190, + 191 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 176, - "end": 191 - } + "range": [ + 176, + 191 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, "computed": false, "optional": false, "loc": null, - "range": { - "start": 176, - "end": 193 - } + "range": [ + 176, + 193 + ] }, "property": { "type": "Identifier", "name": "g", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 195 - } + "range": [ + 194, + 195 + ] }, "computed": false, "optional": false, "loc": null, - "range": { - "start": 176, - "end": 195 - } + "range": [ + 176, + 195 + ] }, "property": { "type": "Identifier", "name": "h", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 198 - } + "range": [ + 197, + 198 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 176, - "end": 198 - } + "range": [ + 176, + 198 + ] }, "loc": null, - "range": { - "start": 172, - "end": 198 - } + "range": [ + 172, + 198 + ] } ], "loc": null, - "range": { - "start": 168, - "end": 199 - } + "range": [ + 168, + 199 + ] }, { "type": "ReturnStatement", @@ -314,30 +314,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 212 - } + "range": [ + 211, + 212 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 212 - } + "range": [ + 211, + 212 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 211, - "end": 212 - } + "range": [ + 211, + 212 + ] }, { "type": "Property", @@ -346,69 +346,69 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 215 - } + "range": [ + 214, + 215 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 215 - } + "range": [ + 214, + 215 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 214, - "end": 215 - } + "range": [ + 214, + 215 + ] } ], "loc": null, - "range": { - "start": 209, - "end": 217 - } + "range": [ + 209, + 217 + ] }, "loc": null, - "range": { - "start": 202, - "end": 218 - } + "range": [ + 202, + 218 + ] } ], "loc": null, - "range": { - "start": 142, - "end": 220 - } + "range": [ + 142, + 220 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 116, - "end": 220 - }, + "range": [ + 116, + 220 + ], "loc": null, - "range": { - "start": 116, - "end": 220 - } + "range": [ + 116, + 220 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 116, - "end": 220 - } + "range": [ + 116, + 220 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-with-optional-member-expr-as-property.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-with-optional-member-expr-as-property.js.snap index 6de55ecdcc..513b7f74f3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-with-optional-member-expr-as-property.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression-with-optional-member-expr-as-property.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -64,30 +64,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [], "loc": null, - "range": { - "start": 40, - "end": 52 - } + "range": [ + 40, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "ReturnStatement", @@ -100,27 +100,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 66 - } + "range": [ + 63, + 66 + ] }, "property": { "type": "OptionalMemberExpression", @@ -131,27 +131,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 76 - } + "range": [ + 69, + 76 + ] }, "property": { "type": "OptionalMemberExpression", @@ -162,27 +162,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 86 - } + "range": [ + 79, + 86 + ] }, "property": { "type": "MemberExpression", @@ -191,83 +191,83 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 94 - } + "range": [ + 89, + 94 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "computed": false, "loc": null, - "range": { - "start": 89, - "end": 96 - } + "range": [ + 89, + 96 + ] }, "computed": true, "optional": true, "loc": null, - "range": { - "start": 79, - "end": 97 - } + "range": [ + 79, + 97 + ] }, "computed": true, "optional": true, "loc": null, - "range": { - "start": 69, - "end": 98 - } + "range": [ + 69, + 98 + ] }, "computed": true, "optional": true, "loc": null, - "range": { - "start": 63, - "end": 99 - } + "range": [ + 63, + 99 + ] }, "loc": null, - "range": { - "start": 56, - "end": 100 - } + "range": [ + 56, + 100 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 102 - } + "range": [ + 26, + 102 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 102 - }, + "range": [ + 0, + 102 + ], "loc": null, - "range": { - "start": 0, - "end": 102 - } + "range": [ + 0, + 102 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 102 - } + "range": [ + 0, + 102 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression.js.snap index 242b6026a4..740f5ae0d4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-member-expression.js.snap @@ -24,10 +24,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "CallExpression", @@ -67,10 +67,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 35 - } + "range": [ + 32, + 35 + ] }, "arguments": [ { @@ -80,47 +80,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 43 - } + "range": [ + 36, + 43 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 44 - } + "range": [ + 32, + 44 + ] }, "loc": null, - "range": { - "start": 28, - "end": 44 - } + "range": [ + 28, + 44 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 45 - } + "range": [ + 24, + 45 + ] }, { "type": "VariableDeclaration", @@ -133,10 +133,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "OptionalMemberExpression", @@ -145,41 +145,41 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 56, - "end": 60 - } + "range": [ + 56, + 60 + ] }, "loc": null, - "range": { - "start": 52, - "end": 60 - } + "range": [ + 52, + 60 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 61 - } + "range": [ + 48, + 61 + ] }, { "type": "VariableDeclaration", @@ -192,10 +192,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "init": { "type": "CallExpression", @@ -204,10 +204,10 @@ Output: "name": "useBar", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 79 - } + "range": [ + 73, + 79 + ] }, "arguments": [ { @@ -215,30 +215,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 82 - } + "range": [ + 73, + 82 + ] }, "loc": null, - "range": { - "start": 69, - "end": 82 - } + "range": [ + 69, + 82 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 83 - } + "range": [ + 65, + 83 + ] }, { "type": "ReturnStatement", @@ -247,42 +247,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 97 - } + "range": [ + 20, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 97 - }, + "range": [ + 0, + 97 + ], "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-method-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-method-call.js.snap index e1746c3049..d29cf26251 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-method-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-method-call.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -66,10 +66,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 50 - } + "range": [ + 40, + 50 + ] }, "arguments": [ { @@ -77,30 +77,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 57 - } + "range": [ + 40, + 57 + ] }, "loc": null, - "range": { - "start": 36, - "end": 57 - } + "range": [ + 36, + 57 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 58 - } + "range": [ + 30, + 58 + ] }, { "type": "VariableDeclaration", @@ -113,10 +113,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "init": { "type": "CallExpression", @@ -125,10 +125,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 81 - } + "range": [ + 71, + 81 + ] }, "arguments": [ { @@ -136,30 +136,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 88 - } + "range": [ + 71, + 88 + ] }, "loc": null, - "range": { - "start": 67, - "end": 88 - } + "range": [ + 67, + 88 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 89 - } + "range": [ + 61, + 89 + ] }, { "type": "VariableDeclaration", @@ -172,10 +172,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "init": { "type": "OptionalCallExpression", @@ -186,27 +186,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "property": { "type": "Identifier", "name": "optionalMethod", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 118 - } + "range": [ + 104, + 118 + ] }, "computed": false, "loc": null, - "range": { - "start": 102, - "end": 118 - } + "range": [ + 102, + 118 + ] }, "arguments": [ { @@ -216,27 +216,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 124 - } + "range": [ + 123, + 124 + ] }, "computed": false, "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] }, { "type": "MemberExpression", @@ -245,27 +245,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 131 - } + "range": [ + 126, + 131 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 126, - "end": 133 - } + "range": [ + 126, + 133 + ] }, { "type": "CallExpression", @@ -274,10 +274,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 138 - } + "range": [ + 135, + 138 + ] }, "arguments": [ { @@ -287,34 +287,34 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 140 - } + "range": [ + 139, + 140 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "computed": false, "loc": null, - "range": { - "start": 139, - "end": 142 - } + "range": [ + 139, + 142 + ] } ], "loc": null, - "range": { - "start": 135, - "end": 143 - } + "range": [ + 135, + 143 + ] }, { "type": "CallExpression", @@ -323,10 +323,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 148 - } + "range": [ + 145, + 148 + ] }, "arguments": [ { @@ -336,55 +336,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 154 - } + "range": [ + 149, + 154 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "computed": false, "loc": null, - "range": { - "start": 149, - "end": 156 - } + "range": [ + 149, + 156 + ] } ], "loc": null, - "range": { - "start": 145, - "end": 157 - } + "range": [ + 145, + 157 + ] } ], "optional": true, "loc": null, - "range": { - "start": 102, - "end": 158 - } + "range": [ + 102, + 158 + ] }, "loc": null, - "range": { - "start": 98, - "end": 158 - } + "range": [ + 98, + 158 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 159 - } + "range": [ + 92, + 159 + ] }, { "type": "ReturnStatement", @@ -393,42 +393,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 170 - } + "range": [ + 169, + 170 + ] }, "loc": null, - "range": { - "start": 162, - "end": 171 - } + "range": [ + 162, + 171 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 173 - } + "range": [ + 26, + 173 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 173 - }, + "range": [ + 0, + 173 + ], "loc": null, - "range": { - "start": 0, - "end": 173 - } + "range": [ + 0, + 173 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 173 - } + "range": [ + 0, + 173 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-receiver-method-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-receiver-method-call.js.snap index 1b16bc5eb4..aa48c26bfc 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-receiver-method-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-receiver-method-call.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -66,10 +66,10 @@ Output: "name": "makeOptionalObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 58 - } + "range": [ + 40, + 58 + ] }, "arguments": [ { @@ -77,30 +77,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 65 - } + "range": [ + 40, + 65 + ] }, "loc": null, - "range": { - "start": 36, - "end": 65 - } + "range": [ + 36, + 65 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 66 - } + "range": [ + 30, + 66 + ] }, { "type": "VariableDeclaration", @@ -113,10 +113,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "init": { "type": "CallExpression", @@ -125,10 +125,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 89 - } + "range": [ + 79, + 89 + ] }, "arguments": [ { @@ -136,30 +136,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 96 - } + "range": [ + 79, + 96 + ] }, "loc": null, - "range": { - "start": 75, - "end": 96 - } + "range": [ + 75, + 96 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 97 - } + "range": [ + 69, + 97 + ] }, { "type": "VariableDeclaration", @@ -172,10 +172,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "init": { "type": "OptionalCallExpression", @@ -186,28 +186,28 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "property": { "type": "Identifier", "name": "method", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 119 - } + "range": [ + 113, + 119 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 110, - "end": 119 - } + "range": [ + 110, + 119 + ] }, "arguments": [ { @@ -217,27 +217,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 123 - } + "range": [ + 120, + 123 + ] }, { "type": "MemberExpression", @@ -246,27 +246,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 130 - } + "range": [ + 125, + 130 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 132 - } + "range": [ + 131, + 132 + ] }, "computed": false, "loc": null, - "range": { - "start": 125, - "end": 132 - } + "range": [ + 125, + 132 + ] }, { "type": "CallExpression", @@ -275,10 +275,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 137 - } + "range": [ + 134, + 137 + ] }, "arguments": [ { @@ -288,34 +288,34 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 138, - "end": 139 - } + "range": [ + 138, + 139 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] }, "computed": false, "loc": null, - "range": { - "start": 138, - "end": 141 - } + "range": [ + 138, + 141 + ] } ], "loc": null, - "range": { - "start": 134, - "end": 142 - } + "range": [ + 134, + 142 + ] }, { "type": "CallExpression", @@ -324,10 +324,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 147 - } + "range": [ + 144, + 147 + ] }, "arguments": [ { @@ -337,55 +337,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 153 - } + "range": [ + 148, + 153 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "computed": false, "loc": null, - "range": { - "start": 148, - "end": 155 - } + "range": [ + 148, + 155 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 156 - } + "range": [ + 144, + 156 + ] } ], "optional": false, "loc": null, - "range": { - "start": 110, - "end": 157 - } + "range": [ + 110, + 157 + ] }, "loc": null, - "range": { - "start": 106, - "end": 157 - } + "range": [ + 106, + 157 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 158 - } + "range": [ + 100, + 158 + ] }, { "type": "ReturnStatement", @@ -394,42 +394,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] }, "loc": null, - "range": { - "start": 161, - "end": 170 - } + "range": [ + 161, + 170 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 172 - } + "range": [ + 26, + 172 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 172 - }, + "range": [ + 0, + 172 + ], "loc": null, - "range": { - "start": 0, - "end": 172 - } + "range": [ + 0, + 172 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 172 - } + "range": [ + 0, + 172 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-receiver-optional-method.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-receiver-optional-method.js.snap index 6cf5c648c2..3197e84448 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-receiver-optional-method.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@optional-receiver-optional-method.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -66,10 +66,10 @@ Output: "name": "makeOptionalObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 58 - } + "range": [ + 40, + 58 + ] }, "arguments": [ { @@ -77,30 +77,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 65 - } + "range": [ + 40, + 65 + ] }, "loc": null, - "range": { - "start": 36, - "end": 65 - } + "range": [ + 36, + 65 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 66 - } + "range": [ + 30, + 66 + ] }, { "type": "VariableDeclaration", @@ -113,10 +113,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "init": { "type": "CallExpression", @@ -125,10 +125,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 89 - } + "range": [ + 79, + 89 + ] }, "arguments": [ { @@ -136,30 +136,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 96 - } + "range": [ + 79, + 96 + ] }, "loc": null, - "range": { - "start": 75, - "end": 96 - } + "range": [ + 75, + 96 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 97 - } + "range": [ + 69, + 97 + ] }, { "type": "VariableDeclaration", @@ -172,10 +172,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "init": { "type": "OptionalCallExpression", @@ -186,28 +186,28 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "property": { "type": "Identifier", "name": "optionalMethod", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 127 - } + "range": [ + 113, + 127 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 110, - "end": 127 - } + "range": [ + 110, + 127 + ] }, "arguments": [ { @@ -217,27 +217,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 130, - "end": 133 - } + "range": [ + 130, + 133 + ] }, { "type": "MemberExpression", @@ -246,27 +246,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 140 - } + "range": [ + 135, + 140 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "computed": false, "loc": null, - "range": { - "start": 135, - "end": 142 - } + "range": [ + 135, + 142 + ] }, { "type": "CallExpression", @@ -275,10 +275,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 147 - } + "range": [ + 144, + 147 + ] }, "arguments": [ { @@ -288,34 +288,34 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 149 - } + "range": [ + 148, + 149 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "computed": false, "loc": null, - "range": { - "start": 148, - "end": 151 - } + "range": [ + 148, + 151 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 152 - } + "range": [ + 144, + 152 + ] }, { "type": "CallExpression", @@ -324,10 +324,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 157 - } + "range": [ + 154, + 157 + ] }, "arguments": [ { @@ -337,55 +337,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 163 - } + "range": [ + 158, + 163 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 165 - } + "range": [ + 164, + 165 + ] }, "computed": false, "loc": null, - "range": { - "start": 158, - "end": 165 - } + "range": [ + 158, + 165 + ] } ], "loc": null, - "range": { - "start": 154, - "end": 166 - } + "range": [ + 154, + 166 + ] } ], "optional": true, "loc": null, - "range": { - "start": 110, - "end": 167 - } + "range": [ + 110, + 167 + ] }, "loc": null, - "range": { - "start": 106, - "end": 167 - } + "range": [ + 106, + 167 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 168 - } + "range": [ + 100, + 168 + ] }, { "type": "ReturnStatement", @@ -394,42 +394,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 178, - "end": 179 - } + "range": [ + 178, + 179 + ] }, "loc": null, - "range": { - "start": 171, - "end": 180 - } + "range": [ + 171, + 180 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 182 - } + "range": [ + 26, + 182 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 182 - }, + "range": [ + 0, + 182 + ], "loc": null, - "range": { - "start": 0, - "end": 182 - } + "range": [ + 0, + 182 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 182 - } + "range": [ + 0, + 182 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-interleaved-by-terminal.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-interleaved-by-terminal.js.snap index b83e4c8bb4..6acb7b090d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-interleaved-by-terminal.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-interleaved-by-terminal.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,30 +38,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -78,32 +78,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 36, - "end": 38 - } + "range": [ + 36, + 38 + ] }, "loc": null, - "range": { - "start": 32, - "end": 38 - } + "range": [ + 32, + 38 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 39 - } + "range": [ + 26, + 39 + ] }, { "type": "VariableDeclaration", @@ -116,32 +116,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 52, - "end": 54 - } + "range": [ + 52, + 54 + ] }, "loc": null, - "range": { - "start": 48, - "end": 54 - } + "range": [ + 48, + 54 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 55 - } + "range": [ + 42, + 55 + ] }, { "type": "IfStatement", @@ -150,26 +150,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] }, "alternate": null, "loc": null, - "range": { - "start": 59, - "end": 71 - } + "range": [ + 59, + 71 + ] }, { "type": "ExpressionStatement", @@ -182,27 +182,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 81 - } + "range": [ + 77, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 81 - } + "range": [ + 75, + 81 + ] }, "arguments": [ { @@ -210,24 +210,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 84 - } + "range": [ + 75, + 84 + ] }, "directive": null, "loc": null, - "range": { - "start": 75, - "end": 85 - } + "range": [ + 75, + 85 + ] }, { "type": "ExpressionStatement", @@ -240,27 +240,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 94 - } + "range": [ + 90, + 94 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 94 - } + "range": [ + 88, + 94 + ] }, "arguments": [ { @@ -268,50 +268,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 98 - } + "range": [ + 88, + 98 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 100 - } + "range": [ + 22, + 100 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 100 - }, + "range": [ + 0, + 100 + ], "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-interleaved.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-interleaved.js.snap index 60fe818f23..6566fc42db 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-interleaved.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-interleaved.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -34,20 +34,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -64,32 +64,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 31, - "end": 33 - } + "range": [ + 31, + 33 + ] }, "loc": null, - "range": { - "start": 27, - "end": 33 - } + "range": [ + 27, + 33 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 34 - } + "range": [ + 23, + 34 + ] }, { "type": "VariableDeclaration", @@ -102,32 +102,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 45, - "end": 47 - } + "range": [ + 45, + 47 + ] }, "loc": null, - "range": { - "start": 41, - "end": 47 - } + "range": [ + 41, + 47 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] }, { "type": "ExpressionStatement", @@ -140,27 +140,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 57 - } + "range": [ + 53, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 57 - } + "range": [ + 51, + 57 + ] }, "arguments": [ { @@ -168,24 +168,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 60 - } + "range": [ + 51, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 51, - "end": 61 - } + "range": [ + 51, + 61 + ] }, { "type": "ExpressionStatement", @@ -198,27 +198,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 70 - } + "range": [ + 66, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 64, - "end": 70 - } + "range": [ + 64, + 70 + ] }, "arguments": [ { @@ -226,50 +226,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 73 - } + "range": [ + 64, + 73 + ] }, "directive": null, "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 76 - } + "range": [ + 19, + 76 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 76 - }, + "range": [ + 0, + 76 + ], "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-shadowed.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-shadowed.js.snap index 4abdb1a210..6ceedd149d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-shadowed.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-shadowed.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -34,20 +34,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -64,32 +64,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 31, - "end": 33 - } + "range": [ + 31, + 33 + ] }, "loc": null, - "range": { - "start": 27, - "end": 33 - } + "range": [ + 27, + 33 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 34 - } + "range": [ + 23, + 34 + ] }, { "type": "VariableDeclaration", @@ -102,32 +102,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 45, - "end": 47 - } + "range": [ + 45, + 47 + ] }, "loc": null, - "range": { - "start": 41, - "end": 47 - } + "range": [ + 41, + 47 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 48 - } + "range": [ + 37, + 48 + ] }, { "type": "ExpressionStatement", @@ -140,27 +140,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 57 - } + "range": [ + 53, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 57 - } + "range": [ + 51, + 57 + ] }, "arguments": [ { @@ -168,24 +168,24 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 60 - } + "range": [ + 51, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 51, - "end": 61 - } + "range": [ + 51, + 61 + ] }, { "type": "ExpressionStatement", @@ -198,27 +198,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 70 - } + "range": [ + 66, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 64, - "end": 70 - } + "range": [ + 64, + 70 + ] }, "arguments": [ { @@ -226,50 +226,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 73 - } + "range": [ + 64, + 73 + ] }, "directive": null, "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 76 - } + "range": [ + 19, + 76 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 76 - }, + "range": [ + 0, + 76 + ], "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-shadowing-within-block.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-shadowing-within-block.js.snap index a0fcf7cdba..8dae7b27ea 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-shadowing-within-block.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-shadowing-within-block.js.snap @@ -29,10 +29,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -40,30 +40,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -80,32 +80,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 34, - "end": 36 - } + "range": [ + 34, + 36 + ] }, "loc": null, - "range": { - "start": 30, - "end": 36 - } + "range": [ + 30, + 36 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 37 - } + "range": [ + 26, + 37 + ] }, { "type": "IfStatement", @@ -114,10 +114,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "consequent": { "type": "BlockStatement", @@ -133,32 +133,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 61, - "end": 63 - } + "range": [ + 61, + 63 + ] }, "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 64 - } + "range": [ + 53, + 64 + ] }, { "type": "IfStatement", @@ -167,10 +167,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "consequent": { "type": "BlockStatement", @@ -186,27 +186,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 90 - } + "range": [ + 86, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 84, - "end": 90 - } + "range": [ + 84, + 90 + ] }, "arguments": [ { @@ -214,38 +214,38 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 93 - } + "range": [ + 84, + 93 + ] }, "directive": null, "loc": null, - "range": { - "start": 84, - "end": 94 - } + "range": [ + 84, + 94 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 100 - } + "range": [ + 76, + 100 + ] }, "alternate": null, "loc": null, - "range": { - "start": 69, - "end": 100 - } + "range": [ + 69, + 100 + ] }, { "type": "ExpressionStatement", @@ -258,27 +258,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 112 - } + "range": [ + 108, + 112 + ] }, "computed": false, "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] }, "arguments": [ { @@ -289,18 +289,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 114, - "end": 117 - } + "range": [ + 114, + 117 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 113, - "end": 118 - } + "range": [ + 113, + 118 + ] }, "children": [ { @@ -310,16 +310,16 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] } ], "closingElement": { @@ -328,50 +328,50 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 123, - "end": 126 - } + "range": [ + 123, + 126 + ] }, "loc": null, - "range": { - "start": 121, - "end": 127 - } + "range": [ + 121, + 127 + ] }, "loc": null, - "range": { - "start": 113, - "end": 127 - } + "range": [ + 113, + 127 + ] } ], "loc": null, - "range": { - "start": 106, - "end": 128 - } + "range": [ + 106, + 128 + ] }, "directive": null, "loc": null, - "range": { - "start": 106, - "end": 129 - } + "range": [ + 106, + 129 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 133 - } + "range": [ + 47, + 133 + ] }, "alternate": null, "loc": null, - "range": { - "start": 40, - "end": 133 - } + "range": [ + 40, + 133 + ] }, { "type": "ReturnStatement", @@ -380,42 +380,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, "loc": null, - "range": { - "start": 136, - "end": 145 - } + "range": [ + 136, + 145 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 147 - } + "range": [ + 22, + 147 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 147 - }, + "range": [ + 0, + 147 + ], "loc": null, - "range": { - "start": 0, - "end": 147 - } + "range": [ + 0, + 147 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 147 - } + "range": [ + 0, + 147 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-while.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-while.js.snap index 5ff3a68e65..4ba18bc0c3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-while.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-while.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -36,30 +36,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -76,32 +76,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 34, - "end": 36 - } + "range": [ + 34, + 36 + ] }, "loc": null, - "range": { - "start": 30, - "end": 36 - } + "range": [ + 30, + 36 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 37 - } + "range": [ + 26, + 37 + ] }, { "type": "VariableDeclaration", @@ -114,32 +114,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 48, - "end": 50 - } + "range": [ + 48, + 50 + ] }, "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 51 - } + "range": [ + 40, + 51 + ] }, { "type": "WhileStatement", @@ -148,10 +148,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "body": { "type": "BlockStatement", @@ -167,27 +167,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 76 - } + "range": [ + 72, + 76 + ] }, "computed": false, "loc": null, - "range": { - "start": 70, - "end": 76 - } + "range": [ + 70, + 76 + ] }, "arguments": [ { @@ -195,24 +195,24 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 79 - } + "range": [ + 70, + 79 + ] }, "directive": null, "loc": null, - "range": { - "start": 70, - "end": 80 - } + "range": [ + 70, + 80 + ] }, { "type": "ExpressionStatement", @@ -225,27 +225,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 91 - } + "range": [ + 87, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 85, - "end": 91 - } + "range": [ + 85, + 91 + ] }, "arguments": [ { @@ -253,63 +253,63 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 94 - } + "range": [ + 85, + 94 + ] }, "directive": null, "loc": null, - "range": { - "start": 85, - "end": 95 - } + "range": [ + 85, + 95 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 99 - } + "range": [ + 64, + 99 + ] }, "loc": null, - "range": { - "start": 54, - "end": 99 - } + "range": [ + 54, + 99 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 101 - } + "range": [ + 22, + 101 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 101 - }, + "range": [ + 0, + 101 + ], "loc": null, - "range": { - "start": 0, - "end": 101 - } + "range": [ + 0, + 101 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 101 - } + "range": [ + 0, + 101 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-within-block.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-within-block.js.snap index e43c834571..0b732a56cd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-within-block.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@overlapping-scopes-within-block.js.snap @@ -29,10 +29,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -40,30 +40,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -80,32 +80,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 34, - "end": 36 - } + "range": [ + 34, + 36 + ] }, "loc": null, - "range": { - "start": 30, - "end": 36 - } + "range": [ + 30, + 36 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 37 - } + "range": [ + 26, + 37 + ] }, { "type": "IfStatement", @@ -114,10 +114,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "consequent": { "type": "BlockStatement", @@ -133,32 +133,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 61, - "end": 63 - } + "range": [ + 61, + 63 + ] }, "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 64 - } + "range": [ + 53, + 64 + ] }, { "type": "IfStatement", @@ -167,10 +167,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "consequent": { "type": "BlockStatement", @@ -186,27 +186,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 90 - } + "range": [ + 86, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 84, - "end": 90 - } + "range": [ + 84, + 90 + ] }, "arguments": [ { @@ -214,38 +214,38 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 93 - } + "range": [ + 84, + 93 + ] }, "directive": null, "loc": null, - "range": { - "start": 84, - "end": 94 - } + "range": [ + 84, + 94 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 100 - } + "range": [ + 76, + 100 + ] }, "alternate": null, "loc": null, - "range": { - "start": 69, - "end": 100 - } + "range": [ + 69, + 100 + ] }, { "type": "ExpressionStatement", @@ -258,27 +258,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 112 - } + "range": [ + 108, + 112 + ] }, "computed": false, "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] }, "arguments": [ { @@ -286,38 +286,38 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] } ], "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] }, "directive": null, "loc": null, - "range": { - "start": 106, - "end": 116 - } + "range": [ + 106, + 116 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 120 - } + "range": [ + 47, + 120 + ] }, "alternate": null, "loc": null, - "range": { - "start": 40, - "end": 120 - } + "range": [ + 40, + 120 + ] }, { "type": "ReturnStatement", @@ -326,42 +326,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "loc": null, - "range": { - "start": 123, - "end": 132 - } + "range": [ + 123, + 132 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 134 - } + "range": [ + 22, + 134 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 134 - }, + "range": [ + 0, + 134 + ], "loc": null, - "range": { - "start": 0, - "end": 134 - } + "range": [ + 0, + 134 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 134 - } + "range": [ + 0, + 134 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-alias-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-alias-mutate.js.snap index 5462f0b4d6..2a3d1466ce 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-alias-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-alias-mutate.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -59,32 +59,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "StringLiteral", "value": "foo", "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "loc": null, - "range": { - "start": 30, - "end": 39 - } + "range": [ + 30, + 39 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 40 - } + "range": [ + 26, + 40 + ] }, { "type": "IfStatement", @@ -93,10 +93,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "consequent": { "type": "BlockStatement", @@ -111,39 +111,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "right": { "type": "StringLiteral", "value": "bar", "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "loc": null, - "range": { - "start": 56, - "end": 65 - } + "range": [ + 56, + 65 + ] }, "directive": null, "loc": null, - "range": { - "start": 56, - "end": 66 - } + "range": [ + 56, + 66 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 70 - } + "range": [ + 50, + 70 + ] }, "alternate": { "type": "BlockStatement", @@ -158,45 +158,45 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "right": { "type": "StringLiteral", "value": "baz", "loc": null, - "range": { - "start": 86, - "end": 91 - } + "range": [ + 86, + 91 + ] }, "loc": null, - "range": { - "start": 82, - "end": 91 - } + "range": [ + 82, + 91 + ] }, "directive": null, "loc": null, - "range": { - "start": 82, - "end": 92 - } + "range": [ + 82, + 92 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 96 - } + "range": [ + 76, + 96 + ] }, "loc": null, - "range": { - "start": 43, - "end": 96 - } + "range": [ + 43, + 96 + ] }, { "type": "VariableDeclaration", @@ -209,33 +209,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 109 - } + "range": [ + 99, + 109 + ] }, { "type": "ExpressionStatement", @@ -246,10 +246,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 118 - } + "range": [ + 112, + 118 + ] }, "arguments": [ { @@ -257,24 +257,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 121 - } + "range": [ + 112, + 121 + ] }, "directive": null, "loc": null, - "range": { - "start": 112, - "end": 122 - } + "range": [ + 112, + 122 + ] }, { "type": "ReturnStatement", @@ -283,42 +283,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "loc": null, - "range": { - "start": 125, - "end": 134 - } + "range": [ + 125, + 134 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 136 - } + "range": [ + 22, + 136 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 136 - }, + "range": [ + 0, + 136 + ], "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-as-dep-nested-scope.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-as-dep-nested-scope.js.snap index 8d53ff47a0..9e418925f7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-as-dep-nested-scope.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-as-dep-nested-scope.js.snap @@ -29,10 +29,10 @@ Output: "name": "PrimitiveAsDepNested", "typeAnnotation": null, "loc": null, - "range": { - "start": 245, - "end": 265 - } + "range": [ + 245, + 265 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 266, - "end": 271 - } + "range": [ + 266, + 271 + ] } ], "body": { @@ -60,32 +60,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 281, - "end": 282 - } + "range": [ + 281, + 282 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 285, - "end": 287 - } + "range": [ + 285, + 287 + ] }, "loc": null, - "range": { - "start": 281, - "end": 287 - } + "range": [ + 281, + 287 + ] } ], "loc": null, - "range": { - "start": 277, - "end": 288 - } + "range": [ + 277, + 288 + ] }, { "type": "ExpressionStatement", @@ -96,10 +96,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 291, - "end": 297 - } + "range": [ + 291, + 297 + ] }, "arguments": [ { @@ -107,24 +107,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 298, - "end": 299 - } + "range": [ + 298, + 299 + ] } ], "loc": null, - "range": { - "start": 291, - "end": 300 - } + "range": [ + 291, + 300 + ] }, "directive": null, "loc": null, - "range": { - "start": 291, - "end": 301 - } + "range": [ + 291, + 301 + ] }, { "type": "VariableDeclaration", @@ -137,10 +137,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 308, - "end": 309 - } + "range": [ + 308, + 309 + ] }, "init": { "type": "CallExpression", @@ -149,10 +149,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 312, - "end": 315 - } + "range": [ + 312, + 315 + ] }, "arguments": [ { @@ -164,63 +164,63 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 316, - "end": 321 - } + "range": [ + 316, + 321 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 322, - "end": 323 - } + "range": [ + 322, + 323 + ] }, "computed": false, "loc": null, - "range": { - "start": 316, - "end": 323 - } + "range": [ + 316, + 323 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 326, - "end": 327 - } + "range": [ + 326, + 327 + ] }, "loc": null, - "range": { - "start": 316, - "end": 327 - } + "range": [ + 316, + 327 + ] } ], "loc": null, - "range": { - "start": 312, - "end": 328 - } + "range": [ + 312, + 328 + ] }, "loc": null, - "range": { - "start": 308, - "end": 328 - } + "range": [ + 308, + 328 + ] } ], "loc": null, - "range": { - "start": 304, - "end": 329 - } + "range": [ + 304, + 329 + ] }, { "type": "ExpressionStatement", @@ -231,10 +231,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 332, - "end": 338 - } + "range": [ + 332, + 338 + ] }, "arguments": [ { @@ -242,10 +242,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 339, - "end": 340 - } + "range": [ + 339, + 340 + ] }, { "type": "MemberExpression", @@ -254,41 +254,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 342, - "end": 347 - } + "range": [ + 342, + 347 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 348, - "end": 349 - } + "range": [ + 348, + 349 + ] }, "computed": false, "loc": null, - "range": { - "start": 342, - "end": 349 - } + "range": [ + 342, + 349 + ] } ], "loc": null, - "range": { - "start": 332, - "end": 350 - } + "range": [ + 332, + 350 + ] }, "directive": null, "loc": null, - "range": { - "start": 332, - "end": 351 - } + "range": [ + 332, + 351 + ] }, { "type": "ReturnStatement", @@ -300,59 +300,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 362, - "end": 363 - } + "range": [ + 362, + 363 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 365, - "end": 366 - } + "range": [ + 365, + 366 + ] } ], "loc": null, - "range": { - "start": 361, - "end": 367 - } + "range": [ + 361, + 367 + ] }, "loc": null, - "range": { - "start": 354, - "end": 368 - } + "range": [ + 354, + 368 + ] } ], "loc": null, - "range": { - "start": 273, - "end": 370 - } + "range": [ + 273, + 370 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 236, - "end": 370 - }, + "range": [ + 236, + 370 + ], "loc": null, - "range": { - "start": 236, - "end": 370 - } + "range": [ + 236, + 370 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 236, - "end": 370 - } + "range": [ + 236, + 370 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-as-dep.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-as-dep.js.snap index a47a802774..ec907086cf 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-as-dep.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@primitive-as-dep.js.snap @@ -26,10 +26,10 @@ Output: "name": "PrimitiveAsDep", "typeAnnotation": null, "loc": null, - "range": { - "start": 245, - "end": 259 - } + "range": [ + 245, + 259 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 265 - } + "range": [ + 260, + 265 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 275, - "end": 276 - } + "range": [ + 275, + 276 + ] }, "init": { "type": "CallExpression", @@ -69,10 +69,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 279, - "end": 282 - } + "range": [ + 279, + 282 + ] }, "arguments": [ { @@ -84,63 +84,63 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 283, - "end": 288 - } + "range": [ + 283, + 288 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 289, - "end": 290 - } + "range": [ + 289, + 290 + ] }, "computed": false, "loc": null, - "range": { - "start": 283, - "end": 290 - } + "range": [ + 283, + 290 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 293, - "end": 294 - } + "range": [ + 293, + 294 + ] }, "loc": null, - "range": { - "start": 283, - "end": 294 - } + "range": [ + 283, + 294 + ] } ], "loc": null, - "range": { - "start": 279, - "end": 295 - } + "range": [ + 279, + 295 + ] }, "loc": null, - "range": { - "start": 275, - "end": 295 - } + "range": [ + 275, + 295 + ] } ], "loc": null, - "range": { - "start": 271, - "end": 296 - } + "range": [ + 271, + 296 + ] }, { "type": "ReturnStatement", @@ -149,42 +149,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 306, - "end": 307 - } + "range": [ + 306, + 307 + ] }, "loc": null, - "range": { - "start": 299, - "end": 308 - } + "range": [ + 299, + 308 + ] } ], "loc": null, - "range": { - "start": 267, - "end": 310 - } + "range": [ + 267, + 310 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 236, - "end": 310 - }, + "range": [ + 236, + 310 + ], "loc": null, - "range": { - "start": 236, - "end": 310 - } + "range": [ + 236, + 310 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 236, - "end": 310 - } + "range": [ + 236, + 310 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@prop-capturing-function-1.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@prop-capturing-function-1.js.snap index 26ce2b82d3..97e27a31bd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@prop-capturing-function-1.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@prop-capturing-function-1.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,20 +35,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -65,10 +65,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "ObjectExpression", @@ -80,30 +80,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, { "type": "Property", @@ -112,50 +112,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 45 - } + "range": [ + 37, + 45 + ] }, "loc": null, - "range": { - "start": 33, - "end": 45 - } + "range": [ + 33, + 45 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 46 - } + "range": [ + 29, + 46 + ] }, { "type": "VariableDeclaration", @@ -168,10 +168,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "init": { "type": "FunctionExpression", @@ -191,27 +191,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 82 - } + "range": [ + 75, + 82 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 86 - } + "range": [ + 83, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 75, - "end": 86 - } + "range": [ + 75, + 86 + ] }, "arguments": [ { @@ -219,57 +219,57 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 89 - } + "range": [ + 75, + 89 + ] }, "directive": null, "loc": null, - "range": { - "start": 75, - "end": 90 - } + "range": [ + 75, + 90 + ] } ], "loc": null, - "range": { - "start": 69, - "end": 94 - } + "range": [ + 69, + 94 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 57, - "end": 94 - }, + "range": [ + 57, + 94 + ], "loc": null, - "range": { - "start": 57, - "end": 94 - } + "range": [ + 57, + 94 + ] }, "loc": null, - "range": { - "start": 53, - "end": 94 - } + "range": [ + 53, + 94 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 95 - } + "range": [ + 49, + 95 + ] }, { "type": "ReturnStatement", @@ -278,42 +278,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "loc": null, - "range": { - "start": 98, - "end": 107 - } + "range": [ + 98, + 107 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 109 - } + "range": [ + 25, + 109 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 109 - }, + "range": [ + 0, + 109 + ], "loc": null, - "range": { - "start": 0, - "end": 109 - } + "range": [ + 0, + 109 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 109 - } + "range": [ + 0, + 109 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-assignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-assignment.js.snap index c8bbc0e009..bebd45f541 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-assignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-assignment.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,32 +56,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "VariableDeclaration", @@ -94,32 +94,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 56, - "end": 58 - } + "range": [ + 56, + 58 + ] }, "loc": null, - "range": { - "start": 52, - "end": 58 - } + "range": [ + 52, + 58 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 59 - } + "range": [ + 46, + 59 + ] }, { "type": "ExpressionStatement", @@ -133,50 +133,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "loc": null, - "range": { - "start": 62, - "end": 69 - } + "range": [ + 62, + 69 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 70 - } + "range": [ + 62, + 70 + ] }, { "type": "VariableDeclaration", @@ -189,10 +189,10 @@ Output: "name": "child", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "init": { "type": "JSXElement", @@ -202,10 +202,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] }, "attributes": [ { @@ -214,10 +214,10 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 98, - "end": 102 - } + "range": [ + 98, + 102 + ] }, "value": { "type": "JSXExpressionContainer", @@ -226,51 +226,51 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "loc": null, - "range": { - "start": 103, - "end": 106 - } + "range": [ + 103, + 106 + ] }, "loc": null, - "range": { - "start": 98, - "end": 106 - } + "range": [ + 98, + 106 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 87, - "end": 109 - } + "range": [ + 87, + 109 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 87, - "end": 109 - } + "range": [ + 87, + 109 + ] }, "loc": null, - "range": { - "start": 79, - "end": 109 - } + "range": [ + 79, + 109 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 110 - } + "range": [ + 73, + 110 + ] }, { "type": "ExpressionStatement", @@ -285,44 +285,44 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "computed": false, "loc": null, - "range": { - "start": 113, - "end": 116 - } + "range": [ + 113, + 116 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 121 - } + "range": [ + 117, + 121 + ] }, "computed": false, "loc": null, - "range": { - "start": 113, - "end": 121 - } + "range": [ + 113, + 121 + ] }, "arguments": [ { @@ -332,41 +332,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 127 - } + "range": [ + 122, + 127 + ] }, "property": { "type": "Identifier", "name": "p0", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 130 - } + "range": [ + 128, + 130 + ] }, "computed": false, "loc": null, - "range": { - "start": 122, - "end": 130 - } + "range": [ + 122, + 130 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 131 - } + "range": [ + 113, + 131 + ] }, "directive": null, "loc": null, - "range": { - "start": 113, - "end": 132 - } + "range": [ + 113, + 132 + ] }, { "type": "ReturnStatement", @@ -378,10 +378,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 143, - "end": 152 - } + "range": [ + 143, + 152 + ] }, "attributes": [ { @@ -390,10 +390,10 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 153, - "end": 157 - } + "range": [ + 153, + 157 + ] }, "value": { "type": "JSXExpressionContainer", @@ -402,30 +402,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "loc": null, - "range": { - "start": 158, - "end": 161 - } + "range": [ + 158, + 161 + ] }, "loc": null, - "range": { - "start": 153, - "end": 161 - } + "range": [ + 153, + 161 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 142, - "end": 162 - } + "range": [ + 142, + 162 + ] }, "children": [ { @@ -435,16 +435,16 @@ Output: "name": "child", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 168 - } + "range": [ + 163, + 168 + ] }, "loc": null, - "range": { - "start": 162, - "end": 169 - } + "range": [ + 162, + 169 + ] } ], "closingElement": { @@ -453,54 +453,54 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 171, - "end": 180 - } + "range": [ + 171, + 180 + ] }, "loc": null, - "range": { - "start": 169, - "end": 181 - } + "range": [ + 169, + 181 + ] }, "loc": null, - "range": { - "start": 142, - "end": 181 - } + "range": [ + 142, + 181 + ] }, "loc": null, - "range": { - "start": 135, - "end": 182 - } + "range": [ + 135, + 182 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 184 - } + "range": [ + 26, + 184 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 184 - }, + "range": [ + 0, + 184 + ], "loc": null, - "range": { - "start": 0, - "end": 184 - } + "range": [ + 0, + 184 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 184 - } + "range": [ + 0, + 184 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-call-evaluation-order.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-call-evaluation-order.js.snap index 15215a6168..59a387378a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-call-evaluation-order.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-call-evaluation-order.js.snap @@ -30,10 +30,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 52 - } + "range": [ + 43, + 52 + ] }, "params": [], "body": { @@ -50,10 +50,10 @@ Output: "name": "changeF", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -64,10 +64,10 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] } ], "body": { @@ -85,27 +85,27 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 91 - } + "range": [ + 88, + 91 + ] }, "right": { "type": "ArrowFunctionExpression", @@ -120,105 +120,105 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 107 - } + "range": [ + 100, + 107 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 111 - } + "range": [ + 108, + 111 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 111 - } + "range": [ + 100, + 111 + ] }, "arguments": [ { "type": "StringLiteral", "value": "new", "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 118 - } + "range": [ + 100, + 118 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 94, - "end": 118 - }, + "range": [ + 94, + 118 + ], "expression": true, "loc": null, - "range": { - "start": 94, - "end": 118 - } + "range": [ + 94, + 118 + ] }, "loc": null, - "range": { - "start": 88, - "end": 118 - } + "range": [ + 88, + 118 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 119 - } + "range": [ + 88, + 119 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 123 - } + "range": [ + 82, + 123 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 75, - "end": 123 - }, + "range": [ + 75, + 123 + ], "expression": false, "loc": null, - "range": { - "start": 75, - "end": 123 - } + "range": [ + 75, + 123 + ] }, "loc": null, - "range": { - "start": 65, - "end": 123 - } + "range": [ + 65, + 123 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 124 - } + "range": [ + 59, + 124 + ] }, { "type": "VariableDeclaration", @@ -231,10 +231,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "init": { "type": "ObjectExpression", @@ -246,10 +246,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, "value": { "type": "ArrowFunctionExpression", @@ -264,88 +264,88 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 159 - } + "range": [ + 152, + 159 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 163 - } + "range": [ + 160, + 163 + ] }, "computed": false, "loc": null, - "range": { - "start": 152, - "end": 163 - } + "range": [ + 152, + 163 + ] }, "arguments": [ { "type": "StringLiteral", "value": "original", "loc": null, - "range": { - "start": 164, - "end": 174 - } + "range": [ + 164, + 174 + ] } ], "loc": null, - "range": { - "start": 152, - "end": 175 - } + "range": [ + 152, + 175 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 146, - "end": 175 - }, + "range": [ + 146, + 175 + ], "expression": true, "loc": null, - "range": { - "start": 146, - "end": 175 - } + "range": [ + 146, + 175 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 143, - "end": 175 - } + "range": [ + 143, + 175 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 180 - } + "range": [ + 137, + 180 + ] }, "loc": null, - "range": { - "start": 133, - "end": 180 - } + "range": [ + 133, + 180 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 181 - } + "range": [ + 127, + 181 + ] }, { "type": "ExpressionStatement", @@ -365,78 +365,78 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 186, - "end": 193 - } + "range": [ + 186, + 193 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 197 - } + "range": [ + 194, + 197 + ] }, "computed": false, "loc": null, - "range": { - "start": 186, - "end": 197 - } + "range": [ + 186, + 197 + ] }, "arguments": [ { "type": "StringLiteral", "value": "A", "loc": null, - "range": { - "start": 198, - "end": 201 - } + "range": [ + 198, + 201 + ] } ], "loc": null, - "range": { - "start": 186, - "end": 202 - } + "range": [ + 186, + 202 + ] }, { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 204, - "end": 205 - } + "range": [ + 204, + 205 + ] } ], "loc": null, - "range": { - "start": 186, - "end": 205 - } + "range": [ + 186, + 205 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 208 - } + "range": [ + 207, + 208 + ] }, "computed": false, "loc": null, - "range": { - "start": 185, - "end": 208 - } + "range": [ + 185, + 208 + ] }, "arguments": [ { @@ -449,10 +449,10 @@ Output: "name": "changeF", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 217 - } + "range": [ + 210, + 217 + ] }, "arguments": [ { @@ -460,17 +460,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 219 - } + "range": [ + 218, + 219 + ] } ], "loc": null, - "range": { - "start": 210, - "end": 220 - } + "range": [ + 210, + 220 + ] }, { "type": "CallExpression", @@ -481,74 +481,74 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 222, - "end": 229 - } + "range": [ + 222, + 229 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 230, - "end": 233 - } + "range": [ + 230, + 233 + ] }, "computed": false, "loc": null, - "range": { - "start": 222, - "end": 233 - } + "range": [ + 222, + 233 + ] }, "arguments": [ { "type": "StringLiteral", "value": "arg", "loc": null, - "range": { - "start": 234, - "end": 239 - } + "range": [ + 234, + 239 + ] } ], "loc": null, - "range": { - "start": 222, - "end": 240 - } + "range": [ + 222, + 240 + ] }, { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 242, - "end": 243 - } + "range": [ + 242, + 243 + ] } ], "loc": null, - "range": { - "start": 210, - "end": 243 - } + "range": [ + 210, + 243 + ] } ], "loc": null, - "range": { - "start": 185, - "end": 245 - } + "range": [ + 185, + 245 + ] }, "directive": null, "loc": null, - "range": { - "start": 185, - "end": 246 - } + "range": [ + 185, + 246 + ] }, { "type": "ReturnStatement", @@ -557,42 +557,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 256, - "end": 257 - } + "range": [ + 256, + 257 + ] }, "loc": null, - "range": { - "start": 249, - "end": 258 - } + "range": [ + 249, + 258 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 260 - } + "range": [ + 55, + 260 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 34, - "end": 260 - }, + "range": [ + 34, + 260 + ], "loc": null, - "range": { - "start": 34, - "end": 260 - } + "range": [ + 34, + 260 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 34, - "end": 260 - } + "range": [ + 34, + 260 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-call-spread.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-call-spread.js.snap index c464f45e3f..c8d5cc2149 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-call-spread.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@property-call-spread.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -66,27 +66,27 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 43 - } + "range": [ + 40, + 43 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 47 - } + "range": [ + 44, + 47 + ] }, "computed": false, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -98,41 +98,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 58 - } + "range": [ + 51, + 58 + ] }, "loc": null, - "range": { - "start": 48, - "end": 58 - } + "range": [ + 48, + 58 + ] }, { "type": "NullLiteral", "loc": null, - "range": { - "start": 60, - "end": 64 - } + "range": [ + 60, + 64 + ] }, { "type": "SpreadElement", @@ -143,53 +143,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 76 - } + "range": [ + 69, + 76 + ] }, "loc": null, - "range": { - "start": 66, - "end": 76 - } + "range": [ + 66, + 76 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 77 - } + "range": [ + 40, + 77 + ] }, "loc": null, - "range": { - "start": 36, - "end": 77 - } + "range": [ + 36, + 77 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 78 - } + "range": [ + 30, + 78 + ] }, { "type": "ReturnStatement", @@ -198,42 +198,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "loc": null, - "range": { - "start": 81, - "end": 90 - } + "range": [ + 81, + 90 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 92 - } + "range": [ + 26, + 92 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 92 - }, + "range": [ + 0, + 92 + ], "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-dependencies-non-optional-properties-inside-optional-chain.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-dependencies-non-optional-properties-inside-optional-chain.js.snap index 909cf7f75e..bdd912d798 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-dependencies-non-optional-properties-inside-optional-chain.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-dependencies-non-optional-properties-inside-optional-chain.js.snap @@ -20,10 +20,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -31,10 +31,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -59,97 +59,97 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "property": { "type": "Identifier", "name": "post", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 47 - } + "range": [ + 43, + 47 + ] }, "computed": false, "loc": null, - "range": { - "start": 37, - "end": 47 - } + "range": [ + 37, + 47 + ] }, "property": { "type": "Identifier", "name": "feedback", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 56 - } + "range": [ + 48, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 37, - "end": 56 - } + "range": [ + 37, + 56 + ] }, "property": { "type": "Identifier", "name": "comments", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 65 - } + "range": [ + 57, + 65 + ] }, "computed": false, "loc": null, - "range": { - "start": 37, - "end": 65 - } + "range": [ + 37, + 65 + ] }, "property": { "type": "Identifier", "name": "edges", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 37, - "end": 72 - } + "range": [ + 37, + 72 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 77 - } + "range": [ + 74, + 77 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 37, - "end": 77 - } + "range": [ + 37, + 77 + ] }, "arguments": [ { @@ -157,50 +157,50 @@ Output: "name": "render", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] } ], "optional": false, "loc": null, - "range": { - "start": 37, - "end": 85 - } + "range": [ + 37, + 85 + ] }, "loc": null, - "range": { - "start": 30, - "end": 86 - } + "range": [ + 30, + 86 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 88 - } + "range": [ + 26, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 88 - }, + "range": [ + 0, + 88 + ], "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scope-grouping.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scope-grouping.js.snap index 23aefab4b1..3315a12e94 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scope-grouping.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scope-grouping.js.snap @@ -26,10 +26,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -46,32 +46,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 27, - "end": 29 - } + "range": [ + 27, + 29 + ] }, "loc": null, - "range": { - "start": 23, - "end": 29 - } + "range": [ + 23, + 29 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 30 - } + "range": [ + 19, + 30 + ] }, { "type": "VariableDeclaration", @@ -84,32 +84,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 41, - "end": 43 - } + "range": [ + 41, + 43 + ] }, "loc": null, - "range": { - "start": 37, - "end": 43 - } + "range": [ + 37, + 43 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 44 - } + "range": [ + 33, + 44 + ] }, { "type": "VariableDeclaration", @@ -122,32 +122,32 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 55, - "end": 57 - } + "range": [ + 55, + 57 + ] }, "loc": null, - "range": { - "start": 51, - "end": 57 - } + "range": [ + 51, + 57 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 58 - } + "range": [ + 47, + 58 + ] }, { "type": "ExpressionStatement", @@ -160,27 +160,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 67 - } + "range": [ + 63, + 67 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 67 - } + "range": [ + 61, + 67 + ] }, "arguments": [ { @@ -188,24 +188,24 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 70 - } + "range": [ + 61, + 70 + ] }, "directive": null, "loc": null, - "range": { - "start": 61, - "end": 71 - } + "range": [ + 61, + 71 + ] }, { "type": "ExpressionStatement", @@ -219,50 +219,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "computed": false, "loc": null, - "range": { - "start": 74, - "end": 77 - } + "range": [ + 74, + 77 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "loc": null, - "range": { - "start": 74, - "end": 81 - } + "range": [ + 74, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 74, - "end": 82 - } + "range": [ + 74, + 82 + ] }, { "type": "ReturnStatement", @@ -271,42 +271,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "loc": null, - "range": { - "start": 86, - "end": 95 - } + "range": [ + 86, + 95 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 97 - } + "range": [ + 15, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 97 - }, + "range": [ + 0, + 97 + ], "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scopes-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scopes-if.js.snap index 2d4c69f42e..5994b12e5d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scopes-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scopes-if.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,30 +39,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -79,32 +79,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 36, - "end": 38 - } + "range": [ + 36, + 38 + ] }, "loc": null, - "range": { - "start": 32, - "end": 38 - } + "range": [ + 32, + 38 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 39 - } + "range": [ + 26, + 39 + ] }, { "type": "IfStatement", @@ -113,10 +113,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "consequent": { "type": "BlockStatement", @@ -132,32 +132,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 65, - "end": 67 - } + "range": [ + 65, + 67 + ] }, "loc": null, - "range": { - "start": 61, - "end": 67 - } + "range": [ + 61, + 67 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 68 - } + "range": [ + 55, + 68 + ] }, { "type": "ExpressionStatement", @@ -170,27 +170,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 73, - "end": 79 - } + "range": [ + 73, + 79 + ] }, "arguments": [ { @@ -198,24 +198,24 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 82 - } + "range": [ + 73, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 73, - "end": 83 - } + "range": [ + 73, + 83 + ] }, { "type": "ExpressionStatement", @@ -228,27 +228,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 94 - } + "range": [ + 90, + 94 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 94 - } + "range": [ + 88, + 94 + ] }, "arguments": [ { @@ -259,18 +259,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 96, - "end": 99 - } + "range": [ + 96, + 99 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 95, - "end": 100 - } + "range": [ + 95, + 100 + ] }, "children": [ { @@ -280,16 +280,16 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "loc": null, - "range": { - "start": 100, - "end": 103 - } + "range": [ + 100, + 103 + ] } ], "closingElement": { @@ -298,43 +298,43 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 105, - "end": 108 - } + "range": [ + 105, + 108 + ] }, "loc": null, - "range": { - "start": 103, - "end": 109 - } + "range": [ + 103, + 109 + ] }, "loc": null, - "range": { - "start": 95, - "end": 109 - } + "range": [ + 95, + 109 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 110 - } + "range": [ + 88, + 110 + ] }, "directive": null, "loc": null, - "range": { - "start": 88, - "end": 111 - } + "range": [ + 88, + 111 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 115 - } + "range": [ + 49, + 115 + ] }, "alternate": { "type": "BlockStatement", @@ -350,27 +350,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 133 - } + "range": [ + 129, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 127, - "end": 133 - } + "range": [ + 127, + 133 + ] }, "arguments": [ { @@ -378,37 +378,37 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 136 - } + "range": [ + 127, + 136 + ] }, "directive": null, "loc": null, - "range": { - "start": 127, - "end": 137 - } + "range": [ + 127, + 137 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 141 - } + "range": [ + 121, + 141 + ] }, "loc": null, - "range": { - "start": 42, - "end": 141 - } + "range": [ + 42, + 141 + ] }, { "type": "ReturnStatement", @@ -417,42 +417,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] }, "loc": null, - "range": { - "start": 144, - "end": 153 - } + "range": [ + 144, + 153 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 155 - } + "range": [ + 22, + 155 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 155 - }, + "range": [ + 0, + 155 + ], "loc": null, - "range": { - "start": 0, - "end": 155 - } + "range": [ + 0, + 155 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 155 - } + "range": [ + 0, + 155 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scopes.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scopes.js.snap index 4668757b2d..713a92bc22 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scopes.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactive-scopes.js.snap @@ -27,10 +27,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 10 - } + "range": [ + 9, + 10 + ] }, "params": [ { @@ -38,20 +38,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 11, - "end": 12 - } + "range": [ + 11, + 12 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 14, - "end": 15 - } + "range": [ + 14, + 15 + ] } ], "body": { @@ -68,32 +68,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 32 - } + "range": [ + 21, + 32 + ] }, { "type": "IfStatement", @@ -106,43 +106,43 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "computed": false, "loc": null, - "range": { - "start": 74, - "end": 82 - } + "range": [ + 74, + 82 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "loc": null, - "range": { - "start": 74, - "end": 88 - } + "range": [ + 74, + 88 + ] }, "consequent": { "type": "BlockStatement", @@ -154,10 +154,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "consequent": { "type": "BlockStatement", @@ -173,27 +173,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 117 - } + "range": [ + 113, + 117 + ] }, "computed": false, "loc": null, - "range": { - "start": 111, - "end": 117 - } + "range": [ + 111, + 117 + ] }, "arguments": [ { @@ -201,52 +201,52 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] } ], "loc": null, - "range": { - "start": 111, - "end": 120 - } + "range": [ + 111, + 120 + ] }, "directive": null, "loc": null, - "range": { - "start": 111, - "end": 121 - } + "range": [ + 111, + 121 + ] } ], "loc": null, - "range": { - "start": 103, - "end": 161 - } + "range": [ + 103, + 161 + ] }, "alternate": null, "loc": null, - "range": { - "start": 96, - "end": 161 - } + "range": [ + 96, + 161 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 165 - } + "range": [ + 90, + 165 + ] }, "alternate": null, "loc": null, - "range": { - "start": 70, - "end": 165 - } + "range": [ + 70, + 165 + ] }, { "type": "ReturnStatement", @@ -258,18 +258,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 177, - "end": 180 - } + "range": [ + 177, + 180 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 176, - "end": 181 - } + "range": [ + 176, + 181 + ] }, "children": [ { @@ -279,16 +279,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 182, - "end": 183 - } + "range": [ + 182, + 183 + ] }, "loc": null, - "range": { - "start": 181, - "end": 184 - } + "range": [ + 181, + 184 + ] } ], "closingElement": { @@ -297,54 +297,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 186, - "end": 189 - } + "range": [ + 186, + 189 + ] }, "loc": null, - "range": { - "start": 184, - "end": 190 - } + "range": [ + 184, + 190 + ] }, "loc": null, - "range": { - "start": 176, - "end": 190 - } + "range": [ + 176, + 190 + ] }, "loc": null, - "range": { - "start": 169, - "end": 191 - } + "range": [ + 169, + 191 + ] } ], "loc": null, - "range": { - "start": 17, - "end": 193 - } + "range": [ + 17, + 193 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 193 - }, + "range": [ + 0, + 193 + ], "loc": null, - "range": { - "start": 0, - "end": 193 - } + "range": [ + 0, + 193 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 193 - } + "range": [ + 0, + 193 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-interleaved-reactivity.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-interleaved-reactivity.js.snap index caac4e102b..9c1c8ee17b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-interleaved-reactivity.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-interleaved-reactivity.js.snap @@ -36,10 +36,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -47,10 +47,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -67,32 +67,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 321, - "end": 322 - } + "range": [ + 321, + 322 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 325, - "end": 327 - } + "range": [ + 325, + 327 + ] }, "loc": null, - "range": { - "start": 321, - "end": 327 - } + "range": [ + 321, + 327 + ] } ], "loc": null, - "range": { - "start": 315, - "end": 328 - } + "range": [ + 315, + 328 + ] }, { "type": "VariableDeclaration", @@ -105,32 +105,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 337, - "end": 338 - } + "range": [ + 337, + 338 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 341, - "end": 343 - } + "range": [ + 341, + 343 + ] }, "loc": null, - "range": { - "start": 337, - "end": 343 - } + "range": [ + 337, + 343 + ] } ], "loc": null, - "range": { - "start": 331, - "end": 344 - } + "range": [ + 331, + 344 + ] }, { "type": "ExpressionStatement", @@ -143,27 +143,27 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 347, - "end": 348 - } + "range": [ + 347, + 348 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 349, - "end": 353 - } + "range": [ + 349, + 353 + ] }, "computed": false, "loc": null, - "range": { - "start": 347, - "end": 353 - } + "range": [ + 347, + 353 + ] }, "arguments": [ { @@ -173,41 +173,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 354, - "end": 359 - } + "range": [ + 354, + 359 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 360, - "end": 361 - } + "range": [ + 360, + 361 + ] }, "computed": false, "loc": null, - "range": { - "start": 354, - "end": 361 - } + "range": [ + 354, + 361 + ] } ], "loc": null, - "range": { - "start": 347, - "end": 362 - } + "range": [ + 347, + 362 + ] }, "directive": null, "loc": null, - "range": { - "start": 347, - "end": 363 - } + "range": [ + 347, + 363 + ] }, { "type": "ExpressionStatement", @@ -221,48 +221,48 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 366, - "end": 367 - } + "range": [ + 366, + 367 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 368, - "end": 369 - } + "range": [ + 368, + 369 + ] }, "computed": false, "loc": null, - "range": { - "start": 366, - "end": 369 - } + "range": [ + 366, + 369 + ] }, "right": { "type": "NullLiteral", "loc": null, - "range": { - "start": 372, - "end": 376 - } + "range": [ + 372, + 376 + ] }, "loc": null, - "range": { - "start": 366, - "end": 376 - } + "range": [ + 366, + 376 + ] }, "directive": null, "loc": null, - "range": { - "start": 366, - "end": 377 - } + "range": [ + 366, + 377 + ] }, { "type": "VariableDeclaration", @@ -275,10 +275,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 490, - "end": 491 - } + "range": [ + 490, + 491 + ] }, "init": { "type": "ArrayExpression", @@ -288,30 +288,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 495, - "end": 496 - } + "range": [ + 495, + 496 + ] } ], "loc": null, - "range": { - "start": 494, - "end": 497 - } + "range": [ + 494, + 497 + ] }, "loc": null, - "range": { - "start": 490, - "end": 497 - } + "range": [ + 490, + 497 + ] } ], "loc": null, - "range": { - "start": 484, - "end": 498 - } + "range": [ + 484, + 498 + ] }, { "type": "ReturnStatement", @@ -323,59 +323,59 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 647, - "end": 648 - } + "range": [ + 647, + 648 + ] }, { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 650, - "end": 651 - } + "range": [ + 650, + 651 + ] } ], "loc": null, - "range": { - "start": 646, - "end": 652 - } + "range": [ + 646, + 652 + ] }, "loc": null, - "range": { - "start": 639, - "end": 653 - } + "range": [ + 639, + 653 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 655 - } + "range": [ + 26, + 655 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 655 - }, + "range": [ + 0, + 655 + ], "loc": null, - "range": { - "start": 0, - "end": 655 - } + "range": [ + 0, + 655 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 655 - } + "range": [ + 0, + 655 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-computed-load.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-computed-load.js.snap index e07fad1591..9c61b8030d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-computed-load.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-computed-load.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] }, "init": { "type": "CallExpression", @@ -68,30 +68,30 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 47 - } + "range": [ + 44, + 47 + ] }, "arguments": [], "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "ExpressionStatement", @@ -102,10 +102,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] }, "arguments": [ { @@ -115,10 +115,10 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "property": { "type": "MemberExpression", @@ -127,34 +127,34 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 71 - } + "range": [ + 66, + 71 + ] }, "property": { "type": "Identifier", "name": "key", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 75 - } + "range": [ + 72, + 75 + ] }, "computed": false, "loc": null, - "range": { - "start": 66, - "end": 75 - } + "range": [ + 66, + 75 + ] }, "computed": true, "loc": null, - "range": { - "start": 60, - "end": 76 - } + "range": [ + 60, + 76 + ] }, { "type": "MemberExpression", @@ -163,41 +163,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 85 - } + "range": [ + 78, + 85 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 86 - } + "range": [ + 53, + 86 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 87 - } + "range": [ + 53, + 87 + ] }, { "type": "VariableDeclaration", @@ -210,10 +210,10 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 102 - } + "range": [ + 97, + 102 + ] }, "init": { "type": "CallExpression", @@ -222,10 +222,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 108 - } + "range": [ + 105, + 108 + ] }, "arguments": [ { @@ -237,63 +237,63 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 114 - } + "range": [ + 109, + 114 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 121 - } + "range": [ + 115, + 121 + ] }, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 121 - } + "range": [ + 109, + 121 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "loc": null, - "range": { - "start": 109, - "end": 125 - } + "range": [ + 109, + 125 + ] } ], "loc": null, - "range": { - "start": 105, - "end": 126 - } + "range": [ + 105, + 126 + ] }, "loc": null, - "range": { - "start": 97, - "end": 126 - } + "range": [ + 97, + 126 + ] } ], "loc": null, - "range": { - "start": 91, - "end": 127 - } + "range": [ + 91, + 127 + ] }, { "type": "ReturnStatement", @@ -307,30 +307,30 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 145 - } + "range": [ + 140, + 145 + ] }, "value": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 145 - } + "range": [ + 140, + 145 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 140, - "end": 145 - } + "range": [ + 140, + 145 + ] }, { "type": "Property", @@ -339,69 +339,69 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 152 - } + "range": [ + 147, + 152 + ] }, "value": { "type": "Identifier", "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 152 - } + "range": [ + 147, + 152 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 147, - "end": 152 - } + "range": [ + 147, + 152 + ] } ], "loc": null, - "range": { - "start": 138, - "end": 154 - } + "range": [ + 138, + 154 + ] }, "loc": null, - "range": { - "start": 131, - "end": 155 - } + "range": [ + 131, + 155 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 157 - } + "range": [ + 26, + 157 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 157 - }, + "range": [ + 0, + 157 + ], "loc": null, - "range": { - "start": 0, - "end": 157 - } + "range": [ + 0, + 157 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 157 - } + "range": [ + 0, + 157 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-property-load.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-property-load.js.snap index dfb10848fe..ca5c2a7aa1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-property-load.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reactivity-analysis-reactive-via-mutation-of-property-load.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] }, "init": { "type": "CallExpression", @@ -68,30 +68,30 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 47 - } + "range": [ + 44, + 47 + ] }, "arguments": [], "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "loc": null, - "range": { - "start": 36, - "end": 49 - } + "range": [ + 36, + 49 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 50 - } + "range": [ + 30, + 50 + ] }, { "type": "ExpressionStatement", @@ -102,10 +102,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] }, "arguments": [ { @@ -115,27 +115,27 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "computed": false, "loc": null, - "range": { - "start": 60, - "end": 67 - } + "range": [ + 60, + 67 + ] }, { "type": "MemberExpression", @@ -144,41 +144,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 76 - } + "range": [ + 69, + 76 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 77 - } + "range": [ + 53, + 77 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 78 - } + "range": [ + 53, + 78 + ] }, { "type": "VariableDeclaration", @@ -191,10 +191,10 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] }, "init": { "type": "CallExpression", @@ -203,10 +203,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 99 - } + "range": [ + 96, + 99 + ] }, "arguments": [ { @@ -218,63 +218,63 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 112 - } + "range": [ + 100, + 112 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "loc": null, - "range": { - "start": 100, - "end": 116 - } + "range": [ + 100, + 116 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 117 - } + "range": [ + 96, + 117 + ] }, "loc": null, - "range": { - "start": 88, - "end": 117 - } + "range": [ + 88, + 117 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 118 - } + "range": [ + 82, + 118 + ] }, { "type": "ReturnStatement", @@ -288,30 +288,30 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, "value": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, { "type": "Property", @@ -320,69 +320,69 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 138, - "end": 143 - } + "range": [ + 138, + 143 + ] }, "value": { "type": "Identifier", "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 138, - "end": 143 - } + "range": [ + 138, + 143 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 138, - "end": 143 - } + "range": [ + 138, + 143 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 145 - } + "range": [ + 129, + 145 + ] }, "loc": null, - "range": { - "start": 122, - "end": 146 - } + "range": [ + 122, + 146 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 148 - } + "range": [ + 26, + 148 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 148 - }, + "range": [ + 0, + 148 + ], "loc": null, - "range": { - "start": 0, - "end": 148 - } + "range": [ + 0, + 148 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 148 - } + "range": [ + 0, + 148 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassign-object-in-context.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassign-object-in-context.js.snap index c4db90e738..214ce73982 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassign-object-in-context.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassign-object-in-context.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,32 +56,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -94,10 +94,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 51 - } + "range": [ + 48, + 51 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -116,66 +116,66 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 70, - "end": 72 - } + "range": [ + 70, + 72 + ] }, "loc": null, - "range": { - "start": 66, - "end": 72 - } + "range": [ + 66, + 72 + ] }, "directive": null, "loc": null, - "range": { - "start": 66, - "end": 73 - } + "range": [ + 66, + 73 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 77 - } + "range": [ + 60, + 77 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 54, - "end": 77 - }, + "range": [ + 54, + 77 + ], "expression": false, "loc": null, - "range": { - "start": 54, - "end": 77 - } + "range": [ + 54, + 77 + ] }, "loc": null, - "range": { - "start": 48, - "end": 77 - } + "range": [ + 48, + 77 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 78 - } + "range": [ + 44, + 78 + ] }, { "type": "ExpressionStatement", @@ -186,24 +186,24 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "arguments": [], "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 87 - } + "range": [ + 81, + 87 + ] }, { "type": "ReturnStatement", @@ -212,42 +212,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "loc": null, - "range": { - "start": 90, - "end": 99 - } + "range": [ + 90, + 99 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 101 - } + "range": [ + 26, + 101 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 101 - }, + "range": [ + 0, + 101 + ], "loc": null, - "range": { - "start": 0, - "end": 101 - } + "range": [ + 0, + 101 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 101 - } + "range": [ + 0, + 101 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassign-primitive-in-context.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassign-primitive-in-context.js.snap index eeced5cc46..963b4c0fd0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassign-primitive-in-context.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassign-primitive-in-context.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,32 +56,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "NumericLiteral", "value": 5.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "VariableDeclaration", @@ -94,10 +94,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 50 - } + "range": [ + 47, + 50 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -116,66 +116,66 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 69, - "end": 71 - } + "range": [ + 69, + 71 + ] }, "loc": null, - "range": { - "start": 65, - "end": 71 - } + "range": [ + 65, + 71 + ] }, "directive": null, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 76 - } + "range": [ + 59, + 76 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 53, - "end": 76 - }, + "range": [ + 53, + 76 + ], "expression": false, "loc": null, - "range": { - "start": 53, - "end": 76 - } + "range": [ + 53, + 76 + ] }, "loc": null, - "range": { - "start": 47, - "end": 76 - } + "range": [ + 47, + 76 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 77 - } + "range": [ + 43, + 77 + ] }, { "type": "ExpressionStatement", @@ -186,24 +186,24 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 83 - } + "range": [ + 80, + 83 + ] }, "arguments": [], "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "directive": null, "loc": null, - "range": { - "start": 80, - "end": 86 - } + "range": [ + 80, + 86 + ] }, { "type": "ReturnStatement", @@ -212,42 +212,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] }, "loc": null, - "range": { - "start": 89, - "end": 98 - } + "range": [ + 89, + 98 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 100 - } + "range": [ + 26, + 100 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 100 - }, + "range": [ + 0, + 100 + ], "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassigned-phi-in-returned-function-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassigned-phi-in-returned-function-expression.js.snap index c94bd003d8..f33b1d7473 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassigned-phi-in-returned-function-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassigned-phi-in-returned-function-expression.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -68,24 +68,24 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] }, "init": null, "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 57 - } + "range": [ + 49, + 57 + ] }, { "type": "IfStatement", @@ -96,27 +96,27 @@ Output: "name": "arguments", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 75 - } + "range": [ + 66, + 75 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "computed": false, "loc": null, - "range": { - "start": 66, - "end": 82 - } + "range": [ + 66, + 82 + ] }, "consequent": { "type": "BlockStatement", @@ -131,10 +131,10 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 95 - } + "range": [ + 92, + 95 + ] }, "right": { "type": "MemberExpression", @@ -143,46 +143,46 @@ Output: "name": "arguments", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 107 - } + "range": [ + 98, + 107 + ] }, "property": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "computed": true, "loc": null, - "range": { - "start": 98, - "end": 110 - } + "range": [ + 98, + 110 + ] }, "loc": null, - "range": { - "start": 92, - "end": 110 - } + "range": [ + 92, + 110 + ] }, "directive": null, "loc": null, - "range": { - "start": 92, - "end": 111 - } + "range": [ + 92, + 111 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 117 - } + "range": [ + 84, + 117 + ] }, "alternate": { "type": "BlockStatement", @@ -197,10 +197,10 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 134 - } + "range": [ + 131, + 134 + ] }, "right": { "type": "MemberExpression", @@ -209,53 +209,53 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 142 - } + "range": [ + 137, + 142 + ] }, "property": { "type": "Identifier", "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 146 - } + "range": [ + 143, + 146 + ] }, "computed": false, "loc": null, - "range": { - "start": 137, - "end": 146 - } + "range": [ + 137, + 146 + ] }, "loc": null, - "range": { - "start": 131, - "end": 146 - } + "range": [ + 131, + 146 + ] }, "directive": null, "loc": null, - "range": { - "start": 131, - "end": 147 - } + "range": [ + 131, + 147 + ] } ], "loc": null, - "range": { - "start": 123, - "end": 153 - } + "range": [ + 123, + 153 + ] }, "loc": null, - "range": { - "start": 62, - "end": 153 - } + "range": [ + 62, + 153 + ] }, { "type": "ExpressionStatement", @@ -268,27 +268,27 @@ Output: "name": "global", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 164 - } + "range": [ + 158, + 164 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 168 - } + "range": [ + 165, + 168 + ] }, "computed": false, "loc": null, - "range": { - "start": 158, - "end": 168 - } + "range": [ + 158, + 168 + ] }, "arguments": [ { @@ -296,77 +296,77 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 172 - } + "range": [ + 169, + 172 + ] } ], "loc": null, - "range": { - "start": 158, - "end": 173 - } + "range": [ + 158, + 173 + ] }, "directive": null, "loc": null, - "range": { - "start": 158, - "end": 174 - } + "range": [ + 158, + 174 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 178 - } + "range": [ + 43, + 178 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 37, - "end": 178 - }, + "range": [ + 37, + 178 + ], "expression": false, "loc": null, - "range": { - "start": 37, - "end": 178 - } + "range": [ + 37, + 178 + ] }, "loc": null, - "range": { - "start": 30, - "end": 179 - } + "range": [ + 30, + 179 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 181 - } + "range": [ + 26, + 181 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 181 - }, + "range": [ + 0, + 181 + ], "loc": null, - "range": { - "start": 0, - "end": 181 - } + "range": [ + 0, + 181 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 181 - } + "range": [ + 0, + 181 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment-conditional.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment-conditional.js.snap index de2fefaf0a..ad4db14dd1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment-conditional.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment-conditional.js.snap @@ -30,10 +30,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -41,10 +41,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -61,32 +61,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "ExpressionStatement", @@ -99,27 +99,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 50 - } + "range": [ + 46, + 50 + ] }, "computed": false, "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] }, "arguments": [ { @@ -129,41 +129,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "property": { "type": "Identifier", "name": "p0", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 59 - } + "range": [ + 57, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 59 - } + "range": [ + 51, + 59 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 60 - } + "range": [ + 44, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 44, - "end": 61 - } + "range": [ + 44, + 61 + ] }, { "type": "VariableDeclaration", @@ -176,33 +176,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] }, { "type": "IfStatement", @@ -213,27 +213,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] }, "property": { "type": "Identifier", "name": "p1", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 90 - } + "range": [ + 88, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 90 - } + "range": [ + 82, + 90 + ] }, "consequent": { "type": "BlockStatement", @@ -248,46 +248,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 102, - "end": 104 - } + "range": [ + 102, + 104 + ] }, "loc": null, - "range": { - "start": 98, - "end": 104 - } + "range": [ + 98, + 104 + ] }, "directive": null, "loc": null, - "range": { - "start": 98, - "end": 105 - } + "range": [ + 98, + 105 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 109 - } + "range": [ + 92, + 109 + ] }, "alternate": null, "loc": null, - "range": { - "start": 78, - "end": 109 - } + "range": [ + 78, + 109 + ] }, { "type": "ExpressionStatement", @@ -300,27 +300,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 119 - } + "range": [ + 115, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 113, - "end": 119 - } + "range": [ + 113, + 119 + ] }, "arguments": [ { @@ -330,41 +330,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 125 - } + "range": [ + 120, + 125 + ] }, "property": { "type": "Identifier", "name": "p2", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 128 - } + "range": [ + 126, + 128 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 128 - } + "range": [ + 120, + 128 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 129 - } + "range": [ + 113, + 129 + ] }, "directive": null, "loc": null, - "range": { - "start": 113, - "end": 130 - } + "range": [ + 113, + 130 + ] }, { "type": "ReturnStatement", @@ -376,10 +376,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 142, - "end": 151 - } + "range": [ + 142, + 151 + ] }, "attributes": [ { @@ -388,10 +388,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] }, "value": { "type": "JSXExpressionContainer", @@ -400,22 +400,22 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "loc": null, - "range": { - "start": 154, - "end": 157 - } + "range": [ + 154, + 157 + ] }, "loc": null, - "range": { - "start": 152, - "end": 157 - } + "range": [ + 152, + 157 + ] }, { "type": "JSXAttribute", @@ -423,10 +423,10 @@ Output: "type": "JSXIdentifier", "name": "y", "loc": null, - "range": { - "start": 158, - "end": 159 - } + "range": [ + 158, + 159 + ] }, "value": { "type": "JSXExpressionContainer", @@ -435,70 +435,70 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "loc": null, - "range": { - "start": 160, - "end": 163 - } + "range": [ + 160, + 163 + ] }, "loc": null, - "range": { - "start": 158, - "end": 163 - } + "range": [ + 158, + 163 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 141, - "end": 166 - } + "range": [ + 141, + 166 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 141, - "end": 166 - } + "range": [ + 141, + 166 + ] }, "loc": null, - "range": { - "start": 134, - "end": 167 - } + "range": [ + 134, + 167 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 169 - } + "range": [ + 26, + 169 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 169 - }, + "range": [ + 0, + 169 + ], "loc": null, - "range": { - "start": 0, - "end": 169 - } + "range": [ + 0, + 169 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 169 - } + "range": [ + 0, + 169 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment-separate-scopes.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment-separate-scopes.js.snap index 763b364a84..192105fa94 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment-separate-scopes.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment-separate-scopes.js.snap @@ -42,10 +42,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -53,30 +53,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -93,32 +93,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 34, - "end": 36 - } + "range": [ + 34, + 36 + ] }, "loc": null, - "range": { - "start": 30, - "end": 36 - } + "range": [ + 30, + 36 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 37 - } + "range": [ + 26, + 37 + ] }, { "type": "IfStatement", @@ -127,10 +127,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "consequent": { "type": "BlockStatement", @@ -146,27 +146,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 59 - } + "range": [ + 55, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] }, "arguments": [ { @@ -174,38 +174,38 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 62 - } + "range": [ + 53, + 62 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 63 - } + "range": [ + 53, + 63 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 67 - } + "range": [ + 47, + 67 + ] }, "alternate": null, "loc": null, - "range": { - "start": 40, - "end": 67 - } + "range": [ + 40, + 67 + ] }, { "type": "VariableDeclaration", @@ -218,10 +218,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "init": { "type": "JSXElement", @@ -231,18 +231,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 79, - "end": 82 - } + "range": [ + 79, + 82 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, "children": [ { @@ -252,16 +252,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 83, - "end": 86 - } + "range": [ + 83, + 86 + ] } ], "closingElement": { @@ -270,35 +270,35 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 88, - "end": 91 - } + "range": [ + 88, + 91 + ] }, "loc": null, - "range": { - "start": 86, - "end": 92 - } + "range": [ + 86, + 92 + ] }, "loc": null, - "range": { - "start": 78, - "end": 92 - } + "range": [ + 78, + 92 + ] }, "loc": null, - "range": { - "start": 74, - "end": 92 - } + "range": [ + 74, + 92 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 93 - } + "range": [ + 70, + 93 + ] }, { "type": "SwitchStatement", @@ -307,10 +307,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "cases": [ { @@ -319,10 +319,10 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "consequent": [ { @@ -338,32 +338,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 131 - } + "range": [ + 130, + 131 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 134, - "end": 136 - } + "range": [ + 134, + 136 + ] }, "loc": null, - "range": { - "start": 130, - "end": 136 - } + "range": [ + 130, + 136 + ] }, "directive": null, "loc": null, - "range": { - "start": 130, - "end": 137 - } + "range": [ + 130, + 137 + ] }, { "type": "ExpressionStatement", @@ -376,27 +376,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 145 - } + "range": [ + 144, + 145 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 150 - } + "range": [ + 146, + 150 + ] }, "computed": false, "loc": null, - "range": { - "start": 144, - "end": 150 - } + "range": [ + 144, + 150 + ] }, "arguments": [ { @@ -404,47 +404,47 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 153 - } + "range": [ + 144, + 153 + ] }, "directive": null, "loc": null, - "range": { - "start": 144, - "end": 154 - } + "range": [ + 144, + 154 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 161, - "end": 167 - } + "range": [ + 161, + 167 + ] } ], "loc": null, - "range": { - "start": 122, - "end": 173 - } + "range": [ + 122, + 173 + ] } ], "loc": null, - "range": { - "start": 114, - "end": 173 - } + "range": [ + 114, + 173 + ] }, { "type": "SwitchCase", @@ -463,32 +463,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 199, - "end": 201 - } + "range": [ + 199, + 201 + ] }, "loc": null, - "range": { - "start": 195, - "end": 201 - } + "range": [ + 195, + 201 + ] }, "directive": null, "loc": null, - "range": { - "start": 195, - "end": 202 - } + "range": [ + 195, + 202 + ] }, { "type": "ExpressionStatement", @@ -501,27 +501,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 210 - } + "range": [ + 209, + 210 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 215 - } + "range": [ + 211, + 215 + ] }, "computed": false, "loc": null, - "range": { - "start": 209, - "end": 215 - } + "range": [ + 209, + 215 + ] }, "arguments": [ { @@ -529,45 +529,45 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 216, - "end": 217 - } + "range": [ + 216, + 217 + ] } ], "loc": null, - "range": { - "start": 209, - "end": 218 - } + "range": [ + 209, + 218 + ] }, "directive": null, "loc": null, - "range": { - "start": 209, - "end": 219 - } + "range": [ + 209, + 219 + ] } ], "loc": null, - "range": { - "start": 187, - "end": 225 - } + "range": [ + 187, + 225 + ] } ], "loc": null, - "range": { - "start": 178, - "end": 225 - } + "range": [ + 178, + 225 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 229 - } + "range": [ + 97, + 229 + ] }, { "type": "ReturnStatement", @@ -579,18 +579,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 246, - "end": 249 - } + "range": [ + 246, + 249 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 245, - "end": 250 - } + "range": [ + 245, + 250 + ] }, "children": [ { @@ -598,10 +598,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 250, - "end": 257 - } + "range": [ + 250, + 257 + ] }, { "type": "JSXExpressionContainer", @@ -610,26 +610,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 258, - "end": 259 - } + "range": [ + 258, + 259 + ] }, "loc": null, - "range": { - "start": 257, - "end": 260 - } + "range": [ + 257, + 260 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 260, - "end": 267 - } + "range": [ + 260, + 267 + ] }, { "type": "JSXExpressionContainer", @@ -638,26 +638,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 268, - "end": 269 - } + "range": [ + 268, + 269 + ] }, "loc": null, - "range": { - "start": 267, - "end": 270 - } + "range": [ + 267, + 270 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 270, - "end": 275 - } + "range": [ + 270, + 275 + ] } ], "closingElement": { @@ -666,54 +666,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 277, - "end": 280 - } + "range": [ + 277, + 280 + ] }, "loc": null, - "range": { - "start": 275, - "end": 281 - } + "range": [ + 275, + 281 + ] }, "loc": null, - "range": { - "start": 245, - "end": 281 - } + "range": [ + 245, + 281 + ] }, "loc": null, - "range": { - "start": 232, - "end": 286 - } + "range": [ + 232, + 286 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 288 - } + "range": [ + 22, + 288 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 288 - }, + "range": [ + 0, + 288 + ], "loc": null, - "range": { - "start": 0, - "end": 288 - } + "range": [ + 0, + 288 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 288 - } + "range": [ + 0, + 288 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment.js.snap index 74ecdd6d90..bf3f2741e5 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reassignment.js.snap @@ -29,10 +29,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,32 +60,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "ExpressionStatement", @@ -98,27 +98,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 50 - } + "range": [ + 46, + 50 + ] }, "computed": false, "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] }, "arguments": [ { @@ -128,41 +128,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "property": { "type": "Identifier", "name": "p0", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 59 - } + "range": [ + 57, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 59 - } + "range": [ + 51, + 59 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 60 - } + "range": [ + 44, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 44, - "end": 61 - } + "range": [ + 44, + 61 + ] }, { "type": "VariableDeclaration", @@ -175,33 +175,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] }, { "type": "ExpressionStatement", @@ -213,32 +213,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 82, - "end": 84 - } + "range": [ + 82, + 84 + ] }, "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 85 - } + "range": [ + 78, + 85 + ] }, { "type": "VariableDeclaration", @@ -251,10 +251,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "init": { "type": "JSXElement", @@ -264,10 +264,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 97, - "end": 106 - } + "range": [ + 97, + 106 + ] }, "attributes": [ { @@ -276,10 +276,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "value": { "type": "JSXExpressionContainer", @@ -288,51 +288,51 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "loc": null, - "range": { - "start": 109, - "end": 112 - } + "range": [ + 109, + 112 + ] }, "loc": null, - "range": { - "start": 107, - "end": 112 - } + "range": [ + 107, + 112 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 96, - "end": 115 - } + "range": [ + 96, + 115 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 96, - "end": 115 - } + "range": [ + 96, + 115 + ] }, "loc": null, - "range": { - "start": 92, - "end": 115 - } + "range": [ + 92, + 115 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 116 - } + "range": [ + 88, + 116 + ] }, { "type": "ExpressionStatement", @@ -345,27 +345,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 126 - } + "range": [ + 122, + 126 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] }, "arguments": [ { @@ -375,41 +375,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 132 - } + "range": [ + 127, + 132 + ] }, "property": { "type": "Identifier", "name": "p1", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 135 - } + "range": [ + 133, + 135 + ] }, "computed": false, "loc": null, - "range": { - "start": 127, - "end": 135 - } + "range": [ + 127, + 135 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 136 - } + "range": [ + 120, + 136 + ] }, "directive": null, "loc": null, - "range": { - "start": 120, - "end": 137 - } + "range": [ + 120, + 137 + ] }, { "type": "ReturnStatement", @@ -421,10 +421,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 149, - "end": 158 - } + "range": [ + 149, + 158 + ] }, "attributes": [ { @@ -433,10 +433,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "value": { "type": "JSXExpressionContainer", @@ -445,22 +445,22 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 163 - } + "range": [ + 162, + 163 + ] }, "loc": null, - "range": { - "start": 161, - "end": 164 - } + "range": [ + 161, + 164 + ] }, "loc": null, - "range": { - "start": 159, - "end": 164 - } + "range": [ + 159, + 164 + ] }, { "type": "JSXAttribute", @@ -468,10 +468,10 @@ Output: "type": "JSXIdentifier", "name": "y", "loc": null, - "range": { - "start": 165, - "end": 166 - } + "range": [ + 165, + 166 + ] }, "value": { "type": "JSXExpressionContainer", @@ -480,70 +480,70 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] }, "loc": null, - "range": { - "start": 167, - "end": 170 - } + "range": [ + 167, + 170 + ] }, "loc": null, - "range": { - "start": 165, - "end": 170 - } + "range": [ + 165, + 170 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 148, - "end": 173 - } + "range": [ + 148, + 173 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 148, - "end": 173 - } + "range": [ + 148, + 173 + ] }, "loc": null, - "range": { - "start": 141, - "end": 174 - } + "range": [ + 141, + 174 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 176 - } + "range": [ + 26, + 176 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 176 - }, + "range": [ + 0, + 176 + ], "loc": null, - "range": { - "start": 0, - "end": 176 - } + "range": [ + 0, + 176 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 176 - } + "range": [ + 0, + 176 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@recursive-function-expr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@recursive-function-expr.js.snap index 17bbdd6ba4..cbaf72ae84 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@recursive-function-expr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@recursive-function-expr.js.snap @@ -20,10 +20,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -44,71 +44,71 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 29 - } + "range": [ + 26, + 29 + ] }, "arguments": [], "loc": null, - "range": { - "start": 26, - "end": 31 - } + "range": [ + 26, + 31 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 20, - "end": 31 - }, + "range": [ + 20, + 31 + ], "expression": true, "loc": null, - "range": { - "start": 20, - "end": 31 - } + "range": [ + 20, + 31 + ] }, "arguments": [], "loc": null, - "range": { - "start": 19, - "end": 34 - } + "range": [ + 19, + 34 + ] }, "directive": null, "loc": null, - "range": { - "start": 19, - "end": 35 - } + "range": [ + 19, + 35 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 37 - } + "range": [ + 15, + 37 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 37 - }, + "range": [ + 0, + 37 + ], "loc": null, - "range": { - "start": 0, - "end": 37 - } + "range": [ + 0, + 37 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 37 - } + "range": [ + 0, + 37 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-condexpr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-condexpr.js.snap index 868e2c23a9..d7166add13 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-condexpr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-condexpr.js.snap @@ -25,10 +25,10 @@ Output: "name": "TestCondDepInConditionalExpr", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 196 - } + "range": [ + 168, + 196 + ] }, "params": [ { @@ -36,20 +36,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 202 - } + "range": [ + 197, + 202 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 204, - "end": 209 - } + "range": [ + 204, + 209 + ] } ], "body": { @@ -66,10 +66,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 221, - "end": 222 - } + "range": [ + 221, + 222 + ] }, "init": { "type": "ConditionalExpression", @@ -80,10 +80,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 225, - "end": 228 - } + "range": [ + 225, + 228 + ] }, "arguments": [ { @@ -91,17 +91,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 229, - "end": 234 - } + "range": [ + 229, + 234 + ] } ], "loc": null, - "range": { - "start": 225, - "end": 235 - } + "range": [ + 225, + 235 + ] }, "alternate": { "type": "CallExpression", @@ -110,10 +110,10 @@ Output: "name": "baz", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 258 - } + "range": [ + 255, + 258 + ] }, "arguments": [ { @@ -125,51 +125,51 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 259, - "end": 264 - } + "range": [ + 259, + 264 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 266 - } + "range": [ + 265, + 266 + ] }, "computed": false, "loc": null, - "range": { - "start": 259, - "end": 266 - } + "range": [ + 259, + 266 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 267, - "end": 268 - } + "range": [ + 267, + 268 + ] }, "computed": false, "loc": null, - "range": { - "start": 259, - "end": 268 - } + "range": [ + 259, + 268 + ] } ], "loc": null, - "range": { - "start": 255, - "end": 269 - } + "range": [ + 255, + 269 + ] }, "consequent": { "type": "CallExpression", @@ -178,10 +178,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 241 - } + "range": [ + 238, + 241 + ] }, "arguments": [ { @@ -193,70 +193,70 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 242, - "end": 247 - } + "range": [ + 242, + 247 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 248, - "end": 249 - } + "range": [ + 248, + 249 + ] }, "computed": false, "loc": null, - "range": { - "start": 242, - "end": 249 - } + "range": [ + 242, + 249 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 250, - "end": 251 - } + "range": [ + 250, + 251 + ] }, "computed": false, "loc": null, - "range": { - "start": 242, - "end": 251 - } + "range": [ + 242, + 251 + ] } ], "loc": null, - "range": { - "start": 238, - "end": 252 - } + "range": [ + 238, + 252 + ] }, "loc": null, - "range": { - "start": 225, - "end": 269 - } + "range": [ + 225, + 269 + ] }, "loc": null, - "range": { - "start": 221, - "end": 269 - } + "range": [ + 221, + 269 + ] } ], "loc": null, - "range": { - "start": 215, - "end": 270 - } + "range": [ + 215, + 270 + ] }, { "type": "ReturnStatement", @@ -265,42 +265,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 280, - "end": 281 - } + "range": [ + 280, + 281 + ] }, "loc": null, - "range": { - "start": 273, - "end": 282 - } + "range": [ + 273, + 282 + ] } ], "loc": null, - "range": { - "start": 211, - "end": 284 - } + "range": [ + 211, + 284 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 159, - "end": 284 - }, + "range": [ + 159, + 284 + ], "loc": null, - "range": { - "start": 159, - "end": 284 - } + "range": [ + 159, + 284 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 159, - "end": 284 - } + "range": [ + 159, + 284 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-ifelse.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-ifelse.js.snap index c1d28d4422..0bdd98be39 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-ifelse.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-ifelse.js.snap @@ -30,10 +30,10 @@ Output: "name": "TestCondDepInDirectIfElse", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 193 - } + "range": [ + 168, + 193 + ] }, "params": [ { @@ -41,20 +41,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 199 - } + "range": [ + 194, + 199 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 206 - } + "range": [ + 201, + 206 + ] } ], "body": { @@ -71,32 +71,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 219 - } + "range": [ + 218, + 219 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 222, - "end": 224 - } + "range": [ + 222, + 224 + ] }, "loc": null, - "range": { - "start": 218, - "end": 224 - } + "range": [ + 218, + 224 + ] } ], "loc": null, - "range": { - "start": 212, - "end": 225 - } + "range": [ + 212, + 225 + ] }, { "type": "IfStatement", @@ -107,10 +107,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 232, - "end": 235 - } + "range": [ + 232, + 235 + ] }, "arguments": [ { @@ -118,17 +118,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 236, - "end": 241 - } + "range": [ + 236, + 241 + ] } ], "loc": null, - "range": { - "start": 232, - "end": 242 - } + "range": [ + 232, + 242 + ] }, "consequent": { "type": "BlockStatement", @@ -145,27 +145,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 250, - "end": 251 - } + "range": [ + 250, + 251 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 252, - "end": 253 - } + "range": [ + 252, + 253 + ] }, "computed": false, "loc": null, - "range": { - "start": 250, - "end": 253 - } + "range": [ + 250, + 253 + ] }, "right": { "type": "MemberExpression", @@ -176,64 +176,64 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 256, - "end": 261 - } + "range": [ + 256, + 261 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 262, - "end": 263 - } + "range": [ + 262, + 263 + ] }, "computed": false, "loc": null, - "range": { - "start": 256, - "end": 263 - } + "range": [ + 256, + 263 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 265 - } + "range": [ + 264, + 265 + ] }, "computed": false, "loc": null, - "range": { - "start": 256, - "end": 265 - } + "range": [ + 256, + 265 + ] }, "loc": null, - "range": { - "start": 250, - "end": 265 - } + "range": [ + 250, + 265 + ] }, "directive": null, "loc": null, - "range": { - "start": 250, - "end": 266 - } + "range": [ + 250, + 266 + ] } ], "loc": null, - "range": { - "start": 244, - "end": 270 - } + "range": [ + 244, + 270 + ] }, "alternate": { "type": "BlockStatement", @@ -250,27 +250,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 282, - "end": 283 - } + "range": [ + 282, + 283 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 284, - "end": 285 - } + "range": [ + 284, + 285 + ] }, "computed": false, "loc": null, - "range": { - "start": 282, - "end": 285 - } + "range": [ + 282, + 285 + ] }, "right": { "type": "MemberExpression", @@ -281,70 +281,70 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 288, - "end": 293 - } + "range": [ + 288, + 293 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 294, - "end": 295 - } + "range": [ + 294, + 295 + ] }, "computed": false, "loc": null, - "range": { - "start": 288, - "end": 295 - } + "range": [ + 288, + 295 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 296, - "end": 297 - } + "range": [ + 296, + 297 + ] }, "computed": false, "loc": null, - "range": { - "start": 288, - "end": 297 - } + "range": [ + 288, + 297 + ] }, "loc": null, - "range": { - "start": 282, - "end": 297 - } + "range": [ + 282, + 297 + ] }, "directive": null, "loc": null, - "range": { - "start": 282, - "end": 298 - } + "range": [ + 282, + 298 + ] } ], "loc": null, - "range": { - "start": 276, - "end": 302 - } + "range": [ + 276, + 302 + ] }, "loc": null, - "range": { - "start": 228, - "end": 302 - } + "range": [ + 228, + 302 + ] }, { "type": "ReturnStatement", @@ -353,42 +353,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 312, - "end": 313 - } + "range": [ + 312, + 313 + ] }, "loc": null, - "range": { - "start": 305, - "end": 314 - } + "range": [ + 305, + 314 + ] } ], "loc": null, - "range": { - "start": 208, - "end": 316 - } + "range": [ + 208, + 316 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 159, - "end": 316 - }, + "range": [ + 159, + 316 + ], "loc": null, - "range": { - "start": 159, - "end": 316 - } + "range": [ + 159, + 316 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 159, - "end": 316 - } + "range": [ + 159, + 316 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-nested-ifelse-missing.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-nested-ifelse-missing.js.snap index 4ee940ca84..400b5b6828 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-nested-ifelse-missing.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-nested-ifelse-missing.js.snap @@ -31,10 +31,10 @@ Output: "name": "TestCondDepInNestedIfElse", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 175 - } + "range": [ + 150, + 175 + ] }, "params": [ { @@ -42,20 +42,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 176, - "end": 181 - } + "range": [ + 176, + 181 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 188 - } + "range": [ + 183, + 188 + ] } ], "body": { @@ -72,32 +72,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 201 - } + "range": [ + 200, + 201 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 204, - "end": 206 - } + "range": [ + 204, + 206 + ] }, "loc": null, - "range": { - "start": 200, - "end": 206 - } + "range": [ + 200, + 206 + ] } ], "loc": null, - "range": { - "start": 194, - "end": 207 - } + "range": [ + 194, + 207 + ] }, { "type": "IfStatement", @@ -108,10 +108,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 217 - } + "range": [ + 214, + 217 + ] }, "arguments": [ { @@ -119,17 +119,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 223 - } + "range": [ + 218, + 223 + ] } ], "loc": null, - "range": { - "start": 214, - "end": 224 - } + "range": [ + 214, + 224 + ] }, "consequent": { "type": "BlockStatement", @@ -143,17 +143,17 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 236, - "end": 239 - } + "range": [ + 236, + 239 + ] }, "arguments": [], "loc": null, - "range": { - "start": 236, - "end": 241 - } + "range": [ + 236, + 241 + ] }, "consequent": { "type": "BlockStatement", @@ -170,27 +170,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 251, - "end": 252 - } + "range": [ + 251, + 252 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 254 - } + "range": [ + 253, + 254 + ] }, "computed": false, "loc": null, - "range": { - "start": 251, - "end": 254 - } + "range": [ + 251, + 254 + ] }, "right": { "type": "MemberExpression", @@ -201,78 +201,78 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 257, - "end": 262 - } + "range": [ + 257, + 262 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 263, - "end": 264 - } + "range": [ + 263, + 264 + ] }, "computed": false, "loc": null, - "range": { - "start": 257, - "end": 264 - } + "range": [ + 257, + 264 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 266 - } + "range": [ + 265, + 266 + ] }, "computed": false, "loc": null, - "range": { - "start": 257, - "end": 266 - } + "range": [ + 257, + 266 + ] }, "loc": null, - "range": { - "start": 251, - "end": 266 - } + "range": [ + 251, + 266 + ] }, "directive": null, "loc": null, - "range": { - "start": 251, - "end": 267 - } + "range": [ + 251, + 267 + ] } ], "loc": null, - "range": { - "start": 243, - "end": 273 - } + "range": [ + 243, + 273 + ] }, "alternate": null, "loc": null, - "range": { - "start": 232, - "end": 273 - } + "range": [ + 232, + 273 + ] } ], "loc": null, - "range": { - "start": 226, - "end": 277 - } + "range": [ + 226, + 277 + ] }, "alternate": { "type": "BlockStatement", @@ -289,27 +289,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 289, - "end": 290 - } + "range": [ + 289, + 290 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 291, - "end": 292 - } + "range": [ + 291, + 292 + ] }, "computed": false, "loc": null, - "range": { - "start": 289, - "end": 292 - } + "range": [ + 289, + 292 + ] }, "right": { "type": "MemberExpression", @@ -320,70 +320,70 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 295, - "end": 300 - } + "range": [ + 295, + 300 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 301, - "end": 302 - } + "range": [ + 301, + 302 + ] }, "computed": false, "loc": null, - "range": { - "start": 295, - "end": 302 - } + "range": [ + 295, + 302 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 303, - "end": 304 - } + "range": [ + 303, + 304 + ] }, "computed": false, "loc": null, - "range": { - "start": 295, - "end": 304 - } + "range": [ + 295, + 304 + ] }, "loc": null, - "range": { - "start": 289, - "end": 304 - } + "range": [ + 289, + 304 + ] }, "directive": null, "loc": null, - "range": { - "start": 289, - "end": 305 - } + "range": [ + 289, + 305 + ] } ], "loc": null, - "range": { - "start": 283, - "end": 309 - } + "range": [ + 283, + 309 + ] }, "loc": null, - "range": { - "start": 210, - "end": 309 - } + "range": [ + 210, + 309 + ] }, { "type": "ReturnStatement", @@ -392,42 +392,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 319, - "end": 320 - } + "range": [ + 319, + 320 + ] }, "loc": null, - "range": { - "start": 312, - "end": 321 - } + "range": [ + 312, + 321 + ] } ], "loc": null, - "range": { - "start": 190, - "end": 323 - } + "range": [ + 190, + 323 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 141, - "end": 323 - }, + "range": [ + 141, + 323 + ], "loc": null, - "range": { - "start": 141, - "end": 323 - } + "range": [ + 141, + 323 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 141, - "end": 323 - } + "range": [ + 141, + 323 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-nested-ifelse.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-nested-ifelse.js.snap index 05b7279a76..1931f1cf40 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-nested-ifelse.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-nested-ifelse.js.snap @@ -36,10 +36,10 @@ Output: "name": "TestCondDepInNestedIfElse", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 193 - } + "range": [ + 168, + 193 + ] }, "params": [ { @@ -47,20 +47,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 194, - "end": 199 - } + "range": [ + 194, + 199 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 206 - } + "range": [ + 201, + 206 + ] } ], "body": { @@ -77,32 +77,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 219 - } + "range": [ + 218, + 219 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 222, - "end": 224 - } + "range": [ + 222, + 224 + ] }, "loc": null, - "range": { - "start": 218, - "end": 224 - } + "range": [ + 218, + 224 + ] } ], "loc": null, - "range": { - "start": 212, - "end": 225 - } + "range": [ + 212, + 225 + ] }, { "type": "IfStatement", @@ -113,10 +113,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 232, - "end": 235 - } + "range": [ + 232, + 235 + ] }, "arguments": [ { @@ -124,17 +124,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 236, - "end": 241 - } + "range": [ + 236, + 241 + ] } ], "loc": null, - "range": { - "start": 232, - "end": 242 - } + "range": [ + 232, + 242 + ] }, "consequent": { "type": "BlockStatement", @@ -148,17 +148,17 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 257 - } + "range": [ + 254, + 257 + ] }, "arguments": [], "loc": null, - "range": { - "start": 254, - "end": 259 - } + "range": [ + 254, + 259 + ] }, "consequent": { "type": "BlockStatement", @@ -175,27 +175,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 269, - "end": 270 - } + "range": [ + 269, + 270 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 271, - "end": 272 - } + "range": [ + 271, + 272 + ] }, "computed": false, "loc": null, - "range": { - "start": 269, - "end": 272 - } + "range": [ + 269, + 272 + ] }, "right": { "type": "MemberExpression", @@ -206,64 +206,64 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 275, - "end": 280 - } + "range": [ + 275, + 280 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 281, - "end": 282 - } + "range": [ + 281, + 282 + ] }, "computed": false, "loc": null, - "range": { - "start": 275, - "end": 282 - } + "range": [ + 275, + 282 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 283, - "end": 284 - } + "range": [ + 283, + 284 + ] }, "computed": false, "loc": null, - "range": { - "start": 275, - "end": 284 - } + "range": [ + 275, + 284 + ] }, "loc": null, - "range": { - "start": 269, - "end": 284 - } + "range": [ + 269, + 284 + ] }, "directive": null, "loc": null, - "range": { - "start": 269, - "end": 285 - } + "range": [ + 269, + 285 + ] } ], "loc": null, - "range": { - "start": 261, - "end": 291 - } + "range": [ + 261, + 291 + ] }, "alternate": { "type": "BlockStatement", @@ -280,27 +280,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 305, - "end": 306 - } + "range": [ + 305, + 306 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 307, - "end": 308 - } + "range": [ + 307, + 308 + ] }, "computed": false, "loc": null, - "range": { - "start": 305, - "end": 308 - } + "range": [ + 305, + 308 + ] }, "right": { "type": "MemberExpression", @@ -311,77 +311,77 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 311, - "end": 316 - } + "range": [ + 311, + 316 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 317, - "end": 318 - } + "range": [ + 317, + 318 + ] }, "computed": false, "loc": null, - "range": { - "start": 311, - "end": 318 - } + "range": [ + 311, + 318 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 319, - "end": 320 - } + "range": [ + 319, + 320 + ] }, "computed": false, "loc": null, - "range": { - "start": 311, - "end": 320 - } + "range": [ + 311, + 320 + ] }, "loc": null, - "range": { - "start": 305, - "end": 320 - } + "range": [ + 305, + 320 + ] }, "directive": null, "loc": null, - "range": { - "start": 305, - "end": 321 - } + "range": [ + 305, + 321 + ] } ], "loc": null, - "range": { - "start": 297, - "end": 327 - } + "range": [ + 297, + 327 + ] }, "loc": null, - "range": { - "start": 250, - "end": 327 - } + "range": [ + 250, + 327 + ] } ], "loc": null, - "range": { - "start": 244, - "end": 331 - } + "range": [ + 244, + 331 + ] }, "alternate": { "type": "IfStatement", @@ -392,10 +392,10 @@ Output: "name": "baz", "typeAnnotation": null, "loc": null, - "range": { - "start": 341, - "end": 344 - } + "range": [ + 341, + 344 + ] }, "arguments": [ { @@ -403,17 +403,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 345, - "end": 350 - } + "range": [ + 345, + 350 + ] } ], "loc": null, - "range": { - "start": 341, - "end": 351 - } + "range": [ + 341, + 351 + ] }, "consequent": { "type": "BlockStatement", @@ -430,27 +430,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 359, - "end": 360 - } + "range": [ + 359, + 360 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 361, - "end": 362 - } + "range": [ + 361, + 362 + ] }, "computed": false, "loc": null, - "range": { - "start": 359, - "end": 362 - } + "range": [ + 359, + 362 + ] }, "right": { "type": "MemberExpression", @@ -461,64 +461,64 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 365, - "end": 370 - } + "range": [ + 365, + 370 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 371, - "end": 372 - } + "range": [ + 371, + 372 + ] }, "computed": false, "loc": null, - "range": { - "start": 365, - "end": 372 - } + "range": [ + 365, + 372 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 373, - "end": 374 - } + "range": [ + 373, + 374 + ] }, "computed": false, "loc": null, - "range": { - "start": 365, - "end": 374 - } + "range": [ + 365, + 374 + ] }, "loc": null, - "range": { - "start": 359, - "end": 374 - } + "range": [ + 359, + 374 + ] }, "directive": null, "loc": null, - "range": { - "start": 359, - "end": 375 - } + "range": [ + 359, + 375 + ] } ], "loc": null, - "range": { - "start": 353, - "end": 379 - } + "range": [ + 353, + 379 + ] }, "alternate": { "type": "BlockStatement", @@ -535,27 +535,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 391, - "end": 392 - } + "range": [ + 391, + 392 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 393, - "end": 394 - } + "range": [ + 393, + 394 + ] }, "computed": false, "loc": null, - "range": { - "start": 391, - "end": 394 - } + "range": [ + 391, + 394 + ] }, "right": { "type": "MemberExpression", @@ -566,76 +566,76 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 397, - "end": 402 - } + "range": [ + 397, + 402 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 403, - "end": 404 - } + "range": [ + 403, + 404 + ] }, "computed": false, "loc": null, - "range": { - "start": 397, - "end": 404 - } + "range": [ + 397, + 404 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 405, - "end": 406 - } + "range": [ + 405, + 406 + ] }, "computed": false, "loc": null, - "range": { - "start": 397, - "end": 406 - } + "range": [ + 397, + 406 + ] }, "loc": null, - "range": { - "start": 391, - "end": 406 - } + "range": [ + 391, + 406 + ] }, "directive": null, "loc": null, - "range": { - "start": 391, - "end": 407 - } + "range": [ + 391, + 407 + ] } ], "loc": null, - "range": { - "start": 385, - "end": 411 - } + "range": [ + 385, + 411 + ] }, "loc": null, - "range": { - "start": 337, - "end": 411 - } + "range": [ + 337, + 411 + ] }, "loc": null, - "range": { - "start": 228, - "end": 411 - } + "range": [ + 228, + 411 + ] }, { "type": "ReturnStatement", @@ -644,42 +644,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 421, - "end": 422 - } + "range": [ + 421, + 422 + ] }, "loc": null, - "range": { - "start": 414, - "end": 423 - } + "range": [ + 414, + 423 + ] } ], "loc": null, - "range": { - "start": 208, - "end": 425 - } + "range": [ + 208, + 425 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 159, - "end": 425 - }, + "range": [ + 159, + 425 + ], "loc": null, - "range": { - "start": 159, - "end": 425 - } + "range": [ + 159, + 425 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 159, - "end": 425 - } + "range": [ + 159, + 425 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-case.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-case.js.snap index 0fb3e3ce9e..1c964eb531 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-case.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-case.js.snap @@ -35,10 +35,10 @@ Output: "name": "TestCondDepInSwitchMissingCase", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 180 - } + "range": [ + 150, + 180 + ] }, "params": [ { @@ -46,20 +46,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 186 - } + "range": [ + 181, + 186 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 193 - } + "range": [ + 188, + 193 + ] } ], "body": { @@ -76,32 +76,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 206 - } + "range": [ + 205, + 206 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 209, - "end": 211 - } + "range": [ + 209, + 211 + ] }, "loc": null, - "range": { - "start": 205, - "end": 211 - } + "range": [ + 205, + 211 + ] } ], "loc": null, - "range": { - "start": 199, - "end": 212 - } + "range": [ + 199, + 212 + ] }, { "type": "SwitchStatement", @@ -112,10 +112,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 226 - } + "range": [ + 223, + 226 + ] }, "arguments": [ { @@ -123,17 +123,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 227, - "end": 232 - } + "range": [ + 227, + 232 + ] } ], "loc": null, - "range": { - "start": 223, - "end": 233 - } + "range": [ + 223, + 233 + ] }, "cases": [ { @@ -142,10 +142,10 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 246, - "end": 247 - } + "range": [ + 246, + 247 + ] }, "consequent": [ { @@ -160,27 +160,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 256 - } + "range": [ + 255, + 256 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 257, - "end": 258 - } + "range": [ + 257, + 258 + ] }, "computed": false, "loc": null, - "range": { - "start": 255, - "end": 258 - } + "range": [ + 255, + 258 + ] }, "right": { "type": "MemberExpression", @@ -191,73 +191,73 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 266 - } + "range": [ + 261, + 266 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 267, - "end": 268 - } + "range": [ + 267, + 268 + ] }, "computed": false, "loc": null, - "range": { - "start": 261, - "end": 268 - } + "range": [ + 261, + 268 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 269, - "end": 270 - } + "range": [ + 269, + 270 + ] }, "computed": false, "loc": null, - "range": { - "start": 261, - "end": 270 - } + "range": [ + 261, + 270 + ] }, "loc": null, - "range": { - "start": 255, - "end": 270 - } + "range": [ + 255, + 270 + ] }, "directive": null, "loc": null, - "range": { - "start": 255, - "end": 271 - } + "range": [ + 255, + 271 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 278, - "end": 284 - } + "range": [ + 278, + 284 + ] } ], "loc": null, - "range": { - "start": 241, - "end": 284 - } + "range": [ + 241, + 284 + ] }, { "type": "SwitchCase", @@ -265,10 +265,10 @@ Output: "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 294, - "end": 295 - } + "range": [ + 294, + 295 + ] }, "consequent": [ { @@ -283,65 +283,65 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 303, - "end": 304 - } + "range": [ + 303, + 304 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 305, - "end": 306 - } + "range": [ + 305, + 306 + ] }, "computed": false, "loc": null, - "range": { - "start": 303, - "end": 306 - } + "range": [ + 303, + 306 + ] }, "right": { "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 309, - "end": 311 - } + "range": [ + 309, + 311 + ] }, "loc": null, - "range": { - "start": 303, - "end": 311 - } + "range": [ + 303, + 311 + ] }, "directive": null, "loc": null, - "range": { - "start": 303, - "end": 312 - } + "range": [ + 303, + 312 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 319, - "end": 325 - } + "range": [ + 319, + 325 + ] } ], "loc": null, - "range": { - "start": 289, - "end": 325 - } + "range": [ + 289, + 325 + ] }, { "type": "SwitchCase", @@ -359,27 +359,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 345, - "end": 346 - } + "range": [ + 345, + 346 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 347, - "end": 348 - } + "range": [ + 347, + 348 + ] }, "computed": false, "loc": null, - "range": { - "start": 345, - "end": 348 - } + "range": [ + 345, + 348 + ] }, "right": { "type": "MemberExpression", @@ -390,80 +390,80 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 351, - "end": 356 - } + "range": [ + 351, + 356 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 357, - "end": 358 - } + "range": [ + 357, + 358 + ] }, "computed": false, "loc": null, - "range": { - "start": 351, - "end": 358 - } + "range": [ + 351, + 358 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 359, - "end": 360 - } + "range": [ + 359, + 360 + ] }, "computed": false, "loc": null, - "range": { - "start": 351, - "end": 360 - } + "range": [ + 351, + 360 + ] }, "loc": null, - "range": { - "start": 345, - "end": 360 - } + "range": [ + 345, + 360 + ] }, "directive": null, "loc": null, - "range": { - "start": 345, - "end": 361 - } + "range": [ + 345, + 361 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 368, - "end": 374 - } + "range": [ + 368, + 374 + ] } ], "loc": null, - "range": { - "start": 330, - "end": 374 - } + "range": [ + 330, + 374 + ] } ], "loc": null, - "range": { - "start": 215, - "end": 378 - } + "range": [ + 215, + 378 + ] }, { "type": "ReturnStatement", @@ -472,42 +472,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 388, - "end": 389 - } + "range": [ + 388, + 389 + ] }, "loc": null, - "range": { - "start": 381, - "end": 390 - } + "range": [ + 381, + 390 + ] } ], "loc": null, - "range": { - "start": 195, - "end": 392 - } + "range": [ + 195, + 392 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 141, - "end": 392 - }, + "range": [ + 141, + 392 + ], "loc": null, - "range": { - "start": 141, - "end": 392 - } + "range": [ + 141, + 392 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 141, - "end": 392 - } + "range": [ + 141, + 392 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-default.js.snap index b9466566dc..acd56401ac 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch-missing-default.js.snap @@ -32,10 +32,10 @@ Output: "name": "TestCondDepInSwitchMissingDefault", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 190 - } + "range": [ + 157, + 190 + ] }, "params": [ { @@ -43,20 +43,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 191, - "end": 196 - } + "range": [ + 191, + 196 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 203 - } + "range": [ + 198, + 203 + ] } ], "body": { @@ -73,32 +73,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 215, - "end": 216 - } + "range": [ + 215, + 216 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 219, - "end": 221 - } + "range": [ + 219, + 221 + ] }, "loc": null, - "range": { - "start": 215, - "end": 221 - } + "range": [ + 215, + 221 + ] } ], "loc": null, - "range": { - "start": 209, - "end": 222 - } + "range": [ + 209, + 222 + ] }, { "type": "SwitchStatement", @@ -109,10 +109,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 233, - "end": 236 - } + "range": [ + 233, + 236 + ] }, "arguments": [ { @@ -120,17 +120,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 237, - "end": 242 - } + "range": [ + 237, + 242 + ] } ], "loc": null, - "range": { - "start": 233, - "end": 243 - } + "range": [ + 233, + 243 + ] }, "cases": [ { @@ -139,10 +139,10 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 256, - "end": 257 - } + "range": [ + 256, + 257 + ] }, "consequent": [ { @@ -157,27 +157,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 266 - } + "range": [ + 265, + 266 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 267, - "end": 268 - } + "range": [ + 267, + 268 + ] }, "computed": false, "loc": null, - "range": { - "start": 265, - "end": 268 - } + "range": [ + 265, + 268 + ] }, "right": { "type": "MemberExpression", @@ -188,73 +188,73 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 271, - "end": 276 - } + "range": [ + 271, + 276 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 277, - "end": 278 - } + "range": [ + 277, + 278 + ] }, "computed": false, "loc": null, - "range": { - "start": 271, - "end": 278 - } + "range": [ + 271, + 278 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 279, - "end": 280 - } + "range": [ + 279, + 280 + ] }, "computed": false, "loc": null, - "range": { - "start": 271, - "end": 280 - } + "range": [ + 271, + 280 + ] }, "loc": null, - "range": { - "start": 265, - "end": 280 - } + "range": [ + 265, + 280 + ] }, "directive": null, "loc": null, - "range": { - "start": 265, - "end": 281 - } + "range": [ + 265, + 281 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 288, - "end": 294 - } + "range": [ + 288, + 294 + ] } ], "loc": null, - "range": { - "start": 251, - "end": 294 - } + "range": [ + 251, + 294 + ] }, { "type": "SwitchCase", @@ -262,10 +262,10 @@ Output: "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 304, - "end": 305 - } + "range": [ + 304, + 305 + ] }, "consequent": [ { @@ -280,27 +280,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 313, - "end": 314 - } + "range": [ + 313, + 314 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 315, - "end": 316 - } + "range": [ + 315, + 316 + ] }, "computed": false, "loc": null, - "range": { - "start": 313, - "end": 316 - } + "range": [ + 313, + 316 + ] }, "right": { "type": "MemberExpression", @@ -311,80 +311,80 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 319, - "end": 324 - } + "range": [ + 319, + 324 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 325, - "end": 326 - } + "range": [ + 325, + 326 + ] }, "computed": false, "loc": null, - "range": { - "start": 319, - "end": 326 - } + "range": [ + 319, + 326 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 327, - "end": 328 - } + "range": [ + 327, + 328 + ] }, "computed": false, "loc": null, - "range": { - "start": 319, - "end": 328 - } + "range": [ + 319, + 328 + ] }, "loc": null, - "range": { - "start": 313, - "end": 328 - } + "range": [ + 313, + 328 + ] }, "directive": null, "loc": null, - "range": { - "start": 313, - "end": 329 - } + "range": [ + 313, + 329 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 336, - "end": 342 - } + "range": [ + 336, + 342 + ] } ], "loc": null, - "range": { - "start": 299, - "end": 342 - } + "range": [ + 299, + 342 + ] } ], "loc": null, - "range": { - "start": 225, - "end": 346 - } + "range": [ + 225, + 346 + ] }, { "type": "ReturnStatement", @@ -393,42 +393,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 356, - "end": 357 - } + "range": [ + 356, + 357 + ] }, "loc": null, - "range": { - "start": 349, - "end": 358 - } + "range": [ + 349, + 358 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 360 - } + "range": [ + 205, + 360 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 148, - "end": 360 - }, + "range": [ + 148, + 360 + ], "loc": null, - "range": { - "start": 148, - "end": 360 - } + "range": [ + 148, + 360 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 148, - "end": 360 - } + "range": [ + 148, + 360 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch.js.snap index ba0b3dff7f..c0334a8462 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-cfg-switch.js.snap @@ -35,10 +35,10 @@ Output: "name": "TestCondDepInSwitch", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 187 - } + "range": [ + 168, + 187 + ] }, "params": [ { @@ -46,20 +46,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 193 - } + "range": [ + 188, + 193 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 200 - } + "range": [ + 195, + 200 + ] } ], "body": { @@ -76,32 +76,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 213 - } + "range": [ + 212, + 213 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 216, - "end": 218 - } + "range": [ + 216, + 218 + ] }, "loc": null, - "range": { - "start": 212, - "end": 218 - } + "range": [ + 212, + 218 + ] } ], "loc": null, - "range": { - "start": 206, - "end": 219 - } + "range": [ + 206, + 219 + ] }, { "type": "SwitchStatement", @@ -112,10 +112,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 230, - "end": 233 - } + "range": [ + 230, + 233 + ] }, "arguments": [ { @@ -123,17 +123,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 234, - "end": 239 - } + "range": [ + 234, + 239 + ] } ], "loc": null, - "range": { - "start": 230, - "end": 240 - } + "range": [ + 230, + 240 + ] }, "cases": [ { @@ -142,10 +142,10 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 253, - "end": 254 - } + "range": [ + 253, + 254 + ] }, "consequent": [ { @@ -160,27 +160,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 262, - "end": 263 - } + "range": [ + 262, + 263 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 265 - } + "range": [ + 264, + 265 + ] }, "computed": false, "loc": null, - "range": { - "start": 262, - "end": 265 - } + "range": [ + 262, + 265 + ] }, "right": { "type": "MemberExpression", @@ -191,73 +191,73 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 268, - "end": 273 - } + "range": [ + 268, + 273 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 274, - "end": 275 - } + "range": [ + 274, + 275 + ] }, "computed": false, "loc": null, - "range": { - "start": 268, - "end": 275 - } + "range": [ + 268, + 275 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 276, - "end": 277 - } + "range": [ + 276, + 277 + ] }, "computed": false, "loc": null, - "range": { - "start": 268, - "end": 277 - } + "range": [ + 268, + 277 + ] }, "loc": null, - "range": { - "start": 262, - "end": 277 - } + "range": [ + 262, + 277 + ] }, "directive": null, "loc": null, - "range": { - "start": 262, - "end": 278 - } + "range": [ + 262, + 278 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 285, - "end": 291 - } + "range": [ + 285, + 291 + ] } ], "loc": null, - "range": { - "start": 248, - "end": 291 - } + "range": [ + 248, + 291 + ] }, { "type": "SwitchCase", @@ -265,10 +265,10 @@ Output: "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 301, - "end": 302 - } + "range": [ + 301, + 302 + ] }, "consequent": [ { @@ -283,27 +283,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 310, - "end": 311 - } + "range": [ + 310, + 311 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 312, - "end": 313 - } + "range": [ + 312, + 313 + ] }, "computed": false, "loc": null, - "range": { - "start": 310, - "end": 313 - } + "range": [ + 310, + 313 + ] }, "right": { "type": "MemberExpression", @@ -314,73 +314,73 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 316, - "end": 321 - } + "range": [ + 316, + 321 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 322, - "end": 323 - } + "range": [ + 322, + 323 + ] }, "computed": false, "loc": null, - "range": { - "start": 316, - "end": 323 - } + "range": [ + 316, + 323 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 324, - "end": 325 - } + "range": [ + 324, + 325 + ] }, "computed": false, "loc": null, - "range": { - "start": 316, - "end": 325 - } + "range": [ + 316, + 325 + ] }, "loc": null, - "range": { - "start": 310, - "end": 325 - } + "range": [ + 310, + 325 + ] }, "directive": null, "loc": null, - "range": { - "start": 310, - "end": 326 - } + "range": [ + 310, + 326 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 333, - "end": 339 - } + "range": [ + 333, + 339 + ] } ], "loc": null, - "range": { - "start": 296, - "end": 339 - } + "range": [ + 296, + 339 + ] }, { "type": "SwitchCase", @@ -398,27 +398,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 359, - "end": 360 - } + "range": [ + 359, + 360 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 361, - "end": 362 - } + "range": [ + 361, + 362 + ] }, "computed": false, "loc": null, - "range": { - "start": 359, - "end": 362 - } + "range": [ + 359, + 362 + ] }, "right": { "type": "MemberExpression", @@ -429,71 +429,71 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 365, - "end": 370 - } + "range": [ + 365, + 370 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 371, - "end": 372 - } + "range": [ + 371, + 372 + ] }, "computed": false, "loc": null, - "range": { - "start": 365, - "end": 372 - } + "range": [ + 365, + 372 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 373, - "end": 374 - } + "range": [ + 373, + 374 + ] }, "computed": false, "loc": null, - "range": { - "start": 365, - "end": 374 - } + "range": [ + 365, + 374 + ] }, "loc": null, - "range": { - "start": 359, - "end": 374 - } + "range": [ + 359, + 374 + ] }, "directive": null, "loc": null, - "range": { - "start": 359, - "end": 375 - } + "range": [ + 359, + 375 + ] } ], "loc": null, - "range": { - "start": 344, - "end": 375 - } + "range": [ + 344, + 375 + ] } ], "loc": null, - "range": { - "start": 222, - "end": 379 - } + "range": [ + 222, + 379 + ] }, { "type": "ReturnStatement", @@ -502,42 +502,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 389, - "end": 390 - } + "range": [ + 389, + 390 + ] }, "loc": null, - "range": { - "start": 382, - "end": 391 - } + "range": [ + 382, + 391 + ] } ], "loc": null, - "range": { - "start": 202, - "end": 393 - } + "range": [ + 202, + 393 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 159, - "end": 393 - }, + "range": [ + 159, + 393 + ], "loc": null, - "range": { - "start": 159, - "end": 393 - } + "range": [ + 159, + 393 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 159, - "end": 393 - } + "range": [ + 159, + 393 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-no-uncond.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-no-uncond.js.snap index 3f84dd9b72..9cd6036556 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-no-uncond.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-no-uncond.js.snap @@ -27,10 +27,10 @@ Output: "name": "TestOnlyConditionalDependencies", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 152 - } + "range": [ + 121, + 152 + ] }, "params": [ { @@ -38,20 +38,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 158 - } + "range": [ + 153, + 158 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 165 - } + "range": [ + 160, + 165 + ] } ], "body": { @@ -68,32 +68,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 178 - } + "range": [ + 177, + 178 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 181, - "end": 183 - } + "range": [ + 181, + 183 + ] }, "loc": null, - "range": { - "start": 177, - "end": 183 - } + "range": [ + 177, + 183 + ] } ], "loc": null, - "range": { - "start": 171, - "end": 184 - } + "range": [ + 171, + 184 + ] }, { "type": "IfStatement", @@ -104,10 +104,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 191, - "end": 194 - } + "range": [ + 191, + 194 + ] }, "arguments": [ { @@ -115,17 +115,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 200 - } + "range": [ + 195, + 200 + ] } ], "loc": null, - "range": { - "start": 191, - "end": 201 - } + "range": [ + 191, + 201 + ] }, "consequent": { "type": "BlockStatement", @@ -142,27 +142,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 210 - } + "range": [ + 209, + 210 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 212 - } + "range": [ + 211, + 212 + ] }, "computed": false, "loc": null, - "range": { - "start": 209, - "end": 212 - } + "range": [ + 209, + 212 + ] }, "right": { "type": "MemberExpression", @@ -173,57 +173,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 215, - "end": 220 - } + "range": [ + 215, + 220 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 221, - "end": 222 - } + "range": [ + 221, + 222 + ] }, "computed": false, "loc": null, - "range": { - "start": 215, - "end": 222 - } + "range": [ + 215, + 222 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 224 - } + "range": [ + 223, + 224 + ] }, "computed": false, "loc": null, - "range": { - "start": 215, - "end": 224 - } + "range": [ + 215, + 224 + ] }, "loc": null, - "range": { - "start": 209, - "end": 224 - } + "range": [ + 209, + 224 + ] }, "directive": null, "loc": null, - "range": { - "start": 209, - "end": 225 - } + "range": [ + 209, + 225 + ] }, { "type": "ExpressionStatement", @@ -237,27 +237,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 230, - "end": 231 - } + "range": [ + 230, + 231 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 232, - "end": 233 - } + "range": [ + 232, + 233 + ] }, "computed": false, "loc": null, - "range": { - "start": 230, - "end": 233 - } + "range": [ + 230, + 233 + ] }, "right": { "type": "MemberExpression", @@ -270,88 +270,88 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 236, - "end": 241 - } + "range": [ + 236, + 241 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 242, - "end": 243 - } + "range": [ + 242, + 243 + ] }, "computed": false, "loc": null, - "range": { - "start": 236, - "end": 243 - } + "range": [ + 236, + 243 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 245 - } + "range": [ + 244, + 245 + ] }, "computed": false, "loc": null, - "range": { - "start": 236, - "end": 245 - } + "range": [ + 236, + 245 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 246, - "end": 247 - } + "range": [ + 246, + 247 + ] }, "computed": false, "loc": null, - "range": { - "start": 236, - "end": 247 - } + "range": [ + 236, + 247 + ] }, "loc": null, - "range": { - "start": 230, - "end": 247 - } + "range": [ + 230, + 247 + ] }, "directive": null, "loc": null, - "range": { - "start": 230, - "end": 248 - } + "range": [ + 230, + 248 + ] } ], "loc": null, - "range": { - "start": 203, - "end": 252 - } + "range": [ + 203, + 252 + ] }, "alternate": null, "loc": null, - "range": { - "start": 187, - "end": 252 - } + "range": [ + 187, + 252 + ] }, { "type": "ReturnStatement", @@ -360,42 +360,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 262, - "end": 263 - } + "range": [ + 262, + 263 + ] }, "loc": null, - "range": { - "start": 255, - "end": 264 - } + "range": [ + 255, + 264 + ] } ], "loc": null, - "range": { - "start": 167, - "end": 266 - } + "range": [ + 167, + 266 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 112, - "end": 266 - }, + "range": [ + 112, + 266 + ], "loc": null, - "range": { - "start": 112, - "end": 266 - } + "range": [ + 112, + 266 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 112, - "end": 266 - } + "range": [ + 112, + 266 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-promote-uncond.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-promote-uncond.js.snap index ee180b4154..be19099720 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-promote-uncond.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-promote-uncond.js.snap @@ -28,10 +28,10 @@ Output: "name": "TestPromoteUnconditionalAccessToDependency", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 260 - } + "range": [ + 218, + 260 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 266 - } + "range": [ + 261, + 266 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 268, - "end": 273 - } + "range": [ + 268, + 273 + ] } ], "body": { @@ -69,32 +69,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 285, - "end": 286 - } + "range": [ + 285, + 286 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 289, - "end": 291 - } + "range": [ + 289, + 291 + ] }, "loc": null, - "range": { - "start": 285, - "end": 291 - } + "range": [ + 285, + 291 + ] } ], "loc": null, - "range": { - "start": 279, - "end": 292 - } + "range": [ + 279, + 292 + ] }, { "type": "ExpressionStatement", @@ -108,27 +108,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 295, - "end": 296 - } + "range": [ + 295, + 296 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 297, - "end": 298 - } + "range": [ + 297, + 298 + ] }, "computed": false, "loc": null, - "range": { - "start": 295, - "end": 298 - } + "range": [ + 295, + 298 + ] }, "right": { "type": "MemberExpression", @@ -141,74 +141,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 301, - "end": 306 - } + "range": [ + 301, + 306 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 307, - "end": 308 - } + "range": [ + 307, + 308 + ] }, "computed": false, "loc": null, - "range": { - "start": 301, - "end": 308 - } + "range": [ + 301, + 308 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 309, - "end": 310 - } + "range": [ + 309, + 310 + ] }, "computed": false, "loc": null, - "range": { - "start": 301, - "end": 310 - } + "range": [ + 301, + 310 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 311, - "end": 312 - } + "range": [ + 311, + 312 + ] }, "computed": false, "loc": null, - "range": { - "start": 301, - "end": 312 - } + "range": [ + 301, + 312 + ] }, "loc": null, - "range": { - "start": 295, - "end": 312 - } + "range": [ + 295, + 312 + ] }, "directive": null, "loc": null, - "range": { - "start": 295, - "end": 313 - } + "range": [ + 295, + 313 + ] }, { "type": "IfStatement", @@ -219,10 +219,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 320, - "end": 323 - } + "range": [ + 320, + 323 + ] }, "arguments": [ { @@ -230,17 +230,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 324, - "end": 329 - } + "range": [ + 324, + 329 + ] } ], "loc": null, - "range": { - "start": 320, - "end": 330 - } + "range": [ + 320, + 330 + ] }, "consequent": { "type": "BlockStatement", @@ -257,27 +257,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 338, - "end": 339 - } + "range": [ + 338, + 339 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 340, - "end": 341 - } + "range": [ + 340, + 341 + ] }, "computed": false, "loc": null, - "range": { - "start": 338, - "end": 341 - } + "range": [ + 338, + 341 + ] }, "right": { "type": "MemberExpression", @@ -290,88 +290,88 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 344, - "end": 349 - } + "range": [ + 344, + 349 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 350, - "end": 351 - } + "range": [ + 350, + 351 + ] }, "computed": false, "loc": null, - "range": { - "start": 344, - "end": 351 - } + "range": [ + 344, + 351 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 352, - "end": 353 - } + "range": [ + 352, + 353 + ] }, "computed": false, "loc": null, - "range": { - "start": 344, - "end": 353 - } + "range": [ + 344, + 353 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 354, - "end": 355 - } + "range": [ + 354, + 355 + ] }, "computed": false, "loc": null, - "range": { - "start": 344, - "end": 355 - } + "range": [ + 344, + 355 + ] }, "loc": null, - "range": { - "start": 338, - "end": 355 - } + "range": [ + 338, + 355 + ] }, "directive": null, "loc": null, - "range": { - "start": 338, - "end": 356 - } + "range": [ + 338, + 356 + ] } ], "loc": null, - "range": { - "start": 332, - "end": 360 - } + "range": [ + 332, + 360 + ] }, "alternate": null, "loc": null, - "range": { - "start": 316, - "end": 360 - } + "range": [ + 316, + 360 + ] }, { "type": "ReturnStatement", @@ -380,42 +380,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 370, - "end": 371 - } + "range": [ + 370, + 371 + ] }, "loc": null, - "range": { - "start": 363, - "end": 372 - } + "range": [ + 363, + 372 + ] } ], "loc": null, - "range": { - "start": 275, - "end": 374 - } + "range": [ + 275, + 374 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 209, - "end": 374 - }, + "range": [ + 209, + 374 + ], "loc": null, - "range": { - "start": 209, - "end": 374 - } + "range": [ + 209, + 374 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 209, - "end": 374 - } + "range": [ + 209, + 374 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-subpath-order1.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-subpath-order1.js.snap index 4d0cbe7b82..8b4e3abf2d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-subpath-order1.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-subpath-order1.js.snap @@ -30,10 +30,10 @@ Output: "name": "TestConditionalSubpath1", "typeAnnotation": null, "loc": null, - "range": { - "start": 317, - "end": 340 - } + "range": [ + 317, + 340 + ] }, "params": [ { @@ -41,20 +41,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 341, - "end": 346 - } + "range": [ + 341, + 346 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 348, - "end": 353 - } + "range": [ + 348, + 353 + ] } ], "body": { @@ -71,32 +71,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 365, - "end": 366 - } + "range": [ + 365, + 366 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 369, - "end": 371 - } + "range": [ + 369, + 371 + ] }, "loc": null, - "range": { - "start": 365, - "end": 371 - } + "range": [ + 365, + 371 + ] } ], "loc": null, - "range": { - "start": 359, - "end": 372 - } + "range": [ + 359, + 372 + ] }, { "type": "ExpressionStatement", @@ -110,27 +110,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 375, - "end": 376 - } + "range": [ + 375, + 376 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 377, - "end": 378 - } + "range": [ + 377, + 378 + ] }, "computed": false, "loc": null, - "range": { - "start": 375, - "end": 378 - } + "range": [ + 375, + 378 + ] }, "right": { "type": "MemberExpression", @@ -141,57 +141,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 381, - "end": 386 - } + "range": [ + 381, + 386 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 387, - "end": 388 - } + "range": [ + 387, + 388 + ] }, "computed": false, "loc": null, - "range": { - "start": 381, - "end": 388 - } + "range": [ + 381, + 388 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 389, - "end": 390 - } + "range": [ + 389, + 390 + ] }, "computed": false, "loc": null, - "range": { - "start": 381, - "end": 390 - } + "range": [ + 381, + 390 + ] }, "loc": null, - "range": { - "start": 375, - "end": 390 - } + "range": [ + 375, + 390 + ] }, "directive": null, "loc": null, - "range": { - "start": 375, - "end": 391 - } + "range": [ + 375, + 391 + ] }, { "type": "IfStatement", @@ -202,10 +202,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 398, - "end": 401 - } + "range": [ + 398, + 401 + ] }, "arguments": [ { @@ -213,17 +213,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 402, - "end": 407 - } + "range": [ + 402, + 407 + ] } ], "loc": null, - "range": { - "start": 398, - "end": 408 - } + "range": [ + 398, + 408 + ] }, "consequent": { "type": "BlockStatement", @@ -240,27 +240,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 416, - "end": 417 - } + "range": [ + 416, + 417 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 418, - "end": 419 - } + "range": [ + 418, + 419 + ] }, "computed": false, "loc": null, - "range": { - "start": 416, - "end": 419 - } + "range": [ + 416, + 419 + ] }, "right": { "type": "MemberExpression", @@ -269,54 +269,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 422, - "end": 427 - } + "range": [ + 422, + 427 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 428, - "end": 429 - } + "range": [ + 428, + 429 + ] }, "computed": false, "loc": null, - "range": { - "start": 422, - "end": 429 - } + "range": [ + 422, + 429 + ] }, "loc": null, - "range": { - "start": 416, - "end": 429 - } + "range": [ + 416, + 429 + ] }, "directive": null, "loc": null, - "range": { - "start": 416, - "end": 430 - } + "range": [ + 416, + 430 + ] } ], "loc": null, - "range": { - "start": 410, - "end": 434 - } + "range": [ + 410, + 434 + ] }, "alternate": null, "loc": null, - "range": { - "start": 394, - "end": 434 - } + "range": [ + 394, + 434 + ] }, { "type": "ReturnStatement", @@ -325,42 +325,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 444, - "end": 445 - } + "range": [ + 444, + 445 + ] }, "loc": null, - "range": { - "start": 437, - "end": 446 - } + "range": [ + 437, + 446 + ] } ], "loc": null, - "range": { - "start": 355, - "end": 448 - } + "range": [ + 355, + 448 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 308, - "end": 448 - }, + "range": [ + 308, + 448 + ], "loc": null, - "range": { - "start": 308, - "end": 448 - } + "range": [ + 308, + 448 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 308, - "end": 448 - } + "range": [ + 308, + 448 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-subpath-order2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-subpath-order2.js.snap index cb4bdb3972..5ff5c67200 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-subpath-order2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-subpath-order2.js.snap @@ -30,10 +30,10 @@ Output: "name": "TestConditionalSubpath2", "typeAnnotation": null, "loc": null, - "range": { - "start": 317, - "end": 340 - } + "range": [ + 317, + 340 + ] }, "params": [ { @@ -41,20 +41,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 341, - "end": 346 - } + "range": [ + 341, + 346 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 348, - "end": 353 - } + "range": [ + 348, + 353 + ] } ], "body": { @@ -71,32 +71,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 365, - "end": 366 - } + "range": [ + 365, + 366 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 369, - "end": 371 - } + "range": [ + 369, + 371 + ] }, "loc": null, - "range": { - "start": 365, - "end": 371 - } + "range": [ + 365, + 371 + ] } ], "loc": null, - "range": { - "start": 359, - "end": 372 - } + "range": [ + 359, + 372 + ] }, { "type": "IfStatement", @@ -107,10 +107,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 379, - "end": 382 - } + "range": [ + 379, + 382 + ] }, "arguments": [ { @@ -118,17 +118,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 383, - "end": 388 - } + "range": [ + 383, + 388 + ] } ], "loc": null, - "range": { - "start": 379, - "end": 389 - } + "range": [ + 379, + 389 + ] }, "consequent": { "type": "BlockStatement", @@ -145,27 +145,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 397, - "end": 398 - } + "range": [ + 397, + 398 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 399, - "end": 400 - } + "range": [ + 399, + 400 + ] }, "computed": false, "loc": null, - "range": { - "start": 397, - "end": 400 - } + "range": [ + 397, + 400 + ] }, "right": { "type": "MemberExpression", @@ -174,54 +174,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 403, - "end": 408 - } + "range": [ + 403, + 408 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 409, - "end": 410 - } + "range": [ + 409, + 410 + ] }, "computed": false, "loc": null, - "range": { - "start": 403, - "end": 410 - } + "range": [ + 403, + 410 + ] }, "loc": null, - "range": { - "start": 397, - "end": 410 - } + "range": [ + 397, + 410 + ] }, "directive": null, "loc": null, - "range": { - "start": 397, - "end": 411 - } + "range": [ + 397, + 411 + ] } ], "loc": null, - "range": { - "start": 391, - "end": 415 - } + "range": [ + 391, + 415 + ] }, "alternate": null, "loc": null, - "range": { - "start": 375, - "end": 415 - } + "range": [ + 375, + 415 + ] }, { "type": "ExpressionStatement", @@ -235,27 +235,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 418, - "end": 419 - } + "range": [ + 418, + 419 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 420, - "end": 421 - } + "range": [ + 420, + 421 + ] }, "computed": false, "loc": null, - "range": { - "start": 418, - "end": 421 - } + "range": [ + 418, + 421 + ] }, "right": { "type": "MemberExpression", @@ -266,57 +266,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 424, - "end": 429 - } + "range": [ + 424, + 429 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 430, - "end": 431 - } + "range": [ + 430, + 431 + ] }, "computed": false, "loc": null, - "range": { - "start": 424, - "end": 431 - } + "range": [ + 424, + 431 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 432, - "end": 433 - } + "range": [ + 432, + 433 + ] }, "computed": false, "loc": null, - "range": { - "start": 424, - "end": 433 - } + "range": [ + 424, + 433 + ] }, "loc": null, - "range": { - "start": 418, - "end": 433 - } + "range": [ + 418, + 433 + ] }, "directive": null, "loc": null, - "range": { - "start": 418, - "end": 434 - } + "range": [ + 418, + 434 + ] }, { "type": "ReturnStatement", @@ -325,42 +325,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 444, - "end": 445 - } + "range": [ + 444, + 445 + ] }, "loc": null, - "range": { - "start": 437, - "end": 446 - } + "range": [ + 437, + 446 + ] } ], "loc": null, - "range": { - "start": 355, - "end": 448 - } + "range": [ + 355, + 448 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 308, - "end": 448 - }, + "range": [ + 308, + 448 + ], "loc": null, - "range": { - "start": 308, - "end": 448 - } + "range": [ + 308, + 448 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 308, - "end": 448 - } + "range": [ + 308, + 448 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-superpath-order1.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-superpath-order1.js.snap index 07e1d1a129..ac6a9ea439 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-superpath-order1.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-superpath-order1.js.snap @@ -29,10 +29,10 @@ Output: "name": "TestConditionalSuperpath1", "typeAnnotation": null, "loc": null, - "range": { - "start": 227, - "end": 252 - } + "range": [ + 227, + 252 + ] }, "params": [ { @@ -40,20 +40,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 258 - } + "range": [ + 253, + 258 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 265 - } + "range": [ + 260, + 265 + ] } ], "body": { @@ -70,32 +70,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 277, - "end": 278 - } + "range": [ + 277, + 278 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 281, - "end": 283 - } + "range": [ + 281, + 283 + ] }, "loc": null, - "range": { - "start": 277, - "end": 283 - } + "range": [ + 277, + 283 + ] } ], "loc": null, - "range": { - "start": 271, - "end": 284 - } + "range": [ + 271, + 284 + ] }, { "type": "ExpressionStatement", @@ -109,27 +109,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 287, - "end": 288 - } + "range": [ + 287, + 288 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 289, - "end": 290 - } + "range": [ + 289, + 290 + ] }, "computed": false, "loc": null, - "range": { - "start": 287, - "end": 290 - } + "range": [ + 287, + 290 + ] }, "right": { "type": "MemberExpression", @@ -138,40 +138,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 293, - "end": 298 - } + "range": [ + 293, + 298 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 299, - "end": 300 - } + "range": [ + 299, + 300 + ] }, "computed": false, "loc": null, - "range": { - "start": 293, - "end": 300 - } + "range": [ + 293, + 300 + ] }, "loc": null, - "range": { - "start": 287, - "end": 300 - } + "range": [ + 287, + 300 + ] }, "directive": null, "loc": null, - "range": { - "start": 287, - "end": 301 - } + "range": [ + 287, + 301 + ] }, { "type": "IfStatement", @@ -182,10 +182,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 308, - "end": 311 - } + "range": [ + 308, + 311 + ] }, "arguments": [ { @@ -193,17 +193,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 312, - "end": 317 - } + "range": [ + 312, + 317 + ] } ], "loc": null, - "range": { - "start": 308, - "end": 318 - } + "range": [ + 308, + 318 + ] }, "consequent": { "type": "BlockStatement", @@ -220,27 +220,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 326, - "end": 327 - } + "range": [ + 326, + 327 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 328, - "end": 329 - } + "range": [ + 328, + 329 + ] }, "computed": false, "loc": null, - "range": { - "start": 326, - "end": 329 - } + "range": [ + 326, + 329 + ] }, "right": { "type": "MemberExpression", @@ -251,71 +251,71 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 332, - "end": 337 - } + "range": [ + 332, + 337 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 338, - "end": 339 - } + "range": [ + 338, + 339 + ] }, "computed": false, "loc": null, - "range": { - "start": 332, - "end": 339 - } + "range": [ + 332, + 339 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 340, - "end": 341 - } + "range": [ + 340, + 341 + ] }, "computed": false, "loc": null, - "range": { - "start": 332, - "end": 341 - } + "range": [ + 332, + 341 + ] }, "loc": null, - "range": { - "start": 326, - "end": 341 - } + "range": [ + 326, + 341 + ] }, "directive": null, "loc": null, - "range": { - "start": 326, - "end": 342 - } + "range": [ + 326, + 342 + ] } ], "loc": null, - "range": { - "start": 320, - "end": 346 - } + "range": [ + 320, + 346 + ] }, "alternate": null, "loc": null, - "range": { - "start": 304, - "end": 346 - } + "range": [ + 304, + 346 + ] }, { "type": "ReturnStatement", @@ -324,42 +324,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 356, - "end": 357 - } + "range": [ + 356, + 357 + ] }, "loc": null, - "range": { - "start": 349, - "end": 358 - } + "range": [ + 349, + 358 + ] } ], "loc": null, - "range": { - "start": 267, - "end": 360 - } + "range": [ + 267, + 360 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 218, - "end": 360 - }, + "range": [ + 218, + 360 + ], "loc": null, - "range": { - "start": 218, - "end": 360 - } + "range": [ + 218, + 360 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 218, - "end": 360 - } + "range": [ + 218, + 360 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-superpath-order2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-superpath-order2.js.snap index d0d4f43afa..da80c52ab1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-superpath-order2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-deps-superpath-order2.js.snap @@ -29,10 +29,10 @@ Output: "name": "TestConditionalSuperpath2", "typeAnnotation": null, "loc": null, - "range": { - "start": 227, - "end": 252 - } + "range": [ + 227, + 252 + ] }, "params": [ { @@ -40,20 +40,20 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 258 - } + "range": [ + 253, + 258 + ] }, { "type": "Identifier", "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 265 - } + "range": [ + 260, + 265 + ] } ], "body": { @@ -70,32 +70,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 277, - "end": 278 - } + "range": [ + 277, + 278 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 281, - "end": 283 - } + "range": [ + 281, + 283 + ] }, "loc": null, - "range": { - "start": 277, - "end": 283 - } + "range": [ + 277, + 283 + ] } ], "loc": null, - "range": { - "start": 271, - "end": 284 - } + "range": [ + 271, + 284 + ] }, { "type": "IfStatement", @@ -106,10 +106,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 291, - "end": 294 - } + "range": [ + 291, + 294 + ] }, "arguments": [ { @@ -117,17 +117,17 @@ Output: "name": "other", "typeAnnotation": null, "loc": null, - "range": { - "start": 295, - "end": 300 - } + "range": [ + 295, + 300 + ] } ], "loc": null, - "range": { - "start": 291, - "end": 301 - } + "range": [ + 291, + 301 + ] }, "consequent": { "type": "BlockStatement", @@ -144,27 +144,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 309, - "end": 310 - } + "range": [ + 309, + 310 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 311, - "end": 312 - } + "range": [ + 311, + 312 + ] }, "computed": false, "loc": null, - "range": { - "start": 309, - "end": 312 - } + "range": [ + 309, + 312 + ] }, "right": { "type": "MemberExpression", @@ -175,71 +175,71 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 315, - "end": 320 - } + "range": [ + 315, + 320 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 321, - "end": 322 - } + "range": [ + 321, + 322 + ] }, "computed": false, "loc": null, - "range": { - "start": 315, - "end": 322 - } + "range": [ + 315, + 322 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 323, - "end": 324 - } + "range": [ + 323, + 324 + ] }, "computed": false, "loc": null, - "range": { - "start": 315, - "end": 324 - } + "range": [ + 315, + 324 + ] }, "loc": null, - "range": { - "start": 309, - "end": 324 - } + "range": [ + 309, + 324 + ] }, "directive": null, "loc": null, - "range": { - "start": 309, - "end": 325 - } + "range": [ + 309, + 325 + ] } ], "loc": null, - "range": { - "start": 303, - "end": 329 - } + "range": [ + 303, + 329 + ] }, "alternate": null, "loc": null, - "range": { - "start": 287, - "end": 329 - } + "range": [ + 287, + 329 + ] }, { "type": "ExpressionStatement", @@ -253,27 +253,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 332, - "end": 333 - } + "range": [ + 332, + 333 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 334, - "end": 335 - } + "range": [ + 334, + 335 + ] }, "computed": false, "loc": null, - "range": { - "start": 332, - "end": 335 - } + "range": [ + 332, + 335 + ] }, "right": { "type": "MemberExpression", @@ -282,40 +282,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 338, - "end": 343 - } + "range": [ + 338, + 343 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 344, - "end": 345 - } + "range": [ + 344, + 345 + ] }, "computed": false, "loc": null, - "range": { - "start": 338, - "end": 345 - } + "range": [ + 338, + 345 + ] }, "loc": null, - "range": { - "start": 332, - "end": 345 - } + "range": [ + 332, + 345 + ] }, "directive": null, "loc": null, - "range": { - "start": 332, - "end": 346 - } + "range": [ + 332, + 346 + ] }, { "type": "ReturnStatement", @@ -324,42 +324,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 356, - "end": 357 - } + "range": [ + 356, + 357 + ] }, "loc": null, - "range": { - "start": 349, - "end": 358 - } + "range": [ + 349, + 358 + ] } ], "loc": null, - "range": { - "start": 267, - "end": 360 - } + "range": [ + 267, + 360 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 218, - "end": 360 - }, + "range": [ + 218, + 360 + ], "loc": null, - "range": { - "start": 218, - "end": 360 - } + "range": [ + 218, + 360 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 218, - "end": 360 - } + "range": [ + 218, + 360 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-memberexpr-join.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-memberexpr-join.js.snap index 6bafb150e1..d8b0d6071d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-memberexpr-join.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-cond-memberexpr-join.js.snap @@ -34,10 +34,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 648, - "end": 657 - } + "range": [ + 648, + 657 + ] }, "params": [ { @@ -45,10 +45,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 658, - "end": 663 - } + "range": [ + 658, + 663 + ] } ], "body": { @@ -65,32 +65,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 673, - "end": 674 - } + "range": [ + 673, + 674 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 677, - "end": 679 - } + "range": [ + 677, + 679 + ] }, "loc": null, - "range": { - "start": 673, - "end": 679 - } + "range": [ + 673, + 679 + ] } ], "loc": null, - "range": { - "start": 669, - "end": 680 - } + "range": [ + 669, + 680 + ] }, { "type": "ExpressionStatement", @@ -103,27 +103,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 683, - "end": 684 - } + "range": [ + 683, + 684 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 685, - "end": 689 - } + "range": [ + 685, + 689 + ] }, "computed": false, "loc": null, - "range": { - "start": 683, - "end": 689 - } + "range": [ + 683, + 689 + ] }, "arguments": [ { @@ -135,59 +135,59 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 690, - "end": 695 - } + "range": [ + 690, + 695 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 696, - "end": 697 - } + "range": [ + 696, + 697 + ] }, "computed": false, "loc": null, - "range": { - "start": 690, - "end": 697 - } + "range": [ + 690, + 697 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 699, - "end": 700 - } + "range": [ + 699, + 700 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 690, - "end": 700 - } + "range": [ + 690, + 700 + ] } ], "loc": null, - "range": { - "start": 683, - "end": 701 - } + "range": [ + 683, + 701 + ] }, "directive": null, "loc": null, - "range": { - "start": 683, - "end": 702 - } + "range": [ + 683, + 702 + ] }, { "type": "ExpressionStatement", @@ -200,27 +200,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 705, - "end": 706 - } + "range": [ + 705, + 706 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 707, - "end": 711 - } + "range": [ + 707, + 711 + ] }, "computed": false, "loc": null, - "range": { - "start": 705, - "end": 711 - } + "range": [ + 705, + 711 + ] }, "arguments": [ { @@ -234,75 +234,75 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 712, - "end": 717 - } + "range": [ + 712, + 717 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 718, - "end": 719 - } + "range": [ + 718, + 719 + ] }, "computed": false, "loc": null, - "range": { - "start": 712, - "end": 719 - } + "range": [ + 712, + 719 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 720, - "end": 721 - } + "range": [ + 720, + 721 + ] }, "computed": false, "loc": null, - "range": { - "start": 712, - "end": 721 - } + "range": [ + 712, + 721 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 722, - "end": 723 - } + "range": [ + 722, + 723 + ] }, "computed": false, "loc": null, - "range": { - "start": 712, - "end": 723 - } + "range": [ + 712, + 723 + ] } ], "loc": null, - "range": { - "start": 705, - "end": 724 - } + "range": [ + 705, + 724 + ] }, "directive": null, "loc": null, - "range": { - "start": 705, - "end": 725 - } + "range": [ + 705, + 725 + ] }, { "type": "ReturnStatement", @@ -311,42 +311,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 735, - "end": 736 - } + "range": [ + 735, + 736 + ] }, "loc": null, - "range": { - "start": 728, - "end": 737 - } + "range": [ + 728, + 737 + ] } ], "loc": null, - "range": { - "start": 665, - "end": 739 - } + "range": [ + 665, + 739 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 639, - "end": 739 - }, + "range": [ + 639, + 739 + ], "loc": null, - "range": { - "start": 639, - "end": 739 - } + "range": [ + 639, + 739 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 639, - "end": 739 - } + "range": [ + 639, + 739 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-dependencies-optional-member-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-dependencies-optional-member-expression.js.snap index e24030b1cc..00dede2036 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-dependencies-optional-member-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-dependencies-optional-member-expression.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,32 +54,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 40, - "end": 42 - } + "range": [ + 40, + 42 + ] }, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 43 - } + "range": [ + 30, + 43 + ] }, { "type": "ExpressionStatement", @@ -92,27 +92,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 52 - } + "range": [ + 48, + 52 + ] }, "computed": false, "loc": null, - "range": { - "start": 46, - "end": 52 - } + "range": [ + 46, + 52 + ] }, "arguments": [ { @@ -124,59 +124,59 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 58 - } + "range": [ + 53, + 58 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 64 - } + "range": [ + 53, + 64 + ] }, "property": { "type": "Identifier", "name": "length", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 72 - } + "range": [ + 66, + 72 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 53, - "end": 72 - } + "range": [ + 53, + 72 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 73 - } + "range": [ + 46, + 73 + ] }, "directive": null, "loc": null, - "range": { - "start": 46, - "end": 74 - } + "range": [ + 46, + 74 + ] }, { "type": "ExpressionStatement", @@ -189,27 +189,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 83 - } + "range": [ + 79, + 83 + ] }, "computed": false, "loc": null, - "range": { - "start": 77, - "end": 83 - } + "range": [ + 77, + 83 + ] }, "arguments": [ { @@ -232,63 +232,63 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 89 - } + "range": [ + 84, + 89 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] }, "computed": false, "loc": null, - "range": { - "start": 84, - "end": 95 - } + "range": [ + 84, + 95 + ] }, "property": { "type": "Identifier", "name": "edges", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 102 - } + "range": [ + 97, + 102 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 84, - "end": 102 - } + "range": [ + 84, + 102 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 107 - } + "range": [ + 104, + 107 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 84, - "end": 107 - } + "range": [ + 84, + 107 + ] }, "arguments": [ { @@ -296,36 +296,36 @@ Output: "name": "render", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] } ], "optional": true, "loc": null, - "range": { - "start": 84, - "end": 117 - } + "range": [ + 84, + 117 + ] }, "property": { "type": "Identifier", "name": "filter", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 125 - } + "range": [ + 119, + 125 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 84, - "end": 125 - } + "range": [ + 84, + 125 + ] }, "arguments": [ { @@ -333,47 +333,47 @@ Output: "name": "Boolean", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 135 - } + "range": [ + 128, + 135 + ] } ], "optional": true, "loc": null, - "range": { - "start": 84, - "end": 136 - } + "range": [ + 84, + 136 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 140, - "end": 142 - } + "range": [ + 140, + 142 + ] }, "loc": null, - "range": { - "start": 84, - "end": 142 - } + "range": [ + 84, + 142 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 143 - } + "range": [ + 77, + 143 + ] }, "directive": null, "loc": null, - "range": { - "start": 77, - "end": 144 - } + "range": [ + 77, + 144 + ] }, { "type": "ReturnStatement", @@ -382,42 +382,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "loc": null, - "range": { - "start": 147, - "end": 156 - } + "range": [ + 147, + 156 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 158 - } + "range": [ + 26, + 158 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 158 - }, + "range": [ + 0, + 158 + ], "loc": null, - "range": { - "start": 0, - "end": 158 - } + "range": [ + 0, + 158 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 158 - } + "range": [ + 0, + 158 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-deps-cond-scope.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-deps-cond-scope.js.snap index 7afcd3c662..a5b3cddced 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-deps-cond-scope.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-deps-cond-scope.js.snap @@ -43,10 +43,10 @@ Output: "name": "TestReactiveDepsInCondScope", "typeAnnotation": null, "loc": null, - "range": { - "start": 433, - "end": 460 - } + "range": [ + 433, + 460 + ] }, "params": [ { @@ -54,10 +54,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 461, - "end": 466 - } + "range": [ + 461, + 466 + ] } ], "body": { @@ -74,32 +74,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 476, - "end": 477 - } + "range": [ + 476, + 477 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 480, - "end": 482 - } + "range": [ + 480, + 482 + ] }, "loc": null, - "range": { - "start": 476, - "end": 482 - } + "range": [ + 476, + 482 + ] } ], "loc": null, - "range": { - "start": 472, - "end": 483 - } + "range": [ + 472, + 483 + ] }, { "type": "IfStatement", @@ -108,10 +108,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 490, - "end": 493 - } + "range": [ + 490, + 493 + ] }, "consequent": { "type": "BlockStatement", @@ -127,10 +127,10 @@ Output: "name": "tmp", "typeAnnotation": null, "loc": null, - "range": { - "start": 505, - "end": 508 - } + "range": [ + 505, + 508 + ] }, "init": { "type": "CallExpression", @@ -139,10 +139,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 511, - "end": 514 - } + "range": [ + 511, + 514 + ] }, "arguments": [ { @@ -154,64 +154,64 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 515, - "end": 520 - } + "range": [ + 515, + 520 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 521, - "end": 522 - } + "range": [ + 521, + 522 + ] }, "computed": false, "loc": null, - "range": { - "start": 515, - "end": 522 - } + "range": [ + 515, + 522 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 523, - "end": 524 - } + "range": [ + 523, + 524 + ] }, "computed": false, "loc": null, - "range": { - "start": 515, - "end": 524 - } + "range": [ + 515, + 524 + ] } ], "loc": null, - "range": { - "start": 511, - "end": 525 - } + "range": [ + 511, + 525 + ] }, "loc": null, - "range": { - "start": 505, - "end": 525 - } + "range": [ + 505, + 525 + ] } ], "loc": null, - "range": { - "start": 501, - "end": 526 - } + "range": [ + 501, + 526 + ] }, { "type": "ExpressionStatement", @@ -225,64 +225,64 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 531, - "end": 532 - } + "range": [ + 531, + 532 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 533, - "end": 534 - } + "range": [ + 533, + 534 + ] }, "computed": false, "loc": null, - "range": { - "start": 531, - "end": 534 - } + "range": [ + 531, + 534 + ] }, "right": { "type": "Identifier", "name": "tmp", "typeAnnotation": null, "loc": null, - "range": { - "start": 537, - "end": 540 - } + "range": [ + 537, + 540 + ] }, "loc": null, - "range": { - "start": 531, - "end": 540 - } + "range": [ + 531, + 540 + ] }, "directive": null, "loc": null, - "range": { - "start": 531, - "end": 541 - } + "range": [ + 531, + 541 + ] } ], "loc": null, - "range": { - "start": 495, - "end": 545 - } + "range": [ + 495, + 545 + ] }, "alternate": null, "loc": null, - "range": { - "start": 486, - "end": 545 - } + "range": [ + 486, + 545 + ] }, { "type": "ReturnStatement", @@ -291,42 +291,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 555, - "end": 556 - } + "range": [ + 555, + 556 + ] }, "loc": null, - "range": { - "start": 548, - "end": 557 - } + "range": [ + 548, + 557 + ] } ], "loc": null, - "range": { - "start": 468, - "end": 559 - } + "range": [ + 468, + 559 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 424, - "end": 559 - }, + "range": [ + 424, + 559 + ], "loc": null, - "range": { - "start": 424, - "end": 559 - } + "range": [ + 424, + 559 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 424, - "end": 559 - } + "range": [ + 424, + 559 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-deps-join-uncond-scopes-cond-deps.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-deps-join-uncond-scopes-cond-deps.js.snap index 3463820dd0..255014c3d0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-deps-join-uncond-scopes-cond-deps.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-deps-join-uncond-scopes-cond-deps.js.snap @@ -43,10 +43,10 @@ Output: "name": "TestJoinCondDepsInUncondScopes", "typeAnnotation": null, "loc": null, - "range": { - "start": 599, - "end": 629 - } + "range": [ + 599, + 629 + ] }, "params": [ { @@ -54,10 +54,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 630, - "end": 635 - } + "range": [ + 630, + 635 + ] } ], "body": { @@ -74,32 +74,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 645, - "end": 646 - } + "range": [ + 645, + 646 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 649, - "end": 651 - } + "range": [ + 649, + 651 + ] }, "loc": null, - "range": { - "start": 645, - "end": 651 - } + "range": [ + 645, + 651 + ] } ], "loc": null, - "range": { - "start": 641, - "end": 652 - } + "range": [ + 641, + 652 + ] }, { "type": "VariableDeclaration", @@ -112,32 +112,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 659, - "end": 660 - } + "range": [ + 659, + 660 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 663, - "end": 665 - } + "range": [ + 663, + 665 + ] }, "loc": null, - "range": { - "start": 659, - "end": 665 - } + "range": [ + 659, + 665 + ] } ], "loc": null, - "range": { - "start": 655, - "end": 666 - } + "range": [ + 655, + 666 + ] }, { "type": "IfStatement", @@ -146,10 +146,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 673, - "end": 676 - } + "range": [ + 673, + 676 + ] }, "consequent": { "type": "BlockStatement", @@ -163,10 +163,10 @@ Output: "name": "mutate1", "typeAnnotation": null, "loc": null, - "range": { - "start": 684, - "end": 691 - } + "range": [ + 684, + 691 + ] }, "arguments": [ { @@ -174,10 +174,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 692, - "end": 693 - } + "range": [ + 692, + 693 + ] }, { "type": "MemberExpression", @@ -188,72 +188,72 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 695, - "end": 700 - } + "range": [ + 695, + 700 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 701, - "end": 702 - } + "range": [ + 701, + 702 + ] }, "computed": false, "loc": null, - "range": { - "start": 695, - "end": 702 - } + "range": [ + 695, + 702 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 703, - "end": 704 - } + "range": [ + 703, + 704 + ] }, "computed": false, "loc": null, - "range": { - "start": 695, - "end": 704 - } + "range": [ + 695, + 704 + ] } ], "loc": null, - "range": { - "start": 684, - "end": 705 - } + "range": [ + 684, + 705 + ] }, "directive": null, "loc": null, - "range": { - "start": 684, - "end": 706 - } + "range": [ + 684, + 706 + ] } ], "loc": null, - "range": { - "start": 678, - "end": 710 - } + "range": [ + 678, + 710 + ] }, "alternate": null, "loc": null, - "range": { - "start": 669, - "end": 710 - } + "range": [ + 669, + 710 + ] }, { "type": "ExpressionStatement", @@ -264,10 +264,10 @@ Output: "name": "mutate2", "typeAnnotation": null, "loc": null, - "range": { - "start": 713, - "end": 720 - } + "range": [ + 713, + 720 + ] }, "arguments": [ { @@ -275,10 +275,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 721, - "end": 722 - } + "range": [ + 721, + 722 + ] }, { "type": "MemberExpression", @@ -289,58 +289,58 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 724, - "end": 729 - } + "range": [ + 724, + 729 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 730, - "end": 731 - } + "range": [ + 730, + 731 + ] }, "computed": false, "loc": null, - "range": { - "start": 724, - "end": 731 - } + "range": [ + 724, + 731 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 732, - "end": 733 - } + "range": [ + 732, + 733 + ] }, "computed": false, "loc": null, - "range": { - "start": 724, - "end": 733 - } + "range": [ + 724, + 733 + ] } ], "loc": null, - "range": { - "start": 713, - "end": 734 - } + "range": [ + 713, + 734 + ] }, "directive": null, "loc": null, - "range": { - "start": 713, - "end": 735 - } + "range": [ + 713, + 735 + ] }, { "type": "ReturnStatement", @@ -352,59 +352,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 746, - "end": 747 - } + "range": [ + 746, + 747 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 749, - "end": 750 - } + "range": [ + 749, + 750 + ] } ], "loc": null, - "range": { - "start": 745, - "end": 751 - } + "range": [ + 745, + 751 + ] }, "loc": null, - "range": { - "start": 738, - "end": 752 - } + "range": [ + 738, + 752 + ] } ], "loc": null, - "range": { - "start": 637, - "end": 754 - } + "range": [ + 637, + 754 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 590, - "end": 754 - }, + "range": [ + 590, + 754 + ], "loc": null, - "range": { - "start": 590, - "end": 754 - } + "range": [ + 590, + 754 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 590, - "end": 754 - } + "range": [ + 590, + 754 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-nonoverlap-descendant.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-nonoverlap-descendant.js.snap index 431fda2dac..384dfdba69 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-nonoverlap-descendant.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-nonoverlap-descendant.js.snap @@ -26,10 +26,10 @@ Output: "name": "TestNonOverlappingDescendantTracked", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 174 - } + "range": [ + 139, + 174 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 180 - } + "range": [ + 175, + 180 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 191 - } + "range": [ + 190, + 191 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 194, - "end": 196 - } + "range": [ + 194, + 196 + ] }, "loc": null, - "range": { - "start": 190, - "end": 196 - } + "range": [ + 190, + 196 + ] } ], "loc": null, - "range": { - "start": 186, - "end": 197 - } + "range": [ + 186, + 197 + ] }, { "type": "ExpressionStatement", @@ -96,27 +96,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 201 - } + "range": [ + 200, + 201 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 203 - } + "range": [ + 202, + 203 + ] }, "computed": false, "loc": null, - "range": { - "start": 200, - "end": 203 - } + "range": [ + 200, + 203 + ] }, "right": { "type": "MemberExpression", @@ -129,74 +129,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 211 - } + "range": [ + 206, + 211 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 212, - "end": 213 - } + "range": [ + 212, + 213 + ] }, "computed": false, "loc": null, - "range": { - "start": 206, - "end": 213 - } + "range": [ + 206, + 213 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 215 - } + "range": [ + 214, + 215 + ] }, "computed": false, "loc": null, - "range": { - "start": 206, - "end": 215 - } + "range": [ + 206, + 215 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 216, - "end": 217 - } + "range": [ + 216, + 217 + ] }, "computed": false, "loc": null, - "range": { - "start": 206, - "end": 217 - } + "range": [ + 206, + 217 + ] }, "loc": null, - "range": { - "start": 200, - "end": 217 - } + "range": [ + 200, + 217 + ] }, "directive": null, "loc": null, - "range": { - "start": 200, - "end": 218 - } + "range": [ + 200, + 218 + ] }, { "type": "ExpressionStatement", @@ -210,27 +210,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 221, - "end": 222 - } + "range": [ + 221, + 222 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 224 - } + "range": [ + 223, + 224 + ] }, "computed": false, "loc": null, - "range": { - "start": 221, - "end": 224 - } + "range": [ + 221, + 224 + ] }, "right": { "type": "MemberExpression", @@ -239,40 +239,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 227, - "end": 232 - } + "range": [ + 227, + 232 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 233, - "end": 234 - } + "range": [ + 233, + 234 + ] }, "computed": false, "loc": null, - "range": { - "start": 227, - "end": 234 - } + "range": [ + 227, + 234 + ] }, "loc": null, - "range": { - "start": 221, - "end": 234 - } + "range": [ + 221, + 234 + ] }, "directive": null, "loc": null, - "range": { - "start": 221, - "end": 235 - } + "range": [ + 221, + 235 + ] }, { "type": "ExpressionStatement", @@ -286,27 +286,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 239 - } + "range": [ + 238, + 239 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 240, - "end": 241 - } + "range": [ + 240, + 241 + ] }, "computed": false, "loc": null, - "range": { - "start": 238, - "end": 241 - } + "range": [ + 238, + 241 + ] }, "right": { "type": "MemberExpression", @@ -323,108 +323,108 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 249 - } + "range": [ + 244, + 249 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 250, - "end": 251 - } + "range": [ + 250, + 251 + ] }, "computed": false, "loc": null, - "range": { - "start": 244, - "end": 251 - } + "range": [ + 244, + 251 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 252, - "end": 253 - } + "range": [ + 252, + 253 + ] }, "computed": false, "loc": null, - "range": { - "start": 244, - "end": 253 - } + "range": [ + 244, + 253 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 255 - } + "range": [ + 254, + 255 + ] }, "computed": false, "loc": null, - "range": { - "start": 244, - "end": 255 - } + "range": [ + 244, + 255 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 256, - "end": 257 - } + "range": [ + 256, + 257 + ] }, "computed": false, "loc": null, - "range": { - "start": 244, - "end": 257 - } + "range": [ + 244, + 257 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 258, - "end": 259 - } + "range": [ + 258, + 259 + ] }, "computed": false, "loc": null, - "range": { - "start": 244, - "end": 259 - } + "range": [ + 244, + 259 + ] }, "loc": null, - "range": { - "start": 238, - "end": 259 - } + "range": [ + 238, + 259 + ] }, "directive": null, "loc": null, - "range": { - "start": 238, - "end": 260 - } + "range": [ + 238, + 260 + ] }, { "type": "ReturnStatement", @@ -433,42 +433,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 270, - "end": 271 - } + "range": [ + 270, + 271 + ] }, "loc": null, - "range": { - "start": 263, - "end": 272 - } + "range": [ + 263, + 272 + ] } ], "loc": null, - "range": { - "start": 182, - "end": 274 - } + "range": [ + 182, + 274 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 130, - "end": 274 - }, + "range": [ + 130, + 274 + ], "loc": null, - "range": { - "start": 130, - "end": 274 - } + "range": [ + 130, + 274 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 130, - "end": 274 - } + "range": [ + 130, + 274 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-nonoverlap-direct.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-nonoverlap-direct.js.snap index 95f459b2c2..5f8ba6ade8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-nonoverlap-direct.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-nonoverlap-direct.js.snap @@ -25,10 +25,10 @@ Output: "name": "TestNonOverlappingTracked", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 164 - } + "range": [ + 139, + 164 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 170 - } + "range": [ + 165, + 170 + ] } ], "body": { @@ -56,32 +56,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 180, - "end": 181 - } + "range": [ + 180, + 181 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 184, - "end": 186 - } + "range": [ + 184, + 186 + ] }, "loc": null, - "range": { - "start": 180, - "end": 186 - } + "range": [ + 180, + 186 + ] } ], "loc": null, - "range": { - "start": 176, - "end": 187 - } + "range": [ + 176, + 187 + ] }, { "type": "ExpressionStatement", @@ -95,27 +95,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 191 - } + "range": [ + 190, + 191 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, "computed": false, "loc": null, - "range": { - "start": 190, - "end": 193 - } + "range": [ + 190, + 193 + ] }, "right": { "type": "MemberExpression", @@ -126,57 +126,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 201 - } + "range": [ + 196, + 201 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 203 - } + "range": [ + 202, + 203 + ] }, "computed": false, "loc": null, - "range": { - "start": 196, - "end": 203 - } + "range": [ + 196, + 203 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 204, - "end": 205 - } + "range": [ + 204, + 205 + ] }, "computed": false, "loc": null, - "range": { - "start": 196, - "end": 205 - } + "range": [ + 196, + 205 + ] }, "loc": null, - "range": { - "start": 190, - "end": 205 - } + "range": [ + 190, + 205 + ] }, "directive": null, "loc": null, - "range": { - "start": 190, - "end": 206 - } + "range": [ + 190, + 206 + ] }, { "type": "ExpressionStatement", @@ -190,27 +190,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 210 - } + "range": [ + 209, + 210 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 212 - } + "range": [ + 211, + 212 + ] }, "computed": false, "loc": null, - "range": { - "start": 209, - "end": 212 - } + "range": [ + 209, + 212 + ] }, "right": { "type": "MemberExpression", @@ -221,57 +221,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 215, - "end": 220 - } + "range": [ + 215, + 220 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 221, - "end": 222 - } + "range": [ + 221, + 222 + ] }, "computed": false, "loc": null, - "range": { - "start": 215, - "end": 222 - } + "range": [ + 215, + 222 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 224 - } + "range": [ + 223, + 224 + ] }, "computed": false, "loc": null, - "range": { - "start": 215, - "end": 224 - } + "range": [ + 215, + 224 + ] }, "loc": null, - "range": { - "start": 209, - "end": 224 - } + "range": [ + 209, + 224 + ] }, "directive": null, "loc": null, - "range": { - "start": 209, - "end": 225 - } + "range": [ + 209, + 225 + ] }, { "type": "ReturnStatement", @@ -280,42 +280,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 235, - "end": 236 - } + "range": [ + 235, + 236 + ] }, "loc": null, - "range": { - "start": 228, - "end": 237 - } + "range": [ + 228, + 237 + ] } ], "loc": null, - "range": { - "start": 172, - "end": 239 - } + "range": [ + 172, + 239 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 130, - "end": 239 - }, + "range": [ + 130, + 239 + ], "loc": null, - "range": { - "start": 130, - "end": 239 - } + "range": [ + 130, + 239 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 130, - "end": 239 - } + "range": [ + 130, + 239 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-overlap-descendant.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-overlap-descendant.js.snap index 4b72d18a03..1d2b317946 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-overlap-descendant.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-overlap-descendant.js.snap @@ -26,10 +26,10 @@ Output: "name": "TestOverlappingDescendantTracked", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 136 - } + "range": [ + 104, + 136 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 142 - } + "range": [ + 137, + 142 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 156, - "end": 158 - } + "range": [ + 156, + 158 + ] }, "loc": null, - "range": { - "start": 152, - "end": 158 - } + "range": [ + 152, + 158 + ] } ], "loc": null, - "range": { - "start": 148, - "end": 159 - } + "range": [ + 148, + 159 + ] }, { "type": "ExpressionStatement", @@ -96,27 +96,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 163 - } + "range": [ + 162, + 163 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 165 - } + "range": [ + 164, + 165 + ] }, "computed": false, "loc": null, - "range": { - "start": 162, - "end": 165 - } + "range": [ + 162, + 165 + ] }, "right": { "type": "MemberExpression", @@ -129,74 +129,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 173 - } + "range": [ + 168, + 173 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 175 - } + "range": [ + 168, + 175 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 176, - "end": 177 - } + "range": [ + 176, + 177 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 177 - } + "range": [ + 168, + 177 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 178, - "end": 179 - } + "range": [ + 178, + 179 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 179 - } + "range": [ + 168, + 179 + ] }, "loc": null, - "range": { - "start": 162, - "end": 179 - } + "range": [ + 162, + 179 + ] }, "directive": null, "loc": null, - "range": { - "start": 162, - "end": 180 - } + "range": [ + 162, + 180 + ] }, { "type": "ExpressionStatement", @@ -210,27 +210,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "computed": false, "loc": null, - "range": { - "start": 183, - "end": 186 - } + "range": [ + 183, + 186 + ] }, "right": { "type": "MemberExpression", @@ -247,108 +247,108 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 189, - "end": 194 - } + "range": [ + 189, + 194 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 196 - } + "range": [ + 189, + 196 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 198 - } + "range": [ + 197, + 198 + ] }, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 198 - } + "range": [ + 189, + 198 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 200 - } + "range": [ + 199, + 200 + ] }, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 200 - } + "range": [ + 189, + 200 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] }, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 202 - } + "range": [ + 189, + 202 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 203, - "end": 204 - } + "range": [ + 203, + 204 + ] }, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 204 - } + "range": [ + 189, + 204 + ] }, "loc": null, - "range": { - "start": 183, - "end": 204 - } + "range": [ + 183, + 204 + ] }, "directive": null, "loc": null, - "range": { - "start": 183, - "end": 205 - } + "range": [ + 183, + 205 + ] }, { "type": "ExpressionStatement", @@ -362,27 +362,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 208, - "end": 209 - } + "range": [ + 208, + 209 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 211 - } + "range": [ + 210, + 211 + ] }, "computed": false, "loc": null, - "range": { - "start": 208, - "end": 211 - } + "range": [ + 208, + 211 + ] }, "right": { "type": "MemberExpression", @@ -391,40 +391,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 219 - } + "range": [ + 214, + 219 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 220, - "end": 221 - } + "range": [ + 220, + 221 + ] }, "computed": false, "loc": null, - "range": { - "start": 214, - "end": 221 - } + "range": [ + 214, + 221 + ] }, "loc": null, - "range": { - "start": 208, - "end": 221 - } + "range": [ + 208, + 221 + ] }, "directive": null, "loc": null, - "range": { - "start": 208, - "end": 222 - } + "range": [ + 208, + 222 + ] }, { "type": "ReturnStatement", @@ -433,42 +433,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 232, - "end": 233 - } + "range": [ + 232, + 233 + ] }, "loc": null, - "range": { - "start": 225, - "end": 234 - } + "range": [ + 225, + 234 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 236 - } + "range": [ + 144, + 236 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 95, - "end": 236 - }, + "range": [ + 95, + 236 + ], "loc": null, - "range": { - "start": 95, - "end": 236 - } + "range": [ + 95, + 236 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 95, - "end": 236 - } + "range": [ + 95, + 236 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-overlap-direct.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-overlap-direct.js.snap index 0ae6e77263..ab5d799dc4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-overlap-direct.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-overlap-direct.js.snap @@ -26,10 +26,10 @@ Output: "name": "TestOverlappingTracked", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 126 - } + "range": [ + 104, + 126 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 132 - } + "range": [ + 127, + 132 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 146, - "end": 148 - } + "range": [ + 146, + 148 + ] }, "loc": null, - "range": { - "start": 142, - "end": 148 - } + "range": [ + 142, + 148 + ] } ], "loc": null, - "range": { - "start": 138, - "end": 149 - } + "range": [ + 138, + 149 + ] }, { "type": "ExpressionStatement", @@ -96,27 +96,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "computed": false, "loc": null, - "range": { - "start": 152, - "end": 155 - } + "range": [ + 152, + 155 + ] }, "right": { "type": "MemberExpression", @@ -127,57 +127,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 163 - } + "range": [ + 158, + 163 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 165 - } + "range": [ + 164, + 165 + ] }, "computed": false, "loc": null, - "range": { - "start": 158, - "end": 165 - } + "range": [ + 158, + 165 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 167 - } + "range": [ + 166, + 167 + ] }, "computed": false, "loc": null, - "range": { - "start": 158, - "end": 167 - } + "range": [ + 158, + 167 + ] }, "loc": null, - "range": { - "start": 152, - "end": 167 - } + "range": [ + 152, + 167 + ] }, "directive": null, "loc": null, - "range": { - "start": 152, - "end": 168 - } + "range": [ + 152, + 168 + ] }, { "type": "ExpressionStatement", @@ -191,27 +191,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 172 - } + "range": [ + 171, + 172 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 174 - } + "range": [ + 173, + 174 + ] }, "computed": false, "loc": null, - "range": { - "start": 171, - "end": 174 - } + "range": [ + 171, + 174 + ] }, "right": { "type": "MemberExpression", @@ -222,57 +222,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 182 - } + "range": [ + 177, + 182 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "computed": false, "loc": null, - "range": { - "start": 177, - "end": 184 - } + "range": [ + 177, + 184 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "computed": false, "loc": null, - "range": { - "start": 177, - "end": 186 - } + "range": [ + 177, + 186 + ] }, "loc": null, - "range": { - "start": 171, - "end": 186 - } + "range": [ + 171, + 186 + ] }, "directive": null, "loc": null, - "range": { - "start": 171, - "end": 187 - } + "range": [ + 171, + 187 + ] }, { "type": "ExpressionStatement", @@ -286,27 +286,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 191 - } + "range": [ + 190, + 191 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, "computed": false, "loc": null, - "range": { - "start": 190, - "end": 193 - } + "range": [ + 190, + 193 + ] }, "right": { "type": "MemberExpression", @@ -315,40 +315,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 201 - } + "range": [ + 196, + 201 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 203 - } + "range": [ + 202, + 203 + ] }, "computed": false, "loc": null, - "range": { - "start": 196, - "end": 203 - } + "range": [ + 196, + 203 + ] }, "loc": null, - "range": { - "start": 190, - "end": 203 - } + "range": [ + 190, + 203 + ] }, "directive": null, "loc": null, - "range": { - "start": 190, - "end": 204 - } + "range": [ + 190, + 204 + ] }, { "type": "ReturnStatement", @@ -357,42 +357,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 215 - } + "range": [ + 214, + 215 + ] }, "loc": null, - "range": { - "start": 207, - "end": 216 - } + "range": [ + 207, + 216 + ] } ], "loc": null, - "range": { - "start": 134, - "end": 218 - } + "range": [ + 134, + 218 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 95, - "end": 218 - }, + "range": [ + 95, + 218 + ], "loc": null, - "range": { - "start": 95, - "end": 218 - } + "range": [ + 95, + 218 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 95, - "end": 218 - } + "range": [ + 95, + 218 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order1.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order1.js.snap index cb702c15b7..75af49bbac 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order1.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order1.js.snap @@ -26,10 +26,10 @@ Output: "name": "TestDepsSubpathOrder1", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 119 - } + "range": [ + 98, + 119 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 125 - } + "range": [ + 120, + 125 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 139, - "end": 141 - } + "range": [ + 139, + 141 + ] }, "loc": null, - "range": { - "start": 135, - "end": 141 - } + "range": [ + 135, + 141 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 142 - } + "range": [ + 131, + 142 + ] }, { "type": "ExpressionStatement", @@ -96,27 +96,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "computed": false, "loc": null, - "range": { - "start": 145, - "end": 148 - } + "range": [ + 145, + 148 + ] }, "right": { "type": "MemberExpression", @@ -127,57 +127,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 156 - } + "range": [ + 151, + 156 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 158 - } + "range": [ + 151, + 158 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 160 - } + "range": [ + 151, + 160 + ] }, "loc": null, - "range": { - "start": 145, - "end": 160 - } + "range": [ + 145, + 160 + ] }, "directive": null, "loc": null, - "range": { - "start": 145, - "end": 161 - } + "range": [ + 145, + 161 + ] }, { "type": "ExpressionStatement", @@ -191,27 +191,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 165 - } + "range": [ + 164, + 165 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 167 - } + "range": [ + 166, + 167 + ] }, "computed": false, "loc": null, - "range": { - "start": 164, - "end": 167 - } + "range": [ + 164, + 167 + ] }, "right": { "type": "MemberExpression", @@ -220,40 +220,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 175 - } + "range": [ + 170, + 175 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 176, - "end": 177 - } + "range": [ + 176, + 177 + ] }, "computed": false, "loc": null, - "range": { - "start": 170, - "end": 177 - } + "range": [ + 170, + 177 + ] }, "loc": null, - "range": { - "start": 164, - "end": 177 - } + "range": [ + 164, + 177 + ] }, "directive": null, "loc": null, - "range": { - "start": 164, - "end": 178 - } + "range": [ + 164, + 178 + ] }, { "type": "ExpressionStatement", @@ -267,27 +267,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "computed": false, "loc": null, - "range": { - "start": 181, - "end": 184 - } + "range": [ + 181, + 184 + ] }, "right": { "type": "MemberExpression", @@ -300,74 +300,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 192 - } + "range": [ + 187, + 192 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 193, - "end": 194 - } + "range": [ + 193, + 194 + ] }, "computed": false, "loc": null, - "range": { - "start": 187, - "end": 194 - } + "range": [ + 187, + 194 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "computed": false, "loc": null, - "range": { - "start": 187, - "end": 196 - } + "range": [ + 187, + 196 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 198 - } + "range": [ + 197, + 198 + ] }, "computed": false, "loc": null, - "range": { - "start": 187, - "end": 198 - } + "range": [ + 187, + 198 + ] }, "loc": null, - "range": { - "start": 181, - "end": 198 - } + "range": [ + 181, + 198 + ] }, "directive": null, "loc": null, - "range": { - "start": 181, - "end": 199 - } + "range": [ + 181, + 199 + ] }, { "type": "ReturnStatement", @@ -376,42 +376,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 210 - } + "range": [ + 209, + 210 + ] }, "loc": null, - "range": { - "start": 202, - "end": 211 - } + "range": [ + 202, + 211 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 213 - } + "range": [ + 127, + 213 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 89, - "end": 213 - }, + "range": [ + 89, + 213 + ], "loc": null, - "range": { - "start": 89, - "end": 213 - } + "range": [ + 89, + 213 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 89, - "end": 213 - } + "range": [ + 89, + 213 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order2.js.snap index 8991c2ba45..46e991a4d0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order2.js.snap @@ -26,10 +26,10 @@ Output: "name": "TestDepsSubpathOrder2", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 119 - } + "range": [ + 98, + 119 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 125 - } + "range": [ + 120, + 125 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 139, - "end": 141 - } + "range": [ + 139, + 141 + ] }, "loc": null, - "range": { - "start": 135, - "end": 141 - } + "range": [ + 135, + 141 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 142 - } + "range": [ + 131, + 142 + ] }, { "type": "ExpressionStatement", @@ -96,27 +96,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "computed": false, "loc": null, - "range": { - "start": 145, - "end": 148 - } + "range": [ + 145, + 148 + ] }, "right": { "type": "MemberExpression", @@ -125,40 +125,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 156 - } + "range": [ + 151, + 156 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 158 - } + "range": [ + 151, + 158 + ] }, "loc": null, - "range": { - "start": 145, - "end": 158 - } + "range": [ + 145, + 158 + ] }, "directive": null, "loc": null, - "range": { - "start": 145, - "end": 159 - } + "range": [ + 145, + 159 + ] }, { "type": "ExpressionStatement", @@ -172,27 +172,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 163 - } + "range": [ + 162, + 163 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 165 - } + "range": [ + 164, + 165 + ] }, "computed": false, "loc": null, - "range": { - "start": 162, - "end": 165 - } + "range": [ + 162, + 165 + ] }, "right": { "type": "MemberExpression", @@ -203,57 +203,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 173 - } + "range": [ + 168, + 173 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 175 - } + "range": [ + 168, + 175 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 176, - "end": 177 - } + "range": [ + 176, + 177 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 177 - } + "range": [ + 168, + 177 + ] }, "loc": null, - "range": { - "start": 162, - "end": 177 - } + "range": [ + 162, + 177 + ] }, "directive": null, "loc": null, - "range": { - "start": 162, - "end": 178 - } + "range": [ + 162, + 178 + ] }, { "type": "ExpressionStatement", @@ -267,27 +267,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "computed": false, "loc": null, - "range": { - "start": 181, - "end": 184 - } + "range": [ + 181, + 184 + ] }, "right": { "type": "MemberExpression", @@ -300,74 +300,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 192 - } + "range": [ + 187, + 192 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 193, - "end": 194 - } + "range": [ + 193, + 194 + ] }, "computed": false, "loc": null, - "range": { - "start": 187, - "end": 194 - } + "range": [ + 187, + 194 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "computed": false, "loc": null, - "range": { - "start": 187, - "end": 196 - } + "range": [ + 187, + 196 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 198 - } + "range": [ + 197, + 198 + ] }, "computed": false, "loc": null, - "range": { - "start": 187, - "end": 198 - } + "range": [ + 187, + 198 + ] }, "loc": null, - "range": { - "start": 181, - "end": 198 - } + "range": [ + 181, + 198 + ] }, "directive": null, "loc": null, - "range": { - "start": 181, - "end": 199 - } + "range": [ + 181, + 199 + ] }, { "type": "ReturnStatement", @@ -376,42 +376,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 210 - } + "range": [ + 209, + 210 + ] }, "loc": null, - "range": { - "start": 202, - "end": 211 - } + "range": [ + 202, + 211 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 213 - } + "range": [ + 127, + 213 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 89, - "end": 213 - }, + "range": [ + 89, + 213 + ], "loc": null, - "range": { - "start": 89, - "end": 213 - } + "range": [ + 89, + 213 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 89, - "end": 213 - } + "range": [ + 89, + 213 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order3.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order3.js.snap index 9ece366723..f031e5201b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order3.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reduce-reactive-uncond-deps-subpath-order3.js.snap @@ -26,10 +26,10 @@ Output: "name": "TestDepsSubpathOrder3", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 119 - } + "range": [ + 98, + 119 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 125 - } + "range": [ + 120, + 125 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 136 - } + "range": [ + 135, + 136 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 139, - "end": 141 - } + "range": [ + 139, + 141 + ] }, "loc": null, - "range": { - "start": 135, - "end": 141 - } + "range": [ + 135, + 141 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 142 - } + "range": [ + 131, + 142 + ] }, { "type": "ExpressionStatement", @@ -96,27 +96,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "computed": false, "loc": null, - "range": { - "start": 145, - "end": 148 - } + "range": [ + 145, + 148 + ] }, "right": { "type": "MemberExpression", @@ -129,74 +129,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 156 - } + "range": [ + 151, + 156 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 158 - } + "range": [ + 151, + 158 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 160 - } + "range": [ + 151, + 160 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 162 - } + "range": [ + 151, + 162 + ] }, "loc": null, - "range": { - "start": 145, - "end": 162 - } + "range": [ + 145, + 162 + ] }, "directive": null, "loc": null, - "range": { - "start": 145, - "end": 163 - } + "range": [ + 145, + 163 + ] }, { "type": "ExpressionStatement", @@ -210,27 +210,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 167 - } + "range": [ + 166, + 167 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] }, "computed": false, "loc": null, - "range": { - "start": 166, - "end": 169 - } + "range": [ + 166, + 169 + ] }, "right": { "type": "MemberExpression", @@ -239,40 +239,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 177 - } + "range": [ + 172, + 177 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 178, - "end": 179 - } + "range": [ + 178, + 179 + ] }, "computed": false, "loc": null, - "range": { - "start": 172, - "end": 179 - } + "range": [ + 172, + 179 + ] }, "loc": null, - "range": { - "start": 166, - "end": 179 - } + "range": [ + 166, + 179 + ] }, "directive": null, "loc": null, - "range": { - "start": 166, - "end": 180 - } + "range": [ + 166, + 180 + ] }, { "type": "ExpressionStatement", @@ -286,27 +286,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "computed": false, "loc": null, - "range": { - "start": 183, - "end": 186 - } + "range": [ + 183, + 186 + ] }, "right": { "type": "MemberExpression", @@ -317,57 +317,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 189, - "end": 194 - } + "range": [ + 189, + 194 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 196 - } + "range": [ + 189, + 196 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 197, - "end": 198 - } + "range": [ + 197, + 198 + ] }, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 198 - } + "range": [ + 189, + 198 + ] }, "loc": null, - "range": { - "start": 183, - "end": 198 - } + "range": [ + 183, + 198 + ] }, "directive": null, "loc": null, - "range": { - "start": 183, - "end": 199 - } + "range": [ + 183, + 199 + ] }, { "type": "ReturnStatement", @@ -376,42 +376,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 210 - } + "range": [ + 209, + 210 + ] }, "loc": null, - "range": { - "start": 202, - "end": 211 - } + "range": [ + 202, + 211 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 213 - } + "range": [ + 127, + 213 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 89, - "end": 213 - }, + "range": [ + 89, + 213 + ], "loc": null, - "range": { - "start": 89, - "end": 213 - } + "range": [ + 89, + 213 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 89, - "end": 213 - } + "range": [ + 89, + 213 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-no-added-to-dep.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-no-added-to-dep.js.snap index d2e1f51015..490f945854 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-no-added-to-dep.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-no-added-to-dep.js.snap @@ -27,10 +27,10 @@ Output: "name": "VideoTab", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 57 - } + "range": [ + 49, + 57 + ] }, "params": [], "body": { @@ -47,10 +47,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "init": { "type": "CallExpression", @@ -59,30 +59,30 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "arguments": [], "loc": null, - "range": { - "start": 76, - "end": 84 - } + "range": [ + 76, + 84 + ] }, "loc": null, - "range": { - "start": 70, - "end": 84 - } + "range": [ + 70, + 84 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 85 - } + "range": [ + 64, + 85 + ] }, { "type": "VariableDeclaration", @@ -95,10 +95,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "MemberExpression", @@ -107,40 +107,40 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 101 - } + "range": [ + 98, + 101 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 109 - } + "range": [ + 102, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 98, - "end": 109 - } + "range": [ + 98, + 109 + ] }, "loc": null, - "range": { - "start": 94, - "end": 109 - } + "range": [ + 94, + 109 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 110 - } + "range": [ + 88, + 110 + ] }, { "type": "VariableDeclaration", @@ -153,10 +153,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -176,27 +176,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 140 - } + "range": [ + 133, + 140 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 144 - } + "range": [ + 141, + 144 + ] }, "computed": false, "loc": null, - "range": { - "start": 133, - "end": 144 - } + "range": [ + 133, + 144 + ] }, "arguments": [ { @@ -204,58 +204,58 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] } ], "loc": null, - "range": { - "start": 133, - "end": 147 - } + "range": [ + 133, + 147 + ] }, "directive": null, "loc": null, - "range": { - "start": 133, - "end": 148 - } + "range": [ + 133, + 148 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 152 - } + "range": [ + 127, + 152 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 121, - "end": 152 - }, + "range": [ + 121, + 152 + ], "expression": false, "loc": null, - "range": { - "start": 121, - "end": 152 - } + "range": [ + 121, + 152 + ] }, "loc": null, - "range": { - "start": 117, - "end": 152 - } + "range": [ + 117, + 152 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 153 - } + "range": [ + 113, + 153 + ] }, { "type": "ReturnStatement", @@ -267,10 +267,10 @@ Output: "type": "JSXIdentifier", "name": "VideoList", "loc": null, - "range": { - "start": 165, - "end": 174 - } + "range": [ + 165, + 174 + ] }, "attributes": [ { @@ -279,10 +279,10 @@ Output: "type": "JSXIdentifier", "name": "videos", "loc": null, - "range": { - "start": 175, - "end": 181 - } + "range": [ + 175, + 181 + ] }, "value": { "type": "JSXExpressionContainer", @@ -291,70 +291,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "loc": null, - "range": { - "start": 182, - "end": 185 - } + "range": [ + 182, + 185 + ] }, "loc": null, - "range": { - "start": 175, - "end": 185 - } + "range": [ + 175, + 185 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 164, - "end": 188 - } + "range": [ + 164, + 188 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 164, - "end": 188 - } + "range": [ + 164, + 188 + ] }, "loc": null, - "range": { - "start": 157, - "end": 189 - } + "range": [ + 157, + 189 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 191 - } + "range": [ + 60, + 191 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 40, - "end": 191 - }, + "range": [ + 40, + 191 + ], "loc": null, - "range": { - "start": 40, - "end": 191 - } + "range": [ + 40, + 191 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 40, - "end": 191 - } + "range": [ + 40, + 191 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-not-added-to-dep-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-not-added-to-dep-2.js.snap index 2f193df82e..f0711c24d0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-not-added-to-dep-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-aliased-not-added-to-dep-2.js.snap @@ -25,10 +25,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 52 - } + "range": [ + 49, + 52 + ] }, "params": [ { @@ -41,37 +41,37 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 58 - } + "range": [ + 53, + 58 + ] } ], "body": { @@ -88,10 +88,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "init": { "type": "CallExpression", @@ -100,30 +100,30 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "arguments": [], "loc": null, - "range": { - "start": 76, - "end": 84 - } + "range": [ + 76, + 84 + ] }, "loc": null, - "range": { - "start": 70, - "end": 84 - } + "range": [ + 70, + 84 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 85 - } + "range": [ + 64, + 85 + ] }, { "type": "VariableDeclaration", @@ -136,10 +136,10 @@ Output: "name": "val", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 97 - } + "range": [ + 94, + 97 + ] }, "init": { "type": "MemberExpression", @@ -148,40 +148,40 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 103 - } + "range": [ + 100, + 103 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 111 - } + "range": [ + 104, + 111 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 111 - } + "range": [ + 100, + 111 + ] }, "loc": null, - "range": { - "start": 94, - "end": 111 - } + "range": [ + 94, + 111 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 112 - } + "range": [ + 88, + 112 + ] }, { "type": "VariableDeclaration", @@ -194,10 +194,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "init": { "type": "ObjectExpression", @@ -209,30 +209,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, { "type": "Property", @@ -241,50 +241,50 @@ Output: "name": "val", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 133 - } + "range": [ + 130, + 133 + ] }, "value": { "type": "Identifier", "name": "val", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 133 - } + "range": [ + 130, + 133 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 130, - "end": 133 - } + "range": [ + 130, + 133 + ] } ], "loc": null, - "range": { - "start": 125, - "end": 135 - } + "range": [ + 125, + 135 + ] }, "loc": null, - "range": { - "start": 121, - "end": 135 - } + "range": [ + 121, + 135 + ] } ], "loc": null, - "range": { - "start": 115, - "end": 136 - } + "range": [ + 115, + 136 + ] }, { "type": "ReturnStatement", @@ -296,10 +296,10 @@ Output: "type": "JSXIdentifier", "name": "VideoList", "loc": null, - "range": { - "start": 148, - "end": 157 - } + "range": [ + 148, + 157 + ] }, "attributes": [ { @@ -308,10 +308,10 @@ Output: "type": "JSXIdentifier", "name": "videos", "loc": null, - "range": { - "start": 158, - "end": 164 - } + "range": [ + 158, + 164 + ] }, "value": { "type": "JSXExpressionContainer", @@ -320,70 +320,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 167 - } + "range": [ + 166, + 167 + ] }, "loc": null, - "range": { - "start": 165, - "end": 168 - } + "range": [ + 165, + 168 + ] }, "loc": null, - "range": { - "start": 158, - "end": 168 - } + "range": [ + 158, + 168 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 147, - "end": 171 - } + "range": [ + 147, + 171 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 147, - "end": 171 - } + "range": [ + 147, + 171 + ] }, "loc": null, - "range": { - "start": 140, - "end": 172 - } + "range": [ + 140, + 172 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 174 - } + "range": [ + 60, + 174 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 40, - "end": 174 - }, + "range": [ + 40, + 174 + ], "loc": null, - "range": { - "start": 40, - "end": 174 - } + "range": [ + 40, + 174 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 40, - "end": 174 - } + "range": [ + 40, + 174 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-field-not-added-to-dep.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-field-not-added-to-dep.js.snap index 2865d6560d..a0fdd3d10e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-field-not-added-to-dep.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-field-not-added-to-dep.js.snap @@ -26,10 +26,10 @@ Output: "name": "VideoTab", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 57 - } + "range": [ + 49, + 57 + ] }, "params": [], "body": { @@ -46,10 +46,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "init": { "type": "CallExpression", @@ -58,30 +58,30 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "arguments": [], "loc": null, - "range": { - "start": 76, - "end": 84 - } + "range": [ + 76, + 84 + ] }, "loc": null, - "range": { - "start": 70, - "end": 84 - } + "range": [ + 70, + 84 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 85 - } + "range": [ + 64, + 85 + ] }, { "type": "VariableDeclaration", @@ -94,10 +94,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -117,27 +117,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 115 - } + "range": [ + 108, + 115 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 119 - } + "range": [ + 116, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 108, - "end": 119 - } + "range": [ + 108, + 119 + ] }, "arguments": [ { @@ -149,92 +149,92 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 123 - } + "range": [ + 120, + 123 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 131 - } + "range": [ + 124, + 131 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 131 - } + "range": [ + 120, + 131 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 133 - } + "range": [ + 120, + 133 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 134 - } + "range": [ + 108, + 134 + ] }, "directive": null, "loc": null, - "range": { - "start": 108, - "end": 135 - } + "range": [ + 108, + 135 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 139 - } + "range": [ + 102, + 139 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 96, - "end": 139 - }, + "range": [ + 96, + 139 + ], "expression": false, "loc": null, - "range": { - "start": 96, - "end": 139 - } + "range": [ + 96, + 139 + ] }, "loc": null, - "range": { - "start": 92, - "end": 139 - } + "range": [ + 92, + 139 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 140 - } + "range": [ + 88, + 140 + ] }, { "type": "ReturnStatement", @@ -246,10 +246,10 @@ Output: "type": "JSXIdentifier", "name": "VideoList", "loc": null, - "range": { - "start": 152, - "end": 161 - } + "range": [ + 152, + 161 + ] }, "attributes": [ { @@ -258,10 +258,10 @@ Output: "type": "JSXIdentifier", "name": "videos", "loc": null, - "range": { - "start": 162, - "end": 168 - } + "range": [ + 162, + 168 + ] }, "value": { "type": "JSXExpressionContainer", @@ -270,70 +270,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 171 - } + "range": [ + 170, + 171 + ] }, "loc": null, - "range": { - "start": 169, - "end": 172 - } + "range": [ + 169, + 172 + ] }, "loc": null, - "range": { - "start": 162, - "end": 172 - } + "range": [ + 162, + 172 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 151, - "end": 175 - } + "range": [ + 151, + 175 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 151, - "end": 175 - } + "range": [ + 151, + 175 + ] }, "loc": null, - "range": { - "start": 144, - "end": 176 - } + "range": [ + 144, + 176 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 178 - } + "range": [ + 60, + 178 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 40, - "end": 178 - }, + "range": [ + 40, + 178 + ], "loc": null, - "range": { - "start": 40, - "end": 178 - } + "range": [ + 40, + 178 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 40, - "end": 178 - } + "range": [ + 40, + 178 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-not-added-to-dep-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-not-added-to-dep-2.js.snap index 862c611ff0..74b152c516 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-not-added-to-dep-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-not-added-to-dep-2.js.snap @@ -24,10 +24,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 52 - } + "range": [ + 49, + 52 + ] }, "params": [ { @@ -40,37 +40,37 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 58 - } + "range": [ + 53, + 58 + ] } ], "body": { @@ -87,10 +87,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 73 - } + "range": [ + 70, + 73 + ] }, "init": { "type": "CallExpression", @@ -99,30 +99,30 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "arguments": [], "loc": null, - "range": { - "start": 76, - "end": 84 - } + "range": [ + 76, + 84 + ] }, "loc": null, - "range": { - "start": 70, - "end": 84 - } + "range": [ + 70, + 84 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 85 - } + "range": [ + 64, + 85 + ] }, { "type": "VariableDeclaration", @@ -135,10 +135,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "init": { "type": "ObjectExpression", @@ -150,30 +150,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, { "type": "Property", @@ -182,10 +182,10 @@ Output: "name": "val", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 106 - } + "range": [ + 103, + 106 + ] }, "value": { "type": "MemberExpression", @@ -194,57 +194,57 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 111 - } + "range": [ + 108, + 111 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 119 - } + "range": [ + 112, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 108, - "end": 119 - } + "range": [ + 108, + 119 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 103, - "end": 119 - } + "range": [ + 103, + 119 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 121 - } + "range": [ + 98, + 121 + ] }, "loc": null, - "range": { - "start": 94, - "end": 121 - } + "range": [ + 94, + 121 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 122 - } + "range": [ + 88, + 122 + ] }, { "type": "ReturnStatement", @@ -256,10 +256,10 @@ Output: "type": "JSXIdentifier", "name": "VideoList", "loc": null, - "range": { - "start": 134, - "end": 143 - } + "range": [ + 134, + 143 + ] }, "attributes": [ { @@ -268,10 +268,10 @@ Output: "type": "JSXIdentifier", "name": "videos", "loc": null, - "range": { - "start": 144, - "end": 150 - } + "range": [ + 144, + 150 + ] }, "value": { "type": "JSXExpressionContainer", @@ -280,70 +280,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 153 - } + "range": [ + 152, + 153 + ] }, "loc": null, - "range": { - "start": 151, - "end": 154 - } + "range": [ + 151, + 154 + ] }, "loc": null, - "range": { - "start": 144, - "end": 154 - } + "range": [ + 144, + 154 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 133, - "end": 157 - } + "range": [ + 133, + 157 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 133, - "end": 157 - } + "range": [ + 133, + 157 + ] }, "loc": null, - "range": { - "start": 126, - "end": 158 - } + "range": [ + 126, + 158 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 160 - } + "range": [ + 60, + 160 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 40, - "end": 160 - }, + "range": [ + 40, + 160 + ], "loc": null, - "range": { - "start": 40, - "end": 160 - } + "range": [ + 40, + 160 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 40, - "end": 160 - } + "range": [ + 40, + 160 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-not-added-to-dep.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-not-added-to-dep.js.snap index 16c378a26f..ed5f5dd40e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-not-added-to-dep.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-not-added-to-dep.js.snap @@ -25,10 +25,10 @@ Output: "name": "VideoTab", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 17 - } + "range": [ + 9, + 17 + ] }, "params": [], "body": { @@ -45,10 +45,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 33 - } + "range": [ + 30, + 33 + ] }, "init": { "type": "CallExpression", @@ -57,30 +57,30 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] }, "arguments": [], "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] }, "loc": null, - "range": { - "start": 30, - "end": 44 - } + "range": [ + 30, + 44 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 45 - } + "range": [ + 24, + 45 + ] }, { "type": "VariableDeclaration", @@ -93,10 +93,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -116,27 +116,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 75 - } + "range": [ + 68, + 75 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 79 - } + "range": [ + 76, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 68, - "end": 79 - } + "range": [ + 68, + 79 + ] }, "arguments": [ { @@ -146,75 +146,75 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 83 - } + "range": [ + 80, + 83 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 91 - } + "range": [ + 84, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 80, - "end": 91 - } + "range": [ + 80, + 91 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 92 - } + "range": [ + 68, + 92 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 93 - } + "range": [ + 68, + 93 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 97 - } + "range": [ + 62, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 56, - "end": 97 - }, + "range": [ + 56, + 97 + ], "expression": false, "loc": null, - "range": { - "start": 56, - "end": 97 - } + "range": [ + 56, + 97 + ] }, "loc": null, - "range": { - "start": 52, - "end": 97 - } + "range": [ + 52, + 97 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 98 - } + "range": [ + 48, + 98 + ] }, { "type": "ReturnStatement", @@ -226,10 +226,10 @@ Output: "type": "JSXIdentifier", "name": "VideoList", "loc": null, - "range": { - "start": 110, - "end": 119 - } + "range": [ + 110, + 119 + ] }, "attributes": [ { @@ -238,10 +238,10 @@ Output: "type": "JSXIdentifier", "name": "videos", "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] }, "value": { "type": "JSXExpressionContainer", @@ -250,70 +250,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "loc": null, - "range": { - "start": 127, - "end": 130 - } + "range": [ + 127, + 130 + ] }, "loc": null, - "range": { - "start": 120, - "end": 130 - } + "range": [ + 120, + 130 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 109, - "end": 133 - } + "range": [ + 109, + 133 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 109, - "end": 133 - } + "range": [ + 109, + 133 + ] }, "loc": null, - "range": { - "start": 102, - "end": 134 - } + "range": [ + 102, + 134 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 136 - } + "range": [ + 20, + 136 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 136 - }, + "range": [ + 0, + 136 + ], "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-optional-field-no-added-to-dep.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-optional-field-no-added-to-dep.js.snap index 6e09125878..9e347f7835 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-optional-field-no-added-to-dep.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-optional-field-no-added-to-dep.js.snap @@ -25,10 +25,10 @@ Output: "name": "VideoTab", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 17 - } + "range": [ + 9, + 17 + ] }, "params": [], "body": { @@ -45,10 +45,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 33 - } + "range": [ + 30, + 33 + ] }, "init": { "type": "CallExpression", @@ -57,30 +57,30 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] }, "arguments": [], "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] }, "loc": null, - "range": { - "start": 30, - "end": 44 - } + "range": [ + 30, + 44 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 45 - } + "range": [ + 24, + 45 + ] }, { "type": "VariableDeclaration", @@ -93,10 +93,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -116,86 +116,86 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 71 - } + "range": [ + 68, + 71 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 79 - } + "range": [ + 72, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 68, - "end": 79 - } + "range": [ + 68, + 79 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 68, - "end": 82 - } + "range": [ + 68, + 82 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 83 - } + "range": [ + 68, + 83 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 87 - } + "range": [ + 62, + 87 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 56, - "end": 87 - }, + "range": [ + 56, + 87 + ], "expression": false, "loc": null, - "range": { - "start": 56, - "end": 87 - } + "range": [ + 56, + 87 + ] }, "loc": null, - "range": { - "start": 52, - "end": 87 - } + "range": [ + 52, + 87 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 88 - } + "range": [ + 48, + 88 + ] }, { "type": "ReturnStatement", @@ -207,10 +207,10 @@ Output: "type": "JSXIdentifier", "name": "VideoList", "loc": null, - "range": { - "start": 100, - "end": 109 - } + "range": [ + 100, + 109 + ] }, "attributes": [ { @@ -219,10 +219,10 @@ Output: "type": "JSXIdentifier", "name": "videos", "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] }, "value": { "type": "JSXExpressionContainer", @@ -231,70 +231,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "loc": null, - "range": { - "start": 117, - "end": 120 - } + "range": [ + 117, + 120 + ] }, "loc": null, - "range": { - "start": 110, - "end": 120 - } + "range": [ + 110, + 120 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 99, - "end": 123 - } + "range": [ + 99, + 123 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 99, - "end": 123 - } + "range": [ + 99, + 123 + ] }, "loc": null, - "range": { - "start": 92, - "end": 124 - } + "range": [ + 92, + 124 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 126 - } + "range": [ + 20, + 126 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 126 - }, + "range": [ + 0, + 126 + ], "loc": null, - "range": { - "start": 0, - "end": 126 - } + "range": [ + 0, + 126 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 126 - } + "range": [ + 0, + 126 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-write-not-added-to-dep.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-write-not-added-to-dep.js.snap index 6be018112a..96fcb59e17 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-write-not-added-to-dep.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-current-write-not-added-to-dep.js.snap @@ -25,10 +25,10 @@ Output: "name": "VideoTab", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 17 - } + "range": [ + 9, + 17 + ] }, "params": [], "body": { @@ -45,10 +45,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 33 - } + "range": [ + 30, + 33 + ] }, "init": { "type": "CallExpression", @@ -57,30 +57,30 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] }, "arguments": [], "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] }, "loc": null, - "range": { - "start": 30, - "end": 44 - } + "range": [ + 30, + 44 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 45 - } + "range": [ + 24, + 45 + ] }, { "type": "VariableDeclaration", @@ -93,10 +93,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -117,83 +117,83 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 71 - } + "range": [ + 68, + 71 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 79 - } + "range": [ + 72, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 68, - "end": 79 - } + "range": [ + 68, + 79 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "loc": null, - "range": { - "start": 68, - "end": 83 - } + "range": [ + 68, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 68, - "end": 84 - } + "range": [ + 68, + 84 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 88 - } + "range": [ + 62, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 56, - "end": 88 - }, + "range": [ + 56, + 88 + ], "expression": false, "loc": null, - "range": { - "start": 56, - "end": 88 - } + "range": [ + 56, + 88 + ] }, "loc": null, - "range": { - "start": 52, - "end": 88 - } + "range": [ + 52, + 88 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 89 - } + "range": [ + 48, + 89 + ] }, { "type": "ReturnStatement", @@ -205,10 +205,10 @@ Output: "type": "JSXIdentifier", "name": "VideoList", "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] }, "attributes": [ { @@ -217,10 +217,10 @@ Output: "type": "JSXIdentifier", "name": "videos", "loc": null, - "range": { - "start": 111, - "end": 117 - } + "range": [ + 111, + 117 + ] }, "value": { "type": "JSXExpressionContainer", @@ -229,70 +229,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "loc": null, - "range": { - "start": 111, - "end": 121 - } + "range": [ + 111, + 121 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 100, - "end": 124 - } + "range": [ + 100, + 124 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 100, - "end": 124 - } + "range": [ + 100, + 124 + ] }, "loc": null, - "range": { - "start": 93, - "end": 125 - } + "range": [ + 93, + 125 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 127 - } + "range": [ + 20, + 127 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 127 - }, + "range": [ + 0, + 127 + ], "loc": null, - "range": { - "start": 0, - "end": 127 - } + "range": [ + 0, + 127 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 127 - } + "range": [ + 0, + 127 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-in-effect.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-in-effect.js.snap index c328396ea1..2a99b44061 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-in-effect.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ref-in-effect.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -59,10 +59,10 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 39 - } + "range": [ + 36, + 39 + ] }, "init": { "type": "CallExpression", @@ -71,39 +71,39 @@ Output: "name": "useRef", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 48 - } + "range": [ + 42, + 48 + ] }, "arguments": [ { "type": "NullLiteral", "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 54 - } + "range": [ + 42, + 54 + ] }, "loc": null, - "range": { - "start": 36, - "end": 54 - } + "range": [ + 36, + 54 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 55 - } + "range": [ + 30, + 55 + ] }, { "type": "VariableDeclaration", @@ -116,10 +116,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 72 - } + "range": [ + 64, + 72 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -130,10 +130,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] } ], "body": { @@ -150,10 +150,10 @@ Output: "name": "newValue", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 102 - } + "range": [ + 94, + 102 + ] }, "init": { "type": "LogicalExpression", @@ -167,44 +167,44 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 113 - } + "range": [ + 107, + 113 + ] }, "computed": false, "loc": null, - "range": { - "start": 105, - "end": 113 - } + "range": [ + 105, + 113 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 119 - } + "range": [ + 114, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 105, - "end": 119 - } + "range": [ + 105, + 119 + ] }, "right": { "type": "MemberExpression", @@ -213,46 +213,46 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 126 - } + "range": [ + 123, + 126 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 134 - } + "range": [ + 127, + 134 + ] }, "computed": false, "loc": null, - "range": { - "start": 123, - "end": 134 - } + "range": [ + 123, + 134 + ] }, "loc": null, - "range": { - "start": 105, - "end": 134 - } + "range": [ + 105, + 134 + ] }, "loc": null, - "range": { - "start": 94, - "end": 134 - } + "range": [ + 94, + 134 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 135 - } + "range": [ + 88, + 135 + ] }, { "type": "ExpressionStatement", @@ -266,84 +266,84 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 143 - } + "range": [ + 140, + 143 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 151 - } + "range": [ + 144, + 151 + ] }, "computed": false, "loc": null, - "range": { - "start": 140, - "end": 151 - } + "range": [ + 140, + 151 + ] }, "right": { "type": "Identifier", "name": "newValue", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 162 - } + "range": [ + 154, + 162 + ] }, "loc": null, - "range": { - "start": 140, - "end": 162 - } + "range": [ + 140, + 162 + ] }, "directive": null, "loc": null, - "range": { - "start": 140, - "end": 163 - } + "range": [ + 140, + 163 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 167 - } + "range": [ + 82, + 167 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 75, - "end": 167 - }, + "range": [ + 75, + 167 + ], "expression": false, "loc": null, - "range": { - "start": 75, - "end": 167 - } + "range": [ + 75, + 167 + ] }, "loc": null, - "range": { - "start": 64, - "end": 167 - } + "range": [ + 64, + 167 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 168 - } + "range": [ + 58, + 168 + ] }, { "type": "ExpressionStatement", @@ -354,10 +354,10 @@ Output: "name": "useEffect", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 180 - } + "range": [ + 171, + 180 + ] }, "arguments": [ { @@ -378,27 +378,27 @@ Output: "name": "console", "typeAnnotation": null, "loc": null, - "range": { - "start": 193, - "end": 200 - } + "range": [ + 193, + 200 + ] }, "property": { "type": "Identifier", "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 204 - } + "range": [ + 201, + 204 + ] }, "computed": false, "loc": null, - "range": { - "start": 193, - "end": 204 - } + "range": [ + 193, + 204 + ] }, "arguments": [ { @@ -408,76 +408,76 @@ Output: "name": "ref", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 208 - } + "range": [ + 205, + 208 + ] }, "property": { "type": "Identifier", "name": "current", "typeAnnotation": null, "loc": null, - "range": { - "start": 209, - "end": 216 - } + "range": [ + 209, + 216 + ] }, "computed": false, "loc": null, - "range": { - "start": 205, - "end": 216 - } + "range": [ + 205, + 216 + ] } ], "loc": null, - "range": { - "start": 193, - "end": 217 - } + "range": [ + 193, + 217 + ] }, "directive": null, "loc": null, - "range": { - "start": 193, - "end": 218 - } + "range": [ + 193, + 218 + ] } ], "loc": null, - "range": { - "start": 187, - "end": 222 - } + "range": [ + 187, + 222 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 181, - "end": 222 - }, + "range": [ + 181, + 222 + ], "expression": false, "loc": null, - "range": { - "start": 181, - "end": 222 - } + "range": [ + 181, + 222 + ] } ], "loc": null, - "range": { - "start": 171, - "end": 223 - } + "range": [ + 171, + 223 + ] }, "directive": null, "loc": null, - "range": { - "start": 171, - "end": 224 - } + "range": [ + 171, + 224 + ] }, { "type": "ReturnStatement", @@ -489,10 +489,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 235, - "end": 238 - } + "range": [ + 235, + 238 + ] }, "attributes": [ { @@ -501,10 +501,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 239, - "end": 247 - } + "range": [ + 239, + 247 + ] }, "value": { "type": "JSXExpressionContainer", @@ -513,70 +513,70 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 249, - "end": 257 - } + "range": [ + 249, + 257 + ] }, "loc": null, - "range": { - "start": 248, - "end": 258 - } + "range": [ + 248, + 258 + ] }, "loc": null, - "range": { - "start": 239, - "end": 258 - } + "range": [ + 239, + 258 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 234, - "end": 261 - } + "range": [ + 234, + 261 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 234, - "end": 261 - } + "range": [ + 234, + 261 + ] }, "loc": null, - "range": { - "start": 227, - "end": 262 - } + "range": [ + 227, + 262 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 264 - } + "range": [ + 26, + 264 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 264 - }, + "range": [ + 0, + 264 + ], "loc": null, - "range": { - "start": 0, - "end": 264 - } + "range": [ + 0, + 264 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 264 - } + "range": [ + 0, + 264 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@regexp-literal.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@regexp-literal.js.snap index e58c1e2299..fecafe3c07 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@regexp-literal.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@regexp-literal.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,33 +58,33 @@ Output: "name": "pattern", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 43 - } + "range": [ + 36, + 43 + ] }, "init": { "type": "RegExpLiteral", "pattern": "foo", "flags": "g", "loc": null, - "range": { - "start": 46, - "end": 52 - } + "range": [ + 46, + 52 + ] }, "loc": null, - "range": { - "start": 36, - "end": 52 - } + "range": [ + 36, + 52 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 53 - } + "range": [ + 30, + 53 + ] }, { "type": "VariableDeclaration", @@ -97,10 +97,10 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "init": { "type": "CallExpression", @@ -109,30 +109,30 @@ Output: "name": "makeValue", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 79 - } + "range": [ + 70, + 79 + ] }, "arguments": [], "loc": null, - "range": { - "start": 70, - "end": 81 - } + "range": [ + 70, + 81 + ] }, "loc": null, - "range": { - "start": 62, - "end": 81 - } + "range": [ + 62, + 81 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 82 - } + "range": [ + 56, + 82 + ] }, { "type": "IfStatement", @@ -145,27 +145,27 @@ Output: "name": "pattern", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 221 - } + "range": [ + 214, + 221 + ] }, "property": { "type": "Identifier", "name": "test", "typeAnnotation": null, "loc": null, - "range": { - "start": 222, - "end": 226 - } + "range": [ + 222, + 226 + ] }, "computed": false, "loc": null, - "range": { - "start": 214, - "end": 226 - } + "range": [ + 214, + 226 + ] }, "arguments": [ { @@ -173,17 +173,17 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 227, - "end": 232 - } + "range": [ + 227, + 232 + ] } ], "loc": null, - "range": { - "start": 214, - "end": 233 - } + "range": [ + 214, + 233 + ] }, "consequent": { "type": "BlockStatement", @@ -198,18 +198,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 249, - "end": 252 - } + "range": [ + 249, + 252 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 248, - "end": 253 - } + "range": [ + 248, + 253 + ] }, "children": [ { @@ -219,16 +219,16 @@ Output: "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 259 - } + "range": [ + 254, + 259 + ] }, "loc": null, - "range": { - "start": 253, - "end": 260 - } + "range": [ + 253, + 260 + ] } ], "closingElement": { @@ -237,42 +237,42 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 262, - "end": 265 - } + "range": [ + 262, + 265 + ] }, "loc": null, - "range": { - "start": 260, - "end": 266 - } + "range": [ + 260, + 266 + ] }, "loc": null, - "range": { - "start": 248, - "end": 266 - } + "range": [ + 248, + 266 + ] }, "loc": null, - "range": { - "start": 241, - "end": 267 - } + "range": [ + 241, + 267 + ] } ], "loc": null, - "range": { - "start": 235, - "end": 271 - } + "range": [ + 235, + 271 + ] }, "alternate": null, "loc": null, - "range": { - "start": 210, - "end": 271 - } + "range": [ + 210, + 271 + ] }, { "type": "ReturnStatement", @@ -284,18 +284,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 282, - "end": 285 - } + "range": [ + 282, + 285 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 281, - "end": 286 - } + "range": [ + 281, + 286 + ] }, "children": [ { @@ -303,10 +303,10 @@ Output: "value": "Default", "raw": "Default", "loc": null, - "range": { - "start": 286, - "end": 293 - } + "range": [ + 286, + 293 + ] } ], "closingElement": { @@ -315,54 +315,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 295, - "end": 298 - } + "range": [ + 295, + 298 + ] }, "loc": null, - "range": { - "start": 293, - "end": 299 - } + "range": [ + 293, + 299 + ] }, "loc": null, - "range": { - "start": 281, - "end": 299 - } + "range": [ + 281, + 299 + ] }, "loc": null, - "range": { - "start": 274, - "end": 300 - } + "range": [ + 274, + 300 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 302 - } + "range": [ + 26, + 302 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 302 - }, + "range": [ + 0, + 302 + ], "loc": null, - "range": { - "start": 0, - "end": 302 - } + "range": [ + 0, + 302 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 302 - } + "range": [ + 0, + 302 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@remove-memoization-kitchen-sink.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@remove-memoization-kitchen-sink.js.snap index b625a33088..a7ea34d686 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@remove-memoization-kitchen-sink.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@remove-memoization-kitchen-sink.js.snap @@ -29,10 +29,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 49 - } + "range": [ + 40, + 49 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] } ], "body": { @@ -63,27 +63,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, { "type": "Identifier", "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 75 - } + "range": [ + 71, + 75 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 76 - } + "range": [ + 67, + 76 + ] }, "init": { "type": "CallExpression", @@ -92,10 +92,10 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 87 - } + "range": [ + 79, + 87 + ] }, "arguments": [ { @@ -109,10 +109,10 @@ Output: "name": "initializeState", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 109 - } + "range": [ + 94, + 109 + ] }, "arguments": [ { @@ -120,51 +120,51 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 115 - } + "range": [ + 110, + 115 + ] } ], "loc": null, - "range": { - "start": 94, - "end": 116 - } + "range": [ + 94, + 116 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 88, - "end": 116 - }, + "range": [ + 88, + 116 + ], "expression": true, "loc": null, - "range": { - "start": 88, - "end": 116 - } + "range": [ + 88, + 116 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 117 - } + "range": [ + 79, + 117 + ] }, "loc": null, - "range": { - "start": 67, - "end": 117 - } + "range": [ + 67, + 117 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 118 - } + "range": [ + 61, + 118 + ] }, { "type": "VariableDeclaration", @@ -177,10 +177,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 135 - } + "range": [ + 127, + 135 + ] }, "init": { "type": "CallExpression", @@ -189,10 +189,10 @@ Output: "name": "useCallback", "typeAnnotation": null, "loc": null, - "range": { - "start": 138, - "end": 149 - } + "range": [ + 138, + 149 + ] }, "arguments": [ { @@ -204,10 +204,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] } ], "body": { @@ -222,10 +222,10 @@ Output: "name": "setX", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 167 - } + "range": [ + 163, + 167 + ] }, "arguments": [ { @@ -237,99 +237,99 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 176 - } + "range": [ + 170, + 176 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 176 - } + "range": [ + 168, + 176 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 182 - } + "range": [ + 177, + 182 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 182 - } + "range": [ + 168, + 182 + ] } ], "loc": null, - "range": { - "start": 163, - "end": 183 - } + "range": [ + 163, + 183 + ] }, "directive": null, "loc": null, - "range": { - "start": 163, - "end": 184 - } + "range": [ + 163, + 184 + ] } ], "loc": null, - "range": { - "start": 157, - "end": 188 - } + "range": [ + 157, + 188 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 150, - "end": 188 - }, + "range": [ + 150, + 188 + ], "expression": false, "loc": null, - "range": { - "start": 150, - "end": 188 - } + "range": [ + 150, + 188 + ] } ], "loc": null, - "range": { - "start": 138, - "end": 189 - } + "range": [ + 138, + 189 + ] }, "loc": null, - "range": { - "start": 127, - "end": 189 - } + "range": [ + 127, + 189 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 190 - } + "range": [ + 121, + 190 + ] }, { "type": "VariableDeclaration", @@ -342,10 +342,10 @@ Output: "name": "object", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 205 - } + "range": [ + 199, + 205 + ] }, "init": { "type": "ObjectExpression", @@ -357,30 +357,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 211 - } + "range": [ + 210, + 211 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 210, - "end": 211 - } + "range": [ + 210, + 211 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 210, - "end": 211 - } + "range": [ + 210, + 211 + ] }, { "type": "Property", @@ -389,50 +389,50 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 213, - "end": 221 - } + "range": [ + 213, + 221 + ] }, "value": { "type": "Identifier", "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 213, - "end": 221 - } + "range": [ + 213, + 221 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 213, - "end": 221 - } + "range": [ + 213, + 221 + ] } ], "loc": null, - "range": { - "start": 208, - "end": 223 - } + "range": [ + 208, + 223 + ] }, "loc": null, - "range": { - "start": 199, - "end": 223 - } + "range": [ + 199, + 223 + ] } ], "loc": null, - "range": { - "start": 193, - "end": 224 - } + "range": [ + 193, + 224 + ] }, { "type": "ReturnStatement", @@ -443,10 +443,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 234, - "end": 241 - } + "range": [ + 234, + 241 + ] }, "arguments": [ { @@ -472,30 +472,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 262, - "end": 263 - } + "range": [ + 262, + 263 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 262, - "end": 263 - } + "range": [ + 262, + 263 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 262, - "end": 263 - } + "range": [ + 262, + 263 + ] }, { "type": "Property", @@ -504,60 +504,60 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 273 - } + "range": [ + 265, + 273 + ] }, "value": { "type": "Identifier", "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 273 - } + "range": [ + 265, + 273 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 265, - "end": 273 - } + "range": [ + 265, + 273 + ] } ], "loc": null, - "range": { - "start": 260, - "end": 275 - } + "range": [ + 260, + 275 + ] }, "init": { "type": "Identifier", "name": "object", "typeAnnotation": null, "loc": null, - "range": { - "start": 278, - "end": 284 - } + "range": [ + 278, + 284 + ] }, "loc": null, - "range": { - "start": 260, - "end": 284 - } + "range": [ + 260, + 284 + ] } ], "loc": null, - "range": { - "start": 254, - "end": 285 - } + "range": [ + 254, + 285 + ] }, { "type": "ReturnStatement", @@ -569,10 +569,10 @@ Output: "type": "JSXIdentifier", "name": "input", "loc": null, - "range": { - "start": 298, - "end": 303 - } + "range": [ + 298, + 303 + ] }, "attributes": [ { @@ -581,10 +581,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 304, - "end": 309 - } + "range": [ + 304, + 309 + ] }, "value": { "type": "JSXExpressionContainer", @@ -593,22 +593,22 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 311, - "end": 312 - } + "range": [ + 311, + 312 + ] }, "loc": null, - "range": { - "start": 310, - "end": 313 - } + "range": [ + 310, + 313 + ] }, "loc": null, - "range": { - "start": 304, - "end": 313 - } + "range": [ + 304, + 313 + ] }, { "type": "JSXAttribute", @@ -616,10 +616,10 @@ Output: "type": "JSXIdentifier", "name": "onChange", "loc": null, - "range": { - "start": 314, - "end": 322 - } + "range": [ + 314, + 322 + ] }, "value": { "type": "JSXExpressionContainer", @@ -628,65 +628,65 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 324, - "end": 332 - } + "range": [ + 324, + 332 + ] }, "loc": null, - "range": { - "start": 323, - "end": 333 - } + "range": [ + 323, + 333 + ] }, "loc": null, - "range": { - "start": 314, - "end": 333 - } + "range": [ + 314, + 333 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 297, - "end": 336 - } + "range": [ + 297, + 336 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 297, - "end": 336 - } + "range": [ + 297, + 336 + ] }, "loc": null, - "range": { - "start": 290, - "end": 337 - } + "range": [ + 290, + 337 + ] } ], "loc": null, - "range": { - "start": 248, - "end": 341 - } + "range": [ + 248, + 341 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 242, - "end": 341 - }, + "range": [ + 242, + 341 + ], "expression": false, "loc": null, - "range": { - "start": 242, - "end": 341 - } + "range": [ + 242, + 341 + ] }, { "type": "ArrayExpression", @@ -696,56 +696,56 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 344, - "end": 345 - } + "range": [ + 344, + 345 + ] } ], "loc": null, - "range": { - "start": 343, - "end": 346 - } + "range": [ + 343, + 346 + ] } ], "loc": null, - "range": { - "start": 234, - "end": 347 - } + "range": [ + 234, + 347 + ] }, "loc": null, - "range": { - "start": 227, - "end": 348 - } + "range": [ + 227, + 348 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 350 - } + "range": [ + 57, + 350 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 31, - "end": 350 - }, + "range": [ + 31, + 350 + ], "loc": null, - "range": { - "start": 31, - "end": 350 - } + "range": [ + 31, + 350 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 31, - "end": 350 - } + "range": [ + 31, + 350 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro-reassign-to-variable-without-mutable-range.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro-reassign-to-variable-without-mutable-range.js.snap index 4dde53ad76..9bc554de23 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro-reassign-to-variable-without-mutable-range.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro-reassign-to-variable-without-mutable-range.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 28 - } + "range": [ + 19, + 28 + ] }, "params": [ { @@ -39,20 +39,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] } ], "body": { @@ -69,32 +69,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 47, - "end": 49 - } + "range": [ + 47, + 49 + ] }, "loc": null, - "range": { - "start": 43, - "end": 49 - } + "range": [ + 43, + 49 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 50 - } + "range": [ + 39, + 50 + ] }, { "type": "VariableDeclaration", @@ -107,32 +107,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 61, - "end": 63 - } + "range": [ + 61, + 63 + ] }, "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 64 - } + "range": [ + 53, + 64 + ] }, { "type": "VariableDeclaration", @@ -145,10 +145,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "init": { "type": "CallExpression", @@ -157,10 +157,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 78 - } + "range": [ + 75, + 78 + ] }, "arguments": [ { @@ -168,30 +168,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 81 - } + "range": [ + 75, + 81 + ] }, "loc": null, - "range": { - "start": 71, - "end": 81 - } + "range": [ + 71, + 81 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 82 - } + "range": [ + 67, + 82 + ] }, { "type": "IfStatement", @@ -200,10 +200,10 @@ Output: "name": "FLAG", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 93 - } + "range": [ + 89, + 93 + ] }, "consequent": { "type": "BlockStatement", @@ -218,10 +218,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "right": { "type": "CallExpression", @@ -230,10 +230,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 108 - } + "range": [ + 105, + 108 + ] }, "arguments": [ { @@ -241,30 +241,30 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] } ], "loc": null, - "range": { - "start": 105, - "end": 111 - } + "range": [ + 105, + 111 + ] }, "loc": null, - "range": { - "start": 101, - "end": 111 - } + "range": [ + 101, + 111 + ] }, "directive": null, "loc": null, - "range": { - "start": 101, - "end": 112 - } + "range": [ + 101, + 112 + ] }, { "type": "ExpressionStatement", @@ -276,10 +276,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "right": { "type": "CallExpression", @@ -288,10 +288,10 @@ Output: "name": "baz", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] }, "arguments": [ { @@ -299,44 +299,44 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 127 - } + "range": [ + 121, + 127 + ] }, "loc": null, - "range": { - "start": 117, - "end": 127 - } + "range": [ + 117, + 127 + ] }, "directive": null, "loc": null, - "range": { - "start": 117, - "end": 128 - } + "range": [ + 117, + 128 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 132 - } + "range": [ + 95, + 132 + ] }, "alternate": null, "loc": null, - "range": { - "start": 85, - "end": 132 - } + "range": [ + 85, + 132 + ] }, { "type": "ReturnStatement", @@ -348,59 +348,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 147 - } + "range": [ + 146, + 147 + ] } ], "loc": null, - "range": { - "start": 142, - "end": 148 - } + "range": [ + 142, + 148 + ] }, "loc": null, - "range": { - "start": 135, - "end": 149 - } + "range": [ + 135, + 149 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 151 - } + "range": [ + 35, + 151 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 10, - "end": 151 - }, + "range": [ + 10, + 151 + ], "loc": null, - "range": { - "start": 10, - "end": 151 - } + "range": [ + 10, + 151 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 10, - "end": 151 - } + "range": [ + 10, + 151 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro-scope-missing-mutable-range.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro-scope-missing-mutable-range.js.snap index 19493cfcf2..e36e26ba71 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro-scope-missing-mutable-range.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro-scope-missing-mutable-range.js.snap @@ -27,10 +27,10 @@ Output: "name": "HomeDiscoStoreItemTileRating", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 37 - } + "range": [ + 9, + 37 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 59 - } + "range": [ + 55, + 59 + ] }, "init": { "type": "CallExpression", @@ -70,30 +70,30 @@ Output: "name": "useFragment", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 73 - } + "range": [ + 62, + 73 + ] }, "arguments": [], "loc": null, - "range": { - "start": 62, - "end": 75 - } + "range": [ + 62, + 75 + ] }, "loc": null, - "range": { - "start": 55, - "end": 75 - } + "range": [ + 55, + 75 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 76 - } + "range": [ + 49, + 76 + ] }, { "type": "VariableDeclaration", @@ -106,32 +106,32 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 88 - } + "range": [ + 83, + 88 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "loc": null, - "range": { - "start": 83, - "end": 92 - } + "range": [ + 83, + 92 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 93 - } + "range": [ + 79, + 93 + ] }, { "type": "VariableDeclaration", @@ -144,10 +144,10 @@ Output: "name": "aggregates", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 112 - } + "range": [ + 102, + 112 + ] }, "init": { "type": "LogicalExpression", @@ -159,56 +159,56 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 119 - } + "range": [ + 115, + 119 + ] }, "property": { "type": "Identifier", "name": "aggregates", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 131 - } + "range": [ + 121, + 131 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 115, - "end": 131 - } + "range": [ + 115, + 131 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 135, - "end": 137 - } + "range": [ + 135, + 137 + ] }, "loc": null, - "range": { - "start": 115, - "end": 137 - } + "range": [ + 115, + 137 + ] }, "loc": null, - "range": { - "start": 102, - "end": 137 - } + "range": [ + 102, + 137 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 138 - } + "range": [ + 96, + 138 + ] }, { "type": "ExpressionStatement", @@ -221,27 +221,27 @@ Output: "name": "aggregates", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 151 - } + "range": [ + 141, + 151 + ] }, "property": { "type": "Identifier", "name": "forEach", "typeAnnotation": null, "loc": null, - "range": { - "start": 152, - "end": 159 - } + "range": [ + 152, + 159 + ] }, "computed": false, "loc": null, - "range": { - "start": 141, - "end": 159 - } + "range": [ + 141, + 159 + ] }, "arguments": [ { @@ -253,10 +253,10 @@ Output: "name": "aggregate", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 170 - } + "range": [ + 161, + 170 + ] } ], "body": { @@ -272,10 +272,10 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 186 - } + "range": [ + 181, + 186 + ] }, "right": { "type": "LogicalExpression", @@ -287,90 +287,90 @@ Output: "name": "aggregate", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 199 - } + "range": [ + 190, + 199 + ] }, "property": { "type": "Identifier", "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 205 - } + "range": [ + 200, + 205 + ] }, "computed": false, "loc": null, - "range": { - "start": 190, - "end": 205 - } + "range": [ + 190, + 205 + ] }, "right": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 209, - "end": 210 - } + "range": [ + 209, + 210 + ] }, "loc": null, - "range": { - "start": 190, - "end": 210 - } + "range": [ + 190, + 210 + ] }, "loc": null, - "range": { - "start": 181, - "end": 210 - } + "range": [ + 181, + 210 + ] }, "directive": null, "loc": null, - "range": { - "start": 181, - "end": 211 - } + "range": [ + 181, + 211 + ] } ], "loc": null, - "range": { - "start": 175, - "end": 215 - } + "range": [ + 175, + 215 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 160, - "end": 215 - }, + "range": [ + 160, + 215 + ], "expression": false, "loc": null, - "range": { - "start": 160, - "end": 215 - } + "range": [ + 160, + 215 + ] } ], "loc": null, - "range": { - "start": 141, - "end": 216 - } + "range": [ + 141, + 216 + ] }, "directive": null, "loc": null, - "range": { - "start": 141, - "end": 217 - } + "range": [ + 141, + 217 + ] }, { "type": "ReturnStatement", @@ -382,18 +382,18 @@ Output: "type": "JSXIdentifier", "name": "Text", "loc": null, - "range": { - "start": 229, - "end": 233 - } + "range": [ + 229, + 233 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 228, - "end": 234 - } + "range": [ + 228, + 234 + ] }, "children": [ { @@ -403,16 +403,16 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 235, - "end": 240 - } + "range": [ + 235, + 240 + ] }, "loc": null, - "range": { - "start": 234, - "end": 241 - } + "range": [ + 234, + 241 + ] } ], "closingElement": { @@ -421,54 +421,54 @@ Output: "type": "JSXIdentifier", "name": "Text", "loc": null, - "range": { - "start": 243, - "end": 247 - } + "range": [ + 243, + 247 + ] }, "loc": null, - "range": { - "start": 241, - "end": 248 - } + "range": [ + 241, + 248 + ] }, "loc": null, - "range": { - "start": 228, - "end": 248 - } + "range": [ + 228, + 248 + ] }, "loc": null, - "range": { - "start": 221, - "end": 249 - } + "range": [ + 221, + 249 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 251 - } + "range": [ + 45, + 251 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 251 - }, + "range": [ + 0, + 251 + ], "loc": null, - "range": { - "start": 0, - "end": 251 - } + "range": [ + 0, + 251 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 251 - } + "range": [ + 0, + 251 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro.js.snap index 74e16f9aff..ca380fe9bb 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@repro.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -42,10 +42,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -62,10 +62,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "MemberExpression", @@ -74,40 +74,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "property": { "type": "Identifier", "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] }, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 53 - } + "range": [ + 43, + 53 + ] }, "loc": null, - "range": { - "start": 36, - "end": 53 - } + "range": [ + 36, + 53 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 54 - } + "range": [ + 30, + 54 + ] }, { "type": "VariableDeclaration", @@ -120,32 +120,32 @@ Output: "name": "thumbnails", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 73 - } + "range": [ + 63, + 73 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 76, - "end": 78 - } + "range": [ + 76, + 78 + ] }, "loc": null, - "range": { - "start": 63, - "end": 78 - } + "range": [ + 63, + 78 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 79 - } + "range": [ + 57, + 79 + ] }, { "type": "VariableDeclaration", @@ -158,10 +158,10 @@ Output: "name": "baseVideos", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 98 - } + "range": [ + 88, + 98 + ] }, "init": { "type": "CallExpression", @@ -170,10 +170,10 @@ Output: "name": "getBaseVideos", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 114 - } + "range": [ + 101, + 114 + ] }, "arguments": [ { @@ -181,30 +181,30 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 119 - } + "range": [ + 115, + 119 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 120 - } + "range": [ + 101, + 120 + ] }, "loc": null, - "range": { - "start": 88, - "end": 120 - } + "range": [ + 88, + 120 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 121 - } + "range": [ + 82, + 121 + ] }, { "type": "ExpressionStatement", @@ -215,10 +215,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 131 - } + "range": [ + 124, + 131 + ] }, "arguments": [ { @@ -239,27 +239,27 @@ Output: "name": "baseVideos", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 154 - } + "range": [ + 144, + 154 + ] }, "property": { "type": "Identifier", "name": "forEach", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 162 - } + "range": [ + 155, + 162 + ] }, "computed": false, "loc": null, - "range": { - "start": 144, - "end": 162 - } + "range": [ + 144, + 162 + ] }, "arguments": [ { @@ -271,10 +271,10 @@ Output: "name": "video", "typeAnnotation": null, "loc": null, - "range": { - "start": 164, - "end": 169 - } + "range": [ + 164, + 169 + ] } ], "body": { @@ -291,10 +291,10 @@ Output: "name": "baseVideo", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 197 - } + "range": [ + 188, + 197 + ] }, "init": { "type": "MemberExpression", @@ -303,40 +303,40 @@ Output: "name": "video", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 205 - } + "range": [ + 200, + 205 + ] }, "property": { "type": "Identifier", "name": "hasBaseVideo", "typeAnnotation": null, "loc": null, - "range": { - "start": 206, - "end": 218 - } + "range": [ + 206, + 218 + ] }, "computed": false, "loc": null, - "range": { - "start": 200, - "end": 218 - } + "range": [ + 200, + 218 + ] }, "loc": null, - "range": { - "start": 188, - "end": 218 - } + "range": [ + 188, + 218 + ] } ], "loc": null, - "range": { - "start": 182, - "end": 219 - } + "range": [ + 182, + 219 + ] }, { "type": "IfStatement", @@ -347,10 +347,10 @@ Output: "name": "Boolean", "typeAnnotation": null, "loc": null, - "range": { - "start": 230, - "end": 237 - } + "range": [ + 230, + 237 + ] }, "arguments": [ { @@ -358,17 +358,17 @@ Output: "name": "baseVideo", "typeAnnotation": null, "loc": null, - "range": { - "start": 238, - "end": 247 - } + "range": [ + 238, + 247 + ] } ], "loc": null, - "range": { - "start": 230, - "end": 248 - } + "range": [ + 230, + 248 + ] }, "consequent": { "type": "BlockStatement", @@ -384,27 +384,27 @@ Output: "name": "thumbnails", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 270 - } + "range": [ + 260, + 270 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 271, - "end": 275 - } + "range": [ + 271, + 275 + ] }, "computed": false, "loc": null, - "range": { - "start": 260, - "end": 275 - } + "range": [ + 260, + 275 + ] }, "arguments": [ { @@ -417,134 +417,134 @@ Output: "name": "extraVideo", "typeAnnotation": null, "loc": null, - "range": { - "start": 278, - "end": 288 - } + "range": [ + 278, + 288 + ] }, "value": { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 290, - "end": 294 - } + "range": [ + 290, + 294 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 278, - "end": 294 - } + "range": [ + 278, + 294 + ] } ], "loc": null, - "range": { - "start": 276, - "end": 296 - } + "range": [ + 276, + 296 + ] } ], "loc": null, - "range": { - "start": 260, - "end": 297 - } + "range": [ + 260, + 297 + ] }, "directive": null, "loc": null, - "range": { - "start": 260, - "end": 298 - } + "range": [ + 260, + 298 + ] } ], "loc": null, - "range": { - "start": 250, - "end": 306 - } + "range": [ + 250, + 306 + ] }, "alternate": null, "loc": null, - "range": { - "start": 226, - "end": 306 - } + "range": [ + 226, + 306 + ] } ], "loc": null, - "range": { - "start": 174, - "end": 312 - } + "range": [ + 174, + 312 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 163, - "end": 312 - }, + "range": [ + 163, + 312 + ], "expression": false, "loc": null, - "range": { - "start": 163, - "end": 312 - } + "range": [ + 163, + 312 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 313 - } + "range": [ + 144, + 313 + ] }, "directive": null, "loc": null, - "range": { - "start": 144, - "end": 314 - } + "range": [ + 144, + 314 + ] } ], "loc": null, - "range": { - "start": 138, - "end": 318 - } + "range": [ + 138, + 318 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 132, - "end": 318 - }, + "range": [ + 132, + 318 + ], "expression": false, "loc": null, - "range": { - "start": 132, - "end": 318 - } + "range": [ + 132, + 318 + ] } ], "loc": null, - "range": { - "start": 124, - "end": 319 - } + "range": [ + 124, + 319 + ] }, "directive": null, "loc": null, - "range": { - "start": 124, - "end": 320 - } + "range": [ + 124, + 320 + ] }, { "type": "ReturnStatement", @@ -556,10 +556,10 @@ Output: "type": "JSXIdentifier", "name": "FlatList", "loc": null, - "range": { - "start": 331, - "end": 339 - } + "range": [ + 331, + 339 + ] }, "attributes": [ { @@ -568,10 +568,10 @@ Output: "type": "JSXIdentifier", "name": "baseVideos", "loc": null, - "range": { - "start": 340, - "end": 350 - } + "range": [ + 340, + 350 + ] }, "value": { "type": "JSXExpressionContainer", @@ -580,22 +580,22 @@ Output: "name": "baseVideos", "typeAnnotation": null, "loc": null, - "range": { - "start": 352, - "end": 362 - } + "range": [ + 352, + 362 + ] }, "loc": null, - "range": { - "start": 351, - "end": 363 - } + "range": [ + 351, + 363 + ] }, "loc": null, - "range": { - "start": 340, - "end": 363 - } + "range": [ + 340, + 363 + ] }, { "type": "JSXAttribute", @@ -603,10 +603,10 @@ Output: "type": "JSXIdentifier", "name": "items", "loc": null, - "range": { - "start": 364, - "end": 369 - } + "range": [ + 364, + 369 + ] }, "value": { "type": "JSXExpressionContainer", @@ -615,70 +615,70 @@ Output: "name": "thumbnails", "typeAnnotation": null, "loc": null, - "range": { - "start": 371, - "end": 381 - } + "range": [ + 371, + 381 + ] }, "loc": null, - "range": { - "start": 370, - "end": 382 - } + "range": [ + 370, + 382 + ] }, "loc": null, - "range": { - "start": 364, - "end": 382 - } + "range": [ + 364, + 382 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 330, - "end": 385 - } + "range": [ + 330, + 385 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 330, - "end": 385 - } + "range": [ + 330, + 385 + ] }, "loc": null, - "range": { - "start": 323, - "end": 386 - } + "range": [ + 323, + 386 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 388 - } + "range": [ + 26, + 388 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 388 - }, + "range": [ + 0, + 388 + ], "loc": null, - "range": { - "start": 0, - "end": 388 - } + "range": [ + 0, + 388 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 388 - } + "range": [ + 0, + 388 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@return-conditional.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@return-conditional.js.snap index 5fb0718c17..fa5c36af5c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@return-conditional.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@return-conditional.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,20 +35,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -63,25 +63,25 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "operator": "==", "right": { "type": "NullLiteral", "loc": null, - "range": { - "start": 32, - "end": 36 - } + "range": [ + 32, + 36 + ] }, "loc": null, - "range": { - "start": 27, - "end": 36 - } + "range": [ + 27, + 36 + ] }, "consequent": { "type": "BlockStatement", @@ -91,23 +91,23 @@ Output: "argument": { "type": "NullLiteral", "loc": null, - "range": { - "start": 51, - "end": 55 - } + "range": [ + 51, + 55 + ] }, "loc": null, - "range": { - "start": 44, - "end": 56 - } + "range": [ + 44, + 56 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 60 - } + "range": [ + 38, + 60 + ] }, "alternate": { "type": "BlockStatement", @@ -119,55 +119,55 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "loc": null, - "range": { - "start": 72, - "end": 81 - } + "range": [ + 72, + 81 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 85 - } + "range": [ + 66, + 85 + ] }, "loc": null, - "range": { - "start": 23, - "end": 85 - } + "range": [ + 23, + 85 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 87 - } + "range": [ + 19, + 87 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 87 - }, + "range": [ + 0, + 87 + ], "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@return-undefined.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@return-undefined.js.snap index 4cd4976caf..30dc09d3f3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@return-undefined.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@return-undefined.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,27 +52,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 34, - "end": 44 - } + "range": [ + 34, + 44 + ] }, "consequent": { "type": "BlockStatement", @@ -84,30 +84,30 @@ Output: "name": "undefined", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 68 - } + "range": [ + 59, + 68 + ] }, "loc": null, - "range": { - "start": 52, - "end": 69 - } + "range": [ + 52, + 69 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 73 - } + "range": [ + 46, + 73 + ] }, "alternate": null, "loc": null, - "range": { - "start": 30, - "end": 73 - } + "range": [ + 30, + 73 + ] }, { "type": "ReturnStatement", @@ -118,59 +118,59 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 88 - } + "range": [ + 83, + 88 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 94 - } + "range": [ + 89, + 94 + ] }, "computed": false, "loc": null, - "range": { - "start": 83, - "end": 94 - } + "range": [ + 83, + 94 + ] }, "loc": null, - "range": { - "start": 76, - "end": 95 - } + "range": [ + 76, + 95 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 97 - } + "range": [ + 26, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 97 - }, + "range": [ + 0, + 97 + ], "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reverse-postorder.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reverse-postorder.js.snap index d8fb5eca7d..534c1eede1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reverse-postorder.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@reverse-postorder.js.snap @@ -44,10 +44,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -55,10 +55,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -75,24 +75,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 36 - } + "range": [ + 30, + 36 + ] }, { "type": "IfStatement", @@ -103,27 +103,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] }, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 53 - } + "range": [ + 43, + 53 + ] }, "consequent": { "type": "BlockStatement", @@ -137,27 +137,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 74 - } + "range": [ + 69, + 74 + ] }, "property": { "type": "Identifier", "name": "test", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 69, - "end": 79 - } + "range": [ + 69, + 79 + ] }, "cases": [ { @@ -166,10 +166,10 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "consequent": [ { @@ -185,10 +185,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "right": { "type": "MemberExpression", @@ -197,63 +197,63 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] }, "property": { "type": "Identifier", "name": "v0", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 119 - } + "range": [ + 117, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 111, - "end": 119 - } + "range": [ + 111, + 119 + ] }, "loc": null, - "range": { - "start": 107, - "end": 119 - } + "range": [ + 107, + 119 + ] }, "directive": null, "loc": null, - "range": { - "start": 107, - "end": 120 - } + "range": [ + 107, + 120 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 129, - "end": 135 - } + "range": [ + 129, + 135 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 143 - } + "range": [ + 97, + 143 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 143 - } + "range": [ + 89, + 143 + ] }, { "type": "SwitchCase", @@ -261,10 +261,10 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "consequent": [ { @@ -280,10 +280,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] }, "right": { "type": "MemberExpression", @@ -292,63 +292,63 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 177 - } + "range": [ + 172, + 177 + ] }, "property": { "type": "Identifier", "name": "v1", "typeAnnotation": null, "loc": null, - "range": { - "start": 178, - "end": 180 - } + "range": [ + 178, + 180 + ] }, "computed": false, "loc": null, - "range": { - "start": 172, - "end": 180 - } + "range": [ + 172, + 180 + ] }, "loc": null, - "range": { - "start": 168, - "end": 180 - } + "range": [ + 168, + 180 + ] }, "directive": null, "loc": null, - "range": { - "start": 168, - "end": 181 - } + "range": [ + 168, + 181 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 190, - "end": 196 - } + "range": [ + 190, + 196 + ] } ], "loc": null, - "range": { - "start": 158, - "end": 204 - } + "range": [ + 158, + 204 + ] } ], "loc": null, - "range": { - "start": 150, - "end": 204 - } + "range": [ + 150, + 204 + ] }, { "type": "SwitchCase", @@ -356,27 +356,27 @@ Output: "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 216, - "end": 217 - } + "range": [ + 216, + 217 + ] }, "consequent": [ { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 219, - "end": 228 - } + "range": [ + 219, + 228 + ] } ], "loc": null, - "range": { - "start": 211, - "end": 228 - } + "range": [ + 211, + 228 + ] }, { "type": "SwitchCase", @@ -395,10 +395,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 255 - } + "range": [ + 254, + 255 + ] }, "right": { "type": "MemberExpression", @@ -407,68 +407,68 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 258, - "end": 263 - } + "range": [ + 258, + 263 + ] }, "property": { "type": "Identifier", "name": "v2", "typeAnnotation": null, "loc": null, - "range": { - "start": 264, - "end": 266 - } + "range": [ + 264, + 266 + ] }, "computed": false, "loc": null, - "range": { - "start": 258, - "end": 266 - } + "range": [ + 258, + 266 + ] }, "loc": null, - "range": { - "start": 254, - "end": 266 - } + "range": [ + 254, + 266 + ] }, "directive": null, "loc": null, - "range": { - "start": 254, - "end": 267 - } + "range": [ + 254, + 267 + ] } ], "loc": null, - "range": { - "start": 244, - "end": 275 - } + "range": [ + 244, + 275 + ] } ], "loc": null, - "range": { - "start": 235, - "end": 275 - } + "range": [ + 235, + 275 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 281 - } + "range": [ + 61, + 281 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 285 - } + "range": [ + 55, + 285 + ] }, "alternate": { "type": "BlockStatement", @@ -482,27 +482,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 301, - "end": 306 - } + "range": [ + 301, + 306 + ] }, "property": { "type": "Identifier", "name": "cond2", "typeAnnotation": null, "loc": null, - "range": { - "start": 307, - "end": 312 - } + "range": [ + 307, + 312 + ] }, "computed": false, "loc": null, - "range": { - "start": 301, - "end": 312 - } + "range": [ + 301, + 312 + ] }, "consequent": { "type": "BlockStatement", @@ -517,10 +517,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 322, - "end": 323 - } + "range": [ + 322, + 323 + ] }, "right": { "type": "MemberExpression", @@ -529,47 +529,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 326, - "end": 331 - } + "range": [ + 326, + 331 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 332, - "end": 333 - } + "range": [ + 332, + 333 + ] }, "computed": false, "loc": null, - "range": { - "start": 326, - "end": 333 - } + "range": [ + 326, + 333 + ] }, "loc": null, - "range": { - "start": 322, - "end": 333 - } + "range": [ + 322, + 333 + ] }, "directive": null, "loc": null, - "range": { - "start": 322, - "end": 334 - } + "range": [ + 322, + 334 + ] } ], "loc": null, - "range": { - "start": 314, - "end": 340 - } + "range": [ + 314, + 340 + ] }, "alternate": { "type": "BlockStatement", @@ -584,10 +584,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 354, - "end": 355 - } + "range": [ + 354, + 355 + ] }, "right": { "type": "MemberExpression", @@ -596,66 +596,66 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 358, - "end": 363 - } + "range": [ + 358, + 363 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 364, - "end": 365 - } + "range": [ + 364, + 365 + ] }, "computed": false, "loc": null, - "range": { - "start": 358, - "end": 365 - } + "range": [ + 358, + 365 + ] }, "loc": null, - "range": { - "start": 354, - "end": 365 - } + "range": [ + 354, + 365 + ] }, "directive": null, "loc": null, - "range": { - "start": 354, - "end": 366 - } + "range": [ + 354, + 366 + ] } ], "loc": null, - "range": { - "start": 346, - "end": 372 - } + "range": [ + 346, + 372 + ] }, "loc": null, - "range": { - "start": 297, - "end": 372 - } + "range": [ + 297, + 372 + ] } ], "loc": null, - "range": { - "start": 291, - "end": 376 - } + "range": [ + 291, + 376 + ] }, "loc": null, - "range": { - "start": 39, - "end": 376 - } + "range": [ + 39, + 376 + ] }, { "type": "ExpressionStatement", @@ -664,43 +664,43 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 379, - "end": 380 - } + "range": [ + 379, + 380 + ] }, "directive": null, "loc": null, - "range": { - "start": 379, - "end": 381 - } + "range": [ + 379, + 381 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 383 - } + "range": [ + 26, + 383 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 383 - }, + "range": [ + 0, + 383 + ], "loc": null, - "range": { - "start": 0, - "end": 383 - } + "range": [ + 0, + 383 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 383 - } + "range": [ + 0, + 383 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@same-variable-as-dep-and-redeclare-maybe-frozen.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@same-variable-as-dep-and-redeclare-maybe-frozen.js.snap index e9517df3f3..d50522386e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@same-variable-as-dep-and-redeclare-maybe-frozen.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@same-variable-as-dep-and-redeclare-maybe-frozen.js.snap @@ -52,10 +52,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 89 - } + "range": [ + 86, + 89 + ] }, "params": [ { @@ -63,10 +63,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] } ], "body": { @@ -83,32 +83,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 161, - "end": 163 - } + "range": [ + 161, + 163 + ] }, "loc": null, - "range": { - "start": 157, - "end": 163 - } + "range": [ + 157, + 163 + ] } ], "loc": null, - "range": { - "start": 153, - "end": 164 - } + "range": [ + 153, + 164 + ] }, { "type": "ExpressionStatement", @@ -121,27 +121,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 167, - "end": 168 - } + "range": [ + 167, + 168 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 173 - } + "range": [ + 169, + 173 + ] }, "computed": false, "loc": null, - "range": { - "start": 167, - "end": 173 - } + "range": [ + 167, + 173 + ] }, "arguments": [ { @@ -151,41 +151,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 179 - } + "range": [ + 174, + 179 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 180, - "end": 181 - } + "range": [ + 180, + 181 + ] }, "computed": false, "loc": null, - "range": { - "start": 174, - "end": 181 - } + "range": [ + 174, + 181 + ] } ], "loc": null, - "range": { - "start": 167, - "end": 182 - } + "range": [ + 167, + 182 + ] }, "directive": null, "loc": null, - "range": { - "start": 167, - "end": 183 - } + "range": [ + 167, + 183 + ] }, { "type": "VariableDeclaration", @@ -198,10 +198,10 @@ Output: "name": "header", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 250 - } + "range": [ + 244, + 250 + ] }, "init": { "type": "ConditionalExpression", @@ -212,35 +212,35 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 253, - "end": 258 - } + "range": [ + 253, + 258 + ] }, "property": { "type": "Identifier", "name": "showHeader", "typeAnnotation": null, "loc": null, - "range": { - "start": 259, - "end": 269 - } + "range": [ + 259, + 269 + ] }, "computed": false, "loc": null, - "range": { - "start": 253, - "end": 269 - } + "range": [ + 253, + 269 + ] }, "alternate": { "type": "NullLiteral", "loc": null, - "range": { - "start": 289, - "end": 293 - } + "range": [ + 289, + 293 + ] }, "consequent": { "type": "JSXElement", @@ -250,18 +250,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 273, - "end": 276 - } + "range": [ + 273, + 276 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 272, - "end": 277 - } + "range": [ + 272, + 277 + ] }, "children": [ { @@ -271,16 +271,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 278, - "end": 279 - } + "range": [ + 278, + 279 + ] }, "loc": null, - "range": { - "start": 277, - "end": 280 - } + "range": [ + 277, + 280 + ] } ], "closingElement": { @@ -289,41 +289,41 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 282, - "end": 285 - } + "range": [ + 282, + 285 + ] }, "loc": null, - "range": { - "start": 280, - "end": 286 - } + "range": [ + 280, + 286 + ] }, "loc": null, - "range": { - "start": 272, - "end": 286 - } + "range": [ + 272, + 286 + ] }, "loc": null, - "range": { - "start": 253, - "end": 293 - } + "range": [ + 253, + 293 + ] }, "loc": null, - "range": { - "start": 244, - "end": 293 - } + "range": [ + 244, + 293 + ] } ], "loc": null, - "range": { - "start": 238, - "end": 294 - } + "range": [ + 238, + 294 + ] }, { "type": "VariableDeclaration", @@ -336,10 +336,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 383, - "end": 384 - } + "range": [ + 383, + 384 + ] }, "init": { "type": "ArrayExpression", @@ -349,30 +349,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 388, - "end": 389 - } + "range": [ + 388, + 389 + ] } ], "loc": null, - "range": { - "start": 387, - "end": 390 - } + "range": [ + 387, + 390 + ] }, "loc": null, - "range": { - "start": 383, - "end": 390 - } + "range": [ + 383, + 390 + ] } ], "loc": null, - "range": { - "start": 377, - "end": 391 - } + "range": [ + 377, + 391 + ] }, { "type": "ExpressionStatement", @@ -384,32 +384,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 424, - "end": 425 - } + "range": [ + 424, + 425 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 428, - "end": 430 - } + "range": [ + 428, + 430 + ] }, "loc": null, - "range": { - "start": 424, - "end": 430 - } + "range": [ + 424, + 430 + ] }, "directive": null, "loc": null, - "range": { - "start": 424, - "end": 431 - } + "range": [ + 424, + 431 + ] }, { "type": "ExpressionStatement", @@ -422,27 +422,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 450, - "end": 451 - } + "range": [ + 450, + 451 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 452, - "end": 456 - } + "range": [ + 452, + 456 + ] }, "computed": false, "loc": null, - "range": { - "start": 450, - "end": 456 - } + "range": [ + 450, + 456 + ] }, "arguments": [ { @@ -452,41 +452,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 457, - "end": 462 - } + "range": [ + 457, + 462 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 463, - "end": 464 - } + "range": [ + 463, + 464 + ] }, "computed": false, "loc": null, - "range": { - "start": 457, - "end": 464 - } + "range": [ + 457, + 464 + ] } ], "loc": null, - "range": { - "start": 450, - "end": 465 - } + "range": [ + 450, + 465 + ] }, "directive": null, "loc": null, - "range": { - "start": 450, - "end": 466 - } + "range": [ + 450, + 466 + ] }, { "type": "ExpressionStatement", @@ -499,27 +499,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 500, - "end": 501 - } + "range": [ + 500, + 501 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 502, - "end": 506 - } + "range": [ + 502, + 506 + ] }, "computed": false, "loc": null, - "range": { - "start": 500, - "end": 506 - } + "range": [ + 500, + 506 + ] }, "arguments": [ { @@ -529,41 +529,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 507, - "end": 512 - } + "range": [ + 507, + 512 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 513, - "end": 514 - } + "range": [ + 513, + 514 + ] }, "computed": false, "loc": null, - "range": { - "start": 507, - "end": 514 - } + "range": [ + 507, + 514 + ] } ], "loc": null, - "range": { - "start": 500, - "end": 515 - } + "range": [ + 500, + 515 + ] }, "directive": null, "loc": null, - "range": { - "start": 500, - "end": 516 - } + "range": [ + 500, + 516 + ] }, { "type": "VariableDeclaration", @@ -576,10 +576,10 @@ Output: "name": "content", "typeAnnotation": null, "loc": null, - "range": { - "start": 567, - "end": 574 - } + "range": [ + 567, + 574 + ] }, "init": { "type": "JSXElement", @@ -589,18 +589,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 584, - "end": 587 - } + "range": [ + 584, + 587 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 583, - "end": 588 - } + "range": [ + 583, + 588 + ] }, "children": [ { @@ -608,10 +608,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 588, - "end": 595 - } + "range": [ + 588, + 595 + ] }, { "type": "JSXExpressionContainer", @@ -620,26 +620,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 596, - "end": 597 - } + "range": [ + 596, + 597 + ] }, "loc": null, - "range": { - "start": 595, - "end": 598 - } + "range": [ + 595, + 598 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 598, - "end": 605 - } + "range": [ + 598, + 605 + ] }, { "type": "JSXExpressionContainer", @@ -648,26 +648,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 606, - "end": 607 - } + "range": [ + 606, + 607 + ] }, "loc": null, - "range": { - "start": 605, - "end": 608 - } + "range": [ + 605, + 608 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 608, - "end": 613 - } + "range": [ + 608, + 613 + ] } ], "closingElement": { @@ -676,35 +676,35 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 615, - "end": 618 - } + "range": [ + 615, + 618 + ] }, "loc": null, - "range": { - "start": 613, - "end": 619 - } + "range": [ + 613, + 619 + ] }, "loc": null, - "range": { - "start": 583, - "end": 619 - } + "range": [ + 583, + 619 + ] }, "loc": null, - "range": { - "start": 567, - "end": 623 - } + "range": [ + 567, + 623 + ] } ], "loc": null, - "range": { - "start": 561, - "end": 624 - } + "range": [ + 561, + 624 + ] }, { "type": "ReturnStatement", @@ -713,10 +713,10 @@ Output: "openingFragment": { "type": "JSXOpeningFragment", "loc": null, - "range": { - "start": 658, - "end": 660 - } + "range": [ + 658, + 660 + ] }, "children": [ { @@ -724,10 +724,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 660, - "end": 667 - } + "range": [ + 660, + 667 + ] }, { "type": "JSXExpressionContainer", @@ -736,26 +736,26 @@ Output: "name": "header", "typeAnnotation": null, "loc": null, - "range": { - "start": 668, - "end": 674 - } + "range": [ + 668, + 674 + ] }, "loc": null, - "range": { - "start": 667, - "end": 675 - } + "range": [ + 667, + 675 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 675, - "end": 682 - } + "range": [ + 675, + 682 + ] }, { "type": "JSXExpressionContainer", @@ -764,73 +764,73 @@ Output: "name": "content", "typeAnnotation": null, "loc": null, - "range": { - "start": 683, - "end": 690 - } + "range": [ + 683, + 690 + ] }, "loc": null, - "range": { - "start": 682, - "end": 691 - } + "range": [ + 682, + 691 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 691, - "end": 696 - } + "range": [ + 691, + 696 + ] } ], "closingFragment": { "type": "JSXClosingFragment", "loc": null, - "range": { - "start": 696, - "end": 699 - } + "range": [ + 696, + 699 + ] }, "loc": null, - "range": { - "start": 658, - "end": 699 - } + "range": [ + 658, + 699 + ] }, "loc": null, - "range": { - "start": 645, - "end": 704 - } + "range": [ + 645, + 704 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 706 - } + "range": [ + 97, + 706 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 77, - "end": 706 - }, + "range": [ + 77, + 706 + ], "loc": null, - "range": { - "start": 77, - "end": 706 - } + "range": [ + 77, + 706 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 77, - "end": 706 - } + "range": [ + 77, + 706 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@same-variable-as-dep-and-redeclare.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@same-variable-as-dep-and-redeclare.js.snap index 22e85a2f4c..8c6607377a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@same-variable-as-dep-and-redeclare.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@same-variable-as-dep-and-redeclare.js.snap @@ -52,10 +52,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 89 - } + "range": [ + 86, + 89 + ] }, "params": [ { @@ -63,10 +63,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] } ], "body": { @@ -83,32 +83,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 161, - "end": 163 - } + "range": [ + 161, + 163 + ] }, "loc": null, - "range": { - "start": 157, - "end": 163 - } + "range": [ + 157, + 163 + ] } ], "loc": null, - "range": { - "start": 153, - "end": 164 - } + "range": [ + 153, + 164 + ] }, { "type": "ExpressionStatement", @@ -121,27 +121,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 167, - "end": 168 - } + "range": [ + 167, + 168 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 173 - } + "range": [ + 169, + 173 + ] }, "computed": false, "loc": null, - "range": { - "start": 167, - "end": 173 - } + "range": [ + 167, + 173 + ] }, "arguments": [ { @@ -151,41 +151,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 179 - } + "range": [ + 174, + 179 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 180, - "end": 181 - } + "range": [ + 180, + 181 + ] }, "computed": false, "loc": null, - "range": { - "start": 174, - "end": 181 - } + "range": [ + 174, + 181 + ] } ], "loc": null, - "range": { - "start": 167, - "end": 182 - } + "range": [ + 167, + 182 + ] }, "directive": null, "loc": null, - "range": { - "start": 167, - "end": 183 - } + "range": [ + 167, + 183 + ] }, { "type": "VariableDeclaration", @@ -198,10 +198,10 @@ Output: "name": "header", "typeAnnotation": null, "loc": null, - "range": { - "start": 244, - "end": 250 - } + "range": [ + 244, + 250 + ] }, "init": { "type": "JSXElement", @@ -211,18 +211,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 254, - "end": 257 - } + "range": [ + 254, + 257 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 253, - "end": 258 - } + "range": [ + 253, + 258 + ] }, "children": [ { @@ -232,16 +232,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 259, - "end": 260 - } + "range": [ + 259, + 260 + ] }, "loc": null, - "range": { - "start": 258, - "end": 261 - } + "range": [ + 258, + 261 + ] } ], "closingElement": { @@ -250,35 +250,35 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 263, - "end": 266 - } + "range": [ + 263, + 266 + ] }, "loc": null, - "range": { - "start": 261, - "end": 267 - } + "range": [ + 261, + 267 + ] }, "loc": null, - "range": { - "start": 253, - "end": 267 - } + "range": [ + 253, + 267 + ] }, "loc": null, - "range": { - "start": 244, - "end": 267 - } + "range": [ + 244, + 267 + ] } ], "loc": null, - "range": { - "start": 238, - "end": 268 - } + "range": [ + 238, + 268 + ] }, { "type": "VariableDeclaration", @@ -291,10 +291,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 357, - "end": 358 - } + "range": [ + 357, + 358 + ] }, "init": { "type": "ArrayExpression", @@ -304,30 +304,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 362, - "end": 363 - } + "range": [ + 362, + 363 + ] } ], "loc": null, - "range": { - "start": 361, - "end": 364 - } + "range": [ + 361, + 364 + ] }, "loc": null, - "range": { - "start": 357, - "end": 364 - } + "range": [ + 357, + 364 + ] } ], "loc": null, - "range": { - "start": 351, - "end": 365 - } + "range": [ + 351, + 365 + ] }, { "type": "ExpressionStatement", @@ -339,32 +339,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 398, - "end": 399 - } + "range": [ + 398, + 399 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 402, - "end": 404 - } + "range": [ + 402, + 404 + ] }, "loc": null, - "range": { - "start": 398, - "end": 404 - } + "range": [ + 398, + 404 + ] }, "directive": null, "loc": null, - "range": { - "start": 398, - "end": 405 - } + "range": [ + 398, + 405 + ] }, { "type": "ExpressionStatement", @@ -377,27 +377,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 424, - "end": 425 - } + "range": [ + 424, + 425 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 426, - "end": 430 - } + "range": [ + 426, + 430 + ] }, "computed": false, "loc": null, - "range": { - "start": 424, - "end": 430 - } + "range": [ + 424, + 430 + ] }, "arguments": [ { @@ -407,41 +407,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 431, - "end": 436 - } + "range": [ + 431, + 436 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 437, - "end": 438 - } + "range": [ + 437, + 438 + ] }, "computed": false, "loc": null, - "range": { - "start": 431, - "end": 438 - } + "range": [ + 431, + 438 + ] } ], "loc": null, - "range": { - "start": 424, - "end": 439 - } + "range": [ + 424, + 439 + ] }, "directive": null, "loc": null, - "range": { - "start": 424, - "end": 440 - } + "range": [ + 424, + 440 + ] }, { "type": "ExpressionStatement", @@ -454,27 +454,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 474, - "end": 475 - } + "range": [ + 474, + 475 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 476, - "end": 480 - } + "range": [ + 476, + 480 + ] }, "computed": false, "loc": null, - "range": { - "start": 474, - "end": 480 - } + "range": [ + 474, + 480 + ] }, "arguments": [ { @@ -484,41 +484,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 481, - "end": 486 - } + "range": [ + 481, + 486 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 487, - "end": 488 - } + "range": [ + 487, + 488 + ] }, "computed": false, "loc": null, - "range": { - "start": 481, - "end": 488 - } + "range": [ + 481, + 488 + ] } ], "loc": null, - "range": { - "start": 474, - "end": 489 - } + "range": [ + 474, + 489 + ] }, "directive": null, "loc": null, - "range": { - "start": 474, - "end": 490 - } + "range": [ + 474, + 490 + ] }, { "type": "VariableDeclaration", @@ -531,10 +531,10 @@ Output: "name": "content", "typeAnnotation": null, "loc": null, - "range": { - "start": 541, - "end": 548 - } + "range": [ + 541, + 548 + ] }, "init": { "type": "JSXElement", @@ -544,18 +544,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 558, - "end": 561 - } + "range": [ + 558, + 561 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 557, - "end": 562 - } + "range": [ + 557, + 562 + ] }, "children": [ { @@ -563,10 +563,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 562, - "end": 569 - } + "range": [ + 562, + 569 + ] }, { "type": "JSXExpressionContainer", @@ -575,26 +575,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 570, - "end": 571 - } + "range": [ + 570, + 571 + ] }, "loc": null, - "range": { - "start": 569, - "end": 572 - } + "range": [ + 569, + 572 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 572, - "end": 579 - } + "range": [ + 572, + 579 + ] }, { "type": "JSXExpressionContainer", @@ -603,26 +603,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 580, - "end": 581 - } + "range": [ + 580, + 581 + ] }, "loc": null, - "range": { - "start": 579, - "end": 582 - } + "range": [ + 579, + 582 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 582, - "end": 587 - } + "range": [ + 582, + 587 + ] } ], "closingElement": { @@ -631,35 +631,35 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 589, - "end": 592 - } + "range": [ + 589, + 592 + ] }, "loc": null, - "range": { - "start": 587, - "end": 593 - } + "range": [ + 587, + 593 + ] }, "loc": null, - "range": { - "start": 557, - "end": 593 - } + "range": [ + 557, + 593 + ] }, "loc": null, - "range": { - "start": 541, - "end": 597 - } + "range": [ + 541, + 597 + ] } ], "loc": null, - "range": { - "start": 535, - "end": 598 - } + "range": [ + 535, + 598 + ] }, { "type": "ReturnStatement", @@ -668,10 +668,10 @@ Output: "openingFragment": { "type": "JSXOpeningFragment", "loc": null, - "range": { - "start": 632, - "end": 634 - } + "range": [ + 632, + 634 + ] }, "children": [ { @@ -679,10 +679,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 634, - "end": 641 - } + "range": [ + 634, + 641 + ] }, { "type": "JSXExpressionContainer", @@ -691,26 +691,26 @@ Output: "name": "header", "typeAnnotation": null, "loc": null, - "range": { - "start": 642, - "end": 648 - } + "range": [ + 642, + 648 + ] }, "loc": null, - "range": { - "start": 641, - "end": 649 - } + "range": [ + 641, + 649 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 649, - "end": 656 - } + "range": [ + 649, + 656 + ] }, { "type": "JSXExpressionContainer", @@ -719,73 +719,73 @@ Output: "name": "content", "typeAnnotation": null, "loc": null, - "range": { - "start": 657, - "end": 664 - } + "range": [ + 657, + 664 + ] }, "loc": null, - "range": { - "start": 656, - "end": 665 - } + "range": [ + 656, + 665 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 665, - "end": 670 - } + "range": [ + 665, + 670 + ] } ], "closingFragment": { "type": "JSXClosingFragment", "loc": null, - "range": { - "start": 670, - "end": 673 - } + "range": [ + 670, + 673 + ] }, "loc": null, - "range": { - "start": 632, - "end": 673 - } + "range": [ + 632, + 673 + ] }, "loc": null, - "range": { - "start": 619, - "end": 678 - } + "range": [ + 619, + 678 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 680 - } + "range": [ + 97, + 680 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 77, - "end": 680 - }, + "range": [ + 77, + 680 + ], "loc": null, - "range": { - "start": 77, - "end": 680 - } + "range": [ + 77, + 680 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 77, - "end": 680 - } + "range": [ + 77, + 680 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequence-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequence-expression.js.snap index a9a2d52ccc..b3044c6d82 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequence-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequence-expression.js.snap @@ -26,10 +26,10 @@ Output: "name": "sequence", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 17 - } + "range": [ + 9, + 17 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 18, - "end": 23 - } + "range": [ + 18, + 23 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "SequenceExpression", @@ -68,10 +68,10 @@ Output: { "type": "NullLiteral", "loc": null, - "range": { - "start": 38, - "end": 42 - } + "range": [ + 38, + 42 + ] }, { "type": "CallExpression", @@ -82,53 +82,53 @@ Output: "name": "Math", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 48 - } + "range": [ + 44, + 48 + ] }, "property": { "type": "Identifier", "name": "max", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 52 - } + "range": [ + 49, + 52 + ] }, "computed": false, "loc": null, - "range": { - "start": 44, - "end": 52 - } + "range": [ + 44, + 52 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 58 - } + "range": [ + 44, + 58 + ] }, { "type": "CallExpression", @@ -137,37 +137,37 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 63 - } + "range": [ + 60, + 63 + ] }, "arguments": [], "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 65 - } + "range": [ + 38, + 65 + ] }, "loc": null, - "range": { - "start": 33, - "end": 66 - } + "range": [ + 33, + 66 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 67 - } + "range": [ + 29, + 67 + ] }, { "type": "WhileStatement", @@ -181,33 +181,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "arguments": [], "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 85, - "end": 89 - } + "range": [ + 85, + 89 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 89 - } + "range": [ + 78, + 89 + ] }, "body": { "type": "BlockStatement", @@ -222,10 +222,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "right": { "type": "SequenceExpression", @@ -237,59 +237,59 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 106 - } + "range": [ + 103, + 106 + ] }, "arguments": [], "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] }, { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] } ], "loc": null, - "range": { - "start": 103, - "end": 111 - } + "range": [ + 103, + 111 + ] }, "loc": null, - "range": { - "start": 98, - "end": 112 - } + "range": [ + 98, + 112 + ] }, "directive": null, "loc": null, - "range": { - "start": 98, - "end": 113 - } + "range": [ + 98, + 113 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 117 - } + "range": [ + 92, + 117 + ] }, "loc": null, - "range": { - "start": 70, - "end": 117 - } + "range": [ + 70, + 117 + ] }, { "type": "ReturnStatement", @@ -298,36 +298,36 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "loc": null, - "range": { - "start": 120, - "end": 129 - } + "range": [ + 120, + 129 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 131 - } + "range": [ + 25, + 131 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 131 - }, + "range": [ + 0, + 131 + ], "loc": null, - "range": { - "start": 0, - "end": 131 - } + "range": [ + 0, + 131 + ] }, { "type": "FunctionDeclaration", @@ -336,39 +336,39 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 145 - } + "range": [ + 142, + 145 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 148, - "end": 150 - } + "range": [ + 148, + 150 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 133, - "end": 150 - }, + "range": [ + 133, + 150 + ], "loc": null, - "range": { - "start": 133, - "end": 150 - } + "range": [ + 133, + 150 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 150 - } + "range": [ + 0, + 150 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequentially-constant-progagatable-if-test-conditions.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequentially-constant-progagatable-if-test-conditions.js.snap index 06a182e8dd..f9210f9191 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequentially-constant-progagatable-if-test-conditions.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sequentially-constant-progagatable-if-test-conditions.js.snap @@ -51,10 +51,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -71,32 +71,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "loc": null, - "range": { - "start": 29, - "end": 34 - } + "range": [ + 29, + 34 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 35 - } + "range": [ + 25, + 35 + ] }, { "type": "VariableDeclaration", @@ -109,24 +109,24 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "init": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] }, { "type": "IfStatement", @@ -137,26 +137,26 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "loc": null, - "range": { - "start": 52, - "end": 59 - } + "range": [ + 52, + 59 + ] }, "consequent": { "type": "BlockStatement", @@ -171,39 +171,39 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "right": { "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 71, - "end": 75 - } + "range": [ + 71, + 75 + ] }, "loc": null, - "range": { - "start": 67, - "end": 75 - } + "range": [ + 67, + 75 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 76 - } + "range": [ + 67, + 76 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 80 - } + "range": [ + 61, + 80 + ] }, "alternate": { "type": "BlockStatement", @@ -218,45 +218,45 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "right": { "type": "BooleanLiteral", "value": false, "loc": null, - "range": { - "start": 96, - "end": 101 - } + "range": [ + 96, + 101 + ] }, "loc": null, - "range": { - "start": 92, - "end": 101 - } + "range": [ + 92, + 101 + ] }, "directive": null, "loc": null, - "range": { - "start": 92, - "end": 102 - } + "range": [ + 92, + 102 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 106 - } + "range": [ + 86, + 106 + ] }, "loc": null, - "range": { - "start": 48, - "end": 106 - } + "range": [ + 48, + 106 + ] }, { "type": "VariableDeclaration", @@ -269,24 +269,24 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "init": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] } ], "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] }, { "type": "IfStatement", @@ -295,10 +295,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 124 - } + "range": [ + 123, + 124 + ] }, "consequent": { "type": "BlockStatement", @@ -313,39 +313,39 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "right": { "type": "StringLiteral", "value": "hello", "loc": null, - "range": { - "start": 136, - "end": 143 - } + "range": [ + 136, + 143 + ] }, "loc": null, - "range": { - "start": 132, - "end": 143 - } + "range": [ + 132, + 143 + ] }, "directive": null, "loc": null, - "range": { - "start": 132, - "end": 144 - } + "range": [ + 132, + 144 + ] } ], "loc": null, - "range": { - "start": 126, - "end": 148 - } + "range": [ + 126, + 148 + ] }, "alternate": { "type": "BlockStatement", @@ -360,44 +360,44 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 161 - } + "range": [ + 160, + 161 + ] }, "right": { "type": "NullLiteral", "loc": null, - "range": { - "start": 164, - "end": 168 - } + "range": [ + 164, + 168 + ] }, "loc": null, - "range": { - "start": 160, - "end": 168 - } + "range": [ + 160, + 168 + ] }, "directive": null, "loc": null, - "range": { - "start": 160, - "end": 169 - } + "range": [ + 160, + 169 + ] } ], "loc": null, - "range": { - "start": 154, - "end": 173 - } + "range": [ + 154, + 173 + ] }, "loc": null, - "range": { - "start": 119, - "end": 173 - } + "range": [ + 119, + 173 + ] }, { "type": "VariableDeclaration", @@ -410,24 +410,24 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "init": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] } ], "loc": null, - "range": { - "start": 177, - "end": 183 - } + "range": [ + 177, + 183 + ] }, { "type": "IfStatement", @@ -438,26 +438,26 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 190, - "end": 191 - } + "range": [ + 190, + 191 + ] }, "operator": "===", "right": { "type": "StringLiteral", "value": "hello", "loc": null, - "range": { - "start": 196, - "end": 203 - } + "range": [ + 196, + 203 + ] }, "loc": null, - "range": { - "start": 190, - "end": 203 - } + "range": [ + 190, + 203 + ] }, "consequent": { "type": "BlockStatement", @@ -472,39 +472,39 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 212 - } + "range": [ + 211, + 212 + ] }, "right": { "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 215, - "end": 219 - } + "range": [ + 215, + 219 + ] }, "loc": null, - "range": { - "start": 211, - "end": 219 - } + "range": [ + 211, + 219 + ] }, "directive": null, "loc": null, - "range": { - "start": 211, - "end": 220 - } + "range": [ + 211, + 220 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 224 - } + "range": [ + 205, + 224 + ] }, "alternate": { "type": "BlockStatement", @@ -519,45 +519,45 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 236, - "end": 237 - } + "range": [ + 236, + 237 + ] }, "right": { "type": "NumericLiteral", "value": 42.001, "loc": null, - "range": { - "start": 240, - "end": 246 - } + "range": [ + 240, + 246 + ] }, "loc": null, - "range": { - "start": 236, - "end": 246 - } + "range": [ + 236, + 246 + ] }, "directive": null, "loc": null, - "range": { - "start": 236, - "end": 247 - } + "range": [ + 236, + 247 + ] } ], "loc": null, - "range": { - "start": 230, - "end": 251 - } + "range": [ + 230, + 251 + ] }, "loc": null, - "range": { - "start": 186, - "end": 251 - } + "range": [ + 186, + 251 + ] }, { "type": "VariableDeclaration", @@ -570,24 +570,24 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 259, - "end": 260 - } + "range": [ + 259, + 260 + ] }, "init": null, "loc": null, - "range": { - "start": 259, - "end": 260 - } + "range": [ + 259, + 260 + ] } ], "loc": null, - "range": { - "start": 255, - "end": 261 - } + "range": [ + 255, + 261 + ] }, { "type": "IfStatement", @@ -598,26 +598,26 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 268, - "end": 269 - } + "range": [ + 268, + 269 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 42.0, "loc": null, - "range": { - "start": 274, - "end": 278 - } + "range": [ + 274, + 278 + ] }, "loc": null, - "range": { - "start": 268, - "end": 278 - } + "range": [ + 268, + 278 + ] }, "consequent": { "type": "BlockStatement", @@ -632,39 +632,39 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 286, - "end": 287 - } + "range": [ + 286, + 287 + ] }, "right": { "type": "StringLiteral", "value": "ok", "loc": null, - "range": { - "start": 290, - "end": 294 - } + "range": [ + 290, + 294 + ] }, "loc": null, - "range": { - "start": 286, - "end": 294 - } + "range": [ + 286, + 294 + ] }, "directive": null, "loc": null, - "range": { - "start": 286, - "end": 295 - } + "range": [ + 286, + 295 + ] } ], "loc": null, - "range": { - "start": 280, - "end": 299 - } + "range": [ + 280, + 299 + ] }, "alternate": { "type": "BlockStatement", @@ -679,45 +679,45 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 311, - "end": 312 - } + "range": [ + 311, + 312 + ] }, "right": { "type": "StringLiteral", "value": "nope", "loc": null, - "range": { - "start": 315, - "end": 321 - } + "range": [ + 315, + 321 + ] }, "loc": null, - "range": { - "start": 311, - "end": 321 - } + "range": [ + 311, + 321 + ] }, "directive": null, "loc": null, - "range": { - "start": 311, - "end": 322 - } + "range": [ + 311, + 322 + ] } ], "loc": null, - "range": { - "start": 305, - "end": 326 - } + "range": [ + 305, + 326 + ] }, "loc": null, - "range": { - "start": 264, - "end": 326 - } + "range": [ + 264, + 326 + ] }, { "type": "ReturnStatement", @@ -726,42 +726,42 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 376, - "end": 377 - } + "range": [ + 376, + 377 + ] }, "loc": null, - "range": { - "start": 369, - "end": 378 - } + "range": [ + 369, + 378 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 380 - } + "range": [ + 21, + 380 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 380 - }, + "range": [ + 0, + 380 + ], "loc": null, - "range": { - "start": 0, - "end": 380 - } + "range": [ + 0, + 380 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 380 - } + "range": [ + 0, + 380 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-alias.js.snap index f6c24feb53..e0d063dbd8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-alias.js.snap @@ -28,33 +28,33 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 15 - } + "range": [ + 9, + 15 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 18, - "end": 20 - } + "range": [ + 18, + 20 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 20 - }, + "range": [ + 0, + 20 + ], "loc": null, - "range": { - "start": 0, - "end": 20 - } + "range": [ + 0, + 20 + ] }, { "type": "FunctionDeclaration", @@ -63,10 +63,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 33 - } + "range": [ + 30, + 33 + ] }, "params": [], "body": { @@ -83,32 +83,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 48, - "end": 50 - } + "range": [ + 48, + 50 + ] }, "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 51 - } + "range": [ + 40, + 51 + ] }, { "type": "VariableDeclaration", @@ -121,32 +121,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 59 - } + "range": [ + 58, + 59 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 62, - "end": 64 - } + "range": [ + 62, + 64 + ] }, "loc": null, - "range": { - "start": 58, - "end": 64 - } + "range": [ + 58, + 64 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 65 - } + "range": [ + 54, + 65 + ] }, { "type": "VariableDeclaration", @@ -159,32 +159,32 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 76, - "end": 78 - } + "range": [ + 76, + 78 + ] }, "loc": null, - "range": { - "start": 72, - "end": 78 - } + "range": [ + 72, + 78 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 79 - } + "range": [ + 68, + 79 + ] }, { "type": "ExpressionStatement", @@ -196,33 +196,33 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] }, "directive": null, "loc": null, - "range": { - "start": 82, - "end": 88 - } + "range": [ + 82, + 88 + ] }, { "type": "ExpressionStatement", @@ -234,33 +234,33 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "loc": null, - "range": { - "start": 91, - "end": 96 - } + "range": [ + 91, + 96 + ] }, "directive": null, "loc": null, - "range": { - "start": 91, - "end": 97 - } + "range": [ + 91, + 97 + ] }, { "type": "ExpressionStatement", @@ -272,33 +272,33 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "right": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "directive": null, "loc": null, - "range": { - "start": 100, - "end": 106 - } + "range": [ + 100, + 106 + ] }, { "type": "ExpressionStatement", @@ -309,10 +309,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 115 - } + "range": [ + 109, + 115 + ] }, "arguments": [ { @@ -320,34 +320,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] } ], "loc": null, - "range": { - "start": 109, - "end": 121 - } + "range": [ + 109, + 121 + ] }, "directive": null, "loc": null, - "range": { - "start": 109, - "end": 122 - } + "range": [ + 109, + 122 + ] }, { "type": "ReturnStatement", @@ -356,42 +356,42 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "loc": null, - "range": { - "start": 125, - "end": 134 - } + "range": [ + 125, + 134 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 136 - } + "range": [ + 36, + 136 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 21, - "end": 136 - }, + "range": [ + 21, + 136 + ], "loc": null, - "range": { - "start": 21, - "end": 136 - } + "range": [ + 21, + 136 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-function-1.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-function-1.js.snap index f997c16ebc..e6df6f6710 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-function-1.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-function-1.js.snap @@ -23,10 +23,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -43,10 +43,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "FunctionExpression", @@ -57,10 +57,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] } ], "body": { @@ -77,74 +77,74 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 57 - } + "range": [ + 54, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] }, "arguments": [], "loc": null, - "range": { - "start": 52, - "end": 59 - } + "range": [ + 52, + 59 + ] }, "directive": null, "loc": null, - "range": { - "start": 52, - "end": 60 - } + "range": [ + 52, + 60 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 64 - } + "range": [ + 46, + 64 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 33, - "end": 64 - }, + "range": [ + 33, + 64 + ], "loc": null, - "range": { - "start": 33, - "end": 64 - } + "range": [ + 33, + 64 + ] }, "loc": null, - "range": { - "start": 29, - "end": 64 - } + "range": [ + 29, + 64 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 65 - } + "range": [ + 25, + 65 + ] }, { "type": "ReturnStatement", @@ -153,42 +153,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "loc": null, - "range": { - "start": 68, - "end": 77 - } + "range": [ + 68, + 77 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 79 - } + "range": [ + 21, + 79 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 79 - }, + "range": [ + 0, + 79 + ], "loc": null, - "range": { - "start": 0, - "end": 79 - } + "range": [ + 0, + 79 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 79 - } + "range": [ + 0, + 79 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-scope.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-scope.js.snap index 7115de1cad..b7ce4c3960 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-scope.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple-scope.js.snap @@ -21,10 +21,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "init": { "type": "ArrayExpression", @@ -67,47 +67,47 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "computed": false, "loc": null, - "range": { - "start": 31, - "end": 34 - } + "range": [ + 31, + 34 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] }, "loc": null, - "range": { - "start": 26, - "end": 35 - } + "range": [ + 26, + 35 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 36 - } + "range": [ + 20, + 36 + ] }, { "type": "ReturnStatement", @@ -116,42 +116,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "loc": null, - "range": { - "start": 39, - "end": 48 - } + "range": [ + 39, + 48 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 50 - } + "range": [ + 16, + 50 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 50 - }, + "range": [ + 0, + 50 + ], "loc": null, - "range": { - "start": 0, - "end": 50 - } + "range": [ + 0, + 50 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 50 - } + "range": [ + 0, + 50 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple.js.snap index 41104132a9..95147836c4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@simple.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 27 - } + "range": [ + 24, + 27 + ] }, "params": [ { @@ -36,20 +36,20 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] } ], "body": { @@ -62,10 +62,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "consequent": { "type": "BlockStatement", @@ -79,57 +79,57 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 58, - "end": 61 - } + "range": [ + 58, + 61 + ] }, "arguments": [ { "type": "BooleanLiteral", "value": false, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 71 - } + "range": [ + 58, + 71 + ] }, "loc": null, - "range": { - "start": 51, - "end": 72 - } + "range": [ + 51, + 72 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 76 - } + "range": [ + 45, + 76 + ] }, "alternate": null, "loc": null, - "range": { - "start": 38, - "end": 76 - } + "range": [ + 38, + 76 + ] }, { "type": "ReturnStatement", @@ -143,71 +143,71 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "operator": "*", "right": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 91, - "end": 93 - } + "range": [ + 91, + 93 + ] }, "loc": null, - "range": { - "start": 87, - "end": 93 - } + "range": [ + 87, + 93 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 94 - } + "range": [ + 86, + 94 + ] }, "loc": null, - "range": { - "start": 79, - "end": 95 - } + "range": [ + 79, + 95 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 97 - } + "range": [ + 34, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 15, - "end": 97 - }, + "range": [ + 15, + 97 + ], "loc": null, - "range": { - "start": 15, - "end": 97 - } + "range": [ + 15, + 97 + ] }, "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sketchy-code-exhaustive-deps.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sketchy-code-exhaustive-deps.js.snap index e7a8a15b47..103b3e431c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sketchy-code-exhaustive-deps.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sketchy-code-exhaustive-deps.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -48,32 +48,32 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 35 - } + "range": [ + 31, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 31, - "end": 40 - } + "range": [ + 31, + 40 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 41 - } + "range": [ + 25, + 41 + ] }, { "type": "VariableDeclaration", @@ -86,10 +86,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 53 - } + "range": [ + 50, + 53 + ] }, "init": { "type": "CallExpression", @@ -98,10 +98,10 @@ Output: "name": "useCallback", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 67 - } + "range": [ + 56, + 67 + ] }, "arguments": [ { @@ -122,101 +122,101 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 91 - } + "range": [ + 87, + 91 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 96 - } + "range": [ + 92, + 96 + ] }, "computed": false, "loc": null, - "range": { - "start": 87, - "end": 96 - } + "range": [ + 87, + 96 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] } ], "loc": null, - "range": { - "start": 87, - "end": 99 - } + "range": [ + 87, + 99 + ] }, "directive": null, "loc": null, - "range": { - "start": 87, - "end": 100 - } + "range": [ + 87, + 100 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 106 - } + "range": [ + 79, + 106 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 73, - "end": 106 - }, + "range": [ + 73, + 106 + ], "expression": false, "loc": null, - "range": { - "start": 73, - "end": 106 - } + "range": [ + 73, + 106 + ] }, { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 168, - "end": 170 - } + "range": [ + 168, + 170 + ] } ], "loc": null, - "range": { - "start": 56, - "end": 174 - } + "range": [ + 56, + 174 + ] }, "loc": null, - "range": { - "start": 50, - "end": 174 - } + "range": [ + 50, + 174 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 175 - } + "range": [ + 44, + 175 + ] }, { "type": "ReturnStatement", @@ -228,10 +228,10 @@ Output: "type": "JSXIdentifier", "name": "Button", "loc": null, - "range": { - "start": 187, - "end": 193 - } + "range": [ + 187, + 193 + ] }, "attributes": [ { @@ -240,10 +240,10 @@ Output: "type": "JSXIdentifier", "name": "foo", "loc": null, - "range": { - "start": 194, - "end": 197 - } + "range": [ + 194, + 197 + ] }, "value": { "type": "JSXExpressionContainer", @@ -252,70 +252,70 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 202 - } + "range": [ + 199, + 202 + ] }, "loc": null, - "range": { - "start": 198, - "end": 203 - } + "range": [ + 198, + 203 + ] }, "loc": null, - "range": { - "start": 194, - "end": 203 - } + "range": [ + 194, + 203 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 186, - "end": 206 - } + "range": [ + 186, + 206 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 186, - "end": 206 - } + "range": [ + 186, + 206 + ] }, "loc": null, - "range": { - "start": 179, - "end": 207 - } + "range": [ + 179, + 207 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 209 - } + "range": [ + 21, + 209 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 209 - }, + "range": [ + 0, + 209 + ], "loc": null, - "range": { - "start": 0, - "end": 209 - } + "range": [ + 0, + 209 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 209 - } + "range": [ + 0, + 209 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sketchy-code-rules-of-hooks.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sketchy-code-rules-of-hooks.js.snap index e5cc22b9ed..f5f9adddc6 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sketchy-code-rules-of-hooks.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@sketchy-code-rules-of-hooks.js.snap @@ -23,10 +23,10 @@ Output: "name": "lowercasecomponent", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 75 - } + "range": [ + 57, + 75 + ] }, "params": [], "body": { @@ -43,32 +43,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 92, - "end": 94 - } + "range": [ + 92, + 94 + ] }, "loc": null, - "range": { - "start": 88, - "end": 94 - } + "range": [ + 88, + 94 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 95 - } + "range": [ + 82, + 95 + ] }, { "type": "ReturnStatement", @@ -80,18 +80,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 106, - "end": 109 - } + "range": [ + 106, + 109 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 105, - "end": 110 - } + "range": [ + 105, + 110 + ] }, "children": [ { @@ -101,16 +101,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "loc": null, - "range": { - "start": 110, - "end": 113 - } + "range": [ + 110, + 113 + ] } ], "closingElement": { @@ -119,54 +119,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 115, - "end": 118 - } + "range": [ + 115, + 118 + ] }, "loc": null, - "range": { - "start": 113, - "end": 119 - } + "range": [ + 113, + 119 + ] }, "loc": null, - "range": { - "start": 105, - "end": 119 - } + "range": [ + 105, + 119 + ] }, "loc": null, - "range": { - "start": 98, - "end": 120 - } + "range": [ + 98, + 120 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 122 - } + "range": [ + 78, + 122 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 122 - }, + "range": [ + 48, + 122 + ], "loc": null, - "range": { - "start": 48, - "end": 122 - } + "range": [ + 48, + 122 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 48, - "end": 122 - } + "range": [ + 48, + 122 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-arrayexpression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-arrayexpression.js.snap index 91373157f1..65df9b1c2c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-arrayexpression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-arrayexpression.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,32 +54,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 42 - } + "range": [ + 30, + 42 + ] }, { "type": "VariableDeclaration", @@ -92,32 +92,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 57 - } + "range": [ + 45, + 57 + ] }, { "type": "VariableDeclaration", @@ -130,10 +130,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "init": { "type": "ArrayExpression", @@ -143,40 +143,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 76 - } + "range": [ + 70, + 76 + ] }, "loc": null, - "range": { - "start": 66, - "end": 76 - } + "range": [ + 66, + 76 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 77 - } + "range": [ + 60, + 77 + ] }, { "type": "ReturnStatement", @@ -185,42 +185,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "loc": null, - "range": { - "start": 80, - "end": 89 - } + "range": [ + 80, + 89 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 91 - } + "range": [ + 26, + 91 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 91 - }, + "range": [ + 0, + 91 + ], "loc": null, - "range": { - "start": 0, - "end": 91 - } + "range": [ + 0, + 91 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 91 - } + "range": [ + 0, + 91 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-call-jsx-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-call-jsx-2.js.snap index fd45c71f87..306097f20a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-call-jsx-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-call-jsx-2.js.snap @@ -30,33 +30,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 45 - } + "range": [ + 42, + 45 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 48, - "end": 50 - } + "range": [ + 48, + 50 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 33, - "end": 50 - }, + "range": [ + 33, + 50 + ], "loc": null, - "range": { - "start": 33, - "end": 50 - } + "range": [ + 33, + 50 + ] }, { "type": "FunctionDeclaration", @@ -65,10 +65,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 70 - } + "range": [ + 61, + 70 + ] }, "params": [ { @@ -76,10 +76,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 76 - } + "range": [ + 71, + 76 + ] } ], "body": { @@ -96,32 +96,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 92, - "end": 94 - } + "range": [ + 92, + 94 + ] }, "loc": null, - "range": { - "start": 88, - "end": 94 - } + "range": [ + 88, + 94 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 95 - } + "range": [ + 82, + 95 + ] }, { "type": "VariableDeclaration", @@ -134,32 +134,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 108, - "end": 110 - } + "range": [ + 108, + 110 + ] }, "loc": null, - "range": { - "start": 104, - "end": 110 - } + "range": [ + 104, + 110 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 111 - } + "range": [ + 98, + 111 + ] }, { "type": "ExpressionStatement", @@ -170,10 +170,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 117 - } + "range": [ + 114, + 117 + ] }, "arguments": [ { @@ -181,34 +181,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] } ], "loc": null, - "range": { - "start": 114, - "end": 123 - } + "range": [ + 114, + 123 + ] }, "directive": null, "loc": null, - "range": { - "start": 114, - "end": 124 - } + "range": [ + 114, + 124 + ] }, { "type": "IfStatement", @@ -219,17 +219,17 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 134 - } + "range": [ + 131, + 134 + ] }, "arguments": [], "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, "consequent": { "type": "BlockStatement", @@ -245,10 +245,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 149 - } + "range": [ + 148, + 149 + ] }, "init": { "type": "JSXElement", @@ -258,10 +258,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 153, - "end": 156 - } + "range": [ + 153, + 156 + ] }, "attributes": [ { @@ -270,10 +270,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "value": { "type": "JSXExpressionContainer", @@ -282,65 +282,65 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 161 - } + "range": [ + 160, + 161 + ] }, "loc": null, - "range": { - "start": 159, - "end": 162 - } + "range": [ + 159, + 162 + ] }, "loc": null, - "range": { - "start": 157, - "end": 162 - } + "range": [ + 157, + 162 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 152, - "end": 165 - } + "range": [ + 152, + 165 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 152, - "end": 165 - } + "range": [ + 152, + 165 + ] }, "loc": null, - "range": { - "start": 148, - "end": 165 - } + "range": [ + 148, + 165 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 166 - } + "range": [ + 144, + 166 + ] } ], "loc": null, - "range": { - "start": 138, - "end": 170 - } + "range": [ + 138, + 170 + ] }, "alternate": null, "loc": null, - "range": { - "start": 127, - "end": 170 - } + "range": [ + 127, + 170 + ] }, { "type": "ExpressionStatement", @@ -351,10 +351,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 176 - } + "range": [ + 173, + 176 + ] }, "arguments": [ { @@ -362,34 +362,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 177, - "end": 178 - } + "range": [ + 177, + 178 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 180, - "end": 181 - } + "range": [ + 180, + 181 + ] } ], "loc": null, - "range": { - "start": 173, - "end": 182 - } + "range": [ + 173, + 182 + ] }, "directive": null, "loc": null, - "range": { - "start": 173, - "end": 183 - } + "range": [ + 173, + 183 + ] }, { "type": "ReturnStatement", @@ -401,10 +401,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 194, - "end": 197 - } + "range": [ + 194, + 197 + ] }, "attributes": [ { @@ -413,10 +413,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 198, - "end": 199 - } + "range": [ + 198, + 199 + ] }, "value": { "type": "JSXExpressionContainer", @@ -425,22 +425,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] }, "loc": null, - "range": { - "start": 200, - "end": 203 - } + "range": [ + 200, + 203 + ] }, "loc": null, - "range": { - "start": 198, - "end": 203 - } + "range": [ + 198, + 203 + ] }, { "type": "JSXAttribute", @@ -448,10 +448,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 204, - "end": 205 - } + "range": [ + 204, + 205 + ] }, "value": { "type": "JSXExpressionContainer", @@ -460,70 +460,70 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 208 - } + "range": [ + 207, + 208 + ] }, "loc": null, - "range": { - "start": 206, - "end": 209 - } + "range": [ + 206, + 209 + ] }, "loc": null, - "range": { - "start": 204, - "end": 209 - } + "range": [ + 204, + 209 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 193, - "end": 212 - } + "range": [ + 193, + 212 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 193, - "end": 212 - } + "range": [ + 193, + 212 + ] }, "loc": null, - "range": { - "start": 186, - "end": 213 - } + "range": [ + 186, + 213 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 215 - } + "range": [ + 78, + 215 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 52, - "end": 215 - }, + "range": [ + 52, + 215 + ], "loc": null, - "range": { - "start": 52, - "end": 215 - } + "range": [ + 52, + 215 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 33, - "end": 215 - } + "range": [ + 33, + 215 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-call-jsx.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-call-jsx.js.snap index 25374c8e17..7f415d91de 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-call-jsx.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-call-jsx.js.snap @@ -27,33 +27,33 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 15, - "end": 17 - } + "range": [ + 15, + 17 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 17 - }, + "range": [ + 0, + 17 + ], "loc": null, - "range": { - "start": 0, - "end": 17 - } + "range": [ + 0, + 17 + ] }, { "type": "FunctionDeclaration", @@ -62,10 +62,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 37 - } + "range": [ + 28, + 37 + ] }, "params": [ { @@ -73,10 +73,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "body": { @@ -93,32 +93,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 59, - "end": 61 - } + "range": [ + 59, + 61 + ] }, "loc": null, - "range": { - "start": 55, - "end": 61 - } + "range": [ + 55, + 61 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 62 - } + "range": [ + 49, + 62 + ] }, { "type": "VariableDeclaration", @@ -131,32 +131,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 75, - "end": 77 - } + "range": [ + 75, + 77 + ] }, "loc": null, - "range": { - "start": 71, - "end": 77 - } + "range": [ + 71, + 77 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 78 - } + "range": [ + 65, + 78 + ] }, { "type": "ExpressionStatement", @@ -167,10 +167,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "arguments": [ { @@ -178,34 +178,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 90 - } + "range": [ + 81, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 91 - } + "range": [ + 81, + 91 + ] }, { "type": "VariableDeclaration", @@ -218,10 +218,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "init": { "type": "JSXElement", @@ -231,10 +231,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 103, - "end": 106 - } + "range": [ + 103, + 106 + ] }, "attributes": [ { @@ -243,10 +243,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "value": { "type": "JSXExpressionContainer", @@ -255,51 +255,51 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "loc": null, - "range": { - "start": 109, - "end": 112 - } + "range": [ + 109, + 112 + ] }, "loc": null, - "range": { - "start": 107, - "end": 112 - } + "range": [ + 107, + 112 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 102, - "end": 115 - } + "range": [ + 102, + 115 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 102, - "end": 115 - } + "range": [ + 102, + 115 + ] }, "loc": null, - "range": { - "start": 98, - "end": 115 - } + "range": [ + 98, + 115 + ] } ], "loc": null, - "range": { - "start": 94, - "end": 116 - } + "range": [ + 94, + 116 + ] }, { "type": "ExpressionStatement", @@ -310,10 +310,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 122 - } + "range": [ + 119, + 122 + ] }, "arguments": [ { @@ -321,34 +321,34 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 124 - } + "range": [ + 123, + 124 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] } ], "loc": null, - "range": { - "start": 119, - "end": 128 - } + "range": [ + 119, + 128 + ] }, "directive": null, "loc": null, - "range": { - "start": 119, - "end": 129 - } + "range": [ + 119, + 129 + ] }, { "type": "ReturnStatement", @@ -360,10 +360,10 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 140, - "end": 143 - } + "range": [ + 140, + 143 + ] }, "attributes": [ { @@ -372,10 +372,10 @@ Output: "type": "JSXIdentifier", "name": "a", "loc": null, - "range": { - "start": 144, - "end": 145 - } + "range": [ + 144, + 145 + ] }, "value": { "type": "JSXExpressionContainer", @@ -384,22 +384,22 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "loc": null, - "range": { - "start": 146, - "end": 149 - } + "range": [ + 146, + 149 + ] }, "loc": null, - "range": { - "start": 144, - "end": 149 - } + "range": [ + 144, + 149 + ] }, { "type": "JSXAttribute", @@ -407,10 +407,10 @@ Output: "type": "JSXIdentifier", "name": "b", "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "value": { "type": "JSXExpressionContainer", @@ -419,70 +419,70 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 154 - } + "range": [ + 153, + 154 + ] }, "loc": null, - "range": { - "start": 152, - "end": 155 - } + "range": [ + 152, + 155 + ] }, "loc": null, - "range": { - "start": 150, - "end": 155 - } + "range": [ + 150, + 155 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 139, - "end": 158 - } + "range": [ + 139, + 158 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 139, - "end": 158 - } + "range": [ + 139, + 158 + ] }, "loc": null, - "range": { - "start": 132, - "end": 159 - } + "range": [ + 132, + 159 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 161 - } + "range": [ + 45, + 161 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 19, - "end": 161 - }, + "range": [ + 19, + 161 + ], "loc": null, - "range": { - "start": 19, - "end": 161 - } + "range": [ + 19, + 161 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 161 - } + "range": [ + 0, + 161 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-cascading-eliminated-phis.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-cascading-eliminated-phis.js.snap index a4038757a6..d34fdb9fb4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-cascading-eliminated-phis.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-cascading-eliminated-phis.js.snap @@ -32,10 +32,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -43,10 +43,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -63,32 +63,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "VariableDeclaration", @@ -101,32 +101,32 @@ Output: "name": "values", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 55 - } + "range": [ + 49, + 55 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 58, - "end": 60 - } + "range": [ + 58, + 60 + ] }, "loc": null, - "range": { - "start": 49, - "end": 60 - } + "range": [ + 49, + 60 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 61 - } + "range": [ + 43, + 61 + ] }, { "type": "VariableDeclaration", @@ -139,10 +139,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "init": { "type": "LogicalExpression", @@ -154,27 +154,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "computed": false, "loc": null, - "range": { - "start": 74, - "end": 81 - } + "range": [ + 74, + 81 + ] }, "right": { "type": "MemberExpression", @@ -183,46 +183,46 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 90 - } + "range": [ + 85, + 90 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 85, - "end": 92 - } + "range": [ + 85, + 92 + ] }, "loc": null, - "range": { - "start": 74, - "end": 92 - } + "range": [ + 74, + 92 + ] }, "loc": null, - "range": { - "start": 70, - "end": 92 - } + "range": [ + 70, + 92 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 93 - } + "range": [ + 64, + 93 + ] }, { "type": "ExpressionStatement", @@ -235,27 +235,27 @@ Output: "name": "values", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 102 - } + "range": [ + 96, + 102 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 107 - } + "range": [ + 103, + 107 + ] }, "computed": false, "loc": null, - "range": { - "start": 96, - "end": 107 - } + "range": [ + 96, + 107 + ] }, "arguments": [ { @@ -263,24 +263,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 110 - } + "range": [ + 96, + 110 + ] }, "directive": null, "loc": null, - "range": { - "start": 96, - "end": 111 - } + "range": [ + 96, + 111 + ] }, { "type": "IfStatement", @@ -291,27 +291,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 123 - } + "range": [ + 118, + 123 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "computed": false, "loc": null, - "range": { - "start": 118, - "end": 125 - } + "range": [ + 118, + 125 + ] }, "consequent": { "type": "BlockStatement", @@ -326,46 +326,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "loc": null, - "range": { - "start": 133, - "end": 138 - } + "range": [ + 133, + 138 + ] }, "directive": null, "loc": null, - "range": { - "start": 133, - "end": 139 - } + "range": [ + 133, + 139 + ] } ], "loc": null, - "range": { - "start": 127, - "end": 143 - } + "range": [ + 127, + 143 + ] }, "alternate": null, "loc": null, - "range": { - "start": 114, - "end": 143 - } + "range": [ + 114, + 143 + ] }, { "type": "ExpressionStatement", @@ -378,27 +378,27 @@ Output: "name": "values", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 152 - } + "range": [ + 146, + 152 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 157 - } + "range": [ + 153, + 157 + ] }, "computed": false, "loc": null, - "range": { - "start": 146, - "end": 157 - } + "range": [ + 146, + 157 + ] }, "arguments": [ { @@ -406,24 +406,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 158, - "end": 159 - } + "range": [ + 158, + 159 + ] } ], "loc": null, - "range": { - "start": 146, - "end": 160 - } + "range": [ + 146, + 160 + ] }, "directive": null, "loc": null, - "range": { - "start": 146, - "end": 161 - } + "range": [ + 146, + 161 + ] }, { "type": "IfStatement", @@ -434,27 +434,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 173 - } + "range": [ + 168, + 173 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 175 - } + "range": [ + 168, + 175 + ] }, "consequent": { "type": "BlockStatement", @@ -469,46 +469,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 187, - "end": 188 - } + "range": [ + 187, + 188 + ] }, "loc": null, - "range": { - "start": 183, - "end": 188 - } + "range": [ + 183, + 188 + ] }, "directive": null, "loc": null, - "range": { - "start": 183, - "end": 189 - } + "range": [ + 183, + 189 + ] } ], "loc": null, - "range": { - "start": 177, - "end": 193 - } + "range": [ + 177, + 193 + ] }, "alternate": null, "loc": null, - "range": { - "start": 164, - "end": 193 - } + "range": [ + 164, + 193 + ] }, { "type": "ExpressionStatement", @@ -521,27 +521,27 @@ Output: "name": "values", "typeAnnotation": null, "loc": null, - "range": { - "start": 196, - "end": 202 - } + "range": [ + 196, + 202 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 203, - "end": 207 - } + "range": [ + 203, + 207 + ] }, "computed": false, "loc": null, - "range": { - "start": 196, - "end": 207 - } + "range": [ + 196, + 207 + ] }, "arguments": [ { @@ -549,24 +549,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 208, - "end": 209 - } + "range": [ + 208, + 209 + ] } ], "loc": null, - "range": { - "start": 196, - "end": 210 - } + "range": [ + 196, + 210 + ] }, "directive": null, "loc": null, - "range": { - "start": 196, - "end": 211 - } + "range": [ + 196, + 211 + ] }, { "type": "ReturnStatement", @@ -575,42 +575,42 @@ Output: "name": "values", "typeAnnotation": null, "loc": null, - "range": { - "start": 221, - "end": 227 - } + "range": [ + 221, + 227 + ] }, "loc": null, - "range": { - "start": 214, - "end": 228 - } + "range": [ + 214, + 228 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 230 - } + "range": [ + 26, + 230 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 230 - }, + "range": [ + 0, + 230 + ], "loc": null, - "range": { - "start": 0, - "end": 230 - } + "range": [ + 0, + 230 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 230 - } + "range": [ + 0, + 230 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-complex-multiple-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-complex-multiple-if.js.snap index 3b65fa41d2..9a957b56c3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-complex-multiple-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-complex-multiple-if.js.snap @@ -29,10 +29,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -49,32 +49,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "VariableDeclaration", @@ -87,32 +87,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 42 - } + "range": [ + 32, + 42 + ] }, { "type": "IfStatement", @@ -123,26 +123,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "loc": null, - "range": { - "start": 49, - "end": 56 - } + "range": [ + 49, + 56 + ] }, "consequent": { "type": "BlockStatement", @@ -157,46 +157,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] }, "directive": null, "loc": null, - "range": { - "start": 64, - "end": 70 - } + "range": [ + 64, + 70 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 74 - } + "range": [ + 58, + 74 + ] }, "alternate": null, "loc": null, - "range": { - "start": 45, - "end": 74 - } + "range": [ + 45, + 74 + ] }, { "type": "IfStatement", @@ -207,26 +207,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "loc": null, - "range": { - "start": 82, - "end": 89 - } + "range": [ + 82, + 89 + ] }, "consequent": { "type": "BlockStatement", @@ -241,46 +241,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "right": { "type": "NumericLiteral", "value": 5.0, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "loc": null, - "range": { - "start": 97, - "end": 102 - } + "range": [ + 97, + 102 + ] }, "directive": null, "loc": null, - "range": { - "start": 97, - "end": 103 - } + "range": [ + 97, + 103 + ] } ], "loc": null, - "range": { - "start": 91, - "end": 107 - } + "range": [ + 91, + 107 + ] }, "alternate": null, "loc": null, - "range": { - "start": 78, - "end": 107 - } + "range": [ + 78, + 107 + ] }, { "type": "ExpressionStatement", @@ -292,59 +292,59 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "loc": null, - "range": { - "start": 110, - "end": 115 - } + "range": [ + 110, + 115 + ] }, "directive": null, "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 118 - } + "range": [ + 15, + 118 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 118 - }, + "range": [ + 0, + 118 + ], "loc": null, - "range": { - "start": 0, - "end": 118 - } + "range": [ + 0, + 118 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 118 - } + "range": [ + 0, + 118 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-complex-single-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-complex-single-if.js.snap index d08fdd33e3..c5e97ae9bf 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-complex-single-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-complex-single-if.js.snap @@ -26,10 +26,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -46,32 +46,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "VariableDeclaration", @@ -84,32 +84,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 42 - } + "range": [ + 32, + 42 + ] }, { "type": "IfStatement", @@ -120,26 +120,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "loc": null, - "range": { - "start": 49, - "end": 56 - } + "range": [ + 49, + 56 + ] }, "consequent": { "type": "BlockStatement", @@ -154,46 +154,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] }, "directive": null, "loc": null, - "range": { - "start": 64, - "end": 70 - } + "range": [ + 64, + 70 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 74 - } + "range": [ + 58, + 74 + ] }, "alternate": null, "loc": null, - "range": { - "start": 45, - "end": 74 - } + "range": [ + 45, + 74 + ] }, { "type": "ExpressionStatement", @@ -205,59 +205,59 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "loc": null, - "range": { - "start": 78, - "end": 83 - } + "range": [ + 78, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 86 - } + "range": [ + 15, + 86 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 86 - }, + "range": [ + 0, + 86 + ], "loc": null, - "range": { - "start": 0, - "end": 86 - } + "range": [ + 0, + 86 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 86 - } + "range": [ + 0, + 86 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for-of.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for-of.js.snap index 666f4730fd..78571e1ad7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for-of.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for-of.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 17 - } + "range": [ + 13, + 17 + ] } ], "body": { @@ -58,32 +58,32 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 32 - } + "range": [ + 27, + 32 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 35, - "end": 37 - } + "range": [ + 35, + 37 + ] }, "loc": null, - "range": { - "start": 27, - "end": 37 - } + "range": [ + 27, + 37 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 38 - } + "range": [ + 23, + 38 + ] }, { "type": "ForOfStatement", @@ -99,34 +99,34 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] }, "init": null, "loc": null, - "range": { - "start": 52, - "end": 56 - } + "range": [ + 52, + 56 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 56 - } + "range": [ + 46, + 56 + ] }, "right": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "body": { "type": "BlockStatement", @@ -142,32 +142,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "loc": null, - "range": { - "start": 77, - "end": 82 - } + "range": [ + 77, + 82 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 83 - } + "range": [ + 73, + 83 + ] }, { "type": "IfStatement", @@ -176,10 +176,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 96 - } + "range": [ + 92, + 96 + ] }, "consequent": { "type": "BlockStatement", @@ -194,59 +194,59 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "loc": null, - "range": { - "start": 106, - "end": 111 - } + "range": [ + 106, + 111 + ] }, "directive": null, "loc": null, - "range": { - "start": 106, - "end": 112 - } + "range": [ + 106, + 112 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 118 - } + "range": [ + 98, + 118 + ] }, "alternate": null, "loc": null, - "range": { - "start": 88, - "end": 118 - } + "range": [ + 88, + 118 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 122 - } + "range": [ + 67, + 122 + ] }, "loc": null, - "range": { - "start": 41, - "end": 122 - } + "range": [ + 41, + 122 + ] }, { "type": "ReturnStatement", @@ -255,42 +255,42 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 137 - } + "range": [ + 132, + 137 + ] }, "loc": null, - "range": { - "start": 125, - "end": 138 - } + "range": [ + 125, + 138 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 140 - } + "range": [ + 19, + 140 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 140 - }, + "range": [ + 0, + 140 + ], "loc": null, - "range": { - "start": 0, - "end": 140 - } + "range": [ + 0, + 140 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 140 - } + "range": [ + 0, + 140 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for-trivial-update.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for-trivial-update.js.snap index fe9ae00c03..ec67a9693f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for-trivial-update.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for-trivial-update.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "ForStatement", @@ -84,32 +84,32 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 46 - } + "range": [ + 37, + 46 + ] }, "test": { "type": "BinaryExpression", @@ -118,36 +118,36 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "operator": "<", "right": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 52, - "end": 54 - } + "range": [ + 52, + 54 + ] }, "loc": null, - "range": { - "start": 48, - "end": 54 - } + "range": [ + 48, + 54 + ] }, "update": { "type": "Identifier", "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "body": { "type": "BlockStatement", @@ -162,45 +162,45 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "loc": null, - "range": { - "start": 112, - "end": 118 - } + "range": [ + 112, + 118 + ] }, "directive": null, "loc": null, - "range": { - "start": 112, - "end": 119 - } + "range": [ + 112, + 119 + ] } ], "loc": null, - "range": { - "start": 106, - "end": 123 - } + "range": [ + 106, + 123 + ] }, "loc": null, - "range": { - "start": 32, - "end": 123 - } + "range": [ + 32, + 123 + ] }, { "type": "ReturnStatement", @@ -209,42 +209,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "loc": null, - "range": { - "start": 126, - "end": 135 - } + "range": [ + 126, + 135 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 137 - } + "range": [ + 15, + 137 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 137 - }, + "range": [ + 0, + 137 + ], "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 137 - } + "range": [ + 0, + 137 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for.js.snap index 412698d484..c0103b94d8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-for.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "ForStatement", @@ -84,32 +84,32 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 46 - } + "range": [ + 37, + 46 + ] }, "test": { "type": "BinaryExpression", @@ -118,26 +118,26 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "operator": "<", "right": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 52, - "end": 54 - } + "range": [ + 52, + 54 + ] }, "loc": null, - "range": { - "start": 48, - "end": 54 - } + "range": [ + 48, + 54 + ] }, "update": { "type": "UpdateExpression", @@ -147,17 +147,17 @@ Output: "name": "i", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "prefix": false, "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "body": { "type": "BlockStatement", @@ -172,45 +172,45 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "loc": null, - "range": { - "start": 67, - "end": 73 - } + "range": [ + 67, + 73 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 74 - } + "range": [ + 67, + 74 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 78 - } + "range": [ + 61, + 78 + ] }, "loc": null, - "range": { - "start": 32, - "end": 78 - } + "range": [ + 32, + 78 + ] }, { "type": "ReturnStatement", @@ -219,42 +219,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "loc": null, - "range": { - "start": 81, - "end": 90 - } + "range": [ + 81, + 90 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 92 - } + "range": [ + 15, + 92 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 92 - }, + "range": [ + 0, + 92 + ], "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 92 - } + "range": [ + 0, + 92 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-if-else.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-if-else.js.snap index 2fbccbcd28..2b17a8f5c3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-if-else.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-if-else.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -47,32 +47,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "VariableDeclaration", @@ -85,32 +85,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 42 - } + "range": [ + 32, + 42 + ] }, { "type": "IfStatement", @@ -119,10 +119,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "consequent": { "type": "BlockStatement", @@ -138,10 +138,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "init": { "type": "BinaryExpression", @@ -150,10 +150,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "operator": "+", "right": { @@ -161,36 +161,36 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "loc": null, - "range": { - "start": 63, - "end": 72 - } + "range": [ + 63, + 72 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 73 - } + "range": [ + 59, + 73 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 77 - } + "range": [ + 53, + 77 + ] }, "alternate": { "type": "BlockStatement", @@ -206,72 +206,72 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "loc": null, - "range": { - "start": 93, - "end": 98 - } + "range": [ + 93, + 98 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 99 - } + "range": [ + 89, + 99 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 103 - } + "range": [ + 83, + 103 + ] }, "loc": null, - "range": { - "start": 46, - "end": 103 - } + "range": [ + 46, + 103 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 105 - } + "range": [ + 15, + 105 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 105 - }, + "range": [ + 0, + 105 + ], "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 105 - } + "range": [ + 0, + 105 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-leave-case.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-leave-case.js.snap index ed21449608..70c5c83bdc 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-leave-case.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-leave-case.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -42,10 +42,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -62,32 +62,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -100,24 +100,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "init": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] }, { "type": "IfStatement", @@ -128,27 +128,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "property": { "type": "Identifier", "name": "p0", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 65 - } + "range": [ + 63, + 65 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 65 - } + "range": [ + 57, + 65 + ] }, "consequent": { "type": "BlockStatement", @@ -164,27 +164,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 79 - } + "range": [ + 75, + 79 + ] }, "computed": false, "loc": null, - "range": { - "start": 73, - "end": 79 - } + "range": [ + 73, + 79 + ] }, "arguments": [ { @@ -194,41 +194,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "property": { "type": "Identifier", "name": "p1", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 88 - } + "range": [ + 86, + 88 + ] }, "computed": false, "loc": null, - "range": { - "start": 80, - "end": 88 - } + "range": [ + 80, + 88 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 89 - } + "range": [ + 73, + 89 + ] }, "directive": null, "loc": null, - "range": { - "start": 73, - "end": 90 - } + "range": [ + 73, + 90 + ] }, { "type": "ExpressionStatement", @@ -240,47 +240,47 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": null, - "range": { - "start": 95, - "end": 100 - } + "range": [ + 95, + 100 + ] }, "directive": null, "loc": null, - "range": { - "start": 95, - "end": 101 - } + "range": [ + 95, + 101 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 105 - } + "range": [ + 67, + 105 + ] }, "alternate": null, "loc": null, - "range": { - "start": 53, - "end": 105 - } + "range": [ + 53, + 105 + ] }, { "type": "ReturnStatement", @@ -292,18 +292,18 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 122, - "end": 131 - } + "range": [ + 122, + 131 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 121, - "end": 132 - } + "range": [ + 121, + 132 + ] }, "children": [ { @@ -311,10 +311,10 @@ Output: "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 132, - "end": 139 - } + "range": [ + 132, + 139 + ] }, { "type": "JSXExpressionContainer", @@ -323,26 +323,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] }, "loc": null, - "range": { - "start": 139, - "end": 142 - } + "range": [ + 139, + 142 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 142, - "end": 149 - } + "range": [ + 142, + 149 + ] }, { "type": "JSXExpressionContainer", @@ -351,26 +351,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "loc": null, - "range": { - "start": 149, - "end": 152 - } + "range": [ + 149, + 152 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 152, - "end": 157 - } + "range": [ + 152, + 157 + ] } ], "closingElement": { @@ -379,54 +379,54 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 159, - "end": 168 - } + "range": [ + 159, + 168 + ] }, "loc": null, - "range": { - "start": 157, - "end": 169 - } + "range": [ + 157, + 169 + ] }, "loc": null, - "range": { - "start": 121, - "end": 169 - } + "range": [ + 121, + 169 + ] }, "loc": null, - "range": { - "start": 108, - "end": 174 - } + "range": [ + 108, + 174 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 176 - } + "range": [ + 26, + 176 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 176 - }, + "range": [ + 0, + 176 + ], "loc": null, - "range": { - "start": 0, - "end": 176 - } + "range": [ + 0, + 176 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 176 - } + "range": [ + 0, + 176 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-multiple-phis.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-multiple-phis.js.snap index f0b2bb08e6..5e68992043 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-multiple-phis.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-multiple-phis.js.snap @@ -36,10 +36,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -47,40 +47,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -97,32 +97,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "loc": null, - "range": { - "start": 33, - "end": 38 - } + "range": [ + 33, + 38 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 39 - } + "range": [ + 29, + 39 + ] }, { "type": "IfStatement", @@ -130,10 +130,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 46, - "end": 50 - } + "range": [ + 46, + 50 + ] }, "consequent": { "type": "BlockStatement", @@ -144,10 +144,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 62, - "end": 66 - } + "range": [ + 62, + 66 + ] }, "consequent": { "type": "BlockStatement", @@ -162,40 +162,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "right": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "loc": null, - "range": { - "start": 76, - "end": 81 - } + "range": [ + 76, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 88 - } + "range": [ + 68, + 88 + ] }, "alternate": { "type": "BlockStatement", @@ -210,46 +210,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "loc": null, - "range": { - "start": 102, - "end": 107 - } + "range": [ + 102, + 107 + ] }, "directive": null, "loc": null, - "range": { - "start": 102, - "end": 108 - } + "range": [ + 102, + 108 + ] } ], "loc": null, - "range": { - "start": 94, - "end": 114 - } + "range": [ + 94, + 114 + ] }, "loc": null, - "range": { - "start": 58, - "end": 114 - } + "range": [ + 58, + 114 + ] }, { "type": "ExpressionStatement", @@ -258,24 +258,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "directive": null, "loc": null, - "range": { - "start": 119, - "end": 121 - } + "range": [ + 119, + 121 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 125 - } + "range": [ + 52, + 125 + ] }, "alternate": { "type": "BlockStatement", @@ -286,10 +286,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 141, - "end": 145 - } + "range": [ + 141, + 145 + ] }, "consequent": { "type": "BlockStatement", @@ -304,40 +304,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "loc": null, - "range": { - "start": 155, - "end": 160 - } + "range": [ + 155, + 160 + ] }, "directive": null, "loc": null, - "range": { - "start": 155, - "end": 161 - } + "range": [ + 155, + 161 + ] } ], "loc": null, - "range": { - "start": 147, - "end": 167 - } + "range": [ + 147, + 167 + ] }, "alternate": { "type": "BlockStatement", @@ -352,46 +352,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "right": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "loc": null, - "range": { - "start": 181, - "end": 186 - } + "range": [ + 181, + 186 + ] }, "directive": null, "loc": null, - "range": { - "start": 181, - "end": 187 - } + "range": [ + 181, + 187 + ] } ], "loc": null, - "range": { - "start": 173, - "end": 193 - } + "range": [ + 173, + 193 + ] }, "loc": null, - "range": { - "start": 137, - "end": 193 - } + "range": [ + 137, + 193 + ] }, { "type": "ExpressionStatement", @@ -400,30 +400,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 199 - } + "range": [ + 198, + 199 + ] }, "directive": null, "loc": null, - "range": { - "start": 198, - "end": 200 - } + "range": [ + 198, + 200 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 204 - } + "range": [ + 131, + 204 + ] }, "loc": null, - "range": { - "start": 42, - "end": 204 - } + "range": [ + 42, + 204 + ] }, { "type": "ReturnStatement", @@ -432,42 +432,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 214, - "end": 215 - } + "range": [ + 214, + 215 + ] }, "loc": null, - "range": { - "start": 207, - "end": 216 - } + "range": [ + 207, + 216 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 218 - } + "range": [ + 25, + 218 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 218 - }, + "range": [ + 0, + 218 + ], "loc": null, - "range": { - "start": 0, - "end": 218 - } + "range": [ + 0, + 218 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 218 - } + "range": [ + 0, + 218 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-loops-no-reassign.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-loops-no-reassign.js.snap index 43c9bc317e..6d3b0f9b81 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-loops-no-reassign.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-loops-no-reassign.js.snap @@ -29,10 +29,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 22 - } + "range": [ + 19, + 22 + ] }, "params": [ { @@ -40,30 +40,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] } ], "body": { @@ -80,32 +80,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "loc": null, - "range": { - "start": 40, - "end": 45 - } + "range": [ + 40, + 45 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 46 - } + "range": [ + 36, + 46 + ] }, { "type": "WhileStatement", @@ -114,10 +114,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "body": { "type": "BlockStatement", @@ -129,10 +129,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "body": { "type": "BlockStatement", @@ -144,10 +144,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "body": { "type": "BlockStatement", @@ -161,72 +161,72 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] }, "directive": null, "loc": null, - "range": { - "start": 103, - "end": 109 - } + "range": [ + 103, + 109 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 117 - } + "range": [ + 93, + 117 + ] }, "loc": null, - "range": { - "start": 83, - "end": 117 - } + "range": [ + 83, + 117 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 123 - } + "range": [ + 75, + 123 + ] }, "loc": null, - "range": { - "start": 65, - "end": 123 - } + "range": [ + 65, + 123 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 127 - } + "range": [ + 59, + 127 + ] }, "loc": null, - "range": { - "start": 49, - "end": 127 - } + "range": [ + 49, + 127 + ] }, { "type": "ReturnStatement", @@ -235,42 +235,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "loc": null, - "range": { - "start": 130, - "end": 139 - } + "range": [ + 130, + 139 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 141 - } + "range": [ + 32, + 141 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 10, - "end": 141 - }, + "range": [ + 10, + 141 + ], "loc": null, - "range": { - "start": 10, - "end": 141 - } + "range": [ + 10, + 141 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 10, - "end": 141 - } + "range": [ + 10, + 141 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-partial-phi.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-partial-phi.js.snap index 4d78a5eada..8085175f65 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-partial-phi.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-partial-phi.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,30 +38,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -78,33 +78,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 36 - } + "range": [ + 26, + 36 + ] }, { "type": "IfStatement", @@ -113,10 +113,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "consequent": { "type": "BlockStatement", @@ -128,10 +128,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "consequent": { "type": "BlockStatement", @@ -146,47 +146,47 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 73 - } + "range": [ + 67, + 73 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 79 - } + "range": [ + 59, + 79 + ] }, "alternate": null, "loc": null, - "range": { - "start": 52, - "end": 79 - } + "range": [ + 52, + 79 + ] }, { "type": "ReturnStatement", @@ -195,56 +195,56 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "loc": null, - "range": { - "start": 140, - "end": 149 - } + "range": [ + 140, + 149 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 153 - } + "range": [ + 46, + 153 + ] }, "alternate": null, "loc": null, - "range": { - "start": 39, - "end": 153 - } + "range": [ + 39, + 153 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 155 - } + "range": [ + 22, + 155 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 155 - }, + "range": [ + 0, + 155 + ], "loc": null, - "range": { - "start": 0, - "end": 155 - } + "range": [ + 0, + 155 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 155 - } + "range": [ + 0, + 155 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-partial-reassignment.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-partial-reassignment.js.snap index 159c6e3d34..fd3f544ef7 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-partial-reassignment.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-nested-partial-reassignment.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,50 +39,50 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] }, { "type": "Identifier", "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] } ], "body": { @@ -99,31 +99,31 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NullLiteral", "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 45 - } + "range": [ + 32, + 45 + ] }, { "type": "IfStatement", @@ -132,10 +132,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "consequent": { "type": "BlockStatement", @@ -150,40 +150,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "directive": null, "loc": null, - "range": { - "start": 61, - "end": 67 - } + "range": [ + 61, + 67 + ] } ], "loc": null, - "range": { - "start": 55, - "end": 71 - } + "range": [ + 55, + 71 + ] }, "alternate": { "type": "BlockStatement", @@ -195,10 +195,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "consequent": { "type": "BlockStatement", @@ -213,60 +213,60 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "right": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "loc": null, - "range": { - "start": 98, - "end": 103 - } + "range": [ + 98, + 103 + ] }, "directive": null, "loc": null, - "range": { - "start": 98, - "end": 104 - } + "range": [ + 98, + 104 + ] } ], "loc": null, - "range": { - "start": 90, - "end": 110 - } + "range": [ + 90, + 110 + ] }, "alternate": null, "loc": null, - "range": { - "start": 83, - "end": 110 - } + "range": [ + 83, + 110 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 114 - } + "range": [ + 77, + 114 + ] }, "loc": null, - "range": { - "start": 48, - "end": 114 - } + "range": [ + 48, + 114 + ] }, { "type": "ReturnStatement", @@ -275,42 +275,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "loc": null, - "range": { - "start": 117, - "end": 126 - } + "range": [ + 117, + 126 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 128 - } + "range": [ + 28, + 128 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 128 - }, + "range": [ + 0, + 128 + ], "loc": null, - "range": { - "start": 0, - "end": 128 - } + "range": [ + 0, + 128 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 128 - } + "range": [ + 0, + 128 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-newexpression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-newexpression.js.snap index f3c994ff27..c9d36db9ca 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-newexpression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-newexpression.js.snap @@ -25,33 +25,33 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 15, - "end": 17 - } + "range": [ + 15, + 17 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 17 - }, + "range": [ + 0, + 17 + ], "loc": null, - "range": { - "start": 0, - "end": 17 - } + "range": [ + 0, + 17 + ] }, { "type": "FunctionDeclaration", @@ -60,10 +60,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 37 - } + "range": [ + 28, + 37 + ] }, "params": [ { @@ -71,10 +71,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "body": { @@ -91,32 +91,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 59, - "end": 61 - } + "range": [ + 59, + 61 + ] }, "loc": null, - "range": { - "start": 55, - "end": 61 - } + "range": [ + 55, + 61 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 62 - } + "range": [ + 49, + 62 + ] }, { "type": "VariableDeclaration", @@ -129,32 +129,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 75, - "end": 77 - } + "range": [ + 75, + 77 + ] }, "loc": null, - "range": { - "start": 71, - "end": 77 - } + "range": [ + 71, + 77 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 78 - } + "range": [ + 65, + 78 + ] }, { "type": "VariableDeclaration", @@ -167,10 +167,10 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "init": { "type": "NewExpression", @@ -179,10 +179,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 96 - } + "range": [ + 93, + 96 + ] }, "arguments": [ { @@ -190,40 +190,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 102 - } + "range": [ + 89, + 102 + ] }, "loc": null, - "range": { - "start": 85, - "end": 102 - } + "range": [ + 85, + 102 + ] } ], "loc": null, - "range": { - "start": 81, - "end": 103 - } + "range": [ + 81, + 103 + ] }, { "type": "ReturnStatement", @@ -232,42 +232,42 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 117 - } + "range": [ + 45, + 117 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 19, - "end": 117 - }, + "range": [ + 19, + 117 + ], "loc": null, - "range": { - "start": 19, - "end": 117 - } + "range": [ + 19, + 117 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 117 - } + "range": [ + 0, + 117 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-non-empty-initializer.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-non-empty-initializer.js.snap index cd46a245fd..1f1ead25f6 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-non-empty-initializer.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-non-empty-initializer.js.snap @@ -26,10 +26,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -37,20 +37,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -67,32 +67,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 31, - "end": 33 - } + "range": [ + 31, + 33 + ] }, "loc": null, - "range": { - "start": 27, - "end": 33 - } + "range": [ + 27, + 33 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 34 - } + "range": [ + 23, + 34 + ] }, { "type": "IfStatement", @@ -101,10 +101,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "consequent": { "type": "BlockStatement", @@ -119,46 +119,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 50, - "end": 56 - } + "range": [ + 50, + 56 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 60 - } + "range": [ + 44, + 60 + ] }, "alternate": null, "loc": null, - "range": { - "start": 37, - "end": 60 - } + "range": [ + 37, + 60 + ] }, { "type": "VariableDeclaration", @@ -171,33 +171,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] }, { "type": "ReturnStatement", @@ -206,42 +206,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 88 - } + "range": [ + 19, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 88 - }, + "range": [ + 0, + 88 + ], "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-objectexpression-phi.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-objectexpression-phi.js.snap index 9f9019179d..d4a7cb0090 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-objectexpression-phi.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-objectexpression-phi.js.snap @@ -30,10 +30,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -50,32 +50,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "VariableDeclaration", @@ -88,32 +88,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 42 - } + "range": [ + 32, + 42 + ] }, { "type": "IfStatement", @@ -124,26 +124,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "operator": ">", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "consequent": { "type": "BlockStatement", @@ -158,39 +158,39 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "directive": null, "loc": null, - "range": { - "start": 63, - "end": 69 - } + "range": [ + 63, + 69 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 73 - } + "range": [ + 57, + 73 + ] }, "alternate": { "type": "BlockStatement", @@ -205,45 +205,45 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "loc": null, - "range": { - "start": 85, - "end": 90 - } + "range": [ + 85, + 90 + ] }, "directive": null, "loc": null, - "range": { - "start": 85, - "end": 91 - } + "range": [ + 85, + 91 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 95 - } + "range": [ + 79, + 95 + ] }, "loc": null, - "range": { - "start": 46, - "end": 95 - } + "range": [ + 46, + 95 + ] }, { "type": "VariableDeclaration", @@ -256,10 +256,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "init": { "type": "ObjectExpression", @@ -271,30 +271,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 110 - } + "range": [ + 109, + 110 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 109, - "end": 113 - } + "range": [ + 109, + 113 + ] }, { "type": "Property", @@ -303,50 +303,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 119 - } + "range": [ + 115, + 119 + ] } ], "loc": null, - "range": { - "start": 107, - "end": 121 - } + "range": [ + 107, + 121 + ] }, "loc": null, - "range": { - "start": 103, - "end": 121 - } + "range": [ + 103, + 121 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 122 - } + "range": [ + 99, + 122 + ] }, { "type": "ReturnStatement", @@ -355,42 +355,42 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 133 - } + "range": [ + 132, + 133 + ] }, "loc": null, - "range": { - "start": 125, - "end": 134 - } + "range": [ + 125, + 134 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 136 - } + "range": [ + 15, + 136 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 136 - }, + "range": [ + 0, + 136 + ], "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-objectexpression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-objectexpression.js.snap index 36d8268fc5..1e71180bce 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-objectexpression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-objectexpression.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,32 +54,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 42 - } + "range": [ + 30, + 42 + ] }, { "type": "VariableDeclaration", @@ -92,32 +92,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 57 - } + "range": [ + 45, + 57 + ] }, { "type": "VariableDeclaration", @@ -130,10 +130,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "init": { "type": "ObjectExpression", @@ -145,30 +145,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 75, - "end": 76 - } + "range": [ + 75, + 76 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 72, - "end": 76 - } + "range": [ + 72, + 76 + ] }, { "type": "Property", @@ -177,50 +177,50 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 82 - } + "range": [ + 78, + 82 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 84 - } + "range": [ + 70, + 84 + ] }, "loc": null, - "range": { - "start": 66, - "end": 84 - } + "range": [ + 66, + 84 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 85 - } + "range": [ + 60, + 85 + ] }, { "type": "ReturnStatement", @@ -229,42 +229,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "loc": null, - "range": { - "start": 88, - "end": 97 - } + "range": [ + 88, + 97 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 99 - } + "range": [ + 26, + 99 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 99 - }, + "range": [ + 0, + 99 + ], "loc": null, - "range": { - "start": 0, - "end": 99 - } + "range": [ + 0, + 99 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 99 - } + "range": [ + 0, + 99 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-alias-mutate-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-alias-mutate-if.js.snap index 3fc8c275f5..cb7dc3ac10 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-alias-mutate-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-alias-mutate-if.js.snap @@ -30,10 +30,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -41,10 +41,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -61,32 +61,32 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 30, - "end": 32 - } + "range": [ + 30, + 32 + ] }, "loc": null, - "range": { - "start": 26, - "end": 32 - } + "range": [ + 26, + 32 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 33 - } + "range": [ + 20, + 33 + ] }, { "type": "VariableDeclaration", @@ -99,33 +99,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "init": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "loc": null, - "range": { - "start": 42, - "end": 47 - } + "range": [ + 42, + 47 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] }, { "type": "IfStatement", @@ -134,10 +134,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "consequent": { "type": "BlockStatement", @@ -153,32 +153,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 72, - "end": 74 - } + "range": [ + 72, + 74 + ] }, "loc": null, - "range": { - "start": 68, - "end": 74 - } + "range": [ + 68, + 74 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 75 - } + "range": [ + 64, + 75 + ] }, { "type": "ExpressionStatement", @@ -192,57 +192,57 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "computed": false, "loc": null, - "range": { - "start": 80, - "end": 83 - } + "range": [ + 80, + 83 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "loc": null, - "range": { - "start": 80, - "end": 87 - } + "range": [ + 80, + 87 + ] }, "directive": null, "loc": null, - "range": { - "start": 80, - "end": 88 - } + "range": [ + 80, + 88 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 92 - } + "range": [ + 58, + 92 + ] }, "alternate": { "type": "BlockStatement", @@ -258,32 +258,32 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 112, - "end": 114 - } + "range": [ + 112, + 114 + ] }, "loc": null, - "range": { - "start": 108, - "end": 114 - } + "range": [ + 108, + 114 + ] } ], "loc": null, - "range": { - "start": 104, - "end": 115 - } + "range": [ + 104, + 115 + ] }, { "type": "ExpressionStatement", @@ -297,63 +297,63 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 123 - } + "range": [ + 120, + 123 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] }, "loc": null, - "range": { - "start": 120, - "end": 127 - } + "range": [ + 120, + 127 + ] }, "directive": null, "loc": null, - "range": { - "start": 120, - "end": 128 - } + "range": [ + 120, + 128 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 132 - } + "range": [ + 98, + 132 + ] }, "loc": null, - "range": { - "start": 51, - "end": 132 - } + "range": [ + 51, + 132 + ] }, { "type": "ExpressionStatement", @@ -364,10 +364,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 141 - } + "range": [ + 135, + 141 + ] }, "arguments": [ { @@ -375,24 +375,24 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] } ], "loc": null, - "range": { - "start": 135, - "end": 144 - } + "range": [ + 135, + 144 + ] }, "directive": null, "loc": null, - "range": { - "start": 135, - "end": 145 - } + "range": [ + 135, + 145 + ] }, { "type": "ReturnStatement", @@ -401,42 +401,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 176 - } + "range": [ + 175, + 176 + ] }, "loc": null, - "range": { - "start": 168, - "end": 177 - } + "range": [ + 168, + 177 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 179 - } + "range": [ + 16, + 179 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 179 - }, + "range": [ + 0, + 179 + ], "loc": null, - "range": { - "start": 0, - "end": 179 - } + "range": [ + 0, + 179 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 179 - } + "range": [ + 0, + 179 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-if.js.snap index b5c1d497b3..82423b43c0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-if.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -59,32 +59,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 30, - "end": 32 - } + "range": [ + 30, + 32 + ] }, "loc": null, - "range": { - "start": 26, - "end": 32 - } + "range": [ + 26, + 32 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 33 - } + "range": [ + 20, + 33 + ] }, { "type": "IfStatement", @@ -93,10 +93,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "consequent": { "type": "BlockStatement", @@ -112,32 +112,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 57, - "end": 59 - } + "range": [ + 57, + 59 + ] }, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 60 - } + "range": [ + 49, + 60 + ] }, { "type": "ExpressionStatement", @@ -151,57 +151,57 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 68 - } + "range": [ + 65, + 68 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] }, "directive": null, "loc": null, - "range": { - "start": 65, - "end": 73 - } + "range": [ + 65, + 73 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 77 - } + "range": [ + 43, + 77 + ] }, "alternate": { "type": "BlockStatement", @@ -217,32 +217,32 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 97, - "end": 99 - } + "range": [ + 97, + 99 + ] }, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 100 - } + "range": [ + 89, + 100 + ] }, { "type": "ExpressionStatement", @@ -256,63 +256,63 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "computed": false, "loc": null, - "range": { - "start": 105, - "end": 108 - } + "range": [ + 105, + 108 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "loc": null, - "range": { - "start": 105, - "end": 112 - } + "range": [ + 105, + 112 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 113 - } + "range": [ + 105, + 113 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 117 - } + "range": [ + 83, + 117 + ] }, "loc": null, - "range": { - "start": 36, - "end": 117 - } + "range": [ + 36, + 117 + ] }, { "type": "ReturnStatement", @@ -321,42 +321,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] }, "loc": null, - "range": { - "start": 120, - "end": 129 - } + "range": [ + 120, + 129 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 131 - } + "range": [ + 16, + 131 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 131 - }, + "range": [ + 0, + 131 + ], "loc": null, - "range": { - "start": 0, - "end": 131 - } + "range": [ + 0, + 131 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 131 - } + "range": [ + 0, + 131 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate-if.js.snap index bc55f620c4..607e21a3d8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate-if.js.snap @@ -29,10 +29,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -60,32 +60,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 30, - "end": 32 - } + "range": [ + 30, + 32 + ] }, "loc": null, - "range": { - "start": 26, - "end": 32 - } + "range": [ + 26, + 32 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 33 - } + "range": [ + 20, + 33 + ] }, { "type": "IfStatement", @@ -94,10 +94,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "consequent": { "type": "BlockStatement", @@ -113,32 +113,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 57, - "end": 59 - } + "range": [ + 57, + 59 + ] }, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 60 - } + "range": [ + 49, + 60 + ] }, { "type": "ExpressionStatement", @@ -152,57 +152,57 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 68 - } + "range": [ + 65, + 68 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] }, "directive": null, "loc": null, - "range": { - "start": 65, - "end": 73 - } + "range": [ + 65, + 73 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 77 - } + "range": [ + 43, + 77 + ] }, "alternate": { "type": "BlockStatement", @@ -218,32 +218,32 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 97, - "end": 99 - } + "range": [ + 97, + 99 + ] }, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] } ], "loc": null, - "range": { - "start": 89, - "end": 100 - } + "range": [ + 89, + 100 + ] }, { "type": "ExpressionStatement", @@ -257,63 +257,63 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 108 - } + "range": [ + 107, + 108 + ] }, "computed": false, "loc": null, - "range": { - "start": 105, - "end": 108 - } + "range": [ + 105, + 108 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 112 - } + "range": [ + 111, + 112 + ] }, "loc": null, - "range": { - "start": 105, - "end": 112 - } + "range": [ + 105, + 112 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 113 - } + "range": [ + 105, + 113 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 117 - } + "range": [ + 83, + 117 + ] }, "loc": null, - "range": { - "start": 36, - "end": 117 - } + "range": [ + 36, + 117 + ] }, { "type": "ExpressionStatement", @@ -324,10 +324,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] }, "arguments": [ { @@ -335,24 +335,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 129 - } + "range": [ + 120, + 129 + ] }, "directive": null, "loc": null, - "range": { - "start": 120, - "end": 130 - } + "range": [ + 120, + 130 + ] }, { "type": "ReturnStatement", @@ -361,42 +361,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] }, "loc": null, - "range": { - "start": 133, - "end": 142 - } + "range": [ + 133, + 142 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 144 - } + "range": [ + 16, + 144 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 144 - }, + "range": [ + 0, + 144 + ], "loc": null, - "range": { - "start": 0, - "end": 144 - } + "range": [ + 0, + 144 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 144 - } + "range": [ + 0, + 144 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate-inside-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate-inside-if.js.snap index 0728ef621e..ad1618e3ec 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate-inside-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate-inside-if.js.snap @@ -29,10 +29,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -60,32 +60,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 26, - "end": 27 - } + "range": [ + 26, + 27 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 30, - "end": 32 - } + "range": [ + 30, + 32 + ] }, "loc": null, - "range": { - "start": 26, - "end": 32 - } + "range": [ + 26, + 32 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 33 - } + "range": [ + 20, + 33 + ] }, { "type": "IfStatement", @@ -94,10 +94,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "consequent": { "type": "BlockStatement", @@ -113,32 +113,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 57, - "end": 59 - } + "range": [ + 57, + 59 + ] }, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 60 - } + "range": [ + 49, + 60 + ] }, { "type": "ExpressionStatement", @@ -152,50 +152,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 68 - } + "range": [ + 65, + 68 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] }, "directive": null, "loc": null, - "range": { - "start": 65, - "end": 73 - } + "range": [ + 65, + 73 + ] }, { "type": "ExpressionStatement", @@ -206,10 +206,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] }, "arguments": [ { @@ -217,31 +217,31 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 87 - } + "range": [ + 78, + 87 + ] }, "directive": null, "loc": null, - "range": { - "start": 78, - "end": 88 - } + "range": [ + 78, + 88 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 120 - } + "range": [ + 43, + 120 + ] }, "alternate": { "type": "BlockStatement", @@ -257,32 +257,32 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 137 - } + "range": [ + 136, + 137 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 140, - "end": 142 - } + "range": [ + 140, + 142 + ] }, "loc": null, - "range": { - "start": 136, - "end": 142 - } + "range": [ + 136, + 142 + ] } ], "loc": null, - "range": { - "start": 132, - "end": 143 - } + "range": [ + 132, + 143 + ] }, { "type": "ExpressionStatement", @@ -296,63 +296,63 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 149 - } + "range": [ + 148, + 149 + ] }, "property": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "computed": false, "loc": null, - "range": { - "start": 148, - "end": 151 - } + "range": [ + 148, + 151 + ] }, "right": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "loc": null, - "range": { - "start": 148, - "end": 155 - } + "range": [ + 148, + 155 + ] }, "directive": null, "loc": null, - "range": { - "start": 148, - "end": 156 - } + "range": [ + 148, + 156 + ] } ], "loc": null, - "range": { - "start": 126, - "end": 160 - } + "range": [ + 126, + 160 + ] }, "loc": null, - "range": { - "start": 36, - "end": 160 - } + "range": [ + 36, + 160 + ] }, { "type": "ReturnStatement", @@ -361,42 +361,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 171 - } + "range": [ + 170, + 171 + ] }, "loc": null, - "range": { - "start": 163, - "end": 172 - } + "range": [ + 163, + 172 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 174 - } + "range": [ + 16, + 174 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 174 - }, + "range": [ + 0, + 174 + ], "loc": null, - "range": { - "start": 0, - "end": 174 - } + "range": [ + 0, + 174 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 174 - } + "range": [ + 0, + 174 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate.js.snap index f56eea6834..88627e132b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-alias-mutate.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -47,32 +47,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -85,33 +85,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 47 - } + "range": [ + 35, + 47 + ] }, { "type": "VariableDeclaration", @@ -124,32 +124,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 61, - "end": 63 - } + "range": [ + 61, + 63 + ] }, "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 64 - } + "range": [ + 51, + 64 + ] }, { "type": "ExpressionStatement", @@ -163,50 +163,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 67, - "end": 74 - } + "range": [ + 67, + 74 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 75 - } + "range": [ + 67, + 75 + ] }, { "type": "ExpressionStatement", @@ -217,10 +217,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 85 - } + "range": [ + 79, + 85 + ] }, "arguments": [ { @@ -228,24 +228,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 88 - } + "range": [ + 79, + 88 + ] }, "directive": null, "loc": null, - "range": { - "start": 79, - "end": 89 - } + "range": [ + 79, + 89 + ] }, { "type": "ReturnStatement", @@ -254,42 +254,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "loc": null, - "range": { - "start": 118, - "end": 127 - } + "range": [ + 118, + 127 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 129 - } + "range": [ + 15, + 129 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 129 - }, + "range": [ + 0, + 129 + ], "loc": null, - "range": { - "start": 0, - "end": 129 - } + "range": [ + 0, + 129 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 129 - } + "range": [ + 0, + 129 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-call.js.snap index 2f7620e49c..37b8346639 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-call.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -43,32 +43,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -81,10 +81,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "ObjectExpression", @@ -96,50 +96,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 47, - "end": 51 - } + "range": [ + 47, + 51 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 53 - } + "range": [ + 45, + 53 + ] }, "loc": null, - "range": { - "start": 41, - "end": 53 - } + "range": [ + 41, + 53 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 54 - } + "range": [ + 35, + 54 + ] }, { "type": "ExpressionStatement", @@ -154,68 +154,68 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 60 - } + "range": [ + 57, + 60 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 65 - } + "range": [ + 61, + 65 + ] }, "computed": false, "loc": null, - "range": { - "start": 57, - "end": 65 - } + "range": [ + 57, + 65 + ] }, "arguments": [ { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 66, - "end": 68 - } + "range": [ + 66, + 68 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 69 - } + "range": [ + 57, + 69 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 70 - } + "range": [ + 57, + 70 + ] }, { "type": "ReturnStatement", @@ -224,42 +224,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "loc": null, - "range": { - "start": 73, - "end": 82 - } + "range": [ + 73, + 82 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 84 - } + "range": [ + 15, + 84 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 84 - }, + "range": [ + 0, + 84 + ], "loc": null, - "range": { - "start": 0, - "end": 84 - } + "range": [ + 0, + 84 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 84 - } + "range": [ + 0, + 84 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate-2.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate-2.js.snap index e672ce8d17..14c9d8b429 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate-2.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate-2.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -82,32 +82,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 45, - "end": 47 - } + "range": [ + 45, + 47 + ] }, "loc": null, - "range": { - "start": 41, - "end": 47 - } + "range": [ + 41, + 47 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 48 - } + "range": [ + 35, + 48 + ] }, { "type": "ExpressionStatement", @@ -121,50 +121,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "loc": null, - "range": { - "start": 51, - "end": 58 - } + "range": [ + 51, + 58 + ] }, "directive": null, "loc": null, - "range": { - "start": 51, - "end": 59 - } + "range": [ + 51, + 59 + ] }, { "type": "ExpressionStatement", @@ -175,10 +175,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 68 - } + "range": [ + 62, + 68 + ] }, "arguments": [ { @@ -186,24 +186,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 71 - } + "range": [ + 62, + 71 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 72 - } + "range": [ + 62, + 72 + ] }, { "type": "ReturnStatement", @@ -212,42 +212,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "loc": null, - "range": { - "start": 75, - "end": 84 - } + "range": [ + 75, + 84 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 86 - } + "range": [ + 15, + 86 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 86 - }, + "range": [ + 0, + 86 + ], "loc": null, - "range": { - "start": 0, - "end": 86 - } + "range": [ + 0, + 86 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 86 - } + "range": [ + 0, + 86 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate-alias.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate-alias.js.snap index 7268ec3e18..0fbd3ae68d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate-alias.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate-alias.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -47,32 +47,32 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -85,33 +85,33 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "loc": null, - "range": { - "start": 41, - "end": 46 - } + "range": [ + 41, + 46 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 47 - } + "range": [ + 35, + 47 + ] }, { "type": "VariableDeclaration", @@ -124,32 +124,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 60, - "end": 62 - } + "range": [ + 60, + 62 + ] }, "loc": null, - "range": { - "start": 56, - "end": 62 - } + "range": [ + 56, + 62 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 63 - } + "range": [ + 50, + 63 + ] }, { "type": "ExpressionStatement", @@ -163,50 +163,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "computed": false, "loc": null, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 67, - "end": 74 - } + "range": [ + 67, + 74 + ] }, "directive": null, "loc": null, - "range": { - "start": 67, - "end": 75 - } + "range": [ + 67, + 75 + ] }, { "type": "ExpressionStatement", @@ -217,10 +217,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 85 - } + "range": [ + 79, + 85 + ] }, "arguments": [ { @@ -228,24 +228,24 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 88 - } + "range": [ + 79, + 88 + ] }, "directive": null, "loc": null, - "range": { - "start": 79, - "end": 89 - } + "range": [ + 79, + 89 + ] }, { "type": "ReturnStatement", @@ -254,42 +254,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "loc": null, - "range": { - "start": 118, - "end": 127 - } + "range": [ + 118, + 127 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 129 - } + "range": [ + 15, + 129 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 129 - }, + "range": [ + 0, + 129 + ], "loc": null, - "range": { - "start": 0, - "end": 129 - } + "range": [ + 0, + 129 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 129 - } + "range": [ + 0, + 129 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate.js.snap index c9eeb20433..df38258f86 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property-mutate.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -82,32 +82,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 45, - "end": 47 - } + "range": [ + 45, + 47 + ] }, "loc": null, - "range": { - "start": 41, - "end": 47 - } + "range": [ + 41, + 47 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 48 - } + "range": [ + 35, + 48 + ] }, { "type": "ExpressionStatement", @@ -121,50 +121,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "loc": null, - "range": { - "start": 51, - "end": 58 - } + "range": [ + 51, + 58 + ] }, "directive": null, "loc": null, - "range": { - "start": 51, - "end": 59 - } + "range": [ + 51, + 59 + ] }, { "type": "ExpressionStatement", @@ -175,10 +175,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 68 - } + "range": [ + 62, + 68 + ] }, "arguments": [ { @@ -186,24 +186,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 71 - } + "range": [ + 62, + 71 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 72 - } + "range": [ + 62, + 72 + ] }, { "type": "ReturnStatement", @@ -212,42 +212,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "loc": null, - "range": { - "start": 75, - "end": 84 - } + "range": [ + 75, + 84 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 86 - } + "range": [ + 15, + 86 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 86 - }, + "range": [ + 0, + 86 + ], "loc": null, - "range": { - "start": 0, - "end": 86 - } + "range": [ + 0, + 86 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 86 - } + "range": [ + 0, + 86 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property.js.snap index d8d70f5ad8..5cb9cb573c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-property.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -43,32 +43,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -81,32 +81,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 45, - "end": 47 - } + "range": [ + 45, + 47 + ] }, "loc": null, - "range": { - "start": 41, - "end": 47 - } + "range": [ + 41, + 47 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 48 - } + "range": [ + 35, + 48 + ] }, { "type": "ExpressionStatement", @@ -120,50 +120,50 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "loc": null, - "range": { - "start": 51, - "end": 58 - } + "range": [ + 51, + 58 + ] }, "directive": null, "loc": null, - "range": { - "start": 51, - "end": 59 - } + "range": [ + 51, + 59 + ] }, { "type": "ReturnStatement", @@ -172,42 +172,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "loc": null, - "range": { - "start": 62, - "end": 71 - } + "range": [ + 62, + 71 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 73 - } + "range": [ + 15, + 73 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 73 - }, + "range": [ + 0, + 73 + ], "loc": null, - "range": { - "start": 0, - "end": 73 - } + "range": [ + 0, + 73 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 73 - } + "range": [ + 0, + 73 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-reassign-in-rval.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-reassign-in-rval.js.snap index 15b3127ed9..1f05cc21a1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-reassign-in-rval.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-reassign-in-rval.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 85 - } + "range": [ + 76, + 85 + ] }, "params": [], "body": { @@ -43,10 +43,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] }, "init": { "type": "CallExpression", @@ -55,30 +55,30 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 103 - } + "range": [ + 100, + 103 + ] }, "arguments": [], "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "loc": null, - "range": { - "start": 96, - "end": 105 - } + "range": [ + 96, + 105 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 106 - } + "range": [ + 92, + 106 + ] }, { "type": "VariableDeclaration", @@ -91,10 +91,10 @@ Output: "name": "result", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 119 - } + "range": [ + 113, + 119 + ] }, "init": { "type": "CallExpression", @@ -103,10 +103,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 123 - } + "range": [ + 122, + 123 + ] }, "arguments": [ { @@ -117,10 +117,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "right": { "type": "CallExpression", @@ -129,52 +129,52 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 132 - } + "range": [ + 129, + 132 + ] }, "arguments": [], "loc": null, - "range": { - "start": 129, - "end": 134 - } + "range": [ + 129, + 134 + ] }, "loc": null, - "range": { - "start": 125, - "end": 134 - } + "range": [ + 125, + 134 + ] }, { "type": "NumericLiteral", "value": 5.0, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] } ], "loc": null, - "range": { - "start": 122, - "end": 139 - } + "range": [ + 122, + 139 + ] }, "loc": null, - "range": { - "start": 113, - "end": 139 - } + "range": [ + 113, + 139 + ] } ], "loc": null, - "range": { - "start": 109, - "end": 140 - } + "range": [ + 109, + 140 + ] }, { "type": "ReturnStatement", @@ -186,59 +186,59 @@ Output: "name": "result", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 157 - } + "range": [ + 151, + 157 + ] }, { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] } ], "loc": null, - "range": { - "start": 150, - "end": 161 - } + "range": [ + 150, + 161 + ] }, "loc": null, - "range": { - "start": 143, - "end": 162 - } + "range": [ + 143, + 162 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 164 - } + "range": [ + 88, + 164 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 67, - "end": 164 - }, + "range": [ + 67, + 164 + ], "loc": null, - "range": { - "start": 67, - "end": 164 - } + "range": [ + 67, + 164 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 67, - "end": 164 - } + "range": [ + 67, + 164 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-reassign.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-reassign.js.snap index 89ba9298b5..19f21b1d46 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-reassign.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-reassign.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,30 +35,30 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -75,32 +75,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "loc": null, - "range": { - "start": 30, - "end": 35 - } + "range": [ + 30, + 35 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 36 - } + "range": [ + 26, + 36 + ] }, { "type": "ExpressionStatement", @@ -112,33 +112,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "right": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "loc": null, - "range": { - "start": 39, - "end": 44 - } + "range": [ + 39, + 44 + ] }, "directive": null, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] }, { "type": "ExpressionStatement", @@ -150,33 +150,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "loc": null, - "range": { - "start": 48, - "end": 53 - } + "range": [ + 48, + 53 + ] }, "directive": null, "loc": null, - "range": { - "start": 48, - "end": 54 - } + "range": [ + 48, + 54 + ] }, { "type": "ExpressionStatement", @@ -188,33 +188,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "directive": null, "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] }, { "type": "ReturnStatement", @@ -223,42 +223,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "loc": null, - "range": { - "start": 66, - "end": 75 - } + "range": [ + 66, + 75 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 77 - } + "range": [ + 22, + 77 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 77 - }, + "range": [ + 0, + 77 + ], "loc": null, - "range": { - "start": 0, - "end": 77 - } + "range": [ + 0, + 77 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 77 - } + "range": [ + 0, + 77 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction-with-mutation.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction-with-mutation.js.snap index 729c47804e..3aa34838f9 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction-with-mutation.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction-with-mutation.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -93,27 +93,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -123,41 +123,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "ExpressionStatement", @@ -170,35 +170,35 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 69 - } + "range": [ + 65, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 69 - } + "range": [ + 59, + 69 + ] }, "alternate": { "type": "NullLiteral", "loc": null, - "range": { - "start": 129, - "end": 133 - } + "range": [ + 129, + 133 + ] }, "consequent": { "type": "SequenceExpression", @@ -216,37 +216,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "right": { "type": "ObjectExpression", @@ -258,42 +258,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "value": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 87, - "end": 89 - } + "range": [ + 87, + 89 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 84, - "end": 89 - } + "range": [ + 84, + 89 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 91 - } + "range": [ + 82, + 91 + ] }, "loc": null, - "range": { - "start": 74, - "end": 91 - } + "range": [ + 74, + 91 + ] }, { "type": "AssignmentExpression", @@ -306,17 +306,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 98 - } + "range": [ + 95, + 98 + ] }, "right": { "type": "ArrayExpression", @@ -325,23 +325,23 @@ Output: "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 102, - "end": 104 - } + "range": [ + 102, + 104 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 105 - } + "range": [ + 101, + 105 + ] }, "loc": null, - "range": { - "start": 95, - "end": 105 - } + "range": [ + 95, + 105 + ] }, { "type": "CallExpression", @@ -352,27 +352,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 114 - } + "range": [ + 110, + 114 + ] }, "computed": false, "loc": null, - "range": { - "start": 108, - "end": 114 - } + "range": [ + 108, + 114 + ] }, "arguments": [ { @@ -382,54 +382,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 124 - } + "range": [ + 115, + 124 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 125 - } + "range": [ + 108, + 125 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 125 - } + "range": [ + 73, + 125 + ] }, "loc": null, - "range": { - "start": 59, - "end": 133 - } + "range": [ + 59, + 133 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 134 - } + "range": [ + 59, + 134 + ] }, { "type": "ExpressionStatement", @@ -440,10 +440,10 @@ Output: "name": "mut", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 140 - } + "range": [ + 137, + 140 + ] }, "arguments": [ { @@ -451,24 +451,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 143 - } + "range": [ + 137, + 143 + ] }, "directive": null, "loc": null, - "range": { - "start": 137, - "end": 144 - } + "range": [ + 137, + 144 + ] }, { "type": "ReturnStatement", @@ -477,42 +477,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 155 - } + "range": [ + 154, + 155 + ] }, "loc": null, - "range": { - "start": 147, - "end": 156 - } + "range": [ + 147, + 156 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 158 - } + "range": [ + 20, + 158 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 158 - }, + "range": [ + 0, + 158 + ], "loc": null, - "range": { - "start": 0, - "end": 158 - } + "range": [ + 0, + 158 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 158 - } + "range": [ + 0, + 158 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction.js.snap index a43bcfdda8..566518506d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-destruction.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -54,32 +54,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -92,27 +92,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -122,41 +122,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "ExpressionStatement", @@ -169,35 +169,35 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 69 - } + "range": [ + 65, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 69 - } + "range": [ + 59, + 69 + ] }, "alternate": { "type": "NullLiteral", "loc": null, - "range": { - "start": 129, - "end": 133 - } + "range": [ + 129, + 133 + ] }, "consequent": { "type": "SequenceExpression", @@ -215,37 +215,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "right": { "type": "ObjectExpression", @@ -257,42 +257,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "value": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 87, - "end": 89 - } + "range": [ + 87, + 89 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 84, - "end": 89 - } + "range": [ + 84, + 89 + ] } ], "loc": null, - "range": { - "start": 82, - "end": 91 - } + "range": [ + 82, + 91 + ] }, "loc": null, - "range": { - "start": 74, - "end": 91 - } + "range": [ + 74, + 91 + ] }, { "type": "AssignmentExpression", @@ -305,17 +305,17 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 98 - } + "range": [ + 95, + 98 + ] }, "right": { "type": "ArrayExpression", @@ -324,23 +324,23 @@ Output: "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 102, - "end": 104 - } + "range": [ + 102, + 104 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 105 - } + "range": [ + 101, + 105 + ] }, "loc": null, - "range": { - "start": 95, - "end": 105 - } + "range": [ + 95, + 105 + ] }, { "type": "CallExpression", @@ -351,27 +351,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 114 - } + "range": [ + 110, + 114 + ] }, "computed": false, "loc": null, - "range": { - "start": 108, - "end": 114 - } + "range": [ + 108, + 114 + ] }, "arguments": [ { @@ -381,54 +381,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 120 - } + "range": [ + 115, + 120 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 124 - } + "range": [ + 121, + 124 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 124 - } + "range": [ + 115, + 124 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 125 - } + "range": [ + 108, + 125 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 125 - } + "range": [ + 73, + 125 + ] }, "loc": null, - "range": { - "start": 59, - "end": 133 - } + "range": [ + 59, + 133 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 134 - } + "range": [ + 59, + 134 + ] }, { "type": "ReturnStatement", @@ -437,42 +437,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 145 - } + "range": [ + 144, + 145 + ] }, "loc": null, - "range": { - "start": 137, - "end": 146 - } + "range": [ + 137, + 146 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 148 - } + "range": [ + 20, + 148 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 148 - }, + "range": [ + 0, + 148 + ], "loc": null, - "range": { - "start": 0, - "end": 148 - } + "range": [ + 0, + 148 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 148 - } + "range": [ + 0, + 148 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-with-mutation.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-with-mutation.js.snap index 9d96d378f2..df1f4a1b34 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-with-mutation.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary-with-mutation.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -93,27 +93,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -123,41 +123,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "ExpressionStatement", @@ -170,35 +170,35 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 69 - } + "range": [ + 65, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 69 - } + "range": [ + 59, + 69 + ] }, "alternate": { "type": "NullLiteral", "loc": null, - "range": { - "start": 114, - "end": 118 - } + "range": [ + 114, + 118 + ] }, "consequent": { "type": "SequenceExpression", @@ -211,25 +211,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 78, - "end": 80 - } + "range": [ + 78, + 80 + ] }, "loc": null, - "range": { - "start": 74, - "end": 80 - } + "range": [ + 74, + 80 + ] }, { "type": "AssignmentExpression", @@ -239,25 +239,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 88, - "end": 90 - } + "range": [ + 88, + 90 + ] }, "loc": null, - "range": { - "start": 84, - "end": 90 - } + "range": [ + 84, + 90 + ] }, { "type": "CallExpression", @@ -268,27 +268,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 99 - } + "range": [ + 95, + 99 + ] }, "computed": false, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "arguments": [ { @@ -298,54 +298,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 109 - } + "range": [ + 106, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 109 - } + "range": [ + 100, + 109 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 110 - } + "range": [ + 93, + 110 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 110 - } + "range": [ + 73, + 110 + ] }, "loc": null, - "range": { - "start": 59, - "end": 118 - } + "range": [ + 59, + 118 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 119 - } + "range": [ + 59, + 119 + ] }, { "type": "ExpressionStatement", @@ -356,10 +356,10 @@ Output: "name": "mut", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 125 - } + "range": [ + 122, + 125 + ] }, "arguments": [ { @@ -367,24 +367,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 126, - "end": 127 - } + "range": [ + 126, + 127 + ] } ], "loc": null, - "range": { - "start": 122, - "end": 128 - } + "range": [ + 122, + 128 + ] }, "directive": null, "loc": null, - "range": { - "start": 122, - "end": 129 - } + "range": [ + 122, + 129 + ] }, { "type": "ReturnStatement", @@ -393,42 +393,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 140 - } + "range": [ + 139, + 140 + ] }, "loc": null, - "range": { - "start": 132, - "end": 141 - } + "range": [ + 132, + 141 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 143 - } + "range": [ + 20, + 143 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 143 - }, + "range": [ + 0, + 143 + ], "loc": null, - "range": { - "start": 0, - "end": 143 - } + "range": [ + 0, + 143 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 143 - } + "range": [ + 0, + 143 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary.js.snap index 9fff0e6081..10eb5c9290 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-ternary.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -54,32 +54,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -92,27 +92,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -122,41 +122,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "ExpressionStatement", @@ -169,35 +169,35 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 69 - } + "range": [ + 65, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 69 - } + "range": [ + 59, + 69 + ] }, "alternate": { "type": "NullLiteral", "loc": null, - "range": { - "start": 114, - "end": 118 - } + "range": [ + 114, + 118 + ] }, "consequent": { "type": "SequenceExpression", @@ -210,25 +210,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 78, - "end": 80 - } + "range": [ + 78, + 80 + ] }, "loc": null, - "range": { - "start": 74, - "end": 80 - } + "range": [ + 74, + 80 + ] }, { "type": "AssignmentExpression", @@ -238,25 +238,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 88, - "end": 90 - } + "range": [ + 88, + 90 + ] }, "loc": null, - "range": { - "start": 84, - "end": 90 - } + "range": [ + 84, + 90 + ] }, { "type": "CallExpression", @@ -267,27 +267,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 99 - } + "range": [ + 95, + 99 + ] }, "computed": false, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "arguments": [ { @@ -297,54 +297,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 105 - } + "range": [ + 100, + 105 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 109 - } + "range": [ + 106, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 109 - } + "range": [ + 100, + 109 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 110 - } + "range": [ + 93, + 110 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 110 - } + "range": [ + 73, + 110 + ] }, "loc": null, - "range": { - "start": 59, - "end": 118 - } + "range": [ + 59, + 118 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 119 - } + "range": [ + 59, + 119 + ] }, { "type": "ReturnStatement", @@ -353,42 +353,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 130 - } + "range": [ + 129, + 130 + ] }, "loc": null, - "range": { - "start": 122, - "end": 131 - } + "range": [ + 122, + 131 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 133 - } + "range": [ + 20, + 133 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 133 - }, + "range": [ + 0, + 133 + ], "loc": null, - "range": { - "start": 0, - "end": 133 - } + "range": [ + 0, + 133 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 133 - } + "range": [ + 0, + 133 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-ternary-with-mutation.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-ternary-with-mutation.js.snap index 7646df84bd..5a75af8efe 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-ternary-with-mutation.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-ternary-with-mutation.js.snap @@ -26,10 +26,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -57,32 +57,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -95,27 +95,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -125,41 +125,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "ExpressionStatement", @@ -172,27 +172,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 69 - } + "range": [ + 65, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 69 - } + "range": [ + 59, + 69 + ] }, "alternate": { "type": "SequenceExpression", @@ -205,25 +205,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 128, - "end": 130 - } + "range": [ + 128, + 130 + ] }, "loc": null, - "range": { - "start": 124, - "end": 130 - } + "range": [ + 124, + 130 + ] }, { "type": "AssignmentExpression", @@ -233,25 +233,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 138, - "end": 140 - } + "range": [ + 138, + 140 + ] }, "loc": null, - "range": { - "start": 134, - "end": 140 - } + "range": [ + 134, + 140 + ] }, { "type": "CallExpression", @@ -262,27 +262,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 149 - } + "range": [ + 145, + 149 + ] }, "computed": false, "loc": null, - "range": { - "start": 143, - "end": 149 - } + "range": [ + 143, + 149 + ] }, "arguments": [ { @@ -292,41 +292,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 155 - } + "range": [ + 150, + 155 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 159 - } + "range": [ + 156, + 159 + ] }, "computed": false, "loc": null, - "range": { - "start": 150, - "end": 159 - } + "range": [ + 150, + 159 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 160 - } + "range": [ + 143, + 160 + ] } ], "loc": null, - "range": { - "start": 123, - "end": 160 - } + "range": [ + 123, + 160 + ] }, "consequent": { "type": "SequenceExpression", @@ -339,25 +339,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 82, - "end": 84 - } + "range": [ + 82, + 84 + ] }, "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] }, { "type": "AssignmentExpression", @@ -367,25 +367,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 92, - "end": 94 - } + "range": [ + 92, + 94 + ] }, "loc": null, - "range": { - "start": 88, - "end": 94 - } + "range": [ + 88, + 94 + ] }, { "type": "CallExpression", @@ -396,27 +396,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 103 - } + "range": [ + 99, + 103 + ] }, "computed": false, "loc": null, - "range": { - "start": 97, - "end": 103 - } + "range": [ + 97, + 103 + ] }, "arguments": [ { @@ -426,54 +426,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 109 - } + "range": [ + 104, + 109 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 113 - } + "range": [ + 110, + 113 + ] }, "computed": false, "loc": null, - "range": { - "start": 104, - "end": 113 - } + "range": [ + 104, + 113 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 114 - } + "range": [ + 97, + 114 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 114 - } + "range": [ + 77, + 114 + ] }, "loc": null, - "range": { - "start": 59, - "end": 161 - } + "range": [ + 59, + 161 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 162 - } + "range": [ + 59, + 162 + ] }, { "type": "ExpressionStatement", @@ -484,10 +484,10 @@ Output: "name": "mut", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 168 - } + "range": [ + 165, + 168 + ] }, "arguments": [ { @@ -495,24 +495,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 170 - } + "range": [ + 169, + 170 + ] } ], "loc": null, - "range": { - "start": 165, - "end": 171 - } + "range": [ + 165, + 171 + ] }, "directive": null, "loc": null, - "range": { - "start": 165, - "end": 172 - } + "range": [ + 165, + 172 + ] }, { "type": "ReturnStatement", @@ -521,42 +521,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 182, - "end": 183 - } + "range": [ + 182, + 183 + ] }, "loc": null, - "range": { - "start": 175, - "end": 184 - } + "range": [ + 175, + 184 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 186 - } + "range": [ + 20, + 186 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 186 - }, + "range": [ + 0, + 186 + ], "loc": null, - "range": { - "start": 0, - "end": 186 - } + "range": [ + 0, + 186 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 186 - } + "range": [ + 0, + 186 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-ternary.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-ternary.js.snap index f5380b7e3a..694d788300 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-ternary.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-ternary.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -56,32 +56,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -94,27 +94,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -124,41 +124,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "ExpressionStatement", @@ -171,27 +171,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 69 - } + "range": [ + 65, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 69 - } + "range": [ + 59, + 69 + ] }, "alternate": { "type": "SequenceExpression", @@ -204,25 +204,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 128, - "end": 130 - } + "range": [ + 128, + 130 + ] }, "loc": null, - "range": { - "start": 124, - "end": 130 - } + "range": [ + 124, + 130 + ] }, { "type": "AssignmentExpression", @@ -232,25 +232,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 138, - "end": 140 - } + "range": [ + 138, + 140 + ] }, "loc": null, - "range": { - "start": 134, - "end": 140 - } + "range": [ + 134, + 140 + ] }, { "type": "CallExpression", @@ -261,27 +261,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 144 - } + "range": [ + 143, + 144 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 149 - } + "range": [ + 145, + 149 + ] }, "computed": false, "loc": null, - "range": { - "start": 143, - "end": 149 - } + "range": [ + 143, + 149 + ] }, "arguments": [ { @@ -291,41 +291,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 155 - } + "range": [ + 150, + 155 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 159 - } + "range": [ + 156, + 159 + ] }, "computed": false, "loc": null, - "range": { - "start": 150, - "end": 159 - } + "range": [ + 150, + 159 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 160 - } + "range": [ + 143, + 160 + ] } ], "loc": null, - "range": { - "start": 123, - "end": 160 - } + "range": [ + 123, + 160 + ] }, "consequent": { "type": "SequenceExpression", @@ -338,25 +338,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 82, - "end": 84 - } + "range": [ + 82, + 84 + ] }, "loc": null, - "range": { - "start": 78, - "end": 84 - } + "range": [ + 78, + 84 + ] }, { "type": "AssignmentExpression", @@ -366,25 +366,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 92, - "end": 94 - } + "range": [ + 92, + 94 + ] }, "loc": null, - "range": { - "start": 88, - "end": 94 - } + "range": [ + 88, + 94 + ] }, { "type": "CallExpression", @@ -395,27 +395,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 103 - } + "range": [ + 99, + 103 + ] }, "computed": false, "loc": null, - "range": { - "start": 97, - "end": 103 - } + "range": [ + 97, + 103 + ] }, "arguments": [ { @@ -425,54 +425,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 109 - } + "range": [ + 104, + 109 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 113 - } + "range": [ + 110, + 113 + ] }, "computed": false, "loc": null, - "range": { - "start": 104, - "end": 113 - } + "range": [ + 104, + 113 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 114 - } + "range": [ + 97, + 114 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 114 - } + "range": [ + 77, + 114 + ] }, "loc": null, - "range": { - "start": 59, - "end": 161 - } + "range": [ + 59, + 161 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 162 - } + "range": [ + 59, + 162 + ] }, { "type": "ReturnStatement", @@ -481,42 +481,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 173 - } + "range": [ + 172, + 173 + ] }, "loc": null, - "range": { - "start": 165, - "end": 174 - } + "range": [ + 165, + 174 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 176 - } + "range": [ + 20, + 176 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 176 - }, + "range": [ + 0, + 176 + ], "loc": null, - "range": { - "start": 0, - "end": 176 - } + "range": [ + 0, + 176 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 176 - } + "range": [ + 0, + 176 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-with-mutation.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-with-mutation.js.snap index 1ea95fbdcf..11346ba1cc 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-with-mutation.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-unconditional-with-mutation.js.snap @@ -32,10 +32,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -43,10 +43,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -63,32 +63,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -101,27 +101,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -131,41 +131,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "IfStatement", @@ -176,27 +176,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 73 - } + "range": [ + 69, + 73 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 73 - } + "range": [ + 63, + 73 + ] }, "consequent": { "type": "BlockStatement", @@ -211,32 +211,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 85, - "end": 87 - } + "range": [ + 85, + 87 + ] }, "loc": null, - "range": { - "start": 81, - "end": 87 - } + "range": [ + 81, + 87 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 88 - } + "range": [ + 81, + 88 + ] }, { "type": "ExpressionStatement", @@ -248,32 +248,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 97, - "end": 99 - } + "range": [ + 97, + 99 + ] }, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "directive": null, "loc": null, - "range": { - "start": 93, - "end": 100 - } + "range": [ + 93, + 100 + ] }, { "type": "ExpressionStatement", @@ -286,27 +286,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 111 - } + "range": [ + 107, + 111 + ] }, "computed": false, "loc": null, - "range": { - "start": 105, - "end": 111 - } + "range": [ + 105, + 111 + ] }, "arguments": [ { @@ -316,48 +316,48 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "computed": false, "loc": null, - "range": { - "start": 112, - "end": 121 - } + "range": [ + 112, + 121 + ] } ], "loc": null, - "range": { - "start": 105, - "end": 122 - } + "range": [ + 105, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 123 - } + "range": [ + 105, + 123 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 127 - } + "range": [ + 75, + 127 + ] }, "alternate": { "type": "BlockStatement", @@ -372,32 +372,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 139, - "end": 140 - } + "range": [ + 139, + 140 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 143, - "end": 145 - } + "range": [ + 143, + 145 + ] }, "loc": null, - "range": { - "start": 139, - "end": 145 - } + "range": [ + 139, + 145 + ] }, "directive": null, "loc": null, - "range": { - "start": 139, - "end": 146 - } + "range": [ + 139, + 146 + ] }, { "type": "ExpressionStatement", @@ -409,32 +409,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 152 - } + "range": [ + 151, + 152 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 155, - "end": 157 - } + "range": [ + 155, + 157 + ] }, "loc": null, - "range": { - "start": 151, - "end": 157 - } + "range": [ + 151, + 157 + ] }, "directive": null, "loc": null, - "range": { - "start": 151, - "end": 158 - } + "range": [ + 151, + 158 + ] }, { "type": "ExpressionStatement", @@ -447,27 +447,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 164 - } + "range": [ + 163, + 164 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 169 - } + "range": [ + 165, + 169 + ] }, "computed": false, "loc": null, - "range": { - "start": 163, - "end": 169 - } + "range": [ + 163, + 169 + ] }, "arguments": [ { @@ -477,54 +477,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 175 - } + "range": [ + 170, + 175 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 176, - "end": 179 - } + "range": [ + 176, + 179 + ] }, "computed": false, "loc": null, - "range": { - "start": 170, - "end": 179 - } + "range": [ + 170, + 179 + ] } ], "loc": null, - "range": { - "start": 163, - "end": 180 - } + "range": [ + 163, + 180 + ] }, "directive": null, "loc": null, - "range": { - "start": 163, - "end": 181 - } + "range": [ + 163, + 181 + ] } ], "loc": null, - "range": { - "start": 133, - "end": 185 - } + "range": [ + 133, + 185 + ] }, "loc": null, - "range": { - "start": 59, - "end": 185 - } + "range": [ + 59, + 185 + ] }, { "type": "ExpressionStatement", @@ -535,10 +535,10 @@ Output: "name": "mut", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 191 - } + "range": [ + 188, + 191 + ] }, "arguments": [ { @@ -546,24 +546,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] } ], "loc": null, - "range": { - "start": 188, - "end": 194 - } + "range": [ + 188, + 194 + ] }, "directive": null, "loc": null, - "range": { - "start": 188, - "end": 195 - } + "range": [ + 188, + 195 + ] }, { "type": "ReturnStatement", @@ -572,42 +572,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 206 - } + "range": [ + 205, + 206 + ] }, "loc": null, - "range": { - "start": 198, - "end": 207 - } + "range": [ + 198, + 207 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 209 - } + "range": [ + 20, + 209 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 209 - }, + "range": [ + 0, + 209 + ], "loc": null, - "range": { - "start": 0, - "end": 209 - } + "range": [ + 0, + 209 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 209 - } + "range": [ + 0, + 209 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring-with-mutation.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring-with-mutation.js.snap index a74fab3eec..f985f6662b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring-with-mutation.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring-with-mutation.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -64,37 +64,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 33 - } + "range": [ + 28, + 33 + ] }, "init": { "type": "ObjectExpression", @@ -106,49 +106,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "value": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 41, - "end": 43 - } + "range": [ + 41, + 43 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 45 - } + "range": [ + 36, + 45 + ] }, "loc": null, - "range": { - "start": 28, - "end": 45 - } + "range": [ + 28, + 45 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 46 - } + "range": [ + 24, + 46 + ] }, { "type": "ExpressionStatement", @@ -161,27 +161,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 55 - } + "range": [ + 51, + 55 + ] }, "computed": false, "loc": null, - "range": { - "start": 49, - "end": 55 - } + "range": [ + 49, + 55 + ] }, "arguments": [ { @@ -191,41 +191,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "computed": false, "loc": null, - "range": { - "start": 56, - "end": 65 - } + "range": [ + 56, + 65 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 66 - } + "range": [ + 49, + 66 + ] }, "directive": null, "loc": null, - "range": { - "start": 49, - "end": 67 - } + "range": [ + 49, + 67 + ] }, { "type": "IfStatement", @@ -236,27 +236,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] }, "computed": false, "loc": null, - "range": { - "start": 74, - "end": 84 - } + "range": [ + 74, + 84 + ] }, "consequent": { "type": "BlockStatement", @@ -276,37 +276,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 98 - } + "range": [ + 93, + 98 + ] }, "right": { "type": "ObjectExpression", @@ -318,49 +318,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "value": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 106, - "end": 108 - } + "range": [ + 106, + 108 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] }, "loc": null, - "range": { - "start": 93, - "end": 110 - } + "range": [ + 93, + 110 + ] }, "directive": null, "loc": null, - "range": { - "start": 92, - "end": 112 - } + "range": [ + 92, + 112 + ] }, { "type": "ExpressionStatement", @@ -377,37 +377,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] } ], "loc": null, - "range": { - "start": 118, - "end": 123 - } + "range": [ + 118, + 123 + ] }, "right": { "type": "ObjectExpression", @@ -419,49 +419,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "value": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 131, - "end": 133 - } + "range": [ + 131, + 133 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 128, - "end": 133 - } + "range": [ + 128, + 133 + ] } ], "loc": null, - "range": { - "start": 126, - "end": 135 - } + "range": [ + 126, + 135 + ] }, "loc": null, - "range": { - "start": 118, - "end": 135 - } + "range": [ + 118, + 135 + ] }, "directive": null, "loc": null, - "range": { - "start": 117, - "end": 137 - } + "range": [ + 117, + 137 + ] }, { "type": "ExpressionStatement", @@ -474,27 +474,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 148 - } + "range": [ + 144, + 148 + ] }, "computed": false, "loc": null, - "range": { - "start": 142, - "end": 148 - } + "range": [ + 142, + 148 + ] }, "arguments": [ { @@ -504,55 +504,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 154 - } + "range": [ + 149, + 154 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 158 - } + "range": [ + 155, + 158 + ] }, "computed": false, "loc": null, - "range": { - "start": 149, - "end": 158 - } + "range": [ + 149, + 158 + ] } ], "loc": null, - "range": { - "start": 142, - "end": 159 - } + "range": [ + 142, + 159 + ] }, "directive": null, "loc": null, - "range": { - "start": 142, - "end": 160 - } + "range": [ + 142, + 160 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 164 - } + "range": [ + 86, + 164 + ] }, "alternate": null, "loc": null, - "range": { - "start": 70, - "end": 164 - } + "range": [ + 70, + 164 + ] }, { "type": "ExpressionStatement", @@ -563,10 +563,10 @@ Output: "name": "mut", "typeAnnotation": null, "loc": null, - "range": { - "start": 167, - "end": 170 - } + "range": [ + 167, + 170 + ] }, "arguments": [ { @@ -574,24 +574,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 172 - } + "range": [ + 171, + 172 + ] } ], "loc": null, - "range": { - "start": 167, - "end": 173 - } + "range": [ + 167, + 173 + ] }, "directive": null, "loc": null, - "range": { - "start": 167, - "end": 174 - } + "range": [ + 167, + 174 + ] }, { "type": "ReturnStatement", @@ -600,42 +600,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 185 - } + "range": [ + 184, + 185 + ] }, "loc": null, - "range": { - "start": 177, - "end": 186 - } + "range": [ + 177, + 186 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 188 - } + "range": [ + 20, + 188 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 188 - }, + "range": [ + 0, + 188 + ], "loc": null, - "range": { - "start": 0, - "end": 188 - } + "range": [ + 0, + 188 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 188 - } + "range": [ + 0, + 188 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring.js.snap index 32376d0872..e0ba611e4d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-via-destructuring.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -63,37 +63,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 33 - } + "range": [ + 28, + 33 + ] }, "init": { "type": "ObjectExpression", @@ -105,49 +105,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "value": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 41, - "end": 43 - } + "range": [ + 41, + 43 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 45 - } + "range": [ + 36, + 45 + ] }, "loc": null, - "range": { - "start": 28, - "end": 45 - } + "range": [ + 28, + 45 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 46 - } + "range": [ + 24, + 46 + ] }, { "type": "ExpressionStatement", @@ -160,27 +160,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 55 - } + "range": [ + 51, + 55 + ] }, "computed": false, "loc": null, - "range": { - "start": 49, - "end": 55 - } + "range": [ + 49, + 55 + ] }, "arguments": [ { @@ -190,41 +190,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 61 - } + "range": [ + 56, + 61 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 65 - } + "range": [ + 62, + 65 + ] }, "computed": false, "loc": null, - "range": { - "start": 56, - "end": 65 - } + "range": [ + 56, + 65 + ] } ], "loc": null, - "range": { - "start": 49, - "end": 66 - } + "range": [ + 49, + 66 + ] }, "directive": null, "loc": null, - "range": { - "start": 49, - "end": 67 - } + "range": [ + 49, + 67 + ] }, { "type": "IfStatement", @@ -235,27 +235,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 79 - } + "range": [ + 74, + 79 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] }, "computed": false, "loc": null, - "range": { - "start": 74, - "end": 84 - } + "range": [ + 74, + 84 + ] }, "consequent": { "type": "BlockStatement", @@ -275,37 +275,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] } ], "loc": null, - "range": { - "start": 93, - "end": 98 - } + "range": [ + 93, + 98 + ] }, "right": { "type": "ObjectExpression", @@ -317,49 +317,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "value": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 106, - "end": 108 - } + "range": [ + 106, + 108 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 110 - } + "range": [ + 101, + 110 + ] }, "loc": null, - "range": { - "start": 93, - "end": 110 - } + "range": [ + 93, + 110 + ] }, "directive": null, "loc": null, - "range": { - "start": 92, - "end": 112 - } + "range": [ + 92, + 112 + ] }, { "type": "ExpressionStatement", @@ -376,37 +376,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] } ], "loc": null, - "range": { - "start": 118, - "end": 123 - } + "range": [ + 118, + 123 + ] }, "right": { "type": "ObjectExpression", @@ -418,49 +418,49 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "value": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 131, - "end": 133 - } + "range": [ + 131, + 133 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 128, - "end": 133 - } + "range": [ + 128, + 133 + ] } ], "loc": null, - "range": { - "start": 126, - "end": 135 - } + "range": [ + 126, + 135 + ] }, "loc": null, - "range": { - "start": 118, - "end": 135 - } + "range": [ + 118, + 135 + ] }, "directive": null, "loc": null, - "range": { - "start": 117, - "end": 137 - } + "range": [ + 117, + 137 + ] }, { "type": "ExpressionStatement", @@ -473,27 +473,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 148 - } + "range": [ + 144, + 148 + ] }, "computed": false, "loc": null, - "range": { - "start": 142, - "end": 148 - } + "range": [ + 142, + 148 + ] }, "arguments": [ { @@ -503,55 +503,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 154 - } + "range": [ + 149, + 154 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 158 - } + "range": [ + 155, + 158 + ] }, "computed": false, "loc": null, - "range": { - "start": 149, - "end": 158 - } + "range": [ + 149, + 158 + ] } ], "loc": null, - "range": { - "start": 142, - "end": 159 - } + "range": [ + 142, + 159 + ] }, "directive": null, "loc": null, - "range": { - "start": 142, - "end": 160 - } + "range": [ + 142, + 160 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 164 - } + "range": [ + 86, + 164 + ] }, "alternate": null, "loc": null, - "range": { - "start": 70, - "end": 164 - } + "range": [ + 70, + 164 + ] }, { "type": "ReturnStatement", @@ -560,42 +560,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "loc": null, - "range": { - "start": 167, - "end": 176 - } + "range": [ + 167, + 176 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 178 - } + "range": [ + 20, + 178 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 178 - }, + "range": [ + 0, + 178 + ], "loc": null, - "range": { - "start": 0, - "end": 178 - } + "range": [ + 0, + 178 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 178 - } + "range": [ + 0, + 178 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-with-mutation.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-with-mutation.js.snap index e692295279..b54ad48157 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-with-mutation.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming-with-mutation.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -59,32 +59,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -97,27 +97,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -127,41 +127,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "IfStatement", @@ -172,27 +172,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 73 - } + "range": [ + 69, + 73 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 73 - } + "range": [ + 63, + 73 + ] }, "consequent": { "type": "BlockStatement", @@ -207,32 +207,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 85, - "end": 87 - } + "range": [ + 85, + 87 + ] }, "loc": null, - "range": { - "start": 81, - "end": 87 - } + "range": [ + 81, + 87 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 88 - } + "range": [ + 81, + 88 + ] }, { "type": "ExpressionStatement", @@ -244,32 +244,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 97, - "end": 99 - } + "range": [ + 97, + 99 + ] }, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "directive": null, "loc": null, - "range": { - "start": 93, - "end": 100 - } + "range": [ + 93, + 100 + ] }, { "type": "ExpressionStatement", @@ -282,27 +282,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 111 - } + "range": [ + 107, + 111 + ] }, "computed": false, "loc": null, - "range": { - "start": 105, - "end": 111 - } + "range": [ + 105, + 111 + ] }, "arguments": [ { @@ -312,55 +312,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "computed": false, "loc": null, - "range": { - "start": 112, - "end": 121 - } + "range": [ + 112, + 121 + ] } ], "loc": null, - "range": { - "start": 105, - "end": 122 - } + "range": [ + 105, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 123 - } + "range": [ + 105, + 123 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 127 - } + "range": [ + 75, + 127 + ] }, "alternate": null, "loc": null, - "range": { - "start": 59, - "end": 127 - } + "range": [ + 59, + 127 + ] }, { "type": "ExpressionStatement", @@ -371,10 +371,10 @@ Output: "name": "mut", "typeAnnotation": null, "loc": null, - "range": { - "start": 130, - "end": 133 - } + "range": [ + 130, + 133 + ] }, "arguments": [ { @@ -382,24 +382,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 135 - } + "range": [ + 134, + 135 + ] } ], "loc": null, - "range": { - "start": 130, - "end": 136 - } + "range": [ + 130, + 136 + ] }, "directive": null, "loc": null, - "range": { - "start": 130, - "end": 137 - } + "range": [ + 130, + 137 + ] }, { "type": "ReturnStatement", @@ -408,42 +408,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "loc": null, - "range": { - "start": 140, - "end": 149 - } + "range": [ + 140, + 149 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 151 - } + "range": [ + 20, + 151 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 151 - }, + "range": [ + 0, + 151 + ], "loc": null, - "range": { - "start": 0, - "end": 151 - } + "range": [ + 0, + 151 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 151 - } + "range": [ + 0, + 151 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming.js.snap index 42a8f8490f..63e07bb296 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-renaming.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -58,32 +58,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 32, - "end": 34 - } + "range": [ + 32, + 34 + ] }, "loc": null, - "range": { - "start": 28, - "end": 34 - } + "range": [ + 28, + 34 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 35 - } + "range": [ + 24, + 35 + ] }, { "type": "ExpressionStatement", @@ -96,27 +96,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 44 - } + "range": [ + 40, + 44 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [ { @@ -126,41 +126,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 54 - } + "range": [ + 45, + 54 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, { "type": "IfStatement", @@ -171,27 +171,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 73 - } + "range": [ + 69, + 73 + ] }, "computed": false, "loc": null, - "range": { - "start": 63, - "end": 73 - } + "range": [ + 63, + 73 + ] }, "consequent": { "type": "BlockStatement", @@ -206,32 +206,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "right": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 85, - "end": 87 - } + "range": [ + 85, + 87 + ] }, "loc": null, - "range": { - "start": 81, - "end": 87 - } + "range": [ + 81, + 87 + ] }, "directive": null, "loc": null, - "range": { - "start": 81, - "end": 88 - } + "range": [ + 81, + 88 + ] }, { "type": "ExpressionStatement", @@ -243,32 +243,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 97, - "end": 99 - } + "range": [ + 97, + 99 + ] }, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] }, "directive": null, "loc": null, - "range": { - "start": 93, - "end": 100 - } + "range": [ + 93, + 100 + ] }, { "type": "ExpressionStatement", @@ -281,27 +281,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 111 - } + "range": [ + 107, + 111 + ] }, "computed": false, "loc": null, - "range": { - "start": 105, - "end": 111 - } + "range": [ + 105, + 111 + ] }, "arguments": [ { @@ -311,55 +311,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] }, "property": { "type": "Identifier", "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 121 - } + "range": [ + 118, + 121 + ] }, "computed": false, "loc": null, - "range": { - "start": 112, - "end": 121 - } + "range": [ + 112, + 121 + ] } ], "loc": null, - "range": { - "start": 105, - "end": 122 - } + "range": [ + 105, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 123 - } + "range": [ + 105, + 123 + ] } ], "loc": null, - "range": { - "start": 75, - "end": 127 - } + "range": [ + 75, + 127 + ] }, "alternate": null, "loc": null, - "range": { - "start": 59, - "end": 127 - } + "range": [ + 59, + 127 + ] }, { "type": "ReturnStatement", @@ -368,42 +368,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "loc": null, - "range": { - "start": 130, - "end": 139 - } + "range": [ + 130, + 139 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 141 - } + "range": [ + 20, + 141 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 141 - }, + "range": [ + 0, + 141 + ], "loc": null, - "range": { - "start": 0, - "end": 141 - } + "range": [ + 0, + 141 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 141 - } + "range": [ + 0, + 141 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-return.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-return.js.snap index 36d371d63c..62acead460 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-return.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-return.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "IfStatement", @@ -81,26 +81,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "loc": null, - "range": { - "start": 36, - "end": 43 - } + "range": [ + 36, + 43 + ] }, "consequent": { "type": "BlockStatement", @@ -115,46 +115,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "directive": null, "loc": null, - "range": { - "start": 51, - "end": 57 - } + "range": [ + 51, + 57 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 61 - } + "range": [ + 45, + 61 + ] }, "alternate": null, "loc": null, - "range": { - "start": 32, - "end": 61 - } + "range": [ + 32, + 61 + ] }, { "type": "ReturnStatement", @@ -163,42 +163,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "loc": null, - "range": { - "start": 65, - "end": 74 - } + "range": [ + 65, + 74 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 76 - } + "range": [ + 15, + 76 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 76 - }, + "range": [ + 0, + 76 + ], "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-shadowing.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-shadowing.js.snap index 893cba6910..0cff741803 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-shadowing.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-shadowing.js.snap @@ -29,33 +29,33 @@ Output: "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 15, - "end": 17 - } + "range": [ + 15, + 17 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 17 - }, + "range": [ + 0, + 17 + ], "loc": null, - "range": { - "start": 0, - "end": 17 - } + "range": [ + 0, + 17 + ] }, { "type": "FunctionDeclaration", @@ -64,10 +64,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 31 - } + "range": [ + 28, + 31 + ] }, "params": [ { @@ -75,10 +75,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 36 - } + "range": [ + 32, + 36 + ] } ], "body": { @@ -95,32 +95,32 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 49 - } + "range": [ + 46, + 49 + ] }, "init": { "type": "StringLiteral", "value": "", "loc": null, - "range": { - "start": 52, - "end": 54 - } + "range": [ + 52, + 54 + ] }, "loc": null, - "range": { - "start": 46, - "end": 54 - } + "range": [ + 46, + 54 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 55 - } + "range": [ + 42, + 55 + ] }, { "type": "IfStatement", @@ -129,10 +129,10 @@ Output: "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 66 - } + "range": [ + 62, + 66 + ] }, "consequent": { "type": "BlockStatement", @@ -148,32 +148,32 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "init": { "type": "StringLiteral", "value": "other test", "loc": null, - "range": { - "start": 84, - "end": 96 - } + "range": [ + 84, + 96 + ] }, "loc": null, - "range": { - "start": 78, - "end": 96 - } + "range": [ + 78, + 96 + ] } ], "loc": null, - "range": { - "start": 74, - "end": 97 - } + "range": [ + 74, + 97 + ] }, { "type": "ExpressionStatement", @@ -184,10 +184,10 @@ Output: "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 105 - } + "range": [ + 102, + 105 + ] }, "arguments": [ { @@ -195,31 +195,31 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 109 - } + "range": [ + 106, + 109 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 110 - } + "range": [ + 102, + 110 + ] }, "directive": null, "loc": null, - "range": { - "start": 102, - "end": 111 - } + "range": [ + 102, + 111 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 115 - } + "range": [ + 68, + 115 + ] }, "alternate": { "type": "BlockStatement", @@ -234,45 +234,45 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 130 - } + "range": [ + 127, + 130 + ] }, "right": { "type": "StringLiteral", "value": "fallthrough test", "loc": null, - "range": { - "start": 133, - "end": 151 - } + "range": [ + 133, + 151 + ] }, "loc": null, - "range": { - "start": 127, - "end": 151 - } + "range": [ + 127, + 151 + ] }, "directive": null, "loc": null, - "range": { - "start": 127, - "end": 152 - } + "range": [ + 127, + 152 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 156 - } + "range": [ + 121, + 156 + ] }, "loc": null, - "range": { - "start": 58, - "end": 156 - } + "range": [ + 58, + 156 + ] }, { "type": "ExpressionStatement", @@ -283,10 +283,10 @@ Output: "name": "log", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 162 - } + "range": [ + 159, + 162 + ] }, "arguments": [ { @@ -294,50 +294,50 @@ Output: "name": "str", "typeAnnotation": null, "loc": null, - "range": { - "start": 163, - "end": 166 - } + "range": [ + 163, + 166 + ] } ], "loc": null, - "range": { - "start": 159, - "end": 167 - } + "range": [ + 159, + 167 + ] }, "directive": null, "loc": null, - "range": { - "start": 159, - "end": 168 - } + "range": [ + 159, + 168 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 170 - } + "range": [ + 38, + 170 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 19, - "end": 170 - }, + "range": [ + 19, + 170 + ], "loc": null, - "range": { - "start": 19, - "end": 170 - } + "range": [ + 19, + 170 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 170 - } + "range": [ + 0, + 170 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-sibling-phis.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-sibling-phis.js.snap index 2ca2ca6dbf..bce5f3968f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-sibling-phis.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-sibling-phis.js.snap @@ -36,10 +36,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -47,40 +47,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -97,32 +97,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "loc": null, - "range": { - "start": 33, - "end": 38 - } + "range": [ + 33, + 38 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 39 - } + "range": [ + 29, + 39 + ] }, { "type": "IfStatement", @@ -130,10 +130,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 46, - "end": 50 - } + "range": [ + 46, + 50 + ] }, "consequent": { "type": "BlockStatement", @@ -144,10 +144,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 62, - "end": 66 - } + "range": [ + 62, + 66 + ] }, "consequent": { "type": "BlockStatement", @@ -162,40 +162,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "right": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "loc": null, - "range": { - "start": 76, - "end": 81 - } + "range": [ + 76, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] } ], "loc": null, - "range": { - "start": 68, - "end": 88 - } + "range": [ + 68, + 88 + ] }, "alternate": { "type": "BlockStatement", @@ -210,46 +210,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "loc": null, - "range": { - "start": 102, - "end": 107 - } + "range": [ + 102, + 107 + ] }, "directive": null, "loc": null, - "range": { - "start": 102, - "end": 108 - } + "range": [ + 102, + 108 + ] } ], "loc": null, - "range": { - "start": 94, - "end": 114 - } + "range": [ + 94, + 114 + ] }, "loc": null, - "range": { - "start": 58, - "end": 114 - } + "range": [ + 58, + 114 + ] }, { "type": "ExpressionStatement", @@ -258,24 +258,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "directive": null, "loc": null, - "range": { - "start": 119, - "end": 121 - } + "range": [ + 119, + 121 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 125 - } + "range": [ + 52, + 125 + ] }, "alternate": { "type": "BlockStatement", @@ -286,10 +286,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 141, - "end": 145 - } + "range": [ + 141, + 145 + ] }, "consequent": { "type": "BlockStatement", @@ -304,40 +304,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "right": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "loc": null, - "range": { - "start": 155, - "end": 160 - } + "range": [ + 155, + 160 + ] }, "directive": null, "loc": null, - "range": { - "start": 155, - "end": 161 - } + "range": [ + 155, + 161 + ] } ], "loc": null, - "range": { - "start": 147, - "end": 167 - } + "range": [ + 147, + 167 + ] }, "alternate": { "type": "BlockStatement", @@ -352,46 +352,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 181, - "end": 182 - } + "range": [ + 181, + 182 + ] }, "right": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "loc": null, - "range": { - "start": 181, - "end": 186 - } + "range": [ + 181, + 186 + ] }, "directive": null, "loc": null, - "range": { - "start": 181, - "end": 187 - } + "range": [ + 181, + 187 + ] } ], "loc": null, - "range": { - "start": 173, - "end": 193 - } + "range": [ + 173, + 193 + ] }, "loc": null, - "range": { - "start": 137, - "end": 193 - } + "range": [ + 137, + 193 + ] }, { "type": "ExpressionStatement", @@ -400,56 +400,56 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 199 - } + "range": [ + 198, + 199 + ] }, "directive": null, "loc": null, - "range": { - "start": 198, - "end": 200 - } + "range": [ + 198, + 200 + ] } ], "loc": null, - "range": { - "start": 131, - "end": 204 - } + "range": [ + 131, + 204 + ] }, "loc": null, - "range": { - "start": 42, - "end": 204 - } + "range": [ + 42, + 204 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 285 - } + "range": [ + 25, + 285 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 285 - }, + "range": [ + 0, + 285 + ], "loc": null, - "range": { - "start": 0, - "end": 285 - } + "range": [ + 0, + 285 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 285 - } + "range": [ + 0, + 285 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-simple-phi.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-simple-phi.js.snap index d3ceab4f7d..38b29fbd7a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-simple-phi.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-simple-phi.js.snap @@ -28,10 +28,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -48,32 +48,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "IfStatement", @@ -84,26 +84,26 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "operator": ">", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "loc": null, - "range": { - "start": 37, - "end": 42 - } + "range": [ + 37, + 42 + ] }, "consequent": { "type": "BlockStatement", @@ -118,39 +118,39 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "directive": null, "loc": null, - "range": { - "start": 50, - "end": 56 - } + "range": [ + 50, + 56 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 60 - } + "range": [ + 44, + 60 + ] }, "alternate": { "type": "BlockStatement", @@ -165,45 +165,45 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "loc": null, - "range": { - "start": 72, - "end": 77 - } + "range": [ + 72, + 77 + ] }, "directive": null, "loc": null, - "range": { - "start": 72, - "end": 78 - } + "range": [ + 72, + 78 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 82 - } + "range": [ + 66, + 82 + ] }, "loc": null, - "range": { - "start": 33, - "end": 82 - } + "range": [ + 33, + 82 + ] }, { "type": "VariableDeclaration", @@ -216,59 +216,59 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 90, - "end": 91 - } + "range": [ + 90, + 91 + ] }, "init": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 95 - } + "range": [ + 94, + 95 + ] }, "loc": null, - "range": { - "start": 90, - "end": 95 - } + "range": [ + 90, + 95 + ] } ], "loc": null, - "range": { - "start": 86, - "end": 96 - } + "range": [ + 86, + 96 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 98 - } + "range": [ + 15, + 98 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 98 - }, + "range": [ + 0, + 98 + ], "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 98 - } + "range": [ + 0, + 98 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-simple.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-simple.js.snap index 68632bb7aa..36c49eb44a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-simple.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-simple.js.snap @@ -21,10 +21,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -41,32 +41,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "VariableDeclaration", @@ -79,58 +79,58 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 42 - } + "range": [ + 32, + 42 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 44 - } + "range": [ + 15, + 44 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 44 - }, + "range": [ + 0, + 44 + ], "loc": null, - "range": { - "start": 0, - "end": 44 - } + "range": [ + 0, + 44 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 44 - } + "range": [ + 0, + 44 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-single-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-single-if.js.snap index 2dcbafcd25..495407632e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-single-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-single-if.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "VariableDeclaration", @@ -83,32 +83,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] } ], "loc": null, - "range": { - "start": 32, - "end": 42 - } + "range": [ + 32, + 42 + ] }, { "type": "IfStatement", @@ -117,10 +117,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "consequent": { "type": "BlockStatement", @@ -136,10 +136,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "init": { "type": "BinaryExpression", @@ -148,10 +148,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "operator": "+", "right": { @@ -159,69 +159,69 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "loc": null, - "range": { - "start": 63, - "end": 72 - } + "range": [ + 63, + 72 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 73 - } + "range": [ + 59, + 73 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 77 - } + "range": [ + 53, + 77 + ] }, "alternate": null, "loc": null, - "range": { - "start": 46, - "end": 77 - } + "range": [ + 46, + 77 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 79 - } + "range": [ + 15, + 79 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 79 - }, + "range": [ + 0, + 79 + ], "loc": null, - "range": { - "start": 0, - "end": 79 - } + "range": [ + 0, + 79 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 79 - } + "range": [ + 0, + 79 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-switch.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-switch.js.snap index ed73b6e6c2..32b990d7d9 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-switch.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-switch.js.snap @@ -36,10 +36,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -56,32 +56,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "SwitchStatement", @@ -90,10 +90,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "cases": [ { @@ -102,10 +102,10 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "consequent": [ { @@ -121,10 +121,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "right": { "type": "BinaryExpression", @@ -133,62 +133,62 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 70, - "end": 75 - } + "range": [ + 70, + 75 + ] }, "loc": null, - "range": { - "start": 66, - "end": 75 - } + "range": [ + 66, + 75 + ] }, "directive": null, "loc": null, - "range": { - "start": 66, - "end": 76 - } + "range": [ + 66, + 76 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 83, - "end": 89 - } + "range": [ + 83, + 89 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 95 - } + "range": [ + 58, + 95 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 95 - } + "range": [ + 50, + 95 + ] }, { "type": "SwitchCase", @@ -196,10 +196,10 @@ Output: "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "consequent": [ { @@ -215,10 +215,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "right": { "type": "BinaryExpression", @@ -227,62 +227,62 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "loc": null, - "range": { - "start": 120, - "end": 125 - } + "range": [ + 120, + 125 + ] }, "loc": null, - "range": { - "start": 116, - "end": 125 - } + "range": [ + 116, + 125 + ] }, "directive": null, "loc": null, - "range": { - "start": 116, - "end": 126 - } + "range": [ + 116, + 126 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 133, - "end": 139 - } + "range": [ + 133, + 139 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 145 - } + "range": [ + 108, + 145 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 145 - } + "range": [ + 100, + 145 + ] }, { "type": "SwitchCase", @@ -301,10 +301,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 167, - "end": 168 - } + "range": [ + 167, + 168 + ] }, "right": { "type": "BinaryExpression", @@ -313,60 +313,60 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 172 - } + "range": [ + 171, + 172 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 175, - "end": 176 - } + "range": [ + 175, + 176 + ] }, "loc": null, - "range": { - "start": 171, - "end": 176 - } + "range": [ + 171, + 176 + ] }, "loc": null, - "range": { - "start": 167, - "end": 176 - } + "range": [ + 167, + 176 + ] }, "directive": null, "loc": null, - "range": { - "start": 167, - "end": 177 - } + "range": [ + 167, + 177 + ] } ], "loc": null, - "range": { - "start": 159, - "end": 183 - } + "range": [ + 159, + 183 + ] } ], "loc": null, - "range": { - "start": 150, - "end": 183 - } + "range": [ + 150, + 183 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 187 - } + "range": [ + 33, + 187 + ] }, { "type": "VariableDeclaration", @@ -379,59 +379,59 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "init": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 200 - } + "range": [ + 199, + 200 + ] }, "loc": null, - "range": { - "start": 195, - "end": 200 - } + "range": [ + 195, + 200 + ] } ], "loc": null, - "range": { - "start": 191, - "end": 201 - } + "range": [ + 191, + 201 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 203 - } + "range": [ + 15, + 203 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 203 - }, + "range": [ + 0, + 203 + ], "loc": null, - "range": { - "start": 0, - "end": 203 - } + "range": [ + 0, + 203 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 203 - } + "range": [ + 0, + 203 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-throw.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-throw.js.snap index 06af9781d7..0a3a2bf836 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-throw.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-throw.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "IfStatement", @@ -80,26 +80,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "operator": "===", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "loc": null, - "range": { - "start": 36, - "end": 43 - } + "range": [ + 36, + 43 + ] }, "consequent": { "type": "BlockStatement", @@ -114,46 +114,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "directive": null, "loc": null, - "range": { - "start": 51, - "end": 57 - } + "range": [ + 51, + 57 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 61 - } + "range": [ + 45, + 61 + ] }, "alternate": null, "loc": null, - "range": { - "start": 32, - "end": 61 - } + "range": [ + 32, + 61 + ] }, { "type": "ThrowStatement", @@ -162,42 +162,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "loc": null, - "range": { - "start": 64, - "end": 72 - } + "range": [ + 64, + 72 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 74 - } + "range": [ + 15, + 74 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 74 - }, + "range": [ + 0, + 74 + ], "loc": null, - "range": { - "start": 0, - "end": 74 - } + "range": [ + 0, + 74 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 74 - } + "range": [ + 0, + 74 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-while-no-reassign.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-while-no-reassign.js.snap index 9a66ab7d63..7c58df0707 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-while-no-reassign.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-while-no-reassign.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "WhileStatement", @@ -81,26 +81,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "operator": "<", "right": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 43, - "end": 45 - } + "range": [ + 43, + 45 + ] }, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] }, "body": { "type": "BlockStatement", @@ -114,46 +114,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "loc": null, - "range": { - "start": 53, - "end": 58 - } + "range": [ + 53, + 58 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 59 - } + "range": [ + 53, + 59 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 63 - } + "range": [ + 47, + 63 + ] }, "loc": null, - "range": { - "start": 32, - "end": 63 - } + "range": [ + 32, + 63 + ] }, { "type": "ReturnStatement", @@ -162,42 +162,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 67, - "end": 76 - } + "range": [ + 67, + 76 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 78 - } + "range": [ + 15, + 78 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 78 - }, + "range": [ + 0, + 78 + ], "loc": null, - "range": { - "start": 0, - "end": 78 - } + "range": [ + 0, + 78 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 78 - } + "range": [ + 0, + 78 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-while.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-while.js.snap index 3f565ec6f8..1877a0f284 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-while.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ssa-while.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -45,32 +45,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 23, - "end": 24 - } + "range": [ + 23, + 24 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 23, - "end": 28 - } + "range": [ + 23, + 28 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 29 - } + "range": [ + 19, + 29 + ] }, { "type": "WhileStatement", @@ -81,26 +81,26 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "operator": "<", "right": { "type": "NumericLiteral", "value": 10.0, "loc": null, - "range": { - "start": 43, - "end": 45 - } + "range": [ + 43, + 45 + ] }, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] }, "body": { "type": "BlockStatement", @@ -115,10 +115,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "right": { "type": "BinaryExpression", @@ -127,52 +127,52 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "loc": null, - "range": { - "start": 53, - "end": 62 - } + "range": [ + 53, + 62 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 63 - } + "range": [ + 53, + 63 + ] } ], "loc": null, - "range": { - "start": 47, - "end": 67 - } + "range": [ + 47, + 67 + ] }, "loc": null, - "range": { - "start": 32, - "end": 67 - } + "range": [ + 32, + 67 + ] }, { "type": "ReturnStatement", @@ -181,42 +181,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 79 - } + "range": [ + 78, + 79 + ] }, "loc": null, - "range": { - "start": 71, - "end": 80 - } + "range": [ + 71, + 80 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 82 - } + "range": [ + 15, + 82 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 82 - }, + "range": [ + 0, + 82 + ], "loc": null, - "range": { - "start": 0, - "end": 82 - } + "range": [ + 0, + 82 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 82 - } + "range": [ + 0, + 82 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@store-via-call.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@store-via-call.js.snap index b734305589..cac0dbea64 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@store-via-call.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@store-via-call.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -43,32 +43,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -81,10 +81,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "CallExpression", @@ -93,10 +93,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 48 - } + "range": [ + 45, + 48 + ] }, "arguments": [ { @@ -104,30 +104,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 51 - } + "range": [ + 45, + 51 + ] }, "loc": null, - "range": { - "start": 41, - "end": 51 - } + "range": [ + 41, + 51 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 52 - } + "range": [ + 35, + 52 + ] }, { "type": "ExpressionStatement", @@ -140,41 +140,41 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "property": { "type": "Identifier", "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] }, "computed": false, "loc": null, - "range": { - "start": 55, - "end": 63 - } + "range": [ + 55, + 63 + ] }, "arguments": [], "loc": null, - "range": { - "start": 55, - "end": 65 - } + "range": [ + 55, + 65 + ] }, "directive": null, "loc": null, - "range": { - "start": 55, - "end": 66 - } + "range": [ + 55, + 66 + ] }, { "type": "ReturnStatement", @@ -183,42 +183,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "loc": null, - "range": { - "start": 69, - "end": 78 - } + "range": [ + 69, + 78 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 80 - } + "range": [ + 15, + 80 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 80 - }, + "range": [ + 0, + 80 + ], "loc": null, - "range": { - "start": 0, - "end": 80 - } + "range": [ + 0, + 80 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 80 - } + "range": [ + 0, + 80 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@store-via-new.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@store-via-new.js.snap index a423070524..ff057eba9a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@store-via-new.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@store-via-new.js.snap @@ -23,10 +23,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [], "body": { @@ -43,32 +43,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 25, - "end": 26 - } + "range": [ + 25, + 26 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 29, - "end": 31 - } + "range": [ + 29, + 31 + ] }, "loc": null, - "range": { - "start": 25, - "end": 31 - } + "range": [ + 25, + 31 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 32 - } + "range": [ + 19, + 32 + ] }, { "type": "VariableDeclaration", @@ -81,10 +81,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "init": { "type": "NewExpression", @@ -93,10 +93,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 52 - } + "range": [ + 49, + 52 + ] }, "arguments": [ { @@ -104,30 +104,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 55 - } + "range": [ + 45, + 55 + ] }, "loc": null, - "range": { - "start": 41, - "end": 55 - } + "range": [ + 41, + 55 + ] } ], "loc": null, - "range": { - "start": 35, - "end": 56 - } + "range": [ + 35, + 56 + ] }, { "type": "ExpressionStatement", @@ -140,41 +140,41 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "property": { "type": "Identifier", "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 67 - } + "range": [ + 61, + 67 + ] }, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 67 - } + "range": [ + 59, + 67 + ] }, "arguments": [], "loc": null, - "range": { - "start": 59, - "end": 69 - } + "range": [ + 59, + 69 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 70 - } + "range": [ + 59, + 70 + ] }, { "type": "ReturnStatement", @@ -183,42 +183,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "loc": null, - "range": { - "start": 73, - "end": 82 - } + "range": [ + 73, + 82 + ] } ], "loc": null, - "range": { - "start": 15, - "end": 84 - } + "range": [ + 15, + 84 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 84 - }, + "range": [ + 0, + 84 + ], "loc": null, - "range": { - "start": 0, - "end": 84 - } + "range": [ + 0, + 84 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 84 - } + "range": [ + 0, + 84 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-global-propertyload-case-test.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-global-propertyload-case-test.js.snap index e2c4c6d737..f169a7264c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-global-propertyload-case-test.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-global-propertyload-case-test.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,27 +56,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 49 - } + "range": [ + 38, + 49 + ] }, "cases": [ { @@ -88,27 +88,27 @@ Output: "name": "Global", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 68 - } + "range": [ + 62, + 68 + ] }, "property": { "type": "Identifier", "name": "Property", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 77 - } + "range": [ + 69, + 77 + ] }, "computed": false, "loc": null, - "range": { - "start": 62, - "end": 77 - } + "range": [ + 62, + 77 + ] }, "consequent": [ { @@ -120,30 +120,30 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 94, - "end": 98 - } + "range": [ + 94, + 98 + ] }, "loc": null, - "range": { - "start": 87, - "end": 99 - } + "range": [ + 87, + 99 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 105 - } + "range": [ + 79, + 105 + ] } ], "loc": null, - "range": { - "start": 57, - "end": 105 - } + "range": [ + 57, + 105 + ] }, { "type": "SwitchCase", @@ -158,63 +158,63 @@ Output: "type": "BooleanLiteral", "value": false, "loc": null, - "range": { - "start": 134, - "end": 139 - } + "range": [ + 134, + 139 + ] }, "loc": null, - "range": { - "start": 127, - "end": 140 - } + "range": [ + 127, + 140 + ] } ], "loc": null, - "range": { - "start": 119, - "end": 146 - } + "range": [ + 119, + 146 + ] } ], "loc": null, - "range": { - "start": 110, - "end": 146 - } + "range": [ + 110, + 146 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 150 - } + "range": [ + 30, + 150 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 152 - } + "range": [ + 26, + 152 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 152 - }, + "range": [ + 0, + 152 + ], "loc": null, - "range": { - "start": 0, - "end": 152 - } + "range": [ + 0, + 152 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 152 - } + "range": [ + 0, + 152 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-non-final-default.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-non-final-default.js.snap index e44b011b02..77212128e0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-non-final-default.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-non-final-default.js.snap @@ -40,10 +40,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -51,10 +51,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -71,32 +71,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -109,24 +109,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "init": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] }, { "type": "SwitchStatement", @@ -137,27 +137,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "property": { "type": "Identifier", "name": "p0", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 69 - } + "range": [ + 67, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 69 - } + "range": [ + 61, + 69 + ] }, "cases": [ { @@ -166,10 +166,10 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "consequent": [ { @@ -179,24 +179,24 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 93, - "end": 99 - } + "range": [ + 93, + 99 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 105 - } + "range": [ + 85, + 105 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 105 - } + "range": [ + 77, + 105 + ] }, { "type": "SwitchCase", @@ -204,10 +204,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 115, - "end": 119 - } + "range": [ + 115, + 119 + ] }, "consequent": [ { @@ -224,27 +224,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 130 - } + "range": [ + 129, + 130 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 135 - } + "range": [ + 131, + 135 + ] }, "computed": false, "loc": null, - "range": { - "start": 129, - "end": 135 - } + "range": [ + 129, + 135 + ] }, "arguments": [ { @@ -254,41 +254,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 141 - } + "range": [ + 136, + 141 + ] }, "property": { "type": "Identifier", "name": "p2", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 144 - } + "range": [ + 142, + 144 + ] }, "computed": false, "loc": null, - "range": { - "start": 136, - "end": 144 - } + "range": [ + 136, + 144 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 145 - } + "range": [ + 129, + 145 + ] }, "directive": null, "loc": null, - "range": { - "start": 129, - "end": 146 - } + "range": [ + 129, + 146 + ] }, { "type": "ExpressionStatement", @@ -300,46 +300,46 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 154 - } + "range": [ + 153, + 154 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 157, - "end": 159 - } + "range": [ + 157, + 159 + ] }, "loc": null, - "range": { - "start": 153, - "end": 159 - } + "range": [ + 153, + 159 + ] }, "directive": null, "loc": null, - "range": { - "start": 153, - "end": 160 - } + "range": [ + 153, + 160 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 166 - } + "range": [ + 121, + 166 + ] } ], "loc": null, - "range": { - "start": 110, - "end": 166 - } + "range": [ + 110, + 166 + ] }, { "type": "SwitchCase", @@ -352,24 +352,24 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 188, - "end": 194 - } + "range": [ + 188, + 194 + ] } ], "loc": null, - "range": { - "start": 180, - "end": 200 - } + "range": [ + 180, + 200 + ] } ], "loc": null, - "range": { - "start": 171, - "end": 200 - } + "range": [ + 171, + 200 + ] }, { "type": "SwitchCase", @@ -377,10 +377,10 @@ Output: "type": "BooleanLiteral", "value": false, "loc": null, - "range": { - "start": 210, - "end": 215 - } + "range": [ + 210, + 215 + ] }, "consequent": [ { @@ -396,63 +396,63 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 225, - "end": 226 - } + "range": [ + 225, + 226 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 229, - "end": 230 - } + "range": [ + 229, + 230 + ] }, "loc": null, - "range": { - "start": 225, - "end": 230 - } + "range": [ + 225, + 230 + ] }, "directive": null, "loc": null, - "range": { - "start": 225, - "end": 231 - } + "range": [ + 225, + 231 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 238, - "end": 244 - } + "range": [ + 238, + 244 + ] } ], "loc": null, - "range": { - "start": 217, - "end": 250 - } + "range": [ + 217, + 250 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 250 - } + "range": [ + 205, + 250 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 254 - } + "range": [ + 53, + 254 + ] }, { "type": "VariableDeclaration", @@ -465,10 +465,10 @@ Output: "name": "child", "typeAnnotation": null, "loc": null, - "range": { - "start": 263, - "end": 268 - } + "range": [ + 263, + 268 + ] }, "init": { "type": "JSXElement", @@ -478,10 +478,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 272, - "end": 281 - } + "range": [ + 272, + 281 + ] }, "attributes": [ { @@ -490,10 +490,10 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 282, - "end": 286 - } + "range": [ + 282, + 286 + ] }, "value": { "type": "JSXExpressionContainer", @@ -502,51 +502,51 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 288, - "end": 289 - } + "range": [ + 288, + 289 + ] }, "loc": null, - "range": { - "start": 287, - "end": 290 - } + "range": [ + 287, + 290 + ] }, "loc": null, - "range": { - "start": 282, - "end": 290 - } + "range": [ + 282, + 290 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 271, - "end": 293 - } + "range": [ + 271, + 293 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 271, - "end": 293 - } + "range": [ + 271, + 293 + ] }, "loc": null, - "range": { - "start": 263, - "end": 293 - } + "range": [ + 263, + 293 + ] } ], "loc": null, - "range": { - "start": 257, - "end": 294 - } + "range": [ + 257, + 294 + ] }, { "type": "ExpressionStatement", @@ -559,27 +559,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 297, - "end": 298 - } + "range": [ + 297, + 298 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 299, - "end": 303 - } + "range": [ + 299, + 303 + ] }, "computed": false, "loc": null, - "range": { - "start": 297, - "end": 303 - } + "range": [ + 297, + 303 + ] }, "arguments": [ { @@ -589,41 +589,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 304, - "end": 309 - } + "range": [ + 304, + 309 + ] }, "property": { "type": "Identifier", "name": "p4", "typeAnnotation": null, "loc": null, - "range": { - "start": 310, - "end": 312 - } + "range": [ + 310, + 312 + ] }, "computed": false, "loc": null, - "range": { - "start": 304, - "end": 312 - } + "range": [ + 304, + 312 + ] } ], "loc": null, - "range": { - "start": 297, - "end": 313 - } + "range": [ + 297, + 313 + ] }, "directive": null, "loc": null, - "range": { - "start": 297, - "end": 314 - } + "range": [ + 297, + 314 + ] }, { "type": "ReturnStatement", @@ -635,10 +635,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 325, - "end": 334 - } + "range": [ + 325, + 334 + ] }, "attributes": [ { @@ -647,10 +647,10 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 335, - "end": 339 - } + "range": [ + 335, + 339 + ] }, "value": { "type": "JSXExpressionContainer", @@ -659,30 +659,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 341, - "end": 342 - } + "range": [ + 341, + 342 + ] }, "loc": null, - "range": { - "start": 340, - "end": 343 - } + "range": [ + 340, + 343 + ] }, "loc": null, - "range": { - "start": 335, - "end": 343 - } + "range": [ + 335, + 343 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 324, - "end": 344 - } + "range": [ + 324, + 344 + ] }, "children": [ { @@ -692,16 +692,16 @@ Output: "name": "child", "typeAnnotation": null, "loc": null, - "range": { - "start": 345, - "end": 350 - } + "range": [ + 345, + 350 + ] }, "loc": null, - "range": { - "start": 344, - "end": 351 - } + "range": [ + 344, + 351 + ] } ], "closingElement": { @@ -710,54 +710,54 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 353, - "end": 362 - } + "range": [ + 353, + 362 + ] }, "loc": null, - "range": { - "start": 351, - "end": 363 - } + "range": [ + 351, + 363 + ] }, "loc": null, - "range": { - "start": 324, - "end": 363 - } + "range": [ + 324, + 363 + ] }, "loc": null, - "range": { - "start": 317, - "end": 364 - } + "range": [ + 317, + 364 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 366 - } + "range": [ + 26, + 366 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 366 - }, + "range": [ + 0, + 366 + ], "loc": null, - "range": { - "start": 0, - "end": 366 - } + "range": [ + 0, + 366 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 366 - } + "range": [ + 0, + 366 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-with-fallthrough.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-with-fallthrough.js.snap index 35164f8542..4a9269d32f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-with-fallthrough.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch-with-fallthrough.js.snap @@ -44,10 +44,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -55,10 +55,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -75,24 +75,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] }, "init": null, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 26 - } + "range": [ + 20, + 26 + ] }, { "type": "SwitchStatement", @@ -101,10 +101,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "cases": [ { @@ -113,10 +113,10 @@ Output: "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "consequent": [ { @@ -132,46 +132,46 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "right": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "directive": null, "loc": null, - "range": { - "start": 62, - "end": 68 - } + "range": [ + 62, + 68 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 74 - } + "range": [ + 54, + 74 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 74 - } + "range": [ + 46, + 74 + ] }, { "type": "SwitchCase", @@ -179,10 +179,10 @@ Output: "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "consequent": [ { @@ -198,46 +198,46 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "loc": null, - "range": { - "start": 95, - "end": 100 - } + "range": [ + 95, + 100 + ] }, "directive": null, "loc": null, - "range": { - "start": 95, - "end": 101 - } + "range": [ + 95, + 101 + ] } ], "loc": null, - "range": { - "start": 87, - "end": 107 - } + "range": [ + 87, + 107 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 107 - } + "range": [ + 79, + 107 + ] }, { "type": "SwitchCase", @@ -245,10 +245,10 @@ Output: "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "consequent": [ { @@ -258,24 +258,24 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 128, - "end": 134 - } + "range": [ + 128, + 134 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 140 - } + "range": [ + 120, + 140 + ] } ], "loc": null, - "range": { - "start": 112, - "end": 140 - } + "range": [ + 112, + 140 + ] }, { "type": "SwitchCase", @@ -283,10 +283,10 @@ Output: "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "consequent": [ { @@ -302,55 +302,55 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 162 - } + "range": [ + 161, + 162 + ] }, "right": { "type": "NumericLiteral", "value": 3.0, "loc": null, - "range": { - "start": 165, - "end": 166 - } + "range": [ + 165, + 166 + ] }, "loc": null, - "range": { - "start": 161, - "end": 166 - } + "range": [ + 161, + 166 + ] }, "directive": null, "loc": null, - "range": { - "start": 161, - "end": 167 - } + "range": [ + 161, + 167 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 174, - "end": 180 - } + "range": [ + 174, + 180 + ] } ], "loc": null, - "range": { - "start": 153, - "end": 186 - } + "range": [ + 153, + 186 + ] } ], "loc": null, - "range": { - "start": 145, - "end": 186 - } + "range": [ + 145, + 186 + ] }, { "type": "SwitchCase", @@ -358,10 +358,10 @@ Output: "type": "NumericLiteral", "value": 4.0, "loc": null, - "range": { - "start": 196, - "end": 197 - } + "range": [ + 196, + 197 + ] }, "consequent": [ { @@ -377,46 +377,46 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 208 - } + "range": [ + 207, + 208 + ] }, "right": { "type": "NumericLiteral", "value": 4.0, "loc": null, - "range": { - "start": 211, - "end": 212 - } + "range": [ + 211, + 212 + ] }, "loc": null, - "range": { - "start": 207, - "end": 212 - } + "range": [ + 207, + 212 + ] }, "directive": null, "loc": null, - "range": { - "start": 207, - "end": 213 - } + "range": [ + 207, + 213 + ] } ], "loc": null, - "range": { - "start": 199, - "end": 219 - } + "range": [ + 199, + 219 + ] } ], "loc": null, - "range": { - "start": 191, - "end": 219 - } + "range": [ + 191, + 219 + ] }, { "type": "SwitchCase", @@ -424,10 +424,10 @@ Output: "type": "NumericLiteral", "value": 5.0, "loc": null, - "range": { - "start": 229, - "end": 230 - } + "range": [ + 229, + 230 + ] }, "consequent": [ { @@ -443,46 +443,46 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 240, - "end": 241 - } + "range": [ + 240, + 241 + ] }, "right": { "type": "NumericLiteral", "value": 5.0, "loc": null, - "range": { - "start": 244, - "end": 245 - } + "range": [ + 244, + 245 + ] }, "loc": null, - "range": { - "start": 240, - "end": 245 - } + "range": [ + 240, + 245 + ] }, "directive": null, "loc": null, - "range": { - "start": 240, - "end": 246 - } + "range": [ + 240, + 246 + ] } ], "loc": null, - "range": { - "start": 232, - "end": 252 - } + "range": [ + 232, + 252 + ] } ], "loc": null, - "range": { - "start": 224, - "end": 252 - } + "range": [ + 224, + 252 + ] }, { "type": "SwitchCase", @@ -501,79 +501,79 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 274, - "end": 275 - } + "range": [ + 274, + 275 + ] }, "right": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 278, - "end": 279 - } + "range": [ + 278, + 279 + ] }, "loc": null, - "range": { - "start": 274, - "end": 279 - } + "range": [ + 274, + 279 + ] }, "directive": null, "loc": null, - "range": { - "start": 274, - "end": 280 - } + "range": [ + 274, + 280 + ] } ], "loc": null, - "range": { - "start": 266, - "end": 286 - } + "range": [ + 266, + 286 + ] } ], "loc": null, - "range": { - "start": 257, - "end": 286 - } + "range": [ + 257, + 286 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 290 - } + "range": [ + 29, + 290 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 292 - } + "range": [ + 16, + 292 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 292 - }, + "range": [ + 0, + 292 + ], "loc": null, - "range": { - "start": 0, - "end": 292 - } + "range": [ + 0, + 292 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 292 - } + "range": [ + 0, + 292 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch.js.snap index 4445cb38a1..a023e5fd7d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@switch.js.snap @@ -35,10 +35,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -46,10 +46,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -66,32 +66,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -104,24 +104,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "init": null, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] } ], "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] }, { "type": "SwitchStatement", @@ -132,27 +132,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 66 - } + "range": [ + 61, + 66 + ] }, "property": { "type": "Identifier", "name": "p0", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 69 - } + "range": [ + 67, + 69 + ] }, "computed": false, "loc": null, - "range": { - "start": 61, - "end": 69 - } + "range": [ + 61, + 69 + ] }, "cases": [ { @@ -161,10 +161,10 @@ Output: "type": "BooleanLiteral", "value": true, "loc": null, - "range": { - "start": 82, - "end": 86 - } + "range": [ + 82, + 86 + ] }, "consequent": [ { @@ -181,27 +181,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 96, - "end": 97 - } + "range": [ + 96, + 97 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 102 - } + "range": [ + 98, + 102 + ] }, "computed": false, "loc": null, - "range": { - "start": 96, - "end": 102 - } + "range": [ + 96, + 102 + ] }, "arguments": [ { @@ -211,41 +211,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] }, "property": { "type": "Identifier", "name": "p2", "typeAnnotation": null, "loc": null, - "range": { - "start": 109, - "end": 111 - } + "range": [ + 109, + 111 + ] }, "computed": false, "loc": null, - "range": { - "start": 103, - "end": 111 - } + "range": [ + 103, + 111 + ] } ], "loc": null, - "range": { - "start": 96, - "end": 112 - } + "range": [ + 96, + 112 + ] }, "directive": null, "loc": null, - "range": { - "start": 96, - "end": 113 - } + "range": [ + 96, + 113 + ] }, { "type": "ExpressionStatement", @@ -258,27 +258,27 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 121 - } + "range": [ + 120, + 121 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 126 - } + "range": [ + 122, + 126 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] }, "arguments": [ { @@ -288,41 +288,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 132 - } + "range": [ + 127, + 132 + ] }, "property": { "type": "Identifier", "name": "p3", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 135 - } + "range": [ + 133, + 135 + ] }, "computed": false, "loc": null, - "range": { - "start": 127, - "end": 135 - } + "range": [ + 127, + 135 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 136 - } + "range": [ + 120, + 136 + ] }, "directive": null, "loc": null, - "range": { - "start": 120, - "end": 137 - } + "range": [ + 120, + 137 + ] }, { "type": "ExpressionStatement", @@ -334,46 +334,46 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 145 - } + "range": [ + 144, + 145 + ] }, "right": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 148, - "end": 150 - } + "range": [ + 148, + 150 + ] }, "loc": null, - "range": { - "start": 144, - "end": 150 - } + "range": [ + 144, + 150 + ] }, "directive": null, "loc": null, - "range": { - "start": 144, - "end": 151 - } + "range": [ + 144, + 151 + ] } ], "loc": null, - "range": { - "start": 88, - "end": 157 - } + "range": [ + 88, + 157 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 157 - } + "range": [ + 77, + 157 + ] }, { "type": "SwitchCase", @@ -381,10 +381,10 @@ Output: "type": "BooleanLiteral", "value": false, "loc": null, - "range": { - "start": 167, - "end": 172 - } + "range": [ + 167, + 172 + ] }, "consequent": [ { @@ -400,63 +400,63 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 182, - "end": 183 - } + "range": [ + 182, + 183 + ] }, "right": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 186, - "end": 187 - } + "range": [ + 186, + 187 + ] }, "loc": null, - "range": { - "start": 182, - "end": 187 - } + "range": [ + 182, + 187 + ] }, "directive": null, "loc": null, - "range": { - "start": 182, - "end": 188 - } + "range": [ + 182, + 188 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 195, - "end": 201 - } + "range": [ + 195, + 201 + ] } ], "loc": null, - "range": { - "start": 174, - "end": 207 - } + "range": [ + 174, + 207 + ] } ], "loc": null, - "range": { - "start": 162, - "end": 207 - } + "range": [ + 162, + 207 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 211 - } + "range": [ + 53, + 211 + ] }, { "type": "VariableDeclaration", @@ -469,10 +469,10 @@ Output: "name": "child", "typeAnnotation": null, "loc": null, - "range": { - "start": 220, - "end": 225 - } + "range": [ + 220, + 225 + ] }, "init": { "type": "JSXElement", @@ -482,10 +482,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 229, - "end": 238 - } + "range": [ + 229, + 238 + ] }, "attributes": [ { @@ -494,10 +494,10 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 239, - "end": 243 - } + "range": [ + 239, + 243 + ] }, "value": { "type": "JSXExpressionContainer", @@ -506,51 +506,51 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 245, - "end": 246 - } + "range": [ + 245, + 246 + ] }, "loc": null, - "range": { - "start": 244, - "end": 247 - } + "range": [ + 244, + 247 + ] }, "loc": null, - "range": { - "start": 239, - "end": 247 - } + "range": [ + 239, + 247 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 228, - "end": 250 - } + "range": [ + 228, + 250 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 228, - "end": 250 - } + "range": [ + 228, + 250 + ] }, "loc": null, - "range": { - "start": 220, - "end": 250 - } + "range": [ + 220, + 250 + ] } ], "loc": null, - "range": { - "start": 214, - "end": 251 - } + "range": [ + 214, + 251 + ] }, { "type": "ExpressionStatement", @@ -563,27 +563,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 255 - } + "range": [ + 254, + 255 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 256, - "end": 260 - } + "range": [ + 256, + 260 + ] }, "computed": false, "loc": null, - "range": { - "start": 254, - "end": 260 - } + "range": [ + 254, + 260 + ] }, "arguments": [ { @@ -593,41 +593,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 261, - "end": 266 - } + "range": [ + 261, + 266 + ] }, "property": { "type": "Identifier", "name": "p4", "typeAnnotation": null, "loc": null, - "range": { - "start": 267, - "end": 269 - } + "range": [ + 267, + 269 + ] }, "computed": false, "loc": null, - "range": { - "start": 261, - "end": 269 - } + "range": [ + 261, + 269 + ] } ], "loc": null, - "range": { - "start": 254, - "end": 270 - } + "range": [ + 254, + 270 + ] }, "directive": null, "loc": null, - "range": { - "start": 254, - "end": 271 - } + "range": [ + 254, + 271 + ] }, { "type": "ReturnStatement", @@ -639,10 +639,10 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 282, - "end": 291 - } + "range": [ + 282, + 291 + ] }, "attributes": [ { @@ -651,10 +651,10 @@ Output: "type": "JSXIdentifier", "name": "data", "loc": null, - "range": { - "start": 292, - "end": 296 - } + "range": [ + 292, + 296 + ] }, "value": { "type": "JSXExpressionContainer", @@ -663,30 +663,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 298, - "end": 299 - } + "range": [ + 298, + 299 + ] }, "loc": null, - "range": { - "start": 297, - "end": 300 - } + "range": [ + 297, + 300 + ] }, "loc": null, - "range": { - "start": 292, - "end": 300 - } + "range": [ + 292, + 300 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 281, - "end": 301 - } + "range": [ + 281, + 301 + ] }, "children": [ { @@ -696,16 +696,16 @@ Output: "name": "child", "typeAnnotation": null, "loc": null, - "range": { - "start": 302, - "end": 307 - } + "range": [ + 302, + 307 + ] }, "loc": null, - "range": { - "start": 301, - "end": 308 - } + "range": [ + 301, + 308 + ] } ], "closingElement": { @@ -714,54 +714,54 @@ Output: "type": "JSXIdentifier", "name": "Component", "loc": null, - "range": { - "start": 310, - "end": 319 - } + "range": [ + 310, + 319 + ] }, "loc": null, - "range": { - "start": 308, - "end": 320 - } + "range": [ + 308, + 320 + ] }, "loc": null, - "range": { - "start": 281, - "end": 320 - } + "range": [ + 281, + 320 + ] }, "loc": null, - "range": { - "start": 274, - "end": 321 - } + "range": [ + 274, + 321 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 323 - } + "range": [ + 26, + 323 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 323 - }, + "range": [ + 0, + 323 + ], "loc": null, - "range": { - "start": 0, - "end": 323 - } + "range": [ + 0, + 323 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 323 - } + "range": [ + 0, + 323 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@tagged-template-in-hook.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@tagged-template-in-hook.js.snap index 97a7ecff0a..516e3e6d19 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@tagged-template-in-hook.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@tagged-template-in-hook.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "CallExpression", @@ -64,10 +64,10 @@ Output: "name": "useFragment", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, "arguments": [ { @@ -77,10 +77,10 @@ Output: "name": "graphql", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 62 - } + "range": [ + 55, + 62 + ] }, "quasi": { "type": "TemplateLiteral", @@ -93,24 +93,24 @@ Output: "raw": "fragment on User { name }" }, "loc": null, - "range": { - "start": 62, - "end": 89 - } + "range": [ + 62, + 89 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 62, - "end": 89 - } + "range": [ + 62, + 89 + ] }, "loc": null, - "range": { - "start": 55, - "end": 89 - } + "range": [ + 55, + 89 + ] }, { "type": "MemberExpression", @@ -119,47 +119,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 96 - } + "range": [ + 91, + 96 + ] }, "property": { "type": "Identifier", "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 101 - } + "range": [ + 97, + 101 + ] }, "computed": false, "loc": null, - "range": { - "start": 91, - "end": 101 - } + "range": [ + 91, + 101 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 102 - } + "range": [ + 43, + 102 + ] }, "loc": null, - "range": { - "start": 36, - "end": 102 - } + "range": [ + 36, + 102 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 103 - } + "range": [ + 30, + 103 + ] }, { "type": "ReturnStatement", @@ -170,59 +170,59 @@ Output: "name": "user", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 117 - } + "range": [ + 113, + 117 + ] }, "property": { "type": "Identifier", "name": "name", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 122 - } + "range": [ + 118, + 122 + ] }, "computed": false, "loc": null, - "range": { - "start": 113, - "end": 122 - } + "range": [ + 113, + 122 + ] }, "loc": null, - "range": { - "start": 106, - "end": 123 - } + "range": [ + 106, + 123 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 125 - } + "range": [ + 26, + 125 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 125 - }, + "range": [ + 0, + 125 + ], "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 125 - } + "range": [ + 0, + 125 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@tagged-template-literal.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@tagged-template-literal.js.snap index b9eb0af671..4871bee000 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@tagged-template-literal.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@tagged-template-literal.js.snap @@ -33,10 +33,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -53,10 +53,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "TaggedTemplateExpression", @@ -65,10 +65,10 @@ Output: "name": "graphql", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 40 - } + "range": [ + 33, + 40 + ] }, "quasi": { "type": "TemplateLiteral", @@ -81,37 +81,37 @@ Output: "raw": "\n fragment List_viewer on Viewer\n @argumentDefinitions(\n count: {\n type: \"Int\"\n defaultValue: 10\n directives: [\"@int_max_value(logged_in: 10)\"]\n }\n cursor: { type: \"ID\" }\n )\n\n " }, "loc": null, - "range": { - "start": 40, - "end": 264 - } + "range": [ + 40, + 264 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 40, - "end": 264 - } + "range": [ + 40, + 264 + ] }, "loc": null, - "range": { - "start": 33, - "end": 264 - } + "range": [ + 33, + 264 + ] }, "loc": null, - "range": { - "start": 29, - "end": 264 - } + "range": [ + 29, + 264 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 265 - } + "range": [ + 25, + 265 + ] }, { "type": "ReturnStatement", @@ -120,42 +120,42 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 276, - "end": 277 - } + "range": [ + 276, + 277 + ] }, "loc": null, - "range": { - "start": 269, - "end": 278 - } + "range": [ + 269, + 278 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 280 - } + "range": [ + 21, + 280 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 280 - }, + "range": [ + 0, + 280 + ], "loc": null, - "range": { - "start": 0, - "end": 280 - } + "range": [ + 0, + 280 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 280 - } + "range": [ + 0, + 280 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@template-literal.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@template-literal.js.snap index cec8b39625..bf8a0e8157 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@template-literal.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@template-literal.js.snap @@ -27,10 +27,10 @@ Output: "name": "componentA", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 19 - } + "range": [ + 9, + 19 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 20, - "end": 25 - } + "range": [ + 20, + 25 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 35, - "end": 36 - } + "range": [ + 35, + 36 + ] }, "init": { "type": "TemplateLiteral", @@ -74,10 +74,10 @@ Output: "raw": "hello " }, "loc": null, - "range": { - "start": 39, - "end": 48 - } + "range": [ + 39, + 48 + ] }, { "type": "TemplateElement", @@ -87,10 +87,10 @@ Output: "raw": ", " }, "loc": null, - "range": { - "start": 55, - "end": 60 - } + "range": [ + 55, + 60 + ] }, { "type": "TemplateElement", @@ -100,10 +100,10 @@ Output: "raw": "!" }, "loc": null, - "range": { - "start": 67, - "end": 70 - } + "range": [ + 67, + 70 + ] } ], "expressions": [ @@ -114,27 +114,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 53 - } + "range": [ + 48, + 53 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "computed": false, "loc": null, - "range": { - "start": 48, - "end": 55 - } + "range": [ + 48, + 55 + ] }, { "type": "MemberExpression", @@ -143,47 +143,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "computed": false, "loc": null, - "range": { - "start": 60, - "end": 67 - } + "range": [ + 60, + 67 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 70 - } + "range": [ + 39, + 70 + ] }, "loc": null, - "range": { - "start": 35, - "end": 70 - } + "range": [ + 35, + 70 + ] } ], "loc": null, - "range": { - "start": 31, - "end": 71 - } + "range": [ + 31, + 71 + ] }, { "type": "ExpressionStatement", @@ -195,10 +195,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "right": { "type": "TemplateLiteral", @@ -211,31 +211,31 @@ Output: "raw": "" }, "loc": null, - "range": { - "start": 79, - "end": 81 - } + "range": [ + 79, + 81 + ] } ], "expressions": [], "loc": null, - "range": { - "start": 79, - "end": 81 - } + "range": [ + 79, + 81 + ] }, "loc": null, - "range": { - "start": 74, - "end": 81 - } + "range": [ + 74, + 81 + ] }, "directive": null, "loc": null, - "range": { - "start": 74, - "end": 82 - } + "range": [ + 74, + 82 + ] }, { "type": "ReturnStatement", @@ -244,36 +244,36 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 93 - } + "range": [ + 92, + 93 + ] }, "loc": null, - "range": { - "start": 85, - "end": 94 - } + "range": [ + 85, + 94 + ] } ], "loc": null, - "range": { - "start": 27, - "end": 96 - } + "range": [ + 27, + 96 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 96 - }, + "range": [ + 0, + 96 + ], "loc": null, - "range": { - "start": 0, - "end": 96 - } + "range": [ + 0, + 96 + ] }, { "type": "FunctionDeclaration", @@ -282,10 +282,10 @@ Output: "name": "componentB", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 117 - } + "range": [ + 107, + 117 + ] }, "params": [ { @@ -293,10 +293,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 123 - } + "range": [ + 118, + 123 + ] } ], "body": { @@ -313,10 +313,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 133, - "end": 134 - } + "range": [ + 133, + 134 + ] }, "init": { "type": "CallExpression", @@ -325,10 +325,10 @@ Output: "name": "useFoo", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 143 - } + "range": [ + 137, + 143 + ] }, "arguments": [ { @@ -342,10 +342,10 @@ Output: "raw": "hello " }, "loc": null, - "range": { - "start": 144, - "end": 153 - } + "range": [ + 144, + 153 + ] }, { "type": "TemplateElement", @@ -355,10 +355,10 @@ Output: "raw": "" }, "loc": null, - "range": { - "start": 160, - "end": 162 - } + "range": [ + 160, + 162 + ] } ], "expressions": [ @@ -369,54 +369,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 153, - "end": 158 - } + "range": [ + 153, + 158 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "computed": false, "loc": null, - "range": { - "start": 153, - "end": 160 - } + "range": [ + 153, + 160 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 162 - } + "range": [ + 144, + 162 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 163 - } + "range": [ + 137, + 163 + ] }, "loc": null, - "range": { - "start": 133, - "end": 163 - } + "range": [ + 133, + 163 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 164 - } + "range": [ + 129, + 164 + ] }, { "type": "ReturnStatement", @@ -425,42 +425,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "loc": null, - "range": { - "start": 167, - "end": 176 - } + "range": [ + 167, + 176 + ] } ], "loc": null, - "range": { - "start": 125, - "end": 178 - } + "range": [ + 125, + 178 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 98, - "end": 178 - }, + "range": [ + 98, + 178 + ], "loc": null, - "range": { - "start": 98, - "end": 178 - } + "range": [ + 98, + 178 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 178 - } + "range": [ + 0, + 178 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-accessed-outside-scope.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-accessed-outside-scope.js.snap index 66101a6fe7..e2ab8b3549 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-accessed-outside-scope.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-accessed-outside-scope.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] }, "init": { "type": "NewExpression", @@ -65,30 +65,30 @@ Output: "name": "MaybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "arguments": [], "loc": null, - "range": { - "start": 51, - "end": 69 - } + "range": [ + 51, + 69 + ] }, "loc": null, - "range": { - "start": 36, - "end": 69 - } + "range": [ + 36, + 69 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 70 - } + "range": [ + 30, + 70 + ] }, { "type": "VariableDeclaration", @@ -101,33 +101,33 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "Identifier", "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 87 - } + "range": [ + 73, + 87 + ] }, { "type": "ReturnStatement", @@ -139,10 +139,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, { "type": "CallExpression", @@ -151,10 +151,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 112 - } + "range": [ + 101, + 112 + ] }, "arguments": [ { @@ -162,56 +162,56 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 125 - } + "range": [ + 113, + 125 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 126 - } + "range": [ + 101, + 126 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 127 - } + "range": [ + 97, + 127 + ] }, "loc": null, - "range": { - "start": 90, - "end": 128 - } + "range": [ + 90, + 128 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 130 - } + "range": [ + 26, + 130 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 130 - }, + "range": [ + 0, + 130 + ], "loc": null, - "range": { - "start": 0, - "end": 130 - } + "range": [ + 0, + 130 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 130 - } + "range": [ + 0, + 130 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-at-start-of-value-block.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-at-start-of-value-block.js.snap index e3d0117907..626c384712 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-at-start-of-value-block.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-at-start-of-value-block.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "init": { "type": "ConditionalExpression", @@ -65,18 +65,18 @@ Output: "name": "isMenuShown", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 121 - } + "range": [ + 110, + 121 + ] }, "alternate": { "type": "NullLiteral", "loc": null, - "range": { - "start": 168, - "end": 172 - } + "range": [ + 168, + 172 + ] }, "consequent": { "type": "JSXElement", @@ -86,18 +86,18 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 125, - "end": 128 - } + "range": [ + 125, + 128 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 124, - "end": 129 - } + "range": [ + 124, + 129 + ] }, "children": [ { @@ -105,10 +105,10 @@ Output: "value": " ", "raw": " ", "loc": null, - "range": { - "start": 129, - "end": 130 - } + "range": [ + 129, + 130 + ] }, { "type": "JSXExpressionContainer", @@ -121,27 +121,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "computed": false, "loc": null, - "range": { - "start": 131, - "end": 138 - } + "range": [ + 131, + 138 + ] }, "alternate": { "type": "MemberExpression", @@ -150,27 +150,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 151, - "end": 156 - } + "range": [ + 151, + 156 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 157, - "end": 158 - } + "range": [ + 157, + 158 + ] }, "computed": false, "loc": null, - "range": { - "start": 151, - "end": 158 - } + "range": [ + 151, + 158 + ] }, "consequent": { "type": "MemberExpression", @@ -179,39 +179,39 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 146 - } + "range": [ + 141, + 146 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "computed": false, "loc": null, - "range": { - "start": 141, - "end": 148 - } + "range": [ + 141, + 148 + ] }, "loc": null, - "range": { - "start": 131, - "end": 158 - } + "range": [ + 131, + 158 + ] }, "loc": null, - "range": { - "start": 130, - "end": 159 - } + "range": [ + 130, + 159 + ] } ], "closingElement": { @@ -220,41 +220,41 @@ Output: "type": "JSXIdentifier", "name": "Bar", "loc": null, - "range": { - "start": 161, - "end": 164 - } + "range": [ + 161, + 164 + ] }, "loc": null, - "range": { - "start": 159, - "end": 165 - } + "range": [ + 159, + 165 + ] }, "loc": null, - "range": { - "start": 124, - "end": 165 - } + "range": [ + 124, + 165 + ] }, "loc": null, - "range": { - "start": 110, - "end": 172 - } + "range": [ + 110, + 172 + ] }, "loc": null, - "range": { - "start": 106, - "end": 172 - } + "range": [ + 106, + 172 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 173 - } + "range": [ + 100, + 173 + ] }, { "type": "ReturnStatement", @@ -263,42 +263,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "loc": null, - "range": { - "start": 176, - "end": 185 - } + "range": [ + 176, + 185 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 187 - } + "range": [ + 26, + 187 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 187 - }, + "range": [ + 0, + 187 + ], "loc": null, - "range": { - "start": 0, - "end": 187 - } + "range": [ + 0, + 187 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 187 - } + "range": [ + 0, + 187 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-property-load-accessed-outside-scope.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-property-load-accessed-outside-scope.js.snap index 1918d4bc26..c03f9dee34 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-property-load-accessed-outside-scope.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@temporary-property-load-accessed-outside-scope.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 48 - } + "range": [ + 36, + 48 + ] }, "init": { "type": "NewExpression", @@ -65,30 +65,30 @@ Output: "name": "MaybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "arguments": [], "loc": null, - "range": { - "start": 51, - "end": 69 - } + "range": [ + 51, + 69 + ] }, "loc": null, - "range": { - "start": 36, - "end": 69 - } + "range": [ + 36, + 69 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 70 - } + "range": [ + 30, + 70 + ] }, { "type": "VariableDeclaration", @@ -101,10 +101,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "MemberExpression", @@ -113,40 +113,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 92 - } + "range": [ + 87, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 81, - "end": 92 - } + "range": [ + 81, + 92 + ] }, "loc": null, - "range": { - "start": 77, - "end": 92 - } + "range": [ + 77, + 92 + ] } ], "loc": null, - "range": { - "start": 73, - "end": 93 - } + "range": [ + 73, + 93 + ] }, { "type": "ReturnStatement", @@ -158,10 +158,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, { "type": "CallExpression", @@ -170,10 +170,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 118 - } + "range": [ + 107, + 118 + ] }, "arguments": [ { @@ -181,56 +181,56 @@ Output: "name": "maybeMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 131 - } + "range": [ + 119, + 131 + ] } ], "loc": null, - "range": { - "start": 107, - "end": 132 - } + "range": [ + 107, + 132 + ] } ], "loc": null, - "range": { - "start": 103, - "end": 133 - } + "range": [ + 103, + 133 + ] }, "loc": null, - "range": { - "start": 96, - "end": 134 - } + "range": [ + 96, + 134 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 136 - } + "range": [ + 26, + 136 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 136 - }, + "range": [ + 0, + 136 + ], "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 136 - } + "range": [ + 0, + 136 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ternary-assignment-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ternary-assignment-expression.js.snap index 2b1f360ca2..25400b1954 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ternary-assignment-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ternary-assignment-expression.js.snap @@ -22,10 +22,10 @@ Output: "name": "ternary", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 16 - } + "range": [ + 9, + 16 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 17, - "end": 22 - } + "range": [ + 17, + 22 + ] } ], "body": { @@ -53,32 +53,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "loc": null, - "range": { - "start": 32, - "end": 37 - } + "range": [ + 32, + 37 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 38 - } + "range": [ + 28, + 38 + ] }, { "type": "VariableDeclaration", @@ -91,10 +91,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "ConditionalExpression", @@ -105,27 +105,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 56 - } + "range": [ + 51, + 56 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "computed": false, "loc": null, - "range": { - "start": 51, - "end": 58 - } + "range": [ + 51, + 58 + ] }, "alternate": { "type": "AssignmentExpression", @@ -135,25 +135,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "loc": null, - "range": { - "start": 72, - "end": 77 - } + "range": [ + 72, + 77 + ] }, "consequent": { "type": "AssignmentExpression", @@ -163,44 +163,44 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "loc": null, - "range": { - "start": 62, - "end": 67 - } + "range": [ + 62, + 67 + ] }, "loc": null, - "range": { - "start": 51, - "end": 78 - } + "range": [ + 51, + 78 + ] }, "loc": null, - "range": { - "start": 47, - "end": 78 - } + "range": [ + 47, + 78 + ] } ], "loc": null, - "range": { - "start": 41, - "end": 79 - } + "range": [ + 41, + 79 + ] }, { "type": "ReturnStatement", @@ -211,10 +211,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "operator": "+", "right": { @@ -222,48 +222,48 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "loc": null, - "range": { - "start": 89, - "end": 94 - } + "range": [ + 89, + 94 + ] }, "loc": null, - "range": { - "start": 82, - "end": 95 - } + "range": [ + 82, + 95 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 97 - } + "range": [ + 24, + 97 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 97 - }, + "range": [ + 0, + 97 + ], "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 97 - } + "range": [ + 0, + 97 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ternary-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ternary-expression.js.snap index e5b0f753bf..f719d9783b 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ternary-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@ternary-expression.js.snap @@ -22,10 +22,10 @@ Output: "name": "ternary", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 16 - } + "range": [ + 9, + 16 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 17, - "end": 22 - } + "range": [ + 17, + 22 + ] } ], "body": { @@ -53,10 +53,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ConditionalExpression", @@ -70,27 +70,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 43 - } + "range": [ + 38, + 43 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "computed": false, "loc": null, - "range": { - "start": 38, - "end": 45 - } + "range": [ + 38, + 45 + ] }, "right": { "type": "MemberExpression", @@ -99,33 +99,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 54 - } + "range": [ + 49, + 54 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 49, - "end": 56 - } + "range": [ + 49, + 56 + ] }, "loc": null, - "range": { - "start": 38, - "end": 56 - } + "range": [ + 38, + 56 + ] }, "alternate": { "type": "LogicalExpression", @@ -137,27 +137,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "property": { "type": "Identifier", "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "computed": false, "loc": null, - "range": { - "start": 80, - "end": 87 - } + "range": [ + 80, + 87 + ] }, "right": { "type": "MemberExpression", @@ -166,33 +166,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 96 - } + "range": [ + 91, + 96 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "computed": false, "loc": null, - "range": { - "start": 91, - "end": 98 - } + "range": [ + 91, + 98 + ] }, "loc": null, - "range": { - "start": 80, - "end": 98 - } + "range": [ + 80, + 98 + ] }, "consequent": { "type": "LogicalExpression", @@ -204,27 +204,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 64 - } + "range": [ + 59, + 64 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 66 - } + "range": [ + 59, + 66 + ] }, "right": { "type": "MemberExpression", @@ -233,52 +233,52 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 75 - } + "range": [ + 70, + 75 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "computed": false, "loc": null, - "range": { - "start": 70, - "end": 77 - } + "range": [ + 70, + 77 + ] }, "loc": null, - "range": { - "start": 59, - "end": 77 - } + "range": [ + 59, + 77 + ] }, "loc": null, - "range": { - "start": 38, - "end": 98 - } + "range": [ + 38, + 98 + ] }, "loc": null, - "range": { - "start": 34, - "end": 98 - } + "range": [ + 34, + 98 + ] } ], "loc": null, - "range": { - "start": 28, - "end": 99 - } + "range": [ + 28, + 99 + ] }, { "type": "VariableDeclaration", @@ -291,10 +291,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "init": { "type": "ConditionalExpression", @@ -305,27 +305,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 117 - } + "range": [ + 112, + 117 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 118, - "end": 119 - } + "range": [ + 118, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 112, - "end": 119 - } + "range": [ + 112, + 119 + ] }, "alternate": { "type": "MemberExpression", @@ -334,27 +334,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 170 - } + "range": [ + 165, + 170 + ] }, "property": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 171, - "end": 172 - } + "range": [ + 171, + 172 + ] }, "computed": false, "loc": null, - "range": { - "start": 165, - "end": 172 - } + "range": [ + 165, + 172 + ] }, "consequent": { "type": "ConditionalExpression", @@ -368,27 +368,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 128 - } + "range": [ + 123, + 128 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 130 - } + "range": [ + 129, + 130 + ] }, "computed": false, "loc": null, - "range": { - "start": 123, - "end": 130 - } + "range": [ + 123, + 130 + ] }, "right": { "type": "MemberExpression", @@ -397,33 +397,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 134, - "end": 139 - } + "range": [ + 134, + 139 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] }, "computed": false, "loc": null, - "range": { - "start": 134, - "end": 141 - } + "range": [ + 134, + 141 + ] }, "loc": null, - "range": { - "start": 123, - "end": 141 - } + "range": [ + 123, + 141 + ] }, "alternate": { "type": "MemberExpression", @@ -432,27 +432,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 159 - } + "range": [ + 154, + 159 + ] }, "property": { "type": "Identifier", "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 161 - } + "range": [ + 160, + 161 + ] }, "computed": false, "loc": null, - "range": { - "start": 154, - "end": 161 - } + "range": [ + 154, + 161 + ] }, "consequent": { "type": "MemberExpression", @@ -461,52 +461,52 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 144, - "end": 149 - } + "range": [ + 144, + 149 + ] }, "property": { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "computed": false, "loc": null, - "range": { - "start": 144, - "end": 151 - } + "range": [ + 144, + 151 + ] }, "loc": null, - "range": { - "start": 123, - "end": 161 - } + "range": [ + 123, + 161 + ] }, "loc": null, - "range": { - "start": 112, - "end": 172 - } + "range": [ + 112, + 172 + ] }, "loc": null, - "range": { - "start": 108, - "end": 172 - } + "range": [ + 108, + 172 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 173 - } + "range": [ + 102, + 173 + ] }, { "type": "ReturnStatement", @@ -517,66 +517,66 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "alternate": { "type": "NullLiteral", "loc": null, - "range": { - "start": 191, - "end": 195 - } + "range": [ + 191, + 195 + ] }, "consequent": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 188 - } + "range": [ + 187, + 188 + ] }, "loc": null, - "range": { - "start": 183, - "end": 195 - } + "range": [ + 183, + 195 + ] }, "loc": null, - "range": { - "start": 176, - "end": 196 - } + "range": [ + 176, + 196 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 198 - } + "range": [ + 24, + 198 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 198 - }, + "range": [ + 0, + 198 + ], "loc": null, - "range": { - "start": 0, - "end": 198 - } + "range": [ + 0, + 198 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 198 - } + "range": [ + 0, + 198 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@timers.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@timers.js.snap index c408291f8c..4d843cee5f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@timers.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@timers.js.snap @@ -27,10 +27,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -38,10 +38,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -58,10 +58,10 @@ Output: "name": "start", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 41 - } + "range": [ + 36, + 41 + ] }, "init": { "type": "CallExpression", @@ -72,47 +72,47 @@ Output: "name": "performance", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 55 - } + "range": [ + 44, + 55 + ] }, "property": { "type": "Identifier", "name": "now", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 59 - } + "range": [ + 56, + 59 + ] }, "computed": false, "loc": null, - "range": { - "start": 44, - "end": 59 - } + "range": [ + 44, + 59 + ] }, "arguments": [], "loc": null, - "range": { - "start": 44, - "end": 61 - } + "range": [ + 44, + 61 + ] }, "loc": null, - "range": { - "start": 36, - "end": 61 - } + "range": [ + 36, + 61 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 62 - } + "range": [ + 30, + 62 + ] }, { "type": "VariableDeclaration", @@ -125,10 +125,10 @@ Output: "name": "now", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 74 - } + "range": [ + 71, + 74 + ] }, "init": { "type": "CallExpression", @@ -139,47 +139,47 @@ Output: "name": "Date", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 81 - } + "range": [ + 77, + 81 + ] }, "property": { "type": "Identifier", "name": "now", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "computed": false, "loc": null, - "range": { - "start": 77, - "end": 85 - } + "range": [ + 77, + 85 + ] }, "arguments": [], "loc": null, - "range": { - "start": 77, - "end": 87 - } + "range": [ + 77, + 87 + ] }, "loc": null, - "range": { - "start": 71, - "end": 87 - } + "range": [ + 71, + 87 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 88 - } + "range": [ + 65, + 88 + ] }, { "type": "VariableDeclaration", @@ -192,10 +192,10 @@ Output: "name": "time", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 101 - } + "range": [ + 97, + 101 + ] }, "init": { "type": "BinaryExpression", @@ -208,34 +208,34 @@ Output: "name": "performance", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 115 - } + "range": [ + 104, + 115 + ] }, "property": { "type": "Identifier", "name": "now", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 119 - } + "range": [ + 116, + 119 + ] }, "computed": false, "loc": null, - "range": { - "start": 104, - "end": 119 - } + "range": [ + 104, + 119 + ] }, "arguments": [], "loc": null, - "range": { - "start": 104, - "end": 121 - } + "range": [ + 104, + 121 + ] }, "operator": "-", "right": { @@ -243,29 +243,29 @@ Output: "name": "start", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 129 - } + "range": [ + 124, + 129 + ] }, "loc": null, - "range": { - "start": 104, - "end": 129 - } + "range": [ + 104, + 129 + ] }, "loc": null, - "range": { - "start": 97, - "end": 129 - } + "range": [ + 97, + 129 + ] } ], "loc": null, - "range": { - "start": 91, - "end": 130 - } + "range": [ + 91, + 130 + ] }, { "type": "ReturnStatement", @@ -277,18 +277,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 147, - "end": 150 - } + "range": [ + 147, + 150 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 146, - "end": 151 - } + "range": [ + 146, + 151 + ] }, "children": [ { @@ -296,10 +296,10 @@ Output: "value": "\n rendering took ", "raw": "\n rendering took ", "loc": null, - "range": { - "start": 151, - "end": 173 - } + "range": [ + 151, + 173 + ] }, { "type": "JSXExpressionContainer", @@ -308,26 +308,26 @@ Output: "name": "time", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 178 - } + "range": [ + 174, + 178 + ] }, "loc": null, - "range": { - "start": 173, - "end": 179 - } + "range": [ + 173, + 179 + ] }, { "type": "JSXText", "value": " at ", "raw": " at ", "loc": null, - "range": { - "start": 179, - "end": 183 - } + "range": [ + 179, + 183 + ] }, { "type": "JSXExpressionContainer", @@ -336,26 +336,26 @@ Output: "name": "now", "typeAnnotation": null, "loc": null, - "range": { - "start": 184, - "end": 187 - } + "range": [ + 184, + 187 + ] }, "loc": null, - "range": { - "start": 183, - "end": 188 - } + "range": [ + 183, + 188 + ] }, { "type": "JSXText", "value": "\n ", "raw": "\n ", "loc": null, - "range": { - "start": 188, - "end": 193 - } + "range": [ + 188, + 193 + ] } ], "closingElement": { @@ -364,54 +364,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 195, - "end": 198 - } + "range": [ + 195, + 198 + ] }, "loc": null, - "range": { - "start": 193, - "end": 199 - } + "range": [ + 193, + 199 + ] }, "loc": null, - "range": { - "start": 146, - "end": 199 - } + "range": [ + 146, + 199 + ] }, "loc": null, - "range": { - "start": 133, - "end": 204 - } + "range": [ + 133, + 204 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 206 - } + "range": [ + 26, + 206 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 206 - }, + "range": [ + 0, + 206 + ], "loc": null, - "range": { - "start": 0, - "end": 206 - } + "range": [ + 0, + 206 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 206 - } + "range": [ + 0, + 206 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@todo-function-expression-captures-value-later-frozen.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@todo-function-expression-captures-value-later-frozen.js.snap index 56c4441146..ac2ffc28bd 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@todo-function-expression-captures-value-later-frozen.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@todo-function-expression-captures-value-later-frozen.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -42,10 +42,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -62,32 +62,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 38, - "end": 40 - } + "range": [ + 38, + 40 + ] }, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 41 - } + "range": [ + 30, + 41 + ] }, { "type": "VariableDeclaration", @@ -100,10 +100,10 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 187, - "end": 195 - } + "range": [ + 187, + 195 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -114,10 +114,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 199, - "end": 200 - } + "range": [ + 199, + 200 + ] } ], "body": { @@ -132,10 +132,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 211, - "end": 222 - } + "range": [ + 211, + 222 + ] }, "arguments": [ { @@ -143,10 +143,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 223, - "end": 224 - } + "range": [ + 223, + 224 + ] }, { "type": "MemberExpression", @@ -157,92 +157,92 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 226, - "end": 227 - } + "range": [ + 226, + 227 + ] }, "property": { "type": "Identifier", "name": "target", "typeAnnotation": null, "loc": null, - "range": { - "start": 228, - "end": 234 - } + "range": [ + 228, + 234 + ] }, "computed": false, "loc": null, - "range": { - "start": 226, - "end": 234 - } + "range": [ + 226, + 234 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 235, - "end": 240 - } + "range": [ + 235, + 240 + ] }, "computed": false, "loc": null, - "range": { - "start": 226, - "end": 240 - } + "range": [ + 226, + 240 + ] } ], "loc": null, - "range": { - "start": 211, - "end": 241 - } + "range": [ + 211, + 241 + ] }, "directive": null, "loc": null, - "range": { - "start": 211, - "end": 242 - } + "range": [ + 211, + 242 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 246 - } + "range": [ + 205, + 246 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 198, - "end": 246 - }, + "range": [ + 198, + 246 + ], "expression": false, "loc": null, - "range": { - "start": 198, - "end": 246 - } + "range": [ + 198, + 246 + ] }, "loc": null, - "range": { - "start": 187, - "end": 246 - } + "range": [ + 187, + 246 + ] } ], "loc": null, - "range": { - "start": 181, - "end": 247 - } + "range": [ + 181, + 247 + ] }, { "type": "IfStatement", @@ -253,27 +253,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 254, - "end": 259 - } + "range": [ + 254, + 259 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 260, - "end": 264 - } + "range": [ + 260, + 264 + ] }, "computed": false, "loc": null, - "range": { - "start": 254, - "end": 264 - } + "range": [ + 254, + 264 + ] }, "consequent": { "type": "BlockStatement", @@ -288,18 +288,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 273, - "end": 276 - } + "range": [ + 273, + 276 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 272, - "end": 277 - } + "range": [ + 272, + 277 + ] }, "children": [ { @@ -309,16 +309,16 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 278, - "end": 279 - } + "range": [ + 278, + 279 + ] }, "loc": null, - "range": { - "start": 277, - "end": 280 - } + "range": [ + 277, + 280 + ] } ], "closingElement": { @@ -327,43 +327,43 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 282, - "end": 285 - } + "range": [ + 282, + 285 + ] }, "loc": null, - "range": { - "start": 280, - "end": 286 - } + "range": [ + 280, + 286 + ] }, "loc": null, - "range": { - "start": 272, - "end": 286 - } + "range": [ + 272, + 286 + ] }, "directive": null, "loc": null, - "range": { - "start": 272, - "end": 287 - } + "range": [ + 272, + 287 + ] } ], "loc": null, - "range": { - "start": 266, - "end": 291 - } + "range": [ + 266, + 291 + ] }, "alternate": null, "loc": null, - "range": { - "start": 250, - "end": 291 - } + "range": [ + 250, + 291 + ] }, { "type": "ExpressionStatement", @@ -374,24 +374,24 @@ Output: "name": "onChange", "typeAnnotation": null, "loc": null, - "range": { - "start": 364, - "end": 372 - } + "range": [ + 364, + 372 + ] }, "arguments": [], "loc": null, - "range": { - "start": 364, - "end": 374 - } + "range": [ + 364, + 374 + ] }, "directive": null, "loc": null, - "range": { - "start": 364, - "end": 375 - } + "range": [ + 364, + 375 + ] }, { "type": "ReturnStatement", @@ -403,10 +403,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 386, - "end": 389 - } + "range": [ + 386, + 389 + ] }, "attributes": [ { @@ -415,10 +415,10 @@ Output: "type": "JSXIdentifier", "name": "value", "loc": null, - "range": { - "start": 390, - "end": 395 - } + "range": [ + 390, + 395 + ] }, "value": { "type": "JSXExpressionContainer", @@ -427,70 +427,70 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 397, - "end": 398 - } + "range": [ + 397, + 398 + ] }, "loc": null, - "range": { - "start": 396, - "end": 399 - } + "range": [ + 396, + 399 + ] }, "loc": null, - "range": { - "start": 390, - "end": 399 - } + "range": [ + 390, + 399 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 385, - "end": 402 - } + "range": [ + 385, + 402 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 385, - "end": 402 - } + "range": [ + 385, + 402 + ] }, "loc": null, - "range": { - "start": 378, - "end": 403 - } + "range": [ + 378, + 403 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 405 - } + "range": [ + 26, + 405 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 405 - }, + "range": [ + 0, + 405 + ], "loc": null, - "range": { - "start": 0, - "end": 405 - } + "range": [ + 0, + 405 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 405 - } + "range": [ + 0, + 405 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@todo.unnecessary-lambda-memoization.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@todo.unnecessary-lambda-memoization.js.snap index d10e439c0d..79b3fed19e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@todo.unnecessary-lambda-memoization.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@todo.unnecessary-lambda-memoization.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -42,10 +42,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -62,10 +62,10 @@ Output: "name": "data", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "CallExpression", @@ -74,30 +74,30 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 52 - } + "range": [ + 43, + 52 + ] }, "arguments": [], "loc": null, - "range": { - "start": 43, - "end": 54 - } + "range": [ + 43, + 54 + ] }, "loc": null, - "range": { - "start": 36, - "end": 54 - } + "range": [ + 36, + 54 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 55 - } + "range": [ + 30, + 55 + ] }, { "type": "VariableDeclaration", @@ -110,10 +110,10 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 770, - "end": 775 - } + "range": [ + 770, + 775 + ] }, "init": { "type": "CallExpression", @@ -126,44 +126,44 @@ Output: "name": "data", "typeAnnotation": null, "loc": null, - "range": { - "start": 778, - "end": 782 - } + "range": [ + 778, + 782 + ] }, "property": { "type": "Identifier", "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 783, - "end": 788 - } + "range": [ + 783, + 788 + ] }, "computed": false, "loc": null, - "range": { - "start": 778, - "end": 788 - } + "range": [ + 778, + 788 + ] }, "property": { "type": "Identifier", "name": "map", "typeAnnotation": null, "loc": null, - "range": { - "start": 789, - "end": 792 - } + "range": [ + 789, + 792 + ] }, "computed": false, "loc": null, - "range": { - "start": 778, - "end": 792 - } + "range": [ + 778, + 792 + ] }, "arguments": [ { @@ -175,10 +175,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 794, - "end": 798 - } + "range": [ + 794, + 798 + ] } ], "body": { @@ -189,10 +189,10 @@ Output: "type": "JSXIdentifier", "name": "Item", "loc": null, - "range": { - "start": 804, - "end": 808 - } + "range": [ + 804, + 808 + ] }, "attributes": [ { @@ -201,10 +201,10 @@ Output: "type": "JSXIdentifier", "name": "item", "loc": null, - "range": { - "start": 809, - "end": 813 - } + "range": [ + 809, + 813 + ] }, "value": { "type": "JSXExpressionContainer", @@ -213,72 +213,72 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 815, - "end": 819 - } + "range": [ + 815, + 819 + ] }, "loc": null, - "range": { - "start": 814, - "end": 820 - } + "range": [ + 814, + 820 + ] }, "loc": null, - "range": { - "start": 809, - "end": 820 - } + "range": [ + 809, + 820 + ] } ], "selfClosing": true, "loc": null, - "range": { - "start": 803, - "end": 823 - } + "range": [ + 803, + 823 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 803, - "end": 823 - } + "range": [ + 803, + 823 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 793, - "end": 823 - }, + "range": [ + 793, + 823 + ], "expression": true, "loc": null, - "range": { - "start": 793, - "end": 823 - } + "range": [ + 793, + 823 + ] } ], "loc": null, - "range": { - "start": 778, - "end": 824 - } + "range": [ + 778, + 824 + ] }, "loc": null, - "range": { - "start": 770, - "end": 824 - } + "range": [ + 770, + 824 + ] } ], "loc": null, - "range": { - "start": 764, - "end": 825 - } + "range": [ + 764, + 825 + ] }, { "type": "ReturnStatement", @@ -290,18 +290,18 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 836, - "end": 839 - } + "range": [ + 836, + 839 + ] }, "attributes": [], "selfClosing": false, "loc": null, - "range": { - "start": 835, - "end": 840 - } + "range": [ + 835, + 840 + ] }, "children": [ { @@ -311,16 +311,16 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 841, - "end": 846 - } + "range": [ + 841, + 846 + ] }, "loc": null, - "range": { - "start": 840, - "end": 847 - } + "range": [ + 840, + 847 + ] } ], "closingElement": { @@ -329,54 +329,54 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 849, - "end": 852 - } + "range": [ + 849, + 852 + ] }, "loc": null, - "range": { - "start": 847, - "end": 853 - } + "range": [ + 847, + 853 + ] }, "loc": null, - "range": { - "start": 835, - "end": 853 - } + "range": [ + 835, + 853 + ] }, "loc": null, - "range": { - "start": 828, - "end": 854 - } + "range": [ + 828, + 854 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 856 - } + "range": [ + 26, + 856 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 856 - }, + "range": [ + 0, + 856 + ], "loc": null, - "range": { - "start": 0, - "end": 856 - } + "range": [ + 0, + 856 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 856 - } + "range": [ + 0, + 856 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@transitive-alias-fields.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@transitive-alias-fields.js.snap index c4ff5760fd..85d6a65e14 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@transitive-alias-fields.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@transitive-alias-fields.js.snap @@ -29,10 +29,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -49,32 +49,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 33, - "end": 35 - } + "range": [ + 33, + 35 + ] }, "loc": null, - "range": { - "start": 29, - "end": 35 - } + "range": [ + 29, + 35 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 36 - } + "range": [ + 25, + 36 + ] }, { "type": "VariableDeclaration", @@ -87,32 +87,32 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 47, - "end": 49 - } + "range": [ + 47, + 49 + ] }, "loc": null, - "range": { - "start": 43, - "end": 49 - } + "range": [ + 43, + 49 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 50 - } + "range": [ + 39, + 50 + ] }, { "type": "VariableDeclaration", @@ -125,32 +125,32 @@ Output: "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 61, - "end": 63 - } + "range": [ + 61, + 63 + ] }, "loc": null, - "range": { - "start": 57, - "end": 63 - } + "range": [ + 57, + 63 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 64 - } + "range": [ + 53, + 64 + ] }, { "type": "VariableDeclaration", @@ -163,32 +163,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 75, - "end": 77 - } + "range": [ + 75, + 77 + ] }, "loc": null, - "range": { - "start": 71, - "end": 77 - } + "range": [ + 71, + 77 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 78 - } + "range": [ + 67, + 78 + ] }, { "type": "ExpressionStatement", @@ -202,50 +202,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 85 - } + "range": [ + 82, + 85 + ] }, "right": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "loc": null, - "range": { - "start": 82, - "end": 89 - } + "range": [ + 82, + 89 + ] }, "directive": null, "loc": null, - "range": { - "start": 82, - "end": 90 - } + "range": [ + 82, + 90 + ] }, { "type": "ExpressionStatement", @@ -259,27 +259,27 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "computed": false, "loc": null, - "range": { - "start": 93, - "end": 96 - } + "range": [ + 93, + 96 + ] }, "right": { "type": "MemberExpression", @@ -288,40 +288,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] }, "computed": false, "loc": null, - "range": { - "start": 99, - "end": 102 - } + "range": [ + 99, + 102 + ] }, "loc": null, - "range": { - "start": 93, - "end": 102 - } + "range": [ + 93, + 102 + ] }, "directive": null, "loc": null, - "range": { - "start": 93, - "end": 103 - } + "range": [ + 93, + 103 + ] }, { "type": "ExpressionStatement", @@ -335,27 +335,27 @@ Output: "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 106, - "end": 109 - } + "range": [ + 106, + 109 + ] }, "right": { "type": "MemberExpression", @@ -364,40 +364,40 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "computed": false, "loc": null, - "range": { - "start": 112, - "end": 115 - } + "range": [ + 112, + 115 + ] }, "loc": null, - "range": { - "start": 106, - "end": 115 - } + "range": [ + 106, + 115 + ] }, "directive": null, "loc": null, - "range": { - "start": 106, - "end": 116 - } + "range": [ + 106, + 116 + ] }, { "type": "ExpressionStatement", @@ -408,10 +408,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] }, "arguments": [ { @@ -419,50 +419,50 @@ Output: "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 128 - } + "range": [ + 127, + 128 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 129 - } + "range": [ + 120, + 129 + ] }, "directive": null, "loc": null, - "range": { - "start": 120, - "end": 130 - } + "range": [ + 120, + 130 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 132 - } + "range": [ + 21, + 132 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 132 - }, + "range": [ + 0, + 132 + ], "loc": null, - "range": { - "start": 0, - "end": 132 - } + "range": [ + 0, + 132 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 132 - } + "range": [ + 0, + 132 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@trivial.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@trivial.js.snap index 3eeb34ce62..f692c1f4da 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@trivial.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@trivial.js.snap @@ -20,10 +20,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -31,10 +31,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -47,42 +47,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "loc": null, - "range": { - "start": 20, - "end": 29 - } + "range": [ + 20, + 29 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 31 - } + "range": [ + 16, + 31 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 31 - }, + "range": [ + 0, + 31 + ], "loc": null, - "range": { - "start": 0, - "end": 31 - } + "range": [ + 0, + 31 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 31 - } + "range": [ + 0, + 31 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-args-test-binary-operator.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-args-test-binary-operator.js.snap index 8df797ad60..5d0f58d835 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-args-test-binary-operator.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-args-test-binary-operator.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,20 +33,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -61,10 +61,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "operator": ">", "right": { @@ -72,16 +72,16 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, "loc": null, - "range": { - "start": 33, - "end": 38 - } + "range": [ + 33, + 38 + ] }, "consequent": { "type": "BlockStatement", @@ -97,72 +97,72 @@ Output: "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 54, - "end": 56 - } + "range": [ + 54, + 56 + ] }, "loc": null, - "range": { - "start": 50, - "end": 56 - } + "range": [ + 50, + 56 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 57 - } + "range": [ + 46, + 57 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 61 - } + "range": [ + 40, + 61 + ] }, "alternate": null, "loc": null, - "range": { - "start": 29, - "end": 61 - } + "range": [ + 29, + 61 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 63 - } + "range": [ + 25, + 63 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 63 - }, + "range": [ + 0, + 63 + ], "loc": null, - "range": { - "start": 0, - "end": 63 - } + "range": [ + 0, + 63 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 63 - } + "range": [ + 0, + 63 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-binary-operator.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-binary-operator.js.snap index 22078092c1..bc57777548 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-binary-operator.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-binary-operator.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -44,10 +44,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "CallExpression", @@ -56,30 +56,30 @@ Output: "name": "some", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 37 - } + "range": [ + 33, + 37 + ] }, "arguments": [], "loc": null, - "range": { - "start": 33, - "end": 39 - } + "range": [ + 33, + 39 + ] }, "loc": null, - "range": { - "start": 29, - "end": 39 - } + "range": [ + 29, + 39 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 40 - } + "range": [ + 25, + 40 + ] }, { "type": "VariableDeclaration", @@ -92,10 +92,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "CallExpression", @@ -104,30 +104,30 @@ Output: "name": "someOther", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 60 - } + "range": [ + 51, + 60 + ] }, "arguments": [], "loc": null, - "range": { - "start": 51, - "end": 62 - } + "range": [ + 51, + 62 + ] }, "loc": null, - "range": { - "start": 47, - "end": 62 - } + "range": [ + 47, + 62 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 63 - } + "range": [ + 43, + 63 + ] }, { "type": "IfStatement", @@ -138,10 +138,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 71 - } + "range": [ + 70, + 71 + ] }, "operator": ">", "right": { @@ -149,16 +149,16 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 70, - "end": 75 - } + "range": [ + 70, + 75 + ] }, "consequent": { "type": "BlockStatement", @@ -174,72 +174,72 @@ Output: "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 91, - "end": 93 - } + "range": [ + 91, + 93 + ] }, "loc": null, - "range": { - "start": 87, - "end": 93 - } + "range": [ + 87, + 93 + ] } ], "loc": null, - "range": { - "start": 83, - "end": 94 - } + "range": [ + 83, + 94 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 98 - } + "range": [ + 77, + 98 + ] }, "alternate": null, "loc": null, - "range": { - "start": 66, - "end": 98 - } + "range": [ + 66, + 98 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 100 - } + "range": [ + 21, + 100 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 100 - }, + "range": [ + 0, + 100 + ], "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 100 - } + "range": [ + 0, + 100 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-cast-expression.flow.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-cast-expression.flow.js.snap index ec843c6256..1bf006eb5e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-cast-expression.flow.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-cast-expression.flow.js.snap @@ -21,10 +21,10 @@ Output: { "type": "TSTypeAliasDeclaration", "loc": null, - "range": { - "start": 9, - "end": 34 - } + "range": [ + 9, + 34 + ] }, { "type": "FunctionDeclaration", @@ -33,10 +33,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 53 - } + "range": [ + 44, + 53 + ] }, "params": [ { @@ -44,10 +44,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] } ], "body": { @@ -64,10 +64,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "init": { "type": "ObjectExpression", @@ -79,10 +79,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 78, - "end": 81 - } + "range": [ + 78, + 81 + ] }, "value": { "type": "MemberExpression", @@ -91,57 +91,57 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 88 - } + "range": [ + 83, + 88 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 92 - } + "range": [ + 89, + 92 + ] }, "computed": false, "loc": null, - "range": { - "start": 83, - "end": 92 - } + "range": [ + 83, + 92 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 78, - "end": 92 - } + "range": [ + 78, + 92 + ] } ], "loc": null, - "range": { - "start": 77, - "end": 93 - } + "range": [ + 77, + 93 + ] }, "loc": null, - "range": { - "start": 73, - "end": 93 - } + "range": [ + 73, + 93 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 94 - } + "range": [ + 67, + 94 + ] }, { "type": "VariableDeclaration", @@ -154,10 +154,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "init": { "type": "CoverTypedIdentifier", @@ -166,37 +166,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "right": { "type": "TSTypeAnnotation", "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] }, "loc": null, - "range": { - "start": 110, - "end": 116 - } + "range": [ + 110, + 116 + ] }, "loc": null, - "range": { - "start": 105, - "end": 117 - } + "range": [ + 105, + 117 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 118 - } + "range": [ + 99, + 118 + ] }, { "type": "ExpressionStatement", @@ -210,49 +210,49 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 123, - "end": 124 - } + "range": [ + 123, + 124 + ] }, "property": { "type": "Identifier", "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 128 - } + "range": [ + 125, + 128 + ] }, "computed": false, "loc": null, - "range": { - "start": 123, - "end": 128 - } + "range": [ + 123, + 128 + ] }, "right": { "type": "StringLiteral", "value": "hello", "loc": null, - "range": { - "start": 131, - "end": 138 - } + "range": [ + 131, + 138 + ] }, "loc": null, - "range": { - "start": 123, - "end": 138 - } + "range": [ + 123, + 138 + ] }, "directive": null, "loc": null, - "range": { - "start": 123, - "end": 139 - } + "range": [ + 123, + 139 + ] }, { "type": "VariableDeclaration", @@ -265,10 +265,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 150, - "end": 151 - } + "range": [ + 150, + 151 + ] }, "init": { "type": "CoverTypedIdentifier", @@ -277,37 +277,37 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 155, - "end": 156 - } + "range": [ + 155, + 156 + ] }, "right": { "type": "TSTypeAnnotation", "loc": null, - "range": { - "start": 156, - "end": 161 - } + "range": [ + 156, + 161 + ] }, "loc": null, - "range": { - "start": 155, - "end": 161 - } + "range": [ + 155, + 161 + ] }, "loc": null, - "range": { - "start": 150, - "end": 162 - } + "range": [ + 150, + 162 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 163 - } + "range": [ + 144, + 163 + ] }, { "type": "ReturnStatement", @@ -316,42 +316,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 176 - } + "range": [ + 175, + 176 + ] }, "loc": null, - "range": { - "start": 168, - "end": 177 - } + "range": [ + 168, + 177 + ] } ], "loc": null, - "range": { - "start": 61, - "end": 179 - } + "range": [ + 61, + 179 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 35, - "end": 179 - }, + "range": [ + 35, + 179 + ], "loc": null, - "range": { - "start": 35, - "end": 179 - } + "range": [ + 35, + 179 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 9, - "end": 179 - } + "range": [ + 9, + 179 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-field-load.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-field-load.js.snap index dc074e72e5..9a30753e4a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-field-load.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-field-load.js.snap @@ -22,10 +22,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -42,10 +42,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ObjectExpression", @@ -57,49 +57,49 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 35, - "end": 36 - } + "range": [ + 35, + 36 + ] }, "value": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 35, - "end": 39 - } + "range": [ + 35, + 39 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 41 - } + "range": [ + 33, + 41 + ] }, "loc": null, - "range": { - "start": 29, - "end": 41 - } + "range": [ + 29, + 41 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 42 - } + "range": [ + 25, + 42 + ] }, { "type": "VariableDeclaration", @@ -112,10 +112,10 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "init": { "type": "MemberExpression", @@ -124,40 +124,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] }, "loc": null, - "range": { - "start": 49, - "end": 56 - } + "range": [ + 49, + 56 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 57 - } + "range": [ + 45, + 57 + ] }, { "type": "ReturnStatement", @@ -166,42 +166,42 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "loc": null, - "range": { - "start": 60, - "end": 69 - } + "range": [ + 60, + 69 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 71 - } + "range": [ + 21, + 71 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 71 - }, + "range": [ + 0, + 71 + ], "loc": null, - "range": { - "start": 0, - "end": 71 - } + "range": [ + 0, + 71 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 71 - } + "range": [ + 0, + 71 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-field-load-binary-op.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-field-load-binary-op.js.snap index 7a9977ddde..6d4399ba6a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-field-load-binary-op.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-field-load-binary-op.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -48,10 +48,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ObjectExpression", @@ -63,10 +63,10 @@ Output: "name": "u", "typeAnnotation": null, "loc": null, - "range": { - "start": 35, - "end": 36 - } + "range": [ + 35, + 36 + ] }, "value": { "type": "CallExpression", @@ -75,27 +75,27 @@ Output: "name": "makeSomePrimitive", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 55 - } + "range": [ + 38, + 55 + ] }, "arguments": [], "loc": null, - "range": { - "start": 38, - "end": 57 - } + "range": [ + 38, + 57 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 35, - "end": 57 - } + "range": [ + 35, + 57 + ] }, { "type": "Property", @@ -104,10 +104,10 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "value": { "type": "CallExpression", @@ -116,47 +116,47 @@ Output: "name": "makeSomePrimitive", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 79 - } + "range": [ + 62, + 79 + ] }, "arguments": [], "loc": null, - "range": { - "start": 62, - "end": 81 - } + "range": [ + 62, + 81 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 59, - "end": 81 - } + "range": [ + 59, + 81 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 83 - } + "range": [ + 33, + 83 + ] }, "loc": null, - "range": { - "start": 29, - "end": 83 - } + "range": [ + 29, + 83 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 84 - } + "range": [ + 25, + 84 + ] }, { "type": "VariableDeclaration", @@ -169,10 +169,10 @@ Output: "name": "u", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "init": { "type": "MemberExpression", @@ -181,40 +181,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "property": { "type": "Identifier", "name": "u", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 98 - } + "range": [ + 97, + 98 + ] }, "computed": false, "loc": null, - "range": { - "start": 95, - "end": 98 - } + "range": [ + 95, + 98 + ] }, "loc": null, - "range": { - "start": 91, - "end": 98 - } + "range": [ + 91, + 98 + ] } ], "loc": null, - "range": { - "start": 87, - "end": 99 - } + "range": [ + 87, + 99 + ] }, { "type": "VariableDeclaration", @@ -227,10 +227,10 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "init": { "type": "MemberExpression", @@ -239,40 +239,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 110, - "end": 111 - } + "range": [ + 110, + 111 + ] }, "property": { "type": "Identifier", "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 112, - "end": 113 - } + "range": [ + 112, + 113 + ] }, "computed": false, "loc": null, - "range": { - "start": 110, - "end": 113 - } + "range": [ + 110, + 113 + ] }, "loc": null, - "range": { - "start": 106, - "end": 113 - } + "range": [ + 106, + 113 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 114 - } + "range": [ + 102, + 114 + ] }, { "type": "IfStatement", @@ -283,10 +283,10 @@ Output: "name": "u", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "operator": ">", "right": { @@ -294,32 +294,32 @@ Output: "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "loc": null, - "range": { - "start": 121, - "end": 126 - } + "range": [ + 121, + 126 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 128, - "end": 133 - } + "range": [ + 128, + 133 + ] }, "alternate": null, "loc": null, - "range": { - "start": 117, - "end": 133 - } + "range": [ + 117, + 133 + ] }, { "type": "VariableDeclaration", @@ -332,10 +332,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "init": { "type": "MemberExpression", @@ -344,40 +344,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "property": { "type": "Identifier", "name": "u", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "computed": false, "loc": null, - "range": { - "start": 145, - "end": 148 - } + "range": [ + 145, + 148 + ] }, "loc": null, - "range": { - "start": 141, - "end": 148 - } + "range": [ + 141, + 148 + ] } ], "loc": null, - "range": { - "start": 137, - "end": 149 - } + "range": [ + 137, + 149 + ] }, { "type": "VariableDeclaration", @@ -390,10 +390,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 157 - } + "range": [ + 156, + 157 + ] }, "init": { "type": "MemberExpression", @@ -402,40 +402,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 161 - } + "range": [ + 160, + 161 + ] }, "property": { "type": "Identifier", "name": "v", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 163 - } + "range": [ + 162, + 163 + ] }, "computed": false, "loc": null, - "range": { - "start": 160, - "end": 163 - } + "range": [ + 160, + 163 + ] }, "loc": null, - "range": { - "start": 156, - "end": 163 - } + "range": [ + 156, + 163 + ] } ], "loc": null, - "range": { - "start": 152, - "end": 164 - } + "range": [ + 152, + 164 + ] }, { "type": "ReturnStatement", @@ -444,42 +444,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "loc": null, - "range": { - "start": 167, - "end": 176 - } + "range": [ + 167, + 176 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 178 - } + "range": [ + 21, + 178 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 178 - }, + "range": [ + 0, + 178 + ], "loc": null, - "range": { - "start": 0, - "end": 178 - } + "range": [ + 0, + 178 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 178 - } + "range": [ + 0, + 178 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-field-store.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-field-store.js.snap index 0acb9d2cf2..939706029d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-field-store.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-field-store.js.snap @@ -24,10 +24,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -44,32 +44,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 33, - "end": 35 - } + "range": [ + 33, + 35 + ] }, "loc": null, - "range": { - "start": 29, - "end": 35 - } + "range": [ + 29, + 35 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 36 - } + "range": [ + 25, + 36 + ] }, { "type": "VariableDeclaration", @@ -82,32 +82,32 @@ Output: "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 47, - "end": 49 - } + "range": [ + 47, + 49 + ] }, "loc": null, - "range": { - "start": 43, - "end": 49 - } + "range": [ + 43, + 49 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 50 - } + "range": [ + 39, + 50 + ] }, { "type": "ExpressionStatement", @@ -121,50 +121,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "computed": false, "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] }, "right": { "type": "Identifier", "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "loc": null, - "range": { - "start": 53, - "end": 60 - } + "range": [ + 53, + 60 + ] }, "directive": null, "loc": null, - "range": { - "start": 53, - "end": 61 - } + "range": [ + 53, + 61 + ] }, { "type": "VariableDeclaration", @@ -177,10 +177,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 69 - } + "range": [ + 68, + 69 + ] }, "init": { "type": "MemberExpression", @@ -189,40 +189,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "computed": false, "loc": null, - "range": { - "start": 72, - "end": 75 - } + "range": [ + 72, + 75 + ] }, "loc": null, - "range": { - "start": 68, - "end": 75 - } + "range": [ + 68, + 75 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 76 - } + "range": [ + 64, + 76 + ] }, { "type": "ReturnStatement", @@ -231,42 +231,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 87 - } + "range": [ + 86, + 87 + ] }, "loc": null, - "range": { - "start": 79, - "end": 88 - } + "range": [ + 79, + 88 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 90 - } + "range": [ + 21, + 90 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 90 - }, + "range": [ + 0, + 90 + ], "loc": null, - "range": { - "start": 0, - "end": 90 - } + "range": [ + 0, + 90 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 90 - } + "range": [ + 0, + 90 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-polymorphic.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-polymorphic.js.snap index c9285e4466..cf6683ea16 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-polymorphic.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-polymorphic.js.snap @@ -31,10 +31,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -51,10 +51,10 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "CallExpression", @@ -63,30 +63,30 @@ Output: "name": "makePrimitive", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 46 - } + "range": [ + 33, + 46 + ] }, "arguments": [], "loc": null, - "range": { - "start": 33, - "end": 48 - } + "range": [ + 33, + 48 + ] }, "loc": null, - "range": { - "start": 29, - "end": 48 - } + "range": [ + 29, + 48 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 49 - } + "range": [ + 25, + 49 + ] }, { "type": "ExpressionStatement", @@ -97,10 +97,10 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 52, - "end": 53 - } + "range": [ + 52, + 53 + ] }, "operator": "+", "right": { @@ -108,23 +108,23 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "loc": null, - "range": { - "start": 52, - "end": 57 - } + "range": [ + 52, + 57 + ] }, "directive": null, "loc": null, - "range": { - "start": 52, - "end": 58 - } + "range": [ + 52, + 58 + ] }, { "type": "VariableDeclaration", @@ -137,32 +137,32 @@ Output: "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 90 - } + "range": [ + 89, + 90 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 93, - "end": 95 - } + "range": [ + 93, + 95 + ] }, "loc": null, - "range": { - "start": 89, - "end": 95 - } + "range": [ + 89, + 95 + ] } ], "loc": null, - "range": { - "start": 85, - "end": 96 - } + "range": [ + 85, + 96 + ] }, { "type": "VariableDeclaration", @@ -175,32 +175,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 104, - "end": 105 - } + "range": [ + 104, + 105 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 108, - "end": 110 - } + "range": [ + 108, + 110 + ] }, "loc": null, - "range": { - "start": 104, - "end": 110 - } + "range": [ + 104, + 110 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 111 - } + "range": [ + 100, + 111 + ] }, { "type": "ExpressionStatement", @@ -214,50 +214,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 117, - "end": 118 - } + "range": [ + 117, + 118 + ] }, "computed": false, "loc": null, - "range": { - "start": 115, - "end": 118 - } + "range": [ + 115, + 118 + ] }, "right": { "type": "Identifier", "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 121, - "end": 122 - } + "range": [ + 121, + 122 + ] }, "loc": null, - "range": { - "start": 115, - "end": 122 - } + "range": [ + 115, + 122 + ] }, "directive": null, "loc": null, - "range": { - "start": 115, - "end": 123 - } + "range": [ + 115, + 123 + ] }, { "type": "VariableDeclaration", @@ -270,10 +270,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 157 - } + "range": [ + 156, + 157 + ] }, "init": { "type": "MemberExpression", @@ -282,40 +282,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 160, - "end": 161 - } + "range": [ + 160, + 161 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 162, - "end": 163 - } + "range": [ + 162, + 163 + ] }, "computed": false, "loc": null, - "range": { - "start": 160, - "end": 163 - } + "range": [ + 160, + 163 + ] }, "loc": null, - "range": { - "start": 156, - "end": 163 - } + "range": [ + 156, + 163 + ] } ], "loc": null, - "range": { - "start": 152, - "end": 164 - } + "range": [ + 152, + 164 + ] }, { "type": "ExpressionStatement", @@ -329,50 +329,50 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 170, - "end": 171 - } + "range": [ + 170, + 171 + ] }, "computed": false, "loc": null, - "range": { - "start": 168, - "end": 171 - } + "range": [ + 168, + 171 + ] }, "right": { "type": "Identifier", "name": "o", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 175 - } + "range": [ + 174, + 175 + ] }, "loc": null, - "range": { - "start": 168, - "end": 175 - } + "range": [ + 168, + 175 + ] }, "directive": null, "loc": null, - "range": { - "start": 168, - "end": 176 - } + "range": [ + 168, + 176 + ] }, { "type": "VariableDeclaration", @@ -385,10 +385,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] }, "init": { "type": "MemberExpression", @@ -397,40 +397,40 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 206 - } + "range": [ + 205, + 206 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 207, - "end": 208 - } + "range": [ + 207, + 208 + ] }, "computed": false, "loc": null, - "range": { - "start": 205, - "end": 208 - } + "range": [ + 205, + 208 + ] }, "loc": null, - "range": { - "start": 201, - "end": 208 - } + "range": [ + 201, + 208 + ] } ], "loc": null, - "range": { - "start": 197, - "end": 209 - } + "range": [ + 197, + 209 + ] }, { "type": "ReturnStatement", @@ -439,42 +439,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 219, - "end": 220 - } + "range": [ + 219, + 220 + ] }, "loc": null, - "range": { - "start": 212, - "end": 221 - } + "range": [ + 212, + 221 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 223 - } + "range": [ + 21, + 223 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 223 - }, + "range": [ + 0, + 223 + ], "loc": null, - "range": { - "start": 0, - "end": 223 - } + "range": [ + 0, + 223 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 223 - } + "range": [ + 0, + 223 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-primitive.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-primitive.js.snap index 35cfcbb6eb..1579bcfde4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-primitive.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-primitive.js.snap @@ -23,10 +23,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -43,32 +43,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "loc": null, - "range": { - "start": 29, - "end": 34 - } + "range": [ + 29, + 34 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 35 - } + "range": [ + 25, + 35 + ] }, { "type": "VariableDeclaration", @@ -81,32 +81,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] }, "init": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "loc": null, - "range": { - "start": 42, - "end": 47 - } + "range": [ + 42, + 47 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 48 - } + "range": [ + 38, + 48 + ] }, { "type": "ReturnStatement", @@ -115,42 +115,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "loc": null, - "range": { - "start": 52, - "end": 61 - } + "range": [ + 52, + 61 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 63 - } + "range": [ + 21, + 63 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 63 - }, + "range": [ + 0, + 63 + ], "loc": null, - "range": { - "start": 0, - "end": 63 - } + "range": [ + 0, + 63 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 63 - } + "range": [ + 0, + 63 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-return-type-inference.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-return-type-inference.js.snap index 2c2f704852..08ed9bbda8 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-return-type-inference.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@type-test-return-type-inference.js.snap @@ -27,10 +27,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -47,10 +47,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 29, - "end": 30 - } + "range": [ + 29, + 30 + ] }, "init": { "type": "CallExpression", @@ -59,30 +59,30 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 36 - } + "range": [ + 33, + 36 + ] }, "arguments": [], "loc": null, - "range": { - "start": 33, - "end": 38 - } + "range": [ + 33, + 38 + ] }, "loc": null, - "range": { - "start": 29, - "end": 38 - } + "range": [ + 29, + 38 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 39 - } + "range": [ + 25, + 39 + ] }, { "type": "VariableDeclaration", @@ -95,10 +95,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 46, - "end": 47 - } + "range": [ + 46, + 47 + ] }, "init": { "type": "CallExpression", @@ -107,30 +107,30 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 53 - } + "range": [ + 50, + 53 + ] }, "arguments": [], "loc": null, - "range": { - "start": 50, - "end": 55 - } + "range": [ + 50, + 55 + ] }, "loc": null, - "range": { - "start": 46, - "end": 55 - } + "range": [ + 46, + 55 + ] } ], "loc": null, - "range": { - "start": 42, - "end": 56 - } + "range": [ + 42, + 56 + ] }, { "type": "IfStatement", @@ -141,10 +141,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "operator": ">", "right": { @@ -152,16 +152,16 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "consequent": { "type": "BlockStatement", @@ -177,46 +177,46 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "init": { "type": "ObjectExpression", "properties": [], "loc": null, - "range": { - "start": 84, - "end": 86 - } + "range": [ + 84, + 86 + ] }, "loc": null, - "range": { - "start": 80, - "end": 86 - } + "range": [ + 80, + 86 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 87 - } + "range": [ + 76, + 87 + ] } ], "loc": null, - "range": { - "start": 70, - "end": 91 - } + "range": [ + 70, + 91 + ] }, "alternate": null, "loc": null, - "range": { - "start": 59, - "end": 91 - } + "range": [ + 59, + 91 + ] }, { "type": "VariableDeclaration", @@ -229,10 +229,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 100 - } + "range": [ + 99, + 100 + ] }, "init": { "type": "CallExpression", @@ -241,30 +241,30 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 106 - } + "range": [ + 103, + 106 + ] }, "arguments": [], "loc": null, - "range": { - "start": 103, - "end": 108 - } + "range": [ + 103, + 108 + ] }, "loc": null, - "range": { - "start": 99, - "end": 108 - } + "range": [ + 99, + 108 + ] } ], "loc": null, - "range": { - "start": 95, - "end": 109 - } + "range": [ + 95, + 109 + ] }, { "type": "ReturnStatement", @@ -273,42 +273,42 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "loc": null, - "range": { - "start": 112, - "end": 121 - } + "range": [ + 112, + 121 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 123 - } + "range": [ + 21, + 123 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 123 - }, + "range": [ + 0, + 123 + ], "loc": null, - "range": { - "start": 0, - "end": 123 - } + "range": [ + 0, + 123 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 123 - } + "range": [ + 0, + 123 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unary-expr.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unary-expr.js.snap index 72e8bc3acc..ce615c123f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unary-expr.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unary-expr.js.snap @@ -28,10 +28,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -59,10 +59,10 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "ObjectExpression", @@ -74,50 +74,50 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "value": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 40 - } + "range": [ + 39, + 40 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 42 - } + "range": [ + 34, + 42 + ] }, "loc": null, - "range": { - "start": 30, - "end": 42 - } + "range": [ + 30, + 42 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 43 - } + "range": [ + 26, + 43 + ] }, { "type": "VariableDeclaration", @@ -130,10 +130,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 50, - "end": 51 - } + "range": [ + 50, + 51 + ] }, "init": { "type": "UnaryExpression", @@ -146,46 +146,46 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "computed": false, "loc": null, - "range": { - "start": 55, - "end": 58 - } + "range": [ + 55, + 58 + ] }, "loc": null, - "range": { - "start": 54, - "end": 58 - } + "range": [ + 54, + 58 + ] }, "loc": null, - "range": { - "start": 50, - "end": 58 - } + "range": [ + 50, + 58 + ] } ], "loc": null, - "range": { - "start": 46, - "end": 59 - } + "range": [ + 46, + 59 + ] }, { "type": "VariableDeclaration", @@ -198,10 +198,10 @@ Output: "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "init": { "type": "UnaryExpression", @@ -214,46 +214,46 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 71, - "end": 74 - } + "range": [ + 71, + 74 + ] }, "loc": null, - "range": { - "start": 70, - "end": 74 - } + "range": [ + 70, + 74 + ] }, "loc": null, - "range": { - "start": 66, - "end": 74 - } + "range": [ + 66, + 74 + ] } ], "loc": null, - "range": { - "start": 62, - "end": 75 - } + "range": [ + 62, + 75 + ] }, { "type": "VariableDeclaration", @@ -266,10 +266,10 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "init": { "type": "UnaryExpression", @@ -282,46 +282,46 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 92 - } + "range": [ + 91, + 92 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "computed": false, "loc": null, - "range": { - "start": 91, - "end": 94 - } + "range": [ + 91, + 94 + ] }, "loc": null, - "range": { - "start": 86, - "end": 94 - } + "range": [ + 86, + 94 + ] }, "loc": null, - "range": { - "start": 82, - "end": 94 - } + "range": [ + 82, + 94 + ] } ], "loc": null, - "range": { - "start": 78, - "end": 95 - } + "range": [ + 78, + 95 + ] }, { "type": "VariableDeclaration", @@ -334,10 +334,10 @@ Output: "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 103 - } + "range": [ + 102, + 103 + ] }, "init": { "type": "UnaryExpression", @@ -350,46 +350,46 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "computed": false, "loc": null, - "range": { - "start": 113, - "end": 116 - } + "range": [ + 113, + 116 + ] }, "loc": null, - "range": { - "start": 106, - "end": 116 - } + "range": [ + 106, + 116 + ] }, "loc": null, - "range": { - "start": 102, - "end": 116 - } + "range": [ + 102, + 116 + ] } ], "loc": null, - "range": { - "start": 98, - "end": 117 - } + "range": [ + 98, + 117 + ] }, { "type": "VariableDeclaration", @@ -402,10 +402,10 @@ Output: "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 124, - "end": 125 - } + "range": [ + 124, + 125 + ] }, "init": { "type": "UnaryExpression", @@ -418,46 +418,46 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 130 - } + "range": [ + 129, + 130 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 132 - } + "range": [ + 131, + 132 + ] }, "computed": false, "loc": null, - "range": { - "start": 129, - "end": 132 - } + "range": [ + 129, + 132 + ] }, "loc": null, - "range": { - "start": 128, - "end": 132 - } + "range": [ + 128, + 132 + ] }, "loc": null, - "range": { - "start": 124, - "end": 132 - } + "range": [ + 124, + 132 + ] } ], "loc": null, - "range": { - "start": 120, - "end": 133 - } + "range": [ + 120, + 133 + ] }, { "type": "VariableDeclaration", @@ -470,10 +470,10 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 141 - } + "range": [ + 140, + 141 + ] }, "init": { "type": "UnaryExpression", @@ -486,46 +486,46 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 147, - "end": 148 - } + "range": [ + 147, + 148 + ] }, "computed": false, "loc": null, - "range": { - "start": 145, - "end": 148 - } + "range": [ + 145, + 148 + ] }, "loc": null, - "range": { - "start": 144, - "end": 148 - } + "range": [ + 144, + 148 + ] }, "loc": null, - "range": { - "start": 140, - "end": 148 - } + "range": [ + 140, + 148 + ] } ], "loc": null, - "range": { - "start": 136, - "end": 149 - } + "range": [ + 136, + 149 + ] }, { "type": "VariableDeclaration", @@ -538,10 +538,10 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 156, - "end": 157 - } + "range": [ + 156, + 157 + ] }, "init": { "type": "UnaryExpression", @@ -554,46 +554,46 @@ Output: "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 167, - "end": 168 - } + "range": [ + 167, + 168 + ] }, "property": { "type": "Identifier", "name": "t", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 170 - } + "range": [ + 169, + 170 + ] }, "computed": false, "loc": null, - "range": { - "start": 167, - "end": 170 - } + "range": [ + 167, + 170 + ] }, "loc": null, - "range": { - "start": 160, - "end": 170 - } + "range": [ + 160, + 170 + ] }, "loc": null, - "range": { - "start": 156, - "end": 170 - } + "range": [ + 156, + 170 + ] } ], "loc": null, - "range": { - "start": 152, - "end": 171 - } + "range": [ + 152, + 171 + ] }, { "type": "ReturnStatement", @@ -607,30 +607,30 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "value": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 183, - "end": 184 - } + "range": [ + 183, + 184 + ] }, { "type": "Property", @@ -639,30 +639,30 @@ Output: "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 186, - "end": 187 - } + "range": [ + 186, + 187 + ] }, "value": { "type": "Identifier", "name": "p", "typeAnnotation": null, "loc": null, - "range": { - "start": 186, - "end": 187 - } + "range": [ + 186, + 187 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 186, - "end": 187 - } + "range": [ + 186, + 187 + ] }, { "type": "Property", @@ -671,30 +671,30 @@ Output: "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 189, - "end": 190 - } + "range": [ + 189, + 190 + ] }, "value": { "type": "Identifier", "name": "q", "typeAnnotation": null, "loc": null, - "range": { - "start": 189, - "end": 190 - } + "range": [ + 189, + 190 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 189, - "end": 190 - } + "range": [ + 189, + 190 + ] }, { "type": "Property", @@ -703,30 +703,30 @@ Output: "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, "value": { "type": "Identifier", "name": "n", "typeAnnotation": null, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 192, - "end": 193 - } + "range": [ + 192, + 193 + ] }, { "type": "Property", @@ -735,30 +735,30 @@ Output: "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "value": { "type": "Identifier", "name": "m", "typeAnnotation": null, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 195, - "end": 196 - } + "range": [ + 195, + 196 + ] }, { "type": "Property", @@ -767,30 +767,30 @@ Output: "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 199 - } + "range": [ + 198, + 199 + ] }, "value": { "type": "Identifier", "name": "e", "typeAnnotation": null, "loc": null, - "range": { - "start": 198, - "end": 199 - } + "range": [ + 198, + 199 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 198, - "end": 199 - } + "range": [ + 198, + 199 + ] }, { "type": "Property", @@ -799,69 +799,69 @@ Output: "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] }, "value": { "type": "Identifier", "name": "f", "typeAnnotation": null, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 201, - "end": 202 - } + "range": [ + 201, + 202 + ] } ], "loc": null, - "range": { - "start": 181, - "end": 204 - } + "range": [ + 181, + 204 + ] }, "loc": null, - "range": { - "start": 174, - "end": 205 - } + "range": [ + 174, + 205 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 207 - } + "range": [ + 22, + 207 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 207 - }, + "range": [ + 0, + 207 + ], "loc": null, - "range": { - "start": 0, - "end": 207 - } + "range": [ + 0, + 207 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 207 - } + "range": [ + 0, + 207 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unconditional-break-label.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unconditional-break-label.js.snap index 85769de6ad..c0828d9cc1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unconditional-break-label.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unconditional-break-label.js.snap @@ -25,10 +25,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] } ], "body": { @@ -56,32 +56,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 24, - "end": 25 - } + "range": [ + 24, + 25 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "loc": null, - "range": { - "start": 24, - "end": 29 - } + "range": [ + 24, + 29 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 30 - } + "range": [ + 20, + 30 + ] }, { "type": "LabeledStatement", @@ -90,10 +90,10 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 36 - } + "range": [ + 33, + 36 + ] }, "body": { "type": "BlockStatement", @@ -108,32 +108,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "directive": null, "loc": null, - "range": { - "start": 44, - "end": 50 - } + "range": [ + 44, + 50 + ] }, { "type": "BreakStatement", @@ -142,29 +142,29 @@ Output: "name": "bar", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 64 - } + "range": [ + 61, + 64 + ] }, "loc": null, - "range": { - "start": 55, - "end": 65 - } + "range": [ + 55, + 65 + ] } ], "loc": null, - "range": { - "start": 38, - "end": 69 - } + "range": [ + 38, + 69 + ] }, "loc": null, - "range": { - "start": 33, - "end": 69 - } + "range": [ + 33, + 69 + ] }, { "type": "ReturnStatement", @@ -175,10 +175,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 80 - } + "range": [ + 79, + 80 + ] }, "operator": "+", "right": { @@ -186,48 +186,48 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 83, - "end": 84 - } + "range": [ + 83, + 84 + ] }, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "loc": null, - "range": { - "start": 72, - "end": 85 - } + "range": [ + 72, + 85 + ] } ], "loc": null, - "range": { - "start": 16, - "end": 87 - } + "range": [ + 16, + 87 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 87 - }, + "range": [ + 0, + 87 + ], "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 87 - } + "range": [ + 0, + 87 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@uninitialized-declaration-in-reactive-scope.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@uninitialized-declaration-in-reactive-scope.js.snap index 58b60a4bb2..cb6393a5a9 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@uninitialized-declaration-in-reactive-scope.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@uninitialized-declaration-in-reactive-scope.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "CallExpression", @@ -66,30 +66,30 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 44 - } + "range": [ + 38, + 44 + ] }, "arguments": [], "loc": null, - "range": { - "start": 38, - "end": 46 - } + "range": [ + 38, + 46 + ] }, "loc": null, - "range": { - "start": 34, - "end": 46 - } + "range": [ + 34, + 46 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 47 - } + "range": [ + 30, + 47 + ] }, { "type": "VariableDeclaration", @@ -102,24 +102,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] }, "init": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 56 - } + "range": [ + 50, + 56 + ] }, { "type": "ExpressionStatement", @@ -130,10 +130,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 62 - } + "range": [ + 59, + 62 + ] }, "arguments": [ { @@ -141,24 +141,24 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 65 - } + "range": [ + 59, + 65 + ] }, "directive": null, "loc": null, - "range": { - "start": 59, - "end": 66 - } + "range": [ + 59, + 66 + ] }, { "type": "ReturnStatement", @@ -170,59 +170,59 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 82 - } + "range": [ + 76, + 82 + ] }, "loc": null, - "range": { - "start": 69, - "end": 83 - } + "range": [ + 69, + 83 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 85 - } + "range": [ + 26, + 85 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 85 - }, + "range": [ + 0, + 85 + ], "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 85 - } + "range": [ + 0, + 85 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unknown-hooks-do-not-assert.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unknown-hooks-do-not-assert.js.snap index 78b03fb3c6..c73d20d99f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unknown-hooks-do-not-assert.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unknown-hooks-do-not-assert.js.snap @@ -28,10 +28,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 276, - "end": 285 - } + "range": [ + 276, + 285 + ] }, "params": [ { @@ -39,10 +39,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 286, - "end": 291 - } + "range": [ + 286, + 291 + ] } ], "body": { @@ -59,10 +59,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 303, - "end": 304 - } + "range": [ + 303, + 304 + ] }, "init": { "type": "CallExpression", @@ -71,10 +71,10 @@ Output: "name": "useUnknownHook1", "typeAnnotation": null, "loc": null, - "range": { - "start": 307, - "end": 322 - } + "range": [ + 307, + 322 + ] }, "arguments": [ { @@ -82,30 +82,30 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 323, - "end": 328 - } + "range": [ + 323, + 328 + ] } ], "loc": null, - "range": { - "start": 307, - "end": 329 - } + "range": [ + 307, + 329 + ] }, "loc": null, - "range": { - "start": 303, - "end": 329 - } + "range": [ + 303, + 329 + ] } ], "loc": null, - "range": { - "start": 297, - "end": 330 - } + "range": [ + 297, + 330 + ] }, { "type": "VariableDeclaration", @@ -118,10 +118,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 339, - "end": 340 - } + "range": [ + 339, + 340 + ] }, "init": { "type": "CallExpression", @@ -130,10 +130,10 @@ Output: "name": "useUnknownHook2", "typeAnnotation": null, "loc": null, - "range": { - "start": 343, - "end": 358 - } + "range": [ + 343, + 358 + ] }, "arguments": [ { @@ -141,30 +141,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 359, - "end": 360 - } + "range": [ + 359, + 360 + ] } ], "loc": null, - "range": { - "start": 343, - "end": 361 - } + "range": [ + 343, + 361 + ] }, "loc": null, - "range": { - "start": 339, - "end": 361 - } + "range": [ + 339, + 361 + ] } ], "loc": null, - "range": { - "start": 333, - "end": 362 - } + "range": [ + 333, + 362 + ] }, { "type": "ReturnStatement", @@ -173,42 +173,42 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 372, - "end": 373 - } + "range": [ + 372, + 373 + ] }, "loc": null, - "range": { - "start": 365, - "end": 374 - } + "range": [ + 365, + 374 + ] } ], "loc": null, - "range": { - "start": 293, - "end": 376 - } + "range": [ + 293, + 376 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 267, - "end": 376 - }, + "range": [ + 267, + 376 + ], "loc": null, - "range": { - "start": 267, - "end": 376 - } + "range": [ + 267, + 376 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 267, - "end": 376 - } + "range": [ + 267, + 376 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-array-middle-element.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-array-middle-element.js.snap index 364c378174..80fc39a525 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-array-middle-element.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-array-middle-element.js.snap @@ -21,10 +21,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -55,37 +55,37 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, { "type": "Identifier", "name": "unused", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 40 - } + "range": [ + 34, + 40 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 42, - "end": 43 - } + "range": [ + 42, + 43 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 44 - } + "range": [ + 30, + 44 + ] }, "init": { "type": "MemberExpression", @@ -94,40 +94,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 52 - } + "range": [ + 47, + 52 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 47, - "end": 54 - } + "range": [ + 47, + 54 + ] }, "loc": null, - "range": { - "start": 30, - "end": 54 - } + "range": [ + 30, + 54 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 55 - } + "range": [ + 24, + 55 + ] }, { "type": "ReturnStatement", @@ -138,10 +138,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "operator": "+", "right": { @@ -149,48 +149,48 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 69, - "end": 70 - } + "range": [ + 69, + 70 + ] }, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "loc": null, - "range": { - "start": 58, - "end": 71 - } + "range": [ + 58, + 71 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 73 - } + "range": [ + 20, + 73 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 73 - }, + "range": [ + 0, + 73 + ], "loc": null, - "range": { - "start": 0, - "end": 73 - } + "range": [ + 0, + 73 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 73 - } + "range": [ + 0, + 73 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-array-rest-element.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-array-rest-element.js.snap index d00f5b022e..99710fcc54 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-array-rest-element.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-array-rest-element.js.snap @@ -21,10 +21,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -55,20 +55,20 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, { "type": "RestElement", @@ -77,23 +77,23 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] }, "loc": null, - "range": { - "start": 37, - "end": 41 - } + "range": [ + 37, + 41 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 42 - } + "range": [ + 30, + 42 + ] }, "init": { "type": "MemberExpression", @@ -102,40 +102,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 50 - } + "range": [ + 45, + 50 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "computed": false, "loc": null, - "range": { - "start": 45, - "end": 52 - } + "range": [ + 45, + 52 + ] }, "loc": null, - "range": { - "start": 30, - "end": 52 - } + "range": [ + 30, + 52 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 53 - } + "range": [ + 24, + 53 + ] }, { "type": "ReturnStatement", @@ -146,10 +146,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 63, - "end": 64 - } + "range": [ + 63, + 64 + ] }, "operator": "+", "right": { @@ -157,48 +157,48 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "loc": null, - "range": { - "start": 63, - "end": 68 - } + "range": [ + 63, + 68 + ] }, "loc": null, - "range": { - "start": 56, - "end": 69 - } + "range": [ + 56, + 69 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 71 - } + "range": [ + 20, + 71 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 71 - }, + "range": [ + 0, + 71 + ], "loc": null, - "range": { - "start": 0, - "end": 71 - } + "range": [ + 0, + 71 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 71 - } + "range": [ + 0, + 71 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-conditional.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-conditional.js.snap index 140cc41c35..bc7b88ea55 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-conditional.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-conditional.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,32 +53,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "ExpressionStatement", @@ -93,25 +93,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 48, - "end": 49 - } + "range": [ + 48, + 49 + ] }, "loc": null, - "range": { - "start": 44, - "end": 49 - } + "range": [ + 44, + 49 + ] }, "right": { "type": "AssignmentExpression", @@ -121,38 +121,38 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 56 - } + "range": [ + 55, + 56 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "loc": null, - "range": { - "start": 55, - "end": 60 - } + "range": [ + 55, + 60 + ] }, "loc": null, - "range": { - "start": 43, - "end": 61 - } + "range": [ + 43, + 61 + ] }, "directive": null, "loc": null, - "range": { - "start": 43, - "end": 62 - } + "range": [ + 43, + 62 + ] }, { "type": "ReturnStatement", @@ -161,42 +161,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 73 - } + "range": [ + 72, + 73 + ] }, "loc": null, - "range": { - "start": 65, - "end": 74 - } + "range": [ + 65, + 74 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 76 - } + "range": [ + 26, + 76 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 76 - }, + "range": [ + 0, + 76 + ], "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 76 - } + "range": [ + 0, + 76 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-logical-assigned-to-variable.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-logical-assigned-to-variable.js.snap index 983ace06f6..95c01a9690 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-logical-assigned-to-variable.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-logical-assigned-to-variable.js.snap @@ -24,10 +24,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -55,10 +55,10 @@ Output: "name": "obj", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 52 - } + "range": [ + 49, + 52 + ] }, "init": { "type": "CallExpression", @@ -67,30 +67,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 65 - } + "range": [ + 55, + 65 + ] }, "arguments": [], "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "loc": null, - "range": { - "start": 49, - "end": 67 - } + "range": [ + 49, + 67 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 68 - } + "range": [ + 43, + 68 + ] }, { "type": "VariableDeclaration", @@ -103,10 +103,10 @@ Output: "name": "obj2", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 81 - } + "range": [ + 77, + 81 + ] }, "init": { "type": "CallExpression", @@ -115,30 +115,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 94 - } + "range": [ + 84, + 94 + ] }, "arguments": [], "loc": null, - "range": { - "start": 84, - "end": 96 - } + "range": [ + 84, + 96 + ] }, "loc": null, - "range": { - "start": 77, - "end": 96 - } + "range": [ + 77, + 96 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 97 - } + "range": [ + 71, + 97 + ] }, { "type": "VariableDeclaration", @@ -151,10 +151,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 106, - "end": 107 - } + "range": [ + 106, + 107 + ] }, "init": { "type": "LogicalExpression", @@ -169,27 +169,27 @@ Output: "name": "obj", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 114 - } + "range": [ + 111, + 114 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "computed": false, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] }, "right": { "type": "MemberExpression", @@ -198,33 +198,33 @@ Output: "name": "obj2", "typeAnnotation": null, "loc": null, - "range": { - "start": 120, - "end": 124 - } + "range": [ + 120, + 124 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 125, - "end": 126 - } + "range": [ + 125, + 126 + ] }, "computed": false, "loc": null, - "range": { - "start": 120, - "end": 126 - } + "range": [ + 120, + 126 + ] }, "loc": null, - "range": { - "start": 111, - "end": 126 - } + "range": [ + 111, + 126 + ] }, "right": { "type": "MemberExpression", @@ -233,88 +233,88 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 138 - } + "range": [ + 137, + 138 + ] }, "computed": false, "loc": null, - "range": { - "start": 131, - "end": 138 - } + "range": [ + 131, + 138 + ] }, "loc": null, - "range": { - "start": 110, - "end": 138 - } + "range": [ + 110, + 138 + ] }, "loc": null, - "range": { - "start": 106, - "end": 138 - } + "range": [ + 106, + 138 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 139 - } + "range": [ + 100, + 139 + ] }, { "type": "ReturnStatement", "argument": { "type": "NullLiteral", "loc": null, - "range": { - "start": 149, - "end": 153 - } + "range": [ + 149, + 153 + ] }, "loc": null, - "range": { - "start": 142, - "end": 154 - } + "range": [ + 142, + 154 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 156 - } + "range": [ + 26, + 156 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 156 - }, + "range": [ + 0, + 156 + ], "loc": null, - "range": { - "start": 0, - "end": 156 - } + "range": [ + 0, + 156 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 156 - } + "range": [ + 0, + 156 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-logical.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-logical.js.snap index eccfbc9331..2efb55c88a 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-logical.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-logical.js.snap @@ -22,10 +22,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -53,32 +53,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 35 - } + "range": [ + 34, + 35 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "loc": null, - "range": { - "start": 34, - "end": 39 - } + "range": [ + 34, + 39 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 40 - } + "range": [ + 30, + 40 + ] }, { "type": "ExpressionStatement", @@ -91,27 +91,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 53 - } + "range": [ + 49, + 53 + ] }, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 53 - } + "range": [ + 43, + 53 + ] }, "alternate": { "type": "AssignmentExpression", @@ -121,25 +121,25 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 67, - "end": 68 - } + "range": [ + 67, + 68 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "loc": null, - "range": { - "start": 67, - "end": 72 - } + "range": [ + 67, + 72 + ] }, "consequent": { "type": "AssignmentExpression", @@ -149,38 +149,38 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 57, - "end": 58 - } + "range": [ + 57, + 58 + ] }, "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "loc": null, - "range": { - "start": 57, - "end": 62 - } + "range": [ + 57, + 62 + ] }, "loc": null, - "range": { - "start": 43, - "end": 73 - } + "range": [ + 43, + 73 + ] }, "directive": null, "loc": null, - "range": { - "start": 43, - "end": 74 - } + "range": [ + 43, + 74 + ] }, { "type": "ReturnStatement", @@ -189,42 +189,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 88 - } + "range": [ + 26, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 88 - }, + "range": [ + 0, + 88 + ], "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-object-element-with-rest.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-object-element-with-rest.js.snap index 715de0c5a2..e475eab5b4 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-object-element-with-rest.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-object-element-with-rest.js.snap @@ -22,10 +22,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -33,10 +33,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -58,30 +58,30 @@ Output: "name": "unused", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 122 - } + "range": [ + 116, + 122 + ] }, "value": { "type": "Identifier", "name": "unused", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 122 - } + "range": [ + 116, + 122 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 116, - "end": 122 - } + "range": [ + 116, + 122 + ] }, { "type": "RestElement", @@ -90,23 +90,23 @@ Output: "name": "rest", "typeAnnotation": null, "loc": null, - "range": { - "start": 127, - "end": 131 - } + "range": [ + 127, + 131 + ] }, "loc": null, - "range": { - "start": 124, - "end": 131 - } + "range": [ + 124, + 131 + ] } ], "loc": null, - "range": { - "start": 114, - "end": 133 - } + "range": [ + 114, + 133 + ] }, "init": { "type": "MemberExpression", @@ -115,40 +115,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 136, - "end": 141 - } + "range": [ + 136, + 141 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 143 - } + "range": [ + 142, + 143 + ] }, "computed": false, "loc": null, - "range": { - "start": 136, - "end": 143 - } + "range": [ + 136, + 143 + ] }, "loc": null, - "range": { - "start": 114, - "end": 143 - } + "range": [ + 114, + 143 + ] } ], "loc": null, - "range": { - "start": 108, - "end": 144 - } + "range": [ + 108, + 144 + ] }, { "type": "ReturnStatement", @@ -157,42 +157,42 @@ Output: "name": "rest", "typeAnnotation": null, "loc": null, - "range": { - "start": 154, - "end": 158 - } + "range": [ + 154, + 158 + ] }, "loc": null, - "range": { - "start": 147, - "end": 159 - } + "range": [ + 147, + 159 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 161 - } + "range": [ + 20, + 161 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 161 - }, + "range": [ + 0, + 161 + ], "loc": null, - "range": { - "start": 0, - "end": 161 - } + "range": [ + 0, + 161 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 161 - } + "range": [ + 0, + 161 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-object-element.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-object-element.js.snap index b5abfc651d..0f71d81c69 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-object-element.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-object-element.js.snap @@ -21,10 +21,10 @@ Output: "name": "Foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -57,30 +57,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, { "type": "Property", @@ -89,30 +89,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 35, - "end": 36 - } + "range": [ + 35, + 36 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 35, - "end": 36 - } + "range": [ + 35, + 36 + ] }, "kind": "init", "computed": false, "shorthand": true, "method": false, "loc": null, - "range": { - "start": 35, - "end": 36 - } + "range": [ + 35, + 36 + ] }, { "type": "RestElement", @@ -121,23 +121,23 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 41, - "end": 42 - } + "range": [ + 41, + 42 + ] }, "loc": null, - "range": { - "start": 38, - "end": 42 - } + "range": [ + 38, + 42 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 44 - } + "range": [ + 30, + 44 + ] }, "init": { "type": "MemberExpression", @@ -146,40 +146,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 52 - } + "range": [ + 47, + 52 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 53, - "end": 54 - } + "range": [ + 53, + 54 + ] }, "computed": false, "loc": null, - "range": { - "start": 47, - "end": 54 - } + "range": [ + 47, + 54 + ] }, "loc": null, - "range": { - "start": 30, - "end": 54 - } + "range": [ + 30, + 54 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 55 - } + "range": [ + 24, + 55 + ] }, { "type": "ReturnStatement", @@ -188,42 +188,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 66 - } + "range": [ + 65, + 66 + ] }, "loc": null, - "range": { - "start": 58, - "end": 67 - } + "range": [ + 58, + 67 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 69 - } + "range": [ + 20, + 69 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 69 - }, + "range": [ + 0, + 69 + ], "loc": null, - "range": { - "start": 0, - "end": 69 - } + "range": [ + 0, + 69 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 69 - } + "range": [ + 0, + 69 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-optional-method-assigned-to-variable.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-optional-method-assigned-to-variable.js.snap index 023c203f1e..edfd5580e1 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-optional-method-assigned-to-variable.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-optional-method-assigned-to-variable.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "obj", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 52 - } + "range": [ + 49, + 52 + ] }, "init": { "type": "CallExpression", @@ -66,30 +66,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 65 - } + "range": [ + 55, + 65 + ] }, "arguments": [], "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "loc": null, - "range": { - "start": 49, - "end": 67 - } + "range": [ + 49, + 67 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 68 - } + "range": [ + 43, + 68 + ] }, { "type": "VariableDeclaration", @@ -102,10 +102,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "OptionalCallExpression", @@ -118,45 +118,45 @@ Output: "name": "obj", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "computed": false, "optional": true, "loc": null, - "range": { - "start": 81, - "end": 89 - } + "range": [ + 81, + 89 + ] }, "arguments": [ { @@ -166,90 +166,90 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 92, - "end": 97 - } + "range": [ + 92, + 97 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, "computed": false, "loc": null, - "range": { - "start": 92, - "end": 99 - } + "range": [ + 92, + 99 + ] } ], "optional": true, "loc": null, - "range": { - "start": 81, - "end": 100 - } + "range": [ + 81, + 100 + ] }, "loc": null, - "range": { - "start": 77, - "end": 100 - } + "range": [ + 77, + 100 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 101 - } + "range": [ + 71, + 101 + ] }, { "type": "ReturnStatement", "argument": { "type": "NullLiteral", "loc": null, - "range": { - "start": 111, - "end": 115 - } + "range": [ + 111, + 115 + ] }, "loc": null, - "range": { - "start": 104, - "end": 116 - } + "range": [ + 104, + 116 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 118 - } + "range": [ + 26, + 118 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 118 - }, + "range": [ + 0, + 118 + ], "loc": null, - "range": { - "start": 0, - "end": 118 - } + "range": [ + 0, + 118 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 118 - } + "range": [ + 0, + 118 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-ternary-assigned-to-variable.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-ternary-assigned-to-variable.js.snap index 52355cf71e..9e6423cefe 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-ternary-assigned-to-variable.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@unused-ternary-assigned-to-variable.js.snap @@ -23,10 +23,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "obj", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 52 - } + "range": [ + 49, + 52 + ] }, "init": { "type": "CallExpression", @@ -66,30 +66,30 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 55, - "end": 65 - } + "range": [ + 55, + 65 + ] }, "arguments": [], "loc": null, - "range": { - "start": 55, - "end": 67 - } + "range": [ + 55, + 67 + ] }, "loc": null, - "range": { - "start": 49, - "end": 67 - } + "range": [ + 49, + 67 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 68 - } + "range": [ + 43, + 68 + ] }, { "type": "VariableDeclaration", @@ -102,10 +102,10 @@ Output: "name": "_", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "init": { "type": "ConditionalExpression", @@ -116,27 +116,27 @@ Output: "name": "obj", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "computed": false, "loc": null, - "range": { - "start": 81, - "end": 86 - } + "range": [ + 81, + 86 + ] }, "alternate": { "type": "MemberExpression", @@ -145,27 +145,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 99, - "end": 104 - } + "range": [ + 99, + 104 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "computed": false, "loc": null, - "range": { - "start": 99, - "end": 106 - } + "range": [ + 99, + 106 + ] }, "consequent": { "type": "MemberExpression", @@ -174,88 +174,88 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 89, - "end": 94 - } + "range": [ + 89, + 94 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 95, - "end": 96 - } + "range": [ + 95, + 96 + ] }, "computed": false, "loc": null, - "range": { - "start": 89, - "end": 96 - } + "range": [ + 89, + 96 + ] }, "loc": null, - "range": { - "start": 81, - "end": 106 - } + "range": [ + 81, + 106 + ] }, "loc": null, - "range": { - "start": 77, - "end": 106 - } + "range": [ + 77, + 106 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 107 - } + "range": [ + 71, + 107 + ] }, { "type": "ReturnStatement", "argument": { "type": "NullLiteral", "loc": null, - "range": { - "start": 117, - "end": 121 - } + "range": [ + 117, + 121 + ] }, "loc": null, - "range": { - "start": 110, - "end": 122 - } + "range": [ + 110, + 122 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 124 - } + "range": [ + 26, + 124 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 124 - }, + "range": [ + 0, + 124 + ], "loc": null, - "range": { - "start": 0, - "end": 124 - } + "range": [ + 0, + 124 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 124 - } + "range": [ + 0, + 124 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@update-expression.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@update-expression.js.snap index 4cb7fa0456..768f047003 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@update-expression.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@update-expression.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "MemberExpression", @@ -66,40 +66,40 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 37 - } + "range": [ + 32, + 37 + ] }, "property": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 38, - "end": 39 - } + "range": [ + 38, + 39 + ] }, "computed": false, "loc": null, - "range": { - "start": 32, - "end": 39 - } + "range": [ + 32, + 39 + ] }, "loc": null, - "range": { - "start": 28, - "end": 39 - } + "range": [ + 28, + 39 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 40 - } + "range": [ + 24, + 40 + ] }, { "type": "VariableDeclaration", @@ -112,10 +112,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "init": { "type": "UpdateExpression", @@ -125,30 +125,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 52 - } + "range": [ + 51, + 52 + ] }, "prefix": false, "loc": null, - "range": { - "start": 51, - "end": 54 - } + "range": [ + 51, + 54 + ] }, "loc": null, - "range": { - "start": 47, - "end": 54 - } + "range": [ + 47, + 54 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 55 - } + "range": [ + 43, + 55 + ] }, { "type": "VariableDeclaration", @@ -161,10 +161,10 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 62, - "end": 63 - } + "range": [ + 62, + 63 + ] }, "init": { "type": "UpdateExpression", @@ -174,30 +174,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 66, - "end": 67 - } + "range": [ + 66, + 67 + ] }, "prefix": false, "loc": null, - "range": { - "start": 66, - "end": 69 - } + "range": [ + 66, + 69 + ] }, "loc": null, - "range": { - "start": 62, - "end": 69 - } + "range": [ + 62, + 69 + ] } ], "loc": null, - "range": { - "start": 58, - "end": 70 - } + "range": [ + 58, + 70 + ] }, { "type": "ReturnStatement", @@ -211,30 +211,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "value": { "type": "Identifier", "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, { "type": "Property", @@ -243,30 +243,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "value": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 85, - "end": 86 - } + "range": [ + 85, + 86 + ] }, { "type": "Property", @@ -275,69 +275,69 @@ Output: "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "value": { "type": "Identifier", "name": "z", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 89 - } + "range": [ + 88, + 89 + ] } ], "loc": null, - "range": { - "start": 80, - "end": 91 - } + "range": [ + 80, + 91 + ] }, "loc": null, - "range": { - "start": 73, - "end": 92 - } + "range": [ + 73, + 92 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 94 - } + "range": [ + 20, + 94 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 94 - }, + "range": [ + 0, + 94 + ], "loc": null, - "range": { - "start": 0, - "end": 94 - } + "range": [ + 0, + 94 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 94 - } + "range": [ + 0, + 94 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@use-callback-simple.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@use-callback-simple.js.snap index 004d1af903..08d674f570 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@use-callback-simple.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@use-callback-simple.js.snap @@ -23,10 +23,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [], "body": { @@ -46,27 +46,27 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 32, - "end": 37 - } + "range": [ + 32, + 37 + ] }, { "type": "Identifier", "name": "setCount", "typeAnnotation": null, "loc": null, - "range": { - "start": 39, - "end": 47 - } + "range": [ + 39, + 47 + ] } ], "loc": null, - "range": { - "start": 31, - "end": 48 - } + "range": [ + 31, + 48 + ] }, "init": { "type": "CallExpression", @@ -75,40 +75,40 @@ Output: "name": "useState", "typeAnnotation": null, "loc": null, - "range": { - "start": 51, - "end": 59 - } + "range": [ + 51, + 59 + ] }, "arguments": [ { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 62 - } + "range": [ + 51, + 62 + ] }, "loc": null, - "range": { - "start": 31, - "end": 62 - } + "range": [ + 31, + 62 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 63 - } + "range": [ + 25, + 63 + ] }, { "type": "VariableDeclaration", @@ -121,10 +121,10 @@ Output: "name": "increment", "typeAnnotation": null, "loc": null, - "range": { - "start": 72, - "end": 81 - } + "range": [ + 72, + 81 + ] }, "init": { "type": "CallExpression", @@ -133,10 +133,10 @@ Output: "name": "useCallback", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 95 - } + "range": [ + 84, + 95 + ] }, "arguments": [ { @@ -150,10 +150,10 @@ Output: "name": "setCount", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 110 - } + "range": [ + 102, + 110 + ] }, "arguments": [ { @@ -163,67 +163,67 @@ Output: "name": "count", "typeAnnotation": null, "loc": null, - "range": { - "start": 111, - "end": 116 - } + "range": [ + 111, + 116 + ] }, "operator": "+", "right": { "type": "NumericLiteral", "value": 1.0, "loc": null, - "range": { - "start": 119, - "end": 120 - } + "range": [ + 119, + 120 + ] }, "loc": null, - "range": { - "start": 111, - "end": 120 - } + "range": [ + 111, + 120 + ] } ], "loc": null, - "range": { - "start": 102, - "end": 121 - } + "range": [ + 102, + 121 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 96, - "end": 121 - }, + "range": [ + 96, + 121 + ], "expression": true, "loc": null, - "range": { - "start": 96, - "end": 121 - } + "range": [ + 96, + 121 + ] } ], "loc": null, - "range": { - "start": 84, - "end": 122 - } + "range": [ + 84, + 122 + ] }, "loc": null, - "range": { - "start": 72, - "end": 122 - } + "range": [ + 72, + 122 + ] } ], "loc": null, - "range": { - "start": 66, - "end": 123 - } + "range": [ + 66, + 123 + ] }, { "type": "ReturnStatement", @@ -235,10 +235,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 135, - "end": 138 - } + "range": [ + 135, + 138 + ] }, "attributes": [ { @@ -247,10 +247,10 @@ Output: "type": "JSXIdentifier", "name": "onClick", "loc": null, - "range": { - "start": 139, - "end": 146 - } + "range": [ + 139, + 146 + ] }, "value": { "type": "JSXExpressionContainer", @@ -259,30 +259,30 @@ Output: "name": "increment", "typeAnnotation": null, "loc": null, - "range": { - "start": 148, - "end": 157 - } + "range": [ + 148, + 157 + ] }, "loc": null, - "range": { - "start": 147, - "end": 158 - } + "range": [ + 147, + 158 + ] }, "loc": null, - "range": { - "start": 139, - "end": 158 - } + "range": [ + 139, + 158 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 134, - "end": 159 - } + "range": [ + 134, + 159 + ] }, "children": [], "closingElement": { @@ -291,54 +291,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 161, - "end": 164 - } + "range": [ + 161, + 164 + ] }, "loc": null, - "range": { - "start": 159, - "end": 165 - } + "range": [ + 159, + 165 + ] }, "loc": null, - "range": { - "start": 134, - "end": 165 - } + "range": [ + 134, + 165 + ] }, "loc": null, - "range": { - "start": 127, - "end": 166 - } + "range": [ + 127, + 166 + ] } ], "loc": null, - "range": { - "start": 21, - "end": 168 - } + "range": [ + 21, + 168 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 168 - }, + "range": [ + 0, + 168 + ], "loc": null, - "range": { - "start": 0, - "end": 168 - } + "range": [ + 0, + 168 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 168 - } + "range": [ + 0, + 168 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useEffect-arg-memoized.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useEffect-arg-memoized.js.snap index ab08f15026..4e2cba6f65 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useEffect-arg-memoized.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useEffect-arg-memoized.js.snap @@ -33,10 +33,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -44,10 +44,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -64,10 +64,10 @@ Output: "name": "dispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 44 - } + "range": [ + 36, + 44 + ] }, "init": { "type": "CallExpression", @@ -76,30 +76,30 @@ Output: "name": "useDispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 58 - } + "range": [ + 47, + 58 + ] }, "arguments": [], "loc": null, - "range": { - "start": 47, - "end": 60 - } + "range": [ + 47, + 60 + ] }, "loc": null, - "range": { - "start": 36, - "end": 60 - } + "range": [ + 36, + 60 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 61 - } + "range": [ + 30, + 61 + ] }, { "type": "ExpressionStatement", @@ -110,10 +110,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 73 - } + "range": [ + 64, + 73 + ] }, "arguments": [ { @@ -121,24 +121,24 @@ Output: "name": "dispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 82 - } + "range": [ + 74, + 82 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 83 - } + "range": [ + 64, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 64, - "end": 84 - } + "range": [ + 64, + 84 + ] }, { "type": "VariableDeclaration", @@ -151,10 +151,10 @@ Output: "name": "onUpdate", "typeAnnotation": null, "loc": null, - "range": { - "start": 182, - "end": 190 - } + "range": [ + 182, + 190 + ] }, "init": { "type": "ArrowFunctionExpression", @@ -172,10 +172,10 @@ Output: "name": "dispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 205, - "end": 213 - } + "range": [ + 205, + 213 + ] }, "arguments": [ { @@ -188,84 +188,84 @@ Output: "name": "kind", "typeAnnotation": null, "loc": null, - "range": { - "start": 216, - "end": 220 - } + "range": [ + 216, + 220 + ] }, "value": { "type": "StringLiteral", "value": "update", "loc": null, - "range": { - "start": 222, - "end": 230 - } + "range": [ + 222, + 230 + ] }, "kind": "init", "method": false, "shorthand": false, "computed": false, "loc": null, - "range": { - "start": 216, - "end": 230 - } + "range": [ + 216, + 230 + ] } ], "loc": null, - "range": { - "start": 214, - "end": 232 - } + "range": [ + 214, + 232 + ] } ], "loc": null, - "range": { - "start": 205, - "end": 233 - } + "range": [ + 205, + 233 + ] }, "directive": null, "loc": null, - "range": { - "start": 205, - "end": 234 - } + "range": [ + 205, + 234 + ] } ], "loc": null, - "range": { - "start": 199, - "end": 238 - } + "range": [ + 199, + 238 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 193, - "end": 238 - }, + "range": [ + 193, + 238 + ], "expression": false, "loc": null, - "range": { - "start": 193, - "end": 238 - } + "range": [ + 193, + 238 + ] }, "loc": null, - "range": { - "start": 182, - "end": 238 - } + "range": [ + 182, + 238 + ] } ], "loc": null, - "range": { - "start": 176, - "end": 239 - } + "range": [ + 176, + 239 + ] }, { "type": "ExpressionStatement", @@ -276,10 +276,10 @@ Output: "name": "useEffect", "typeAnnotation": null, "loc": null, - "range": { - "start": 243, - "end": 252 - } + "range": [ + 243, + 252 + ] }, "arguments": [ { @@ -298,45 +298,45 @@ Output: "name": "onUpdate", "typeAnnotation": null, "loc": null, - "range": { - "start": 265, - "end": 273 - } + "range": [ + 265, + 273 + ] }, "arguments": [], "loc": null, - "range": { - "start": 265, - "end": 275 - } + "range": [ + 265, + 275 + ] }, "directive": null, "loc": null, - "range": { - "start": 265, - "end": 276 - } + "range": [ + 265, + 276 + ] } ], "loc": null, - "range": { - "start": 259, - "end": 280 - } + "range": [ + 259, + 280 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 253, - "end": 280 - }, + "range": [ + 253, + 280 + ], "expression": false, "loc": null, - "range": { - "start": 253, - "end": 280 - } + "range": [ + 253, + 280 + ] }, { "type": "ArrayExpression", @@ -346,31 +346,31 @@ Output: "name": "onUpdate", "typeAnnotation": null, "loc": null, - "range": { - "start": 283, - "end": 291 - } + "range": [ + 283, + 291 + ] } ], "loc": null, - "range": { - "start": 282, - "end": 292 - } + "range": [ + 282, + 292 + ] } ], "loc": null, - "range": { - "start": 243, - "end": 293 - } + "range": [ + 243, + 293 + ] }, "directive": null, "loc": null, - "range": { - "start": 243, - "end": 294 - } + "range": [ + 243, + 294 + ] }, { "type": "ReturnStatement", @@ -382,58 +382,58 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 306, - "end": 309 - } + "range": [ + 306, + 309 + ] }, "attributes": [], "selfClosing": true, "loc": null, - "range": { - "start": 305, - "end": 312 - } + "range": [ + 305, + 312 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 305, - "end": 312 - } + "range": [ + 305, + 312 + ] }, "loc": null, - "range": { - "start": 298, - "end": 313 - } + "range": [ + 298, + 313 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 315 - } + "range": [ + 26, + 315 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 315 - }, + "range": [ + 0, + 315 + ], "loc": null, - "range": { - "start": 0, - "end": 315 - } + "range": [ + 0, + 315 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 315 - } + "range": [ + 0, + 315 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useEffect-nested-lambdas.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useEffect-nested-lambdas.js.snap index 5486346a47..7cb46e5358 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useEffect-nested-lambdas.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useEffect-nested-lambdas.js.snap @@ -39,10 +39,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -50,10 +50,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -70,10 +70,10 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 40 - } + "range": [ + 36, + 40 + ] }, "init": { "type": "CallExpression", @@ -82,10 +82,10 @@ Output: "name": "useMutable", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 53 - } + "range": [ + 43, + 53 + ] }, "arguments": [ { @@ -95,47 +95,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "property": { "type": "Identifier", "name": "itemId", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 66 - } + "range": [ + 60, + 66 + ] }, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 66 - } + "range": [ + 54, + 66 + ] } ], "loc": null, - "range": { - "start": 43, - "end": 67 - } + "range": [ + 43, + 67 + ] }, "loc": null, - "range": { - "start": 36, - "end": 67 - } + "range": [ + 36, + 67 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 68 - } + "range": [ + 30, + 68 + ] }, { "type": "VariableDeclaration", @@ -148,10 +148,10 @@ Output: "name": "dispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 85 - } + "range": [ + 77, + 85 + ] }, "init": { "type": "CallExpression", @@ -160,30 +160,30 @@ Output: "name": "useDispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 99 - } + "range": [ + 88, + 99 + ] }, "arguments": [], "loc": null, - "range": { - "start": 88, - "end": 101 - } + "range": [ + 88, + 101 + ] }, "loc": null, - "range": { - "start": 77, - "end": 101 - } + "range": [ + 77, + 101 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 102 - } + "range": [ + 71, + 102 + ] }, { "type": "ExpressionStatement", @@ -194,10 +194,10 @@ Output: "name": "useFreeze", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 114 - } + "range": [ + 105, + 114 + ] }, "arguments": [ { @@ -205,24 +205,24 @@ Output: "name": "dispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 123 - } + "range": [ + 115, + 123 + ] } ], "loc": null, - "range": { - "start": 105, - "end": 124 - } + "range": [ + 105, + 124 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 125 - } + "range": [ + 105, + 125 + ] }, { "type": "VariableDeclaration", @@ -235,10 +235,10 @@ Output: "name": "exit", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 139 - } + "range": [ + 135, + 139 + ] }, "init": { "type": "CallExpression", @@ -247,10 +247,10 @@ Output: "name": "useCallback", "typeAnnotation": null, "loc": null, - "range": { - "start": 142, - "end": 153 - } + "range": [ + 142, + 153 + ] }, "arguments": [ { @@ -269,10 +269,10 @@ Output: "name": "dispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 166, - "end": 174 - } + "range": [ + 166, + 174 + ] }, "arguments": [ { @@ -282,52 +282,52 @@ Output: "name": "createExitAction", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 191 - } + "range": [ + 175, + 191 + ] }, "arguments": [], "loc": null, - "range": { - "start": 175, - "end": 193 - } + "range": [ + 175, + 193 + ] } ], "loc": null, - "range": { - "start": 166, - "end": 194 - } + "range": [ + 166, + 194 + ] }, "directive": null, "loc": null, - "range": { - "start": 166, - "end": 195 - } + "range": [ + 166, + 195 + ] } ], "loc": null, - "range": { - "start": 160, - "end": 199 - } + "range": [ + 160, + 199 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 154, - "end": 199 - }, + "range": [ + 154, + 199 + ], "expression": false, "loc": null, - "range": { - "start": 154, - "end": 199 - } + "range": [ + 154, + 199 + ] }, { "type": "ArrayExpression", @@ -337,37 +337,37 @@ Output: "name": "dispatch", "typeAnnotation": null, "loc": null, - "range": { - "start": 202, - "end": 210 - } + "range": [ + 202, + 210 + ] } ], "loc": null, - "range": { - "start": 201, - "end": 211 - } + "range": [ + 201, + 211 + ] } ], "loc": null, - "range": { - "start": 142, - "end": 212 - } + "range": [ + 142, + 212 + ] }, "loc": null, - "range": { - "start": 135, - "end": 212 - } + "range": [ + 135, + 212 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 213 - } + "range": [ + 129, + 213 + ] }, { "type": "ExpressionStatement", @@ -378,10 +378,10 @@ Output: "name": "useEffect", "typeAnnotation": null, "loc": null, - "range": { - "start": 217, - "end": 226 - } + "range": [ + 217, + 226 + ] }, "arguments": [ { @@ -402,10 +402,10 @@ Output: "name": "cleanup", "typeAnnotation": null, "loc": null, - "range": { - "start": 245, - "end": 252 - } + "range": [ + 245, + 252 + ] }, "init": { "type": "CallExpression", @@ -416,37 +416,37 @@ Output: "name": "GlobalEventEmitter", "typeAnnotation": null, "loc": null, - "range": { - "start": 255, - "end": 273 - } + "range": [ + 255, + 273 + ] }, "property": { "type": "Identifier", "name": "addListener", "typeAnnotation": null, "loc": null, - "range": { - "start": 274, - "end": 285 - } + "range": [ + 274, + 285 + ] }, "computed": false, "loc": null, - "range": { - "start": 255, - "end": 285 - } + "range": [ + 255, + 285 + ] }, "arguments": [ { "type": "StringLiteral", "value": "onInput", "loc": null, - "range": { - "start": 286, - "end": 295 - } + "range": [ + 286, + 295 + ] }, { "type": "ArrowFunctionExpression", @@ -464,27 +464,27 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 315, - "end": 319 - } + "range": [ + 315, + 319 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 320, - "end": 325 - } + "range": [ + 320, + 325 + ] }, "computed": false, "loc": null, - "range": { - "start": 315, - "end": 325 - } + "range": [ + 315, + 325 + ] }, "consequent": { "type": "BlockStatement", @@ -498,79 +498,79 @@ Output: "name": "exit", "typeAnnotation": null, "loc": null, - "range": { - "start": 337, - "end": 341 - } + "range": [ + 337, + 341 + ] }, "arguments": [], "loc": null, - "range": { - "start": 337, - "end": 343 - } + "range": [ + 337, + 343 + ] }, "directive": null, "loc": null, - "range": { - "start": 337, - "end": 344 - } + "range": [ + 337, + 344 + ] } ], "loc": null, - "range": { - "start": 327, - "end": 352 - } + "range": [ + 327, + 352 + ] }, "alternate": null, "loc": null, - "range": { - "start": 311, - "end": 352 - } + "range": [ + 311, + 352 + ] } ], "loc": null, - "range": { - "start": 303, - "end": 358 - } + "range": [ + 303, + 358 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 297, - "end": 358 - }, + "range": [ + 297, + 358 + ], "expression": false, "loc": null, - "range": { - "start": 297, - "end": 358 - } + "range": [ + 297, + 358 + ] } ], "loc": null, - "range": { - "start": 255, - "end": 359 - } + "range": [ + 255, + 359 + ] }, "loc": null, - "range": { - "start": 245, - "end": 359 - } + "range": [ + 245, + 359 + ] } ], "loc": null, - "range": { - "start": 239, - "end": 360 - } + "range": [ + 239, + 360 + ] }, { "type": "ReturnStatement", @@ -587,75 +587,75 @@ Output: "name": "cleanup", "typeAnnotation": null, "loc": null, - "range": { - "start": 378, - "end": 385 - } + "range": [ + 378, + 385 + ] }, "property": { "type": "Identifier", "name": "remove", "typeAnnotation": null, "loc": null, - "range": { - "start": 386, - "end": 392 - } + "range": [ + 386, + 392 + ] }, "computed": false, "loc": null, - "range": { - "start": 378, - "end": 392 - } + "range": [ + 378, + 392 + ] }, "arguments": [], "loc": null, - "range": { - "start": 378, - "end": 394 - } + "range": [ + 378, + 394 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 372, - "end": 394 - }, + "range": [ + 372, + 394 + ], "expression": true, "loc": null, - "range": { - "start": 372, - "end": 394 - } + "range": [ + 372, + 394 + ] }, "loc": null, - "range": { - "start": 365, - "end": 395 - } + "range": [ + 365, + 395 + ] } ], "loc": null, - "range": { - "start": 233, - "end": 399 - } + "range": [ + 233, + 399 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 227, - "end": 399 - }, + "range": [ + 227, + 399 + ], "expression": false, "loc": null, - "range": { - "start": 227, - "end": 399 - } + "range": [ + 227, + 399 + ] }, { "type": "ArrayExpression", @@ -665,41 +665,41 @@ Output: "name": "exit", "typeAnnotation": null, "loc": null, - "range": { - "start": 402, - "end": 406 - } + "range": [ + 402, + 406 + ] }, { "type": "Identifier", "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 408, - "end": 412 - } + "range": [ + 408, + 412 + ] } ], "loc": null, - "range": { - "start": 401, - "end": 413 - } + "range": [ + 401, + 413 + ] } ], "loc": null, - "range": { - "start": 217, - "end": 414 - } + "range": [ + 217, + 414 + ] }, "directive": null, "loc": null, - "range": { - "start": 217, - "end": 415 - } + "range": [ + 217, + 415 + ] }, { "type": "ExpressionStatement", @@ -710,10 +710,10 @@ Output: "name": "maybeMutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 419, - "end": 430 - } + "range": [ + 419, + 430 + ] }, "arguments": [ { @@ -721,24 +721,24 @@ Output: "name": "item", "typeAnnotation": null, "loc": null, - "range": { - "start": 431, - "end": 435 - } + "range": [ + 431, + 435 + ] } ], "loc": null, - "range": { - "start": 419, - "end": 436 - } + "range": [ + 419, + 436 + ] }, "directive": null, "loc": null, - "range": { - "start": 419, - "end": 437 - } + "range": [ + 419, + 437 + ] }, { "type": "ReturnStatement", @@ -750,58 +750,58 @@ Output: "type": "JSXIdentifier", "name": "div", "loc": null, - "range": { - "start": 449, - "end": 452 - } + "range": [ + 449, + 452 + ] }, "attributes": [], "selfClosing": true, "loc": null, - "range": { - "start": 448, - "end": 455 - } + "range": [ + 448, + 455 + ] }, "children": [], "closingElement": null, "loc": null, - "range": { - "start": 448, - "end": 455 - } + "range": [ + 448, + 455 + ] }, "loc": null, - "range": { - "start": 441, - "end": 456 - } + "range": [ + 441, + 456 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 458 - } + "range": [ + 26, + 458 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 458 - }, + "range": [ + 0, + 458 + ], "loc": null, - "range": { - "start": 0, - "end": 458 - } + "range": [ + 0, + 458 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 458 - } + "range": [ + 0, + 458 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-if-else-multiple-return.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-if-else-multiple-return.js.snap index da53761fc4..3e0a530357 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-if-else-multiple-return.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-if-else-multiple-return.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -69,10 +69,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -91,27 +91,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 74 - } + "range": [ + 70, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] }, "consequent": { "type": "BlockStatement", @@ -125,10 +125,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 91, - "end": 101 - } + "range": [ + 91, + 101 + ] }, "arguments": [ { @@ -138,54 +138,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 107 - } + "range": [ + 102, + 107 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 109 - } + "range": [ + 108, + 109 + ] }, "computed": false, "loc": null, - "range": { - "start": 102, - "end": 109 - } + "range": [ + 102, + 109 + ] } ], "loc": null, - "range": { - "start": 91, - "end": 110 - } + "range": [ + 91, + 110 + ] }, "loc": null, - "range": { - "start": 84, - "end": 111 - } + "range": [ + 84, + 111 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 117 - } + "range": [ + 76, + 117 + ] }, "alternate": null, "loc": null, - "range": { - "start": 60, - "end": 117 - } + "range": [ + 60, + 117 + ] }, { "type": "ReturnStatement", @@ -196,10 +196,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 129, - "end": 139 - } + "range": [ + 129, + 139 + ] }, "arguments": [ { @@ -209,81 +209,81 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 140, - "end": 145 - } + "range": [ + 140, + 145 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 146, - "end": 147 - } + "range": [ + 146, + 147 + ] }, "computed": false, "loc": null, - "range": { - "start": 140, - "end": 147 - } + "range": [ + 140, + 147 + ] } ], "loc": null, - "range": { - "start": 129, - "end": 148 - } + "range": [ + 129, + 148 + ] }, "loc": null, - "range": { - "start": 122, - "end": 149 - } + "range": [ + 122, + 149 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 153 - } + "range": [ + 54, + 153 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 153 - }, + "range": [ + 48, + 153 + ], "expression": false, "loc": null, - "range": { - "start": 48, - "end": 153 - } + "range": [ + 48, + 153 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 154 - } + "range": [ + 40, + 154 + ] }, "loc": null, - "range": { - "start": 36, - "end": 154 - } + "range": [ + 36, + 154 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 155 - } + "range": [ + 30, + 155 + ] }, { "type": "ReturnStatement", @@ -292,42 +292,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 166 - } + "range": [ + 165, + 166 + ] }, "loc": null, - "range": { - "start": 158, - "end": 167 - } + "range": [ + 158, + 167 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 169 - } + "range": [ + 26, + 169 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 169 - }, + "range": [ + 0, + 169 + ], "loc": null, - "range": { - "start": 0, - "end": 169 - } + "range": [ + 0, + 169 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 169 - } + "range": [ + 0, + 169 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-independently-memoizeable.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-independently-memoizeable.js.snap index 305bcdcdb4..025844d4c3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-independently-memoizeable.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-independently-memoizeable.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,27 +60,27 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 38 - } + "range": [ + 37, + 38 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 41 - } + "range": [ + 40, + 41 + ] } ], "loc": null, - "range": { - "start": 36, - "end": 42 - } + "range": [ + 36, + 42 + ] }, "init": { "type": "CallExpression", @@ -89,10 +89,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 52 - } + "range": [ + 45, + 52 + ] }, "arguments": [ { @@ -113,32 +113,32 @@ Output: "name": "items", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 76 - } + "range": [ + 71, + 76 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 79, - "end": 81 - } + "range": [ + 79, + 81 + ] }, "loc": null, - "range": { - "start": 71, - "end": 81 - } + "range": [ + 71, + 81 + ] } ], "loc": null, - "range": { - "start": 65, - "end": 82 - } + "range": [ + 65, + 82 + ] }, { "type": "VariableDeclaration", @@ -151,10 +151,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 93, - "end": 94 - } + "range": [ + 93, + 94 + ] }, "init": { "type": "CallExpression", @@ -163,10 +163,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 97, - "end": 107 - } + "range": [ + 97, + 107 + ] }, "arguments": [ { @@ -176,47 +176,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 108, - "end": 113 - } + "range": [ + 108, + 113 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 114, - "end": 115 - } + "range": [ + 114, + 115 + ] }, "computed": false, "loc": null, - "range": { - "start": 108, - "end": 115 - } + "range": [ + 108, + 115 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 116 - } + "range": [ + 97, + 116 + ] }, "loc": null, - "range": { - "start": 93, - "end": 116 - } + "range": [ + 93, + 116 + ] } ], "loc": null, - "range": { - "start": 87, - "end": 117 - } + "range": [ + 87, + 117 + ] }, { "type": "VariableDeclaration", @@ -229,10 +229,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 129 - } + "range": [ + 128, + 129 + ] }, "init": { "type": "CallExpression", @@ -241,10 +241,10 @@ Output: "name": "makeObject", "typeAnnotation": null, "loc": null, - "range": { - "start": 132, - "end": 142 - } + "range": [ + 132, + 142 + ] }, "arguments": [ { @@ -254,47 +254,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 143, - "end": 148 - } + "range": [ + 143, + 148 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 149, - "end": 150 - } + "range": [ + 149, + 150 + ] }, "computed": false, "loc": null, - "range": { - "start": 143, - "end": 150 - } + "range": [ + 143, + 150 + ] } ], "loc": null, - "range": { - "start": 132, - "end": 151 - } + "range": [ + 132, + 151 + ] }, "loc": null, - "range": { - "start": 128, - "end": 151 - } + "range": [ + 128, + 151 + ] } ], "loc": null, - "range": { - "start": 122, - "end": 152 - } + "range": [ + 122, + 152 + ] }, { "type": "ReturnStatement", @@ -306,74 +306,74 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 165, - "end": 166 - } + "range": [ + 165, + 166 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 168, - "end": 169 - } + "range": [ + 168, + 169 + ] } ], "loc": null, - "range": { - "start": 164, - "end": 170 - } + "range": [ + 164, + 170 + ] }, "loc": null, - "range": { - "start": 157, - "end": 171 - } + "range": [ + 157, + 171 + ] } ], "loc": null, - "range": { - "start": 59, - "end": 175 - } + "range": [ + 59, + 175 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 53, - "end": 175 - }, + "range": [ + 53, + 175 + ], "expression": false, "loc": null, - "range": { - "start": 53, - "end": 175 - } + "range": [ + 53, + 175 + ] } ], "loc": null, - "range": { - "start": 45, - "end": 176 - } + "range": [ + 45, + 176 + ] }, "loc": null, - "range": { - "start": 36, - "end": 176 - } + "range": [ + 36, + 176 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 177 - } + "range": [ + 30, + 177 + ] }, { "type": "ReturnStatement", @@ -385,59 +385,59 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 188, - "end": 189 - } + "range": [ + 188, + 189 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 191, - "end": 192 - } + "range": [ + 191, + 192 + ] } ], "loc": null, - "range": { - "start": 187, - "end": 193 - } + "range": [ + 187, + 193 + ] }, "loc": null, - "range": { - "start": 180, - "end": 194 - } + "range": [ + 180, + 194 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 196 - } + "range": [ + 26, + 196 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 196 - }, + "range": [ + 0, + 196 + ], "loc": null, - "range": { - "start": 0, - "end": 196 - } + "range": [ + 0, + 196 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 196 - } + "range": [ + 0, + 196 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-inlining-block-return.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-inlining-block-return.js.snap index da56002c87..b7140f8860 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-inlining-block-return.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-inlining-block-return.js.snap @@ -25,10 +25,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,20 +36,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -66,10 +66,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 33, - "end": 34 - } + "range": [ + 33, + 34 + ] }, "init": { "type": "CallExpression", @@ -78,10 +78,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 37, - "end": 44 - } + "range": [ + 37, + 44 + ] }, "arguments": [ { @@ -98,10 +98,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "consequent": { "type": "BlockStatement", @@ -118,78 +118,78 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "value": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] }, "kind": "init", "method": false, "shorthand": true, "computed": false, "loc": null, - "range": { - "start": 81, - "end": 82 - } + "range": [ + 81, + 82 + ] } ], "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "loc": null, - "range": { - "start": 72, - "end": 85 - } + "range": [ + 72, + 85 + ] } ], "loc": null, - "range": { - "start": 64, - "end": 91 - } + "range": [ + 64, + 91 + ] }, "alternate": null, "loc": null, - "range": { - "start": 57, - "end": 91 - } + "range": [ + 57, + 91 + ] } ], "loc": null, - "range": { - "start": 51, - "end": 95 - } + "range": [ + 51, + 95 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 45, - "end": 95 - }, + "range": [ + 45, + 95 + ], "expression": false, "loc": null, - "range": { - "start": 45, - "end": 95 - } + "range": [ + 45, + 95 + ] }, { "type": "ArrayExpression", @@ -199,47 +199,47 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 98, - "end": 99 - } + "range": [ + 98, + 99 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 101, - "end": 102 - } + "range": [ + 101, + 102 + ] } ], "loc": null, - "range": { - "start": 97, - "end": 103 - } + "range": [ + 97, + 103 + ] } ], "loc": null, - "range": { - "start": 37, - "end": 104 - } + "range": [ + 37, + 104 + ] }, "loc": null, - "range": { - "start": 33, - "end": 104 - } + "range": [ + 33, + 104 + ] } ], "loc": null, - "range": { - "start": 29, - "end": 105 - } + "range": [ + 29, + 105 + ] }, { "type": "ReturnStatement", @@ -248,42 +248,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 115, - "end": 116 - } + "range": [ + 115, + 116 + ] }, "loc": null, - "range": { - "start": 108, - "end": 117 - } + "range": [ + 108, + 117 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 119 - } + "range": [ + 25, + 119 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 119 - }, + "range": [ + 0, + 119 + ], "loc": null, - "range": { - "start": 0, - "end": 119 - } + "range": [ + 0, + 119 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 119 - } + "range": [ + 0, + 119 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-inverted-if.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-inverted-if.js.snap index 62c80e9e0e..9c9c795628 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-inverted-if.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-inverted-if.js.snap @@ -29,10 +29,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -40,10 +40,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -60,10 +60,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -72,10 +72,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -92,10 +92,10 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "body": { "type": "BlockStatement", @@ -109,27 +109,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 89 - } + "range": [ + 85, + 89 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 89 - } + "range": [ + 79, + 89 + ] }, "consequent": { "type": "BlockStatement", @@ -141,30 +141,30 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 112 - } + "range": [ + 107, + 112 + ] }, "loc": null, - "range": { - "start": 101, - "end": 113 - } + "range": [ + 101, + 113 + ] } ], "loc": null, - "range": { - "start": 91, - "end": 121 - } + "range": [ + 91, + 121 + ] }, "alternate": null, "loc": null, - "range": { - "start": 75, - "end": 121 - } + "range": [ + 75, + 121 + ] }, { "type": "ReturnStatement", @@ -175,46 +175,46 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 135, - "end": 140 - } + "range": [ + 135, + 140 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 141, - "end": 142 - } + "range": [ + 141, + 142 + ] }, "computed": false, "loc": null, - "range": { - "start": 135, - "end": 142 - } + "range": [ + 135, + 142 + ] }, "loc": null, - "range": { - "start": 128, - "end": 143 - } + "range": [ + 128, + 143 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 149 - } + "range": [ + 67, + 149 + ] }, "loc": null, - "range": { - "start": 60, - "end": 149 - } + "range": [ + 60, + 149 + ] }, { "type": "ReturnStatement", @@ -225,74 +225,74 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 161, - "end": 166 - } + "range": [ + 161, + 166 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 167, - "end": 168 - } + "range": [ + 167, + 168 + ] }, "computed": false, "loc": null, - "range": { - "start": 161, - "end": 168 - } + "range": [ + 161, + 168 + ] }, "loc": null, - "range": { - "start": 154, - "end": 169 - } + "range": [ + 154, + 169 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 173 - } + "range": [ + 54, + 173 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 173 - }, + "range": [ + 48, + 173 + ], "expression": false, "loc": null, - "range": { - "start": 48, - "end": 173 - } + "range": [ + 48, + 173 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 174 - } + "range": [ + 40, + 174 + ] }, "loc": null, - "range": { - "start": 36, - "end": 174 - } + "range": [ + 36, + 174 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 175 - } + "range": [ + 30, + 175 + ] }, { "type": "ReturnStatement", @@ -301,42 +301,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "loc": null, - "range": { - "start": 178, - "end": 187 - } + "range": [ + 178, + 187 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 189 - } + "range": [ + 26, + 189 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 189 - }, + "range": [ + 0, + 189 + ], "loc": null, - "range": { - "start": 0, - "end": 189 - } + "range": [ + 0, + 189 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 189 - } + "range": [ + 0, + 189 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-labeled-statement-unconditional-return.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-labeled-statement-unconditional-return.js.snap index fae66b785b..6e9fd2cfd3 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-labeled-statement-unconditional-return.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-labeled-statement-unconditional-return.js.snap @@ -25,10 +25,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -36,10 +36,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -56,10 +56,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -68,10 +68,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -88,10 +88,10 @@ Output: "name": "label", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 65 - } + "range": [ + 60, + 65 + ] }, "body": { "type": "BlockStatement", @@ -105,87 +105,87 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 87 - } + "range": [ + 82, + 87 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] }, "computed": false, "loc": null, - "range": { - "start": 82, - "end": 93 - } + "range": [ + 82, + 93 + ] }, "loc": null, - "range": { - "start": 75, - "end": 94 - } + "range": [ + 75, + 94 + ] } ], "loc": null, - "range": { - "start": 67, - "end": 100 - } + "range": [ + 67, + 100 + ] }, "loc": null, - "range": { - "start": 60, - "end": 100 - } + "range": [ + 60, + 100 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 104 - } + "range": [ + 54, + 104 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 104 - }, + "range": [ + 48, + 104 + ], "expression": false, "loc": null, - "range": { - "start": 48, - "end": 104 - } + "range": [ + 48, + 104 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 105 - } + "range": [ + 40, + 105 + ] }, "loc": null, - "range": { - "start": 36, - "end": 105 - } + "range": [ + 36, + 105 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 106 - } + "range": [ + 30, + 106 + ] }, { "type": "ReturnStatement", @@ -194,42 +194,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 117 - } + "range": [ + 116, + 117 + ] }, "loc": null, - "range": { - "start": 109, - "end": 118 - } + "range": [ + 109, + 118 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 120 - } + "range": [ + 26, + 120 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 120 - }, + "range": [ + 0, + 120 + ], "loc": null, - "range": { - "start": 0, - "end": 120 - } + "range": [ + 0, + 120 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 120 - } + "range": [ + 0, + 120 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-logical.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-logical.js.snap index 3970cfb347..95a75dc390 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-logical.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-logical.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -64,10 +64,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -84,27 +84,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 59 - } + "range": [ + 54, + 59 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 60, - "end": 61 - } + "range": [ + 60, + 61 + ] }, "computed": false, "loc": null, - "range": { - "start": 54, - "end": 61 - } + "range": [ + 54, + 61 + ] }, "right": { "type": "MemberExpression", @@ -113,67 +113,67 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 72 - } + "range": [ + 71, + 72 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 72 - } + "range": [ + 65, + 72 + ] }, "loc": null, - "range": { - "start": 54, - "end": 72 - } + "range": [ + 54, + 72 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 48, - "end": 72 - }, + "range": [ + 48, + 72 + ], "expression": true, "loc": null, - "range": { - "start": 48, - "end": 72 - } + "range": [ + 48, + 72 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 73 - } + "range": [ + 40, + 73 + ] }, "loc": null, - "range": { - "start": 36, - "end": 73 - } + "range": [ + 36, + 73 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 74 - } + "range": [ + 30, + 74 + ] }, { "type": "ReturnStatement", @@ -182,42 +182,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 88 - } + "range": [ + 26, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 88 - }, + "range": [ + 0, + 88 + ], "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-multiple-if-else.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-multiple-if-else.js.snap index fb7937f89b..af001b663d 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-multiple-if-else.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-multiple-if-else.js.snap @@ -31,10 +31,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -42,10 +42,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -62,10 +62,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -74,10 +74,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -98,32 +98,32 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "init": { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 68, - "end": 70 - } + "range": [ + 68, + 70 + ] }, "loc": null, - "range": { - "start": 64, - "end": 70 - } + "range": [ + 64, + 70 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 71 - } + "range": [ + 60, + 71 + ] }, { "type": "IfStatement", @@ -134,27 +134,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 85 - } + "range": [ + 80, + 85 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 86, - "end": 90 - } + "range": [ + 86, + 90 + ] }, "computed": false, "loc": null, - "range": { - "start": 80, - "end": 90 - } + "range": [ + 80, + 90 + ] }, "consequent": { "type": "BlockStatement", @@ -170,27 +170,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 100, - "end": 101 - } + "range": [ + 100, + 101 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 102, - "end": 106 - } + "range": [ + 102, + 106 + ] }, "computed": false, "loc": null, - "range": { - "start": 100, - "end": 106 - } + "range": [ + 100, + 106 + ] }, "arguments": [ { @@ -200,55 +200,55 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 107, - "end": 112 - } + "range": [ + 107, + 112 + ] }, "property": { "type": "Identifier", "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 113, - "end": 114 - } + "range": [ + 113, + 114 + ] }, "computed": false, "loc": null, - "range": { - "start": 107, - "end": 114 - } + "range": [ + 107, + 114 + ] } ], "loc": null, - "range": { - "start": 100, - "end": 115 - } + "range": [ + 100, + 115 + ] }, "directive": null, "loc": null, - "range": { - "start": 100, - "end": 116 - } + "range": [ + 100, + 116 + ] } ], "loc": null, - "range": { - "start": 92, - "end": 122 - } + "range": [ + 92, + 122 + ] }, "alternate": null, "loc": null, - "range": { - "start": 76, - "end": 122 - } + "range": [ + 76, + 122 + ] }, { "type": "IfStatement", @@ -259,27 +259,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 131, - "end": 136 - } + "range": [ + 131, + 136 + ] }, "property": { "type": "Identifier", "name": "cond2", "typeAnnotation": null, "loc": null, - "range": { - "start": 137, - "end": 142 - } + "range": [ + 137, + 142 + ] }, "computed": false, "loc": null, - "range": { - "start": 131, - "end": 142 - } + "range": [ + 131, + 142 + ] }, "consequent": { "type": "BlockStatement", @@ -291,30 +291,30 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 159, - "end": 160 - } + "range": [ + 159, + 160 + ] }, "loc": null, - "range": { - "start": 152, - "end": 161 - } + "range": [ + 152, + 161 + ] } ], "loc": null, - "range": { - "start": 144, - "end": 167 - } + "range": [ + 144, + 167 + ] }, "alternate": null, "loc": null, - "range": { - "start": 127, - "end": 167 - } + "range": [ + 127, + 167 + ] }, { "type": "ExpressionStatement", @@ -327,27 +327,27 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 172, - "end": 173 - } + "range": [ + 172, + 173 + ] }, "property": { "type": "Identifier", "name": "push", "typeAnnotation": null, "loc": null, - "range": { - "start": 174, - "end": 178 - } + "range": [ + 174, + 178 + ] }, "computed": false, "loc": null, - "range": { - "start": 172, - "end": 178 - } + "range": [ + 172, + 178 + ] }, "arguments": [ { @@ -357,41 +357,41 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 179, - "end": 184 - } + "range": [ + 179, + 184 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 185, - "end": 186 - } + "range": [ + 185, + 186 + ] }, "computed": false, "loc": null, - "range": { - "start": 179, - "end": 186 - } + "range": [ + 179, + 186 + ] } ], "loc": null, - "range": { - "start": 172, - "end": 187 - } + "range": [ + 172, + 187 + ] }, "directive": null, "loc": null, - "range": { - "start": 172, - "end": 188 - } + "range": [ + 172, + 188 + ] }, { "type": "ReturnStatement", @@ -400,57 +400,57 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 200, - "end": 201 - } + "range": [ + 200, + 201 + ] }, "loc": null, - "range": { - "start": 193, - "end": 202 - } + "range": [ + 193, + 202 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 206 - } + "range": [ + 54, + 206 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 206 - }, + "range": [ + 48, + 206 + ], "expression": false, "loc": null, - "range": { - "start": 48, - "end": 206 - } + "range": [ + 48, + 206 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 207 - } + "range": [ + 40, + 207 + ] }, "loc": null, - "range": { - "start": 36, - "end": 207 - } + "range": [ + 36, + 207 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 208 - } + "range": [ + 30, + 208 + ] }, { "type": "ReturnStatement", @@ -459,42 +459,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 219 - } + "range": [ + 218, + 219 + ] }, "loc": null, - "range": { - "start": 211, - "end": 220 - } + "range": [ + 211, + 220 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 222 - } + "range": [ + 26, + 222 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 222 - }, + "range": [ + 0, + 222 + ], "loc": null, - "range": { - "start": 0, - "end": 222 - } + "range": [ + 0, + 222 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 222 - } + "range": [ + 0, + 222 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-named-function.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-named-function.js.snap index 27b5e98a92..30147ec836 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-named-function.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-named-function.js.snap @@ -21,10 +21,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -64,10 +64,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -75,39 +75,39 @@ Output: "name": "someHelper", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 58 - } + "range": [ + 48, + 58 + ] }, { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 60, - "end": 62 - } + "range": [ + 60, + 62 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 63 - } + "range": [ + 40, + 63 + ] }, "loc": null, - "range": { - "start": 36, - "end": 63 - } + "range": [ + 36, + 63 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 64 - } + "range": [ + 30, + 64 + ] }, { "type": "ReturnStatement", @@ -116,42 +116,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 75 - } + "range": [ + 74, + 75 + ] }, "loc": null, - "range": { - "start": 67, - "end": 76 - } + "range": [ + 67, + 76 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 78 - } + "range": [ + 26, + 78 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 78 - }, + "range": [ + 0, + 78 + ], "loc": null, - "range": { - "start": 0, - "end": 78 - } + "range": [ + 0, + 78 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 78 - } + "range": [ + 0, + 78 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-nested-ifs.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-nested-ifs.js.snap index 8fecb8a543..2e7a22670c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-nested-ifs.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-nested-ifs.js.snap @@ -26,10 +26,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -37,10 +37,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -57,10 +57,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -69,10 +69,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -91,27 +91,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 69 - } + "range": [ + 64, + 69 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 70, - "end": 74 - } + "range": [ + 70, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 64, - "end": 74 - } + "range": [ + 64, + 74 + ] }, "consequent": { "type": "BlockStatement", @@ -125,78 +125,78 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 88, - "end": 93 - } + "range": [ + 88, + 93 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 94, - "end": 98 - } + "range": [ + 94, + 98 + ] }, "computed": false, "loc": null, - "range": { - "start": 88, - "end": 98 - } + "range": [ + 88, + 98 + ] }, "consequent": { "type": "BlockStatement", "body": [], "loc": null, - "range": { - "start": 100, - "end": 109 - } + "range": [ + 100, + 109 + ] }, "alternate": null, "loc": null, - "range": { - "start": 84, - "end": 109 - } + "range": [ + 84, + 109 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 115 - } + "range": [ + 76, + 115 + ] }, "alternate": null, "loc": null, - "range": { - "start": 60, - "end": 115 - } + "range": [ + 60, + 115 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 119 - } + "range": [ + 54, + 119 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 119 - }, + "range": [ + 48, + 119 + ], "expression": false, "loc": null, - "range": { - "start": 48, - "end": 119 - } + "range": [ + 48, + 119 + ] }, { "type": "ArrayExpression", @@ -208,54 +208,54 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 127 - } + "range": [ + 122, + 127 + ] }, "property": { "type": "Identifier", "name": "cond", "typeAnnotation": null, "loc": null, - "range": { - "start": 128, - "end": 132 - } + "range": [ + 128, + 132 + ] }, "computed": false, "loc": null, - "range": { - "start": 122, - "end": 132 - } + "range": [ + 122, + 132 + ] } ], "loc": null, - "range": { - "start": 121, - "end": 133 - } + "range": [ + 121, + 133 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 134 - } + "range": [ + 40, + 134 + ] }, "loc": null, - "range": { - "start": 36, - "end": 134 - } + "range": [ + 36, + 134 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 135 - } + "range": [ + 30, + 135 + ] }, { "type": "ReturnStatement", @@ -264,42 +264,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 145, - "end": 146 - } + "range": [ + 145, + 146 + ] }, "loc": null, - "range": { - "start": 138, - "end": 147 - } + "range": [ + 138, + 147 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 149 - } + "range": [ + 26, + 149 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 149 - }, + "range": [ + 0, + 149 + ], "loc": null, - "range": { - "start": 0, - "end": 149 - } + "range": [ + 0, + 149 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 149 - } + "range": [ + 0, + 149 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-return-empty.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-return-empty.js.snap index 0d6165f6ac..2eae137d0e 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-return-empty.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-return-empty.js.snap @@ -23,10 +23,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -34,10 +34,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -54,10 +54,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "CallExpression", @@ -66,10 +66,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 41 - } + "range": [ + 34, + 41 + ] }, "arguments": [ { @@ -88,10 +88,10 @@ Output: "name": "mutate", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 60 - } + "range": [ + 54, + 60 + ] }, "arguments": [ { @@ -99,74 +99,74 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 63 - } + "range": [ + 54, + 63 + ] }, "directive": null, "loc": null, - "range": { - "start": 54, - "end": 64 - } + "range": [ + 54, + 64 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 68 - } + "range": [ + 48, + 68 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 42, - "end": 68 - }, + "range": [ + 42, + 68 + ], "expression": false, "loc": null, - "range": { - "start": 42, - "end": 68 - } + "range": [ + 42, + 68 + ] }, { "type": "ArrayExpression", "elements": [], "loc": null, - "range": { - "start": 70, - "end": 72 - } + "range": [ + 70, + 72 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 73 - } + "range": [ + 34, + 73 + ] }, "loc": null, - "range": { - "start": 30, - "end": 73 - } + "range": [ + 30, + 73 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 74 - } + "range": [ + 26, + 74 + ] }, { "type": "ReturnStatement", @@ -175,42 +175,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 84, - "end": 85 - } + "range": [ + 84, + 85 + ] }, "loc": null, - "range": { - "start": 77, - "end": 86 - } + "range": [ + 77, + 86 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 88 - } + "range": [ + 22, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 88 - }, + "range": [ + 0, + 88 + ], "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-simple.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-simple.js.snap index d8b8d0e31b..de09eb07f0 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-simple.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-simple.js.snap @@ -21,10 +21,10 @@ Output: "name": "component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -32,10 +32,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] } ], "body": { @@ -52,10 +52,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "init": { "type": "CallExpression", @@ -64,10 +64,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 34, - "end": 41 - } + "range": [ + 34, + 41 + ] }, "arguments": [ { @@ -82,31 +82,31 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] } ], "loc": null, - "range": { - "start": 48, - "end": 51 - } + "range": [ + 48, + 51 + ] }, "generator": true, "async": false, "loc": null, - "range": { - "start": 42, - "end": 51 - }, + "range": [ + 42, + 51 + ], "expression": true, "loc": null, - "range": { - "start": 42, - "end": 51 - } + "range": [ + 42, + 51 + ] }, { "type": "ArrayExpression", @@ -116,37 +116,37 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 55 - } + "range": [ + 54, + 55 + ] } ], "loc": null, - "range": { - "start": 53, - "end": 56 - } + "range": [ + 53, + 56 + ] } ], "loc": null, - "range": { - "start": 34, - "end": 57 - } + "range": [ + 34, + 57 + ] }, "loc": null, - "range": { - "start": 30, - "end": 57 - } + "range": [ + 30, + 57 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 58 - } + "range": [ + 26, + 58 + ] }, { "type": "ReturnStatement", @@ -158,10 +158,10 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 69, - "end": 72 - } + "range": [ + 69, + 72 + ] }, "attributes": [ { @@ -170,10 +170,10 @@ Output: "type": "JSXIdentifier", "name": "x", "loc": null, - "range": { - "start": 73, - "end": 74 - } + "range": [ + 73, + 74 + ] }, "value": { "type": "JSXExpressionContainer", @@ -182,30 +182,30 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 76, - "end": 77 - } + "range": [ + 76, + 77 + ] }, "loc": null, - "range": { - "start": 75, - "end": 78 - } + "range": [ + 75, + 78 + ] }, "loc": null, - "range": { - "start": 73, - "end": 78 - } + "range": [ + 73, + 78 + ] } ], "selfClosing": false, "loc": null, - "range": { - "start": 68, - "end": 79 - } + "range": [ + 68, + 79 + ] }, "children": [], "closingElement": { @@ -214,54 +214,54 @@ Output: "type": "JSXIdentifier", "name": "Foo", "loc": null, - "range": { - "start": 81, - "end": 84 - } + "range": [ + 81, + 84 + ] }, "loc": null, - "range": { - "start": 79, - "end": 85 - } + "range": [ + 79, + 85 + ] }, "loc": null, - "range": { - "start": 68, - "end": 85 - } + "range": [ + 68, + 85 + ] }, "loc": null, - "range": { - "start": 61, - "end": 86 - } + "range": [ + 61, + 86 + ] } ], "loc": null, - "range": { - "start": 22, - "end": 88 - } + "range": [ + 22, + 88 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 88 - }, + "range": [ + 0, + 88 + ], "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 88 - } + "range": [ + 0, + 88 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-switch-no-fallthrough.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-switch-no-fallthrough.js.snap index 1f1fb8edde..10303bd7b2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-switch-no-fallthrough.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-switch-no-fallthrough.js.snap @@ -30,10 +30,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -41,10 +41,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -61,10 +61,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -73,10 +73,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -95,27 +95,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 68, - "end": 73 - } + "range": [ + 68, + 73 + ] }, "property": { "type": "Identifier", "name": "key", "typeAnnotation": null, "loc": null, - "range": { - "start": 74, - "end": 77 - } + "range": [ + 74, + 77 + ] }, "computed": false, "loc": null, - "range": { - "start": 68, - "end": 77 - } + "range": [ + 68, + 77 + ] }, "cases": [ { @@ -124,10 +124,10 @@ Output: "type": "StringLiteral", "value": "key", "loc": null, - "range": { - "start": 92, - "end": 97 - } + "range": [ + 92, + 97 + ] }, "consequent": [ { @@ -142,47 +142,47 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 116, - "end": 121 - } + "range": [ + 116, + 121 + ] }, "property": { "type": "Identifier", "name": "value", "typeAnnotation": null, "loc": null, - "range": { - "start": 122, - "end": 127 - } + "range": [ + 122, + 127 + ] }, "computed": false, "loc": null, - "range": { - "start": 116, - "end": 127 - } + "range": [ + 116, + 127 + ] }, "loc": null, - "range": { - "start": 109, - "end": 128 - } + "range": [ + 109, + 128 + ] } ], "loc": null, - "range": { - "start": 99, - "end": 136 - } + "range": [ + 99, + 136 + ] } ], "loc": null, - "range": { - "start": 87, - "end": 136 - } + "range": [ + 87, + 136 + ] }, { "type": "SwitchCase", @@ -200,95 +200,95 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 169, - "end": 174 - } + "range": [ + 169, + 174 + ] }, "property": { "type": "Identifier", "name": "defaultValue", "typeAnnotation": null, "loc": null, - "range": { - "start": 175, - "end": 187 - } + "range": [ + 175, + 187 + ] }, "computed": false, "loc": null, - "range": { - "start": 169, - "end": 187 - } + "range": [ + 169, + 187 + ] }, "loc": null, - "range": { - "start": 162, - "end": 188 - } + "range": [ + 162, + 188 + ] } ], "loc": null, - "range": { - "start": 152, - "end": 196 - } + "range": [ + 152, + 196 + ] } ], "loc": null, - "range": { - "start": 143, - "end": 196 - } + "range": [ + 143, + 196 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 202 - } + "range": [ + 60, + 202 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 206 - } + "range": [ + 54, + 206 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 206 - }, + "range": [ + 48, + 206 + ], "expression": false, "loc": null, - "range": { - "start": 48, - "end": 206 - } + "range": [ + 48, + 206 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 207 - } + "range": [ + 40, + 207 + ] }, "loc": null, - "range": { - "start": 36, - "end": 207 - } + "range": [ + 36, + 207 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 208 - } + "range": [ + 30, + 208 + ] }, { "type": "ReturnStatement", @@ -297,42 +297,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 218, - "end": 219 - } + "range": [ + 218, + 219 + ] }, "loc": null, - "range": { - "start": 211, - "end": 220 - } + "range": [ + 211, + 220 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 222 - } + "range": [ + 26, + 222 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 222 - }, + "range": [ + 0, + 222 + ], "loc": null, - "range": { - "start": 0, - "end": 222 - } + "range": [ + 0, + 222 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 222 - } + "range": [ + 0, + 222 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-switch-return.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-switch-return.js.snap index 0a7b45f232..c134835848 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-switch-return.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@useMemo-switch-return.js.snap @@ -36,10 +36,10 @@ Output: "name": "Component", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 18 - } + "range": [ + 9, + 18 + ] }, "params": [ { @@ -47,10 +47,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 24 - } + "range": [ + 19, + 24 + ] } ], "body": { @@ -67,10 +67,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "init": { "type": "CallExpression", @@ -79,10 +79,10 @@ Output: "name": "useMemo", "typeAnnotation": null, "loc": null, - "range": { - "start": 40, - "end": 47 - } + "range": [ + 40, + 47 + ] }, "arguments": [ { @@ -103,24 +103,24 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] }, "init": null, "loc": null, - "range": { - "start": 64, - "end": 65 - } + "range": [ + 64, + 65 + ] } ], "loc": null, - "range": { - "start": 60, - "end": 66 - } + "range": [ + 60, + 66 + ] }, { "type": "SwitchStatement", @@ -131,27 +131,27 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 79, - "end": 84 - } + "range": [ + 79, + 84 + ] }, "property": { "type": "Identifier", "name": "switch", "typeAnnotation": null, "loc": null, - "range": { - "start": 85, - "end": 91 - } + "range": [ + 85, + 91 + ] }, "computed": false, "loc": null, - "range": { - "start": 79, - "end": 91 - } + "range": [ + 79, + 91 + ] }, "cases": [ { @@ -160,10 +160,10 @@ Output: "type": "StringLiteral", "value": "foo", "loc": null, - "range": { - "start": 106, - "end": 111 - } + "range": [ + 106, + 111 + ] }, "consequent": [ { @@ -175,30 +175,30 @@ Output: "type": "StringLiteral", "value": "foo", "loc": null, - "range": { - "start": 130, - "end": 135 - } + "range": [ + 130, + 135 + ] }, "loc": null, - "range": { - "start": 123, - "end": 136 - } + "range": [ + 123, + 136 + ] } ], "loc": null, - "range": { - "start": 113, - "end": 144 - } + "range": [ + 113, + 144 + ] } ], "loc": null, - "range": { - "start": 101, - "end": 144 - } + "range": [ + 101, + 144 + ] }, { "type": "SwitchCase", @@ -206,10 +206,10 @@ Output: "type": "StringLiteral", "value": "bar", "loc": null, - "range": { - "start": 156, - "end": 161 - } + "range": [ + 156, + 161 + ] }, "consequent": [ { @@ -225,55 +225,55 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 173, - "end": 174 - } + "range": [ + 173, + 174 + ] }, "right": { "type": "StringLiteral", "value": "bar", "loc": null, - "range": { - "start": 177, - "end": 182 - } + "range": [ + 177, + 182 + ] }, "loc": null, - "range": { - "start": 173, - "end": 182 - } + "range": [ + 173, + 182 + ] }, "directive": null, "loc": null, - "range": { - "start": 173, - "end": 183 - } + "range": [ + 173, + 183 + ] }, { "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 192, - "end": 198 - } + "range": [ + 192, + 198 + ] } ], "loc": null, - "range": { - "start": 163, - "end": 206 - } + "range": [ + 163, + 206 + ] } ], "loc": null, - "range": { - "start": 151, - "end": 206 - } + "range": [ + 151, + 206 + ] }, { "type": "SwitchCase", @@ -292,10 +292,10 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 232, - "end": 233 - } + "range": [ + 232, + 233 + ] }, "right": { "type": "MemberExpression", @@ -304,61 +304,61 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 236, - "end": 241 - } + "range": [ + 236, + 241 + ] }, "property": { "type": "Identifier", "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 242, - "end": 243 - } + "range": [ + 242, + 243 + ] }, "computed": false, "loc": null, - "range": { - "start": 236, - "end": 243 - } + "range": [ + 236, + 243 + ] }, "loc": null, - "range": { - "start": 232, - "end": 243 - } + "range": [ + 232, + 243 + ] }, "directive": null, "loc": null, - "range": { - "start": 232, - "end": 244 - } + "range": [ + 232, + 244 + ] } ], "loc": null, - "range": { - "start": 222, - "end": 252 - } + "range": [ + 222, + 252 + ] } ], "loc": null, - "range": { - "start": 213, - "end": 252 - } + "range": [ + 213, + 252 + ] } ], "loc": null, - "range": { - "start": 71, - "end": 258 - } + "range": [ + 71, + 258 + ] }, { "type": "ReturnStatement", @@ -367,57 +367,57 @@ Output: "name": "y", "typeAnnotation": null, "loc": null, - "range": { - "start": 270, - "end": 271 - } + "range": [ + 270, + 271 + ] }, "loc": null, - "range": { - "start": 263, - "end": 272 - } + "range": [ + 263, + 272 + ] } ], "loc": null, - "range": { - "start": 54, - "end": 276 - } + "range": [ + 54, + 276 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 48, - "end": 276 - }, + "range": [ + 48, + 276 + ], "expression": false, "loc": null, - "range": { - "start": 48, - "end": 276 - } + "range": [ + 48, + 276 + ] } ], "loc": null, - "range": { - "start": 40, - "end": 277 - } + "range": [ + 40, + 277 + ] }, "loc": null, - "range": { - "start": 36, - "end": 277 - } + "range": [ + 36, + 277 + ] } ], "loc": null, - "range": { - "start": 30, - "end": 278 - } + "range": [ + 30, + 278 + ] }, { "type": "ReturnStatement", @@ -426,42 +426,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 288, - "end": 289 - } + "range": [ + 288, + 289 + ] }, "loc": null, - "range": { - "start": 281, - "end": 290 - } + "range": [ + 281, + 290 + ] } ], "loc": null, - "range": { - "start": 26, - "end": 292 - } + "range": [ + 26, + 292 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 292 - }, + "range": [ + 0, + 292 + ], "loc": null, - "range": { - "start": 0, - "end": 292 - } + "range": [ + 0, + 292 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 292 - } + "range": [ + 0, + 292 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-break.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-break.js.snap index ed0da95bca..8f1c856753 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-break.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-break.js.snap @@ -23,10 +23,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -34,20 +34,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -60,10 +60,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 30, - "end": 31 - } + "range": [ + 30, + 31 + ] }, "body": { "type": "BlockStatement", @@ -72,23 +72,23 @@ Output: "type": "BreakStatement", "label": null, "loc": null, - "range": { - "start": 39, - "end": 45 - } + "range": [ + 39, + 45 + ] } ], "loc": null, - "range": { - "start": 33, - "end": 49 - } + "range": [ + 33, + 49 + ] }, "loc": null, - "range": { - "start": 23, - "end": 49 - } + "range": [ + 23, + 49 + ] }, { "type": "ReturnStatement", @@ -97,42 +97,42 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 59, - "end": 60 - } + "range": [ + 59, + 60 + ] }, "loc": null, - "range": { - "start": 52, - "end": 61 - } + "range": [ + 52, + 61 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 63 - } + "range": [ + 19, + 63 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 63 - }, + "range": [ + 0, + 63 + ], "loc": null, - "range": { - "start": 0, - "end": 63 - } + "range": [ + 0, + 63 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 63 - } + "range": [ + 0, + 63 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-conditional-continue.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-conditional-continue.js.snap index 183941f51b..ec16b6364f 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-conditional-continue.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-conditional-continue.js.snap @@ -27,10 +27,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -38,40 +38,40 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] }, { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 19, - "end": 20 - } + "range": [ + 19, + 20 + ] }, { "type": "Identifier", "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 22, - "end": 23 - } + "range": [ + 22, + 23 + ] } ], "body": { @@ -84,10 +84,10 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 36, - "end": 37 - } + "range": [ + 36, + 37 + ] }, "body": { "type": "BlockStatement", @@ -99,10 +99,10 @@ Output: "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 49, - "end": 50 - } + "range": [ + 49, + 50 + ] }, "consequent": { "type": "BlockStatement", @@ -111,24 +111,24 @@ Output: "type": "ContinueStatement", "label": null, "loc": null, - "range": { - "start": 60, - "end": 69 - } + "range": [ + 60, + 69 + ] } ], "loc": null, - "range": { - "start": 52, - "end": 75 - } + "range": [ + 52, + 75 + ] }, "alternate": null, "loc": null, - "range": { - "start": 45, - "end": 75 - } + "range": [ + 45, + 75 + ] }, { "type": "ExpressionStatement", @@ -139,46 +139,46 @@ Output: "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 80, - "end": 81 - } + "range": [ + 80, + 81 + ] }, "arguments": [], "loc": null, - "range": { - "start": 80, - "end": 83 - } + "range": [ + 80, + 83 + ] }, "directive": null, "loc": null, - "range": { - "start": 80, - "end": 84 - } + "range": [ + 80, + 84 + ] }, { "type": "ContinueStatement", "label": null, "loc": null, - "range": { - "start": 89, - "end": 98 - } + "range": [ + 89, + 98 + ] } ], "loc": null, - "range": { - "start": 39, - "end": 102 - } + "range": [ + 39, + 102 + ] }, "loc": null, - "range": { - "start": 29, - "end": 102 - } + "range": [ + 29, + 102 + ] }, { "type": "ExpressionStatement", @@ -189,50 +189,50 @@ Output: "name": "d", "typeAnnotation": null, "loc": null, - "range": { - "start": 105, - "end": 106 - } + "range": [ + 105, + 106 + ] }, "arguments": [], "loc": null, - "range": { - "start": 105, - "end": 108 - } + "range": [ + 105, + 108 + ] }, "directive": null, "loc": null, - "range": { - "start": 105, - "end": 109 - } + "range": [ + 105, + 109 + ] } ], "loc": null, - "range": { - "start": 25, - "end": 111 - } + "range": [ + 25, + 111 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 111 - }, + "range": [ + 0, + 111 + ], "loc": null, - "range": { - "start": 0, - "end": 111 - } + "range": [ + 0, + 111 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 111 - } + "range": [ + 0, + 111 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-logical.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-logical.js.snap index d59657c3ee..5727273fc2 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-logical.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-logical.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,10 +35,10 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 18 - } + "range": [ + 13, + 18 + ] } ], "body": { @@ -55,32 +55,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 28, - "end": 29 - } + "range": [ + 28, + 29 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 32, - "end": 33 - } + "range": [ + 32, + 33 + ] }, "loc": null, - "range": { - "start": 28, - "end": 33 - } + "range": [ + 28, + 33 + ] } ], "loc": null, - "range": { - "start": 24, - "end": 34 - } + "range": [ + 24, + 34 + ] }, { "type": "WhileStatement", @@ -94,10 +94,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 44, - "end": 45 - } + "range": [ + 44, + 45 + ] }, "operator": ">", "right": { @@ -107,33 +107,33 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 48, - "end": 53 - } + "range": [ + 48, + 53 + ] }, "property": { "type": "Identifier", "name": "min", "typeAnnotation": null, "loc": null, - "range": { - "start": 54, - "end": 57 - } + "range": [ + 54, + 57 + ] }, "computed": false, "loc": null, - "range": { - "start": 48, - "end": 57 - } + "range": [ + 48, + 57 + ] }, "loc": null, - "range": { - "start": 44, - "end": 57 - } + "range": [ + 44, + 57 + ] }, "right": { "type": "BinaryExpression", @@ -142,10 +142,10 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "operator": "<", "right": { @@ -155,39 +155,39 @@ Output: "name": "props", "typeAnnotation": null, "loc": null, - "range": { - "start": 65, - "end": 70 - } + "range": [ + 65, + 70 + ] }, "property": { "type": "Identifier", "name": "max", "typeAnnotation": null, "loc": null, - "range": { - "start": 71, - "end": 74 - } + "range": [ + 71, + 74 + ] }, "computed": false, "loc": null, - "range": { - "start": 65, - "end": 74 - } + "range": [ + 65, + 74 + ] }, "loc": null, - "range": { - "start": 61, - "end": 74 - } + "range": [ + 61, + 74 + ] }, "loc": null, - "range": { - "start": 44, - "end": 74 - } + "range": [ + 44, + 74 + ] }, "body": { "type": "BlockStatement", @@ -202,45 +202,45 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 82, - "end": 83 - } + "range": [ + 82, + 83 + ] }, "right": { "type": "NumericLiteral", "value": 2.0, "loc": null, - "range": { - "start": 87, - "end": 88 - } + "range": [ + 87, + 88 + ] }, "loc": null, - "range": { - "start": 82, - "end": 88 - } + "range": [ + 82, + 88 + ] }, "directive": null, "loc": null, - "range": { - "start": 82, - "end": 89 - } + "range": [ + 82, + 89 + ] } ], "loc": null, - "range": { - "start": 76, - "end": 93 - } + "range": [ + 76, + 93 + ] }, "loc": null, - "range": { - "start": 37, - "end": 93 - } + "range": [ + 37, + 93 + ] }, { "type": "ReturnStatement", @@ -249,42 +249,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 103, - "end": 104 - } + "range": [ + 103, + 104 + ] }, "loc": null, - "range": { - "start": 96, - "end": 105 - } + "range": [ + 96, + 105 + ] } ], "loc": null, - "range": { - "start": 20, - "end": 107 - } + "range": [ + 20, + 107 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 107 - }, + "range": [ + 0, + 107 + ], "loc": null, - "range": { - "start": 0, - "end": 107 - } + "range": [ + 0, + 107 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 107 - } + "range": [ + 0, + 107 + ] } diff --git a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-property.js.snap b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-property.js.snap index dd4192cc8f..35d50e0e7c 100644 --- a/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-property.js.snap +++ b/compiler/forget/crates/forget_hermes_parser/tests/snapshots/parser_test__fixtures@while-property.js.snap @@ -24,10 +24,10 @@ Output: "name": "foo", "typeAnnotation": null, "loc": null, - "range": { - "start": 9, - "end": 12 - } + "range": [ + 9, + 12 + ] }, "params": [ { @@ -35,20 +35,20 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 13, - "end": 14 - } + "range": [ + 13, + 14 + ] }, { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 16, - "end": 17 - } + "range": [ + 16, + 17 + ] } ], "body": { @@ -65,32 +65,32 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 27, - "end": 28 - } + "range": [ + 27, + 28 + ] }, "init": { "type": "NumericLiteral", "value": 0.0, "loc": null, - "range": { - "start": 31, - "end": 32 - } + "range": [ + 31, + 32 + ] }, "loc": null, - "range": { - "start": 27, - "end": 32 - } + "range": [ + 27, + 32 + ] } ], "loc": null, - "range": { - "start": 23, - "end": 33 - } + "range": [ + 23, + 33 + ] }, { "type": "WhileStatement", @@ -103,44 +103,44 @@ Output: "name": "a", "typeAnnotation": null, "loc": null, - "range": { - "start": 43, - "end": 44 - } + "range": [ + 43, + 44 + ] }, "property": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 45, - "end": 46 - } + "range": [ + 45, + 46 + ] }, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 46 - } + "range": [ + 43, + 46 + ] }, "property": { "type": "Identifier", "name": "c", "typeAnnotation": null, "loc": null, - "range": { - "start": 47, - "end": 48 - } + "range": [ + 47, + 48 + ] }, "computed": false, "loc": null, - "range": { - "start": 43, - "end": 48 - } + "range": [ + 43, + 48 + ] }, "body": { "type": "BlockStatement", @@ -155,46 +155,46 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 56, - "end": 57 - } + "range": [ + 56, + 57 + ] }, "right": { "type": "Identifier", "name": "b", "typeAnnotation": null, "loc": null, - "range": { - "start": 61, - "end": 62 - } + "range": [ + 61, + 62 + ] }, "loc": null, - "range": { - "start": 56, - "end": 62 - } + "range": [ + 56, + 62 + ] }, "directive": null, "loc": null, - "range": { - "start": 56, - "end": 63 - } + "range": [ + 56, + 63 + ] } ], "loc": null, - "range": { - "start": 50, - "end": 67 - } + "range": [ + 50, + 67 + ] }, "loc": null, - "range": { - "start": 36, - "end": 67 - } + "range": [ + 36, + 67 + ] }, { "type": "ReturnStatement", @@ -203,42 +203,42 @@ Output: "name": "x", "typeAnnotation": null, "loc": null, - "range": { - "start": 77, - "end": 78 - } + "range": [ + 77, + 78 + ] }, "loc": null, - "range": { - "start": 70, - "end": 79 - } + "range": [ + 70, + 79 + ] } ], "loc": null, - "range": { - "start": 19, - "end": 81 - } + "range": [ + 19, + 81 + ] }, "generator": false, "async": false, "loc": null, - "range": { - "start": 0, - "end": 81 - }, + "range": [ + 0, + 81 + ], "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } ], "sourceType": "script", "loc": null, - "range": { - "start": 0, - "end": 81 - } + "range": [ + 0, + 81 + ] } diff --git a/compiler/forget/scripts/rustfmt.sh b/compiler/forget/scripts/rustfmt.sh new file mode 100755 index 0000000000..1d0a040231 --- /dev/null +++ b/compiler/forget/scripts/rustfmt.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -eo pipefail + +# Executes rustfmt using a nightly build of the compiler +# NOTE: this command must exactly match the Rust Lint command in .github/workflows/rust.yml +rustup toolchain list | grep -q nightly-2023-08-01 || (echo "Expected Rust version missing, try running: 'rustup toolchain install nightly-2023-08-01'" && exit 1) +grep -r --include "*.rs" --files-without-match "@generated" crates | xargs rustup run nightly-2023-08-01 rustfmt --config="skip_children=true" "$@" \ No newline at end of file