Sync interpolated lexer state within re_lex_logical_token
This commit is contained in:
@@ -145,6 +145,28 @@ Module(
|
||||
simple: false,
|
||||
},
|
||||
),
|
||||
ClassDef(
|
||||
StmtClassDef {
|
||||
node_index: NodeIndex(None),
|
||||
range: 94..111,
|
||||
decorator_list: [],
|
||||
name: Identifier {
|
||||
id: Name("A"),
|
||||
range: 100..101,
|
||||
node_index: NodeIndex(None),
|
||||
},
|
||||
type_params: None,
|
||||
arguments: None,
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
node_index: NodeIndex(None),
|
||||
range: 107..111,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
)
|
||||
@@ -189,17 +211,6 @@ Module(
|
||||
|
|
||||
|
||||
|
||||
|
|
||||
1 | # Regression test for https://github.com/astral-sh/ty/issues/1828
|
||||
2 | (c: int = 1,f"""{d=[
|
||||
3 | def a(
|
||||
| _______^
|
||||
4 | | class A:
|
||||
5 | | pass
|
||||
| |_________^ Syntax Error: f-string: unterminated triple-quoted string
|
||||
|
|
||||
|
||||
|
||||
|
|
||||
2 | (c: int = 1,f"""{d=[
|
||||
3 | def a(
|
||||
@@ -209,17 +220,6 @@ Module(
|
||||
|
|
||||
|
||||
|
||||
|
|
||||
1 | # Regression test for https://github.com/astral-sh/ty/issues/1828
|
||||
2 | (c: int = 1,f"""{d=[
|
||||
3 | def a(
|
||||
| _______^
|
||||
4 | | class A:
|
||||
5 | | pass
|
||||
| |_________^ Syntax Error: Expected a statement
|
||||
|
|
||||
|
||||
|
||||
|
|
||||
4 | class A:
|
||||
5 | pass
|
||||
|
||||
Reference in New Issue
Block a user