Skip to content

Commit 4713b2b

Browse files
committed
Refactor: Join string and string_parser.
1 parent e7f14ab commit 4713b2b

16 files changed

Lines changed: 705 additions & 698 deletions

‎parser/src/lib.rs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ mod function;
2727
pub mod lexer;
2828
pub mod mode;
2929
pub mod parser;
30-
mod string_parser;
30+
mod string;
3131
#[rustfmt::skip]
3232
mod python;
3333
mod context;
34-
mod string;
3534
pub mod token;

parser/src/snapshots/rustpython_parser__string_parser__tests__fstring_parse_selfdocumenting_base.snap renamed to parser/src/snapshots/rustpython_parser__string__tests__fstring_parse_selfdocumenting_base.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
source: compiler/parser/src/string_parser.rs
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 698
34
expression: parse_ast
45
---
56
[

parser/src/snapshots/rustpython_parser__string_parser__tests__fstring_parse_selfdocumenting_base_more.snap renamed to parser/src/snapshots/rustpython_parser__string__tests__fstring_parse_selfdocumenting_base_more.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
source: compiler/parser/src/string_parser.rs
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 706
34
expression: parse_ast
45
---
56
[

parser/src/snapshots/rustpython_parser__string_parser__tests__fstring_parse_selfdocumenting_format.snap renamed to parser/src/snapshots/rustpython_parser__string__tests__fstring_parse_selfdocumenting_format.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
source: compiler/parser/src/string_parser.rs
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 714
34
expression: parse_ast
45
---
56
[
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 690
4+
expression: "parse_fstring(\"\").unwrap()"
5+
---
6+
[]

parser/src/snapshots/rustpython_parser__string_parser__tests__parse_fstring.snap renamed to parser/src/snapshots/rustpython_parser__string__tests__parse_fstring.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
source: compiler/parser/src/string_parser.rs
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 669
34
expression: parse_ast
45
---
56
[

parser/src/snapshots/rustpython_parser__string_parser__tests__parse_fstring_equals.snap renamed to parser/src/snapshots/rustpython_parser__string__tests__parse_fstring_equals.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
source: compiler/parser/src/string_parser.rs
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 766
34
expression: parse_ast
45
---
56
[

parser/src/snapshots/rustpython_parser__string_parser__tests__parse_fstring_nested_spec.snap renamed to parser/src/snapshots/rustpython_parser__string__tests__parse_fstring_nested_spec.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
source: compiler/parser/src/string_parser.rs
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 677
34
expression: parse_ast
45
---
56
[

parser/src/snapshots/rustpython_parser__string_parser__tests__parse_fstring_not_equals.snap renamed to parser/src/snapshots/rustpython_parser__string__tests__parse_fstring_not_equals.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
source: compiler/parser/src/string_parser.rs
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 759
34
expression: parse_ast
45
---
56
[

parser/src/snapshots/rustpython_parser__string_parser__tests__parse_fstring_not_nested_spec.snap renamed to parser/src/snapshots/rustpython_parser__string__tests__parse_fstring_not_nested_spec.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
source: compiler/parser/src/string_parser.rs
2+
source: compiler/parser/src/string.rs
3+
assertion_line: 685
34
expression: parse_ast
45
---
56
[

0 commit comments

Comments
 (0)