--- source: crates/rome_json_parser/tests/spec_test.rs expression: snapshot --- ## Input ```json [1.2a-3] ``` ## AST ``` JsonRoot { value: JsonArrayValue { l_brack_token: L_BRACK@0..1 "[" [] [], elements: JsonArrayElementList [ JsonNumberValue { value_token: JSON_NUMBER_LITERAL@1..4 "1.2" [] [], }, missing separator, JsonBogusValue { items: [ IDENT@4..5 "a" [] [], ], }, missing separator, JsonNumberValue { value_token: JSON_NUMBER_LITERAL@5..7 "-3" [] [], }, ], r_brack_token: R_BRACK@7..8 "]" [] [], }, eof_token: EOF@8..8 "" [] [], } ``` ## CST ``` 0: JSON_ROOT@0..8 0: JSON_ARRAY_VALUE@0..8 0: L_BRACK@0..1 "[" [] [] 1: JSON_ARRAY_ELEMENT_LIST@1..7 0: JSON_NUMBER_VALUE@1..4 0: JSON_NUMBER_LITERAL@1..4 "1.2" [] [] 1: (empty) 2: JSON_BOGUS_VALUE@4..5 0: IDENT@4..5 "a" [] [] 3: (empty) 4: JSON_NUMBER_VALUE@5..7 0: JSON_NUMBER_LITERAL@5..7 "-3" [] [] 2: R_BRACK@7..8 "]" [] [] 1: EOF@8..8 "" [] [] ``` ## Diagnostics ``` number_with_alpha.json:1:5 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `a` > 1 │ [1.2a-3] │ ^ i Remove a number_with_alpha.json:1:6 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ × expected `,` but instead found `-3` > 1 │ [1.2a-3] │ ^^ i Remove -3 ```