Start string location at kind or quote prefix

This commit is contained in:
Charlie Marsh 2022-10-15 11:03:45 -04:00
parent eede189959
commit 15e2ac3fd7
8 changed files with 57 additions and 18 deletions

View file

@ -1,19 +1,19 @@
---
source: parser/src/parser.rs
source: compiler/parser/src/parser.rs
expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: JoinedStr {
@ -21,7 +21,7 @@ expression: parse_ast
Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: Constant {

View file

@ -1,5 +1,5 @@
---
source: parser/src/string.rs
source: compiler/parser/src/string.rs
expression: parse_ast
---
[
@ -34,7 +34,7 @@ expression: parse_ast
Located {
location: Location {
row: 1,
column: 12,
column: 10,
},
custom: (),
node: FormattedValue {

View file

@ -0,0 +1,30 @@
---
source: compiler/parser/src/string.rs
expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 1,
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 1,
column: 1,
},
custom: (),
node: Constant {
value: Str(
"Hello, world!",
),
kind: Some(
"u",
),
},
},
},
},
]

View file

@ -1,19 +1,19 @@
---
source: parser/src/string.rs
source: compiler/parser/src/string.rs
expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: JoinedStr {
@ -21,7 +21,7 @@ expression: parse_ast
Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: Constant {

View file

@ -1,19 +1,19 @@
---
source: parser/src/string.rs
source: compiler/parser/src/string.rs
expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: JoinedStr {
@ -21,7 +21,7 @@ expression: parse_ast
Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: Constant {

View file

@ -1,19 +1,19 @@
---
source: parser/src/string.rs
source: compiler/parser/src/string.rs
expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 1,
column: 3,
column: 1,
},
custom: (),
node: Constant {