mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-21 20:15:26 +00:00
Move range
from Attributed
to Node
s (#22)
* Move `range` from `Attributed` to `Node`s * No Attributed + custom for Range PoC * Generate all located variants, generate enum implementations * Implement `Copy` on simple enums * Move `Suite` to `ranged` and `located` * Update tests --------- Co-authored-by: Jeong YunWon <jeong@youknowone.org>
This commit is contained in:
parent
a983f4383f
commit
192379cede
126 changed files with 29410 additions and 30670 deletions
|
@ -1,49 +1,48 @@
|
|||
use crate::ast::{self, Expr, ExprContext, ExprKind};
|
||||
use crate::ast::{self, Expr, ExprContext};
|
||||
|
||||
pub(crate) fn set_context(expr: Expr, ctx: ExprContext) -> Expr {
|
||||
match expr.node {
|
||||
ExprKind::Name(ast::ExprName { id, .. }) => Expr {
|
||||
node: ast::ExprName { id, ctx }.into(),
|
||||
..expr
|
||||
},
|
||||
ExprKind::Tuple(ast::ExprTuple { elts, .. }) => Expr {
|
||||
node: ast::ExprTuple {
|
||||
elts: elts
|
||||
.into_iter()
|
||||
.map(|elt| set_context(elt, ctx.clone()))
|
||||
.collect(),
|
||||
ctx,
|
||||
}
|
||||
.into(),
|
||||
..expr
|
||||
},
|
||||
ExprKind::List(ast::ExprList { elts, .. }) => Expr {
|
||||
node: ast::ExprList {
|
||||
elts: elts
|
||||
.into_iter()
|
||||
.map(|elt| set_context(elt, ctx.clone()))
|
||||
.collect(),
|
||||
ctx,
|
||||
}
|
||||
.into(),
|
||||
..expr
|
||||
},
|
||||
ExprKind::Attribute(ast::ExprAttribute { value, attr, .. }) => Expr {
|
||||
node: ast::ExprAttribute { value, attr, ctx }.into(),
|
||||
..expr
|
||||
},
|
||||
ExprKind::Subscript(ast::ExprSubscript { value, slice, .. }) => Expr {
|
||||
node: ast::ExprSubscript { value, slice, ctx }.into(),
|
||||
..expr
|
||||
},
|
||||
ExprKind::Starred(ast::ExprStarred { value, .. }) => Expr {
|
||||
node: ast::ExprStarred {
|
||||
value: Box::new(set_context(*value, ctx.clone())),
|
||||
ctx,
|
||||
}
|
||||
.into(),
|
||||
..expr
|
||||
},
|
||||
match expr {
|
||||
Expr::Name(ast::ExprName { id, range, .. }) => ast::ExprName { id, ctx, range }.into(),
|
||||
Expr::Tuple(ast::ExprTuple { elts, range, .. }) => ast::ExprTuple {
|
||||
elts: elts.into_iter().map(|elt| set_context(elt, ctx)).collect(),
|
||||
range,
|
||||
ctx,
|
||||
}
|
||||
.into(),
|
||||
|
||||
Expr::List(ast::ExprList { elts, range, .. }) => ast::ExprList {
|
||||
elts: elts.into_iter().map(|elt| set_context(elt, ctx)).collect(),
|
||||
range,
|
||||
ctx,
|
||||
}
|
||||
.into(),
|
||||
Expr::Attribute(ast::ExprAttribute {
|
||||
value, attr, range, ..
|
||||
}) => ast::ExprAttribute {
|
||||
value,
|
||||
attr,
|
||||
range,
|
||||
ctx,
|
||||
}
|
||||
.into(),
|
||||
Expr::Subscript(ast::ExprSubscript {
|
||||
value,
|
||||
slice,
|
||||
range,
|
||||
..
|
||||
}) => ast::ExprSubscript {
|
||||
value,
|
||||
slice,
|
||||
range,
|
||||
ctx,
|
||||
}
|
||||
.into(),
|
||||
Expr::Starred(ast::ExprStarred { value, range, .. }) => ast::ExprStarred {
|
||||
value: Box::new(set_context(*value, ctx)),
|
||||
range,
|
||||
ctx,
|
||||
}
|
||||
.into(),
|
||||
_ => expr,
|
||||
}
|
||||
}
|
||||
|
@ -67,6 +66,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_assign_list() {
|
||||
let source = "[x, y] = (1, 2, 3)";
|
||||
let parse_ast = parse_program(source, "<test>").unwrap();
|
||||
|
@ -102,6 +102,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_assign_list_comp() {
|
||||
let source = "x = [y for y in (1, 2, 3)]";
|
||||
let parse_ast = parse_program(source, "<test>").unwrap();
|
||||
|
@ -109,6 +110,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_assign_set_comp() {
|
||||
let source = "x = {y for y in (1, 2, 3)}";
|
||||
let parse_ast = parse_program(source, "<test>").unwrap();
|
||||
|
@ -116,6 +118,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_assign_with() {
|
||||
let source = "with 1 as x: pass";
|
||||
let parse_ast = parse_program(source, "<test>").unwrap();
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
// Contains functions that perform validation and parsing of arguments and parameters.
|
||||
// Checks apply both to functions and to lambdas.
|
||||
use crate::text_size::TextRange;
|
||||
use crate::{
|
||||
ast,
|
||||
lexer::{LexicalError, LexicalErrorType},
|
||||
text_size::TextSize,
|
||||
};
|
||||
use rustc_hash::FxHashSet;
|
||||
use rustpython_ast::Ranged;
|
||||
|
||||
pub(crate) struct ArgumentList {
|
||||
pub args: Vec<ast::Expr>,
|
||||
|
@ -19,7 +21,7 @@ type ParameterDef = (ast::Arg, Option<ast::Expr>);
|
|||
pub(crate) fn validate_arguments(
|
||||
arguments: ast::Arguments,
|
||||
) -> Result<ast::Arguments, LexicalError> {
|
||||
let mut all_args: Vec<&ast::Attributed<ast::ArgData>> = vec![];
|
||||
let mut all_args: Vec<&ast::Arg> = vec![];
|
||||
|
||||
all_args.extend(arguments.posonlyargs.iter());
|
||||
all_args.extend(arguments.args.iter());
|
||||
|
@ -116,13 +118,11 @@ pub(crate) fn parse_args(func_args: Vec<FunctionArgument>) -> Result<ArgumentLis
|
|||
double_starred = true;
|
||||
}
|
||||
|
||||
keywords.push(ast::Keyword::new(
|
||||
start..end,
|
||||
ast::KeywordData {
|
||||
arg: name.map(ast::Identifier::new),
|
||||
value,
|
||||
},
|
||||
));
|
||||
keywords.push(ast::Keyword {
|
||||
arg: name.map(ast::Identifier::new),
|
||||
value,
|
||||
range: TextRange::new(start, end),
|
||||
});
|
||||
}
|
||||
None => {
|
||||
// Positional arguments mustn't follow keyword arguments.
|
||||
|
@ -148,8 +148,8 @@ pub(crate) fn parse_args(func_args: Vec<FunctionArgument>) -> Result<ArgumentLis
|
|||
}
|
||||
|
||||
// Check if an expression is a starred expression.
|
||||
fn is_starred(exp: &ast::Expr) -> bool {
|
||||
matches!(exp.node, ast::ExprKind::Starred { .. })
|
||||
const fn is_starred(exp: &ast::Expr) -> bool {
|
||||
exp.is_starred_expr()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -157,6 +157,7 @@ mod tests {
|
|||
use super::*;
|
||||
use crate::parser::{parse_program, ParseErrorType};
|
||||
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
macro_rules! function_and_lambda {
|
||||
($($name:ident: $code:expr,)*) => {
|
||||
$(
|
||||
|
@ -169,6 +170,7 @@ mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
function_and_lambda! {
|
||||
test_function_no_args: "def f(): pass",
|
||||
test_function_pos_args: "def f(a, b, c): pass",
|
||||
|
|
|
@ -23,7 +23,9 @@ use crate::{
|
|||
use itertools::Itertools;
|
||||
use std::iter;
|
||||
|
||||
use crate::text_size::TextRange;
|
||||
pub(super) use lalrpop_util::ParseError as LalrpopError;
|
||||
use rustpython_ast::OptionalRange;
|
||||
|
||||
/// Parse a full Python program usually consisting of multiple lines.
|
||||
///
|
||||
|
@ -95,7 +97,7 @@ pub fn parse_expression_starts_at(
|
|||
offset: TextSize,
|
||||
) -> Result<ast::Expr, ParseError> {
|
||||
parse_starts_at(source, Mode::Expression, path, offset).map(|top| match top {
|
||||
ast::Mod::Expression(ast::ModExpression { body }) => *body,
|
||||
ast::Mod::Expression(ast::ModExpression { body, .. }) => *body,
|
||||
_ => unreachable!(),
|
||||
})
|
||||
}
|
||||
|
@ -318,6 +320,11 @@ impl ParseErrorType {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub(super) fn optional_range(start: TextSize, end: TextSize) -> OptionalRange<TextRange> {
|
||||
OptionalRange::<TextRange>::new(start, end)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
@ -371,6 +378,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_parse_lambda() {
|
||||
let source = "lambda x, y: x * y"; // lambda(x, y): x * y";
|
||||
let parse_ast = parse_program(source, "<test>").unwrap();
|
||||
|
@ -385,6 +393,7 @@ mod tests {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_parse_class() {
|
||||
let source = "\
|
||||
class Foo(A, B):
|
||||
|
@ -397,6 +406,7 @@ class Foo(A, B):
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_parse_dict_comprehension() {
|
||||
let source = "{x1: x2 for y in z}";
|
||||
let parse_ast = parse_expression(source, "<test>").unwrap();
|
||||
|
@ -404,6 +414,7 @@ class Foo(A, B):
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_parse_list_comprehension() {
|
||||
let source = "[x for y in z]";
|
||||
let parse_ast = parse_expression(source, "<test>").unwrap();
|
||||
|
@ -411,6 +422,7 @@ class Foo(A, B):
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_parse_double_list_comprehension() {
|
||||
let source = "[x for y, y2 in z for a in b if a < 5 if a > 10]";
|
||||
let parse_ast = parse_expression(source, "<test>").unwrap();
|
||||
|
@ -418,6 +430,7 @@ class Foo(A, B):
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_parse_generator_comprehension() {
|
||||
let source = "(x for y in z)";
|
||||
let parse_ast = parse_expression(source, "<test>").unwrap();
|
||||
|
@ -425,6 +438,7 @@ class Foo(A, B):
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_parse_named_expression_generator_comprehension() {
|
||||
let source = "(x := y + 1 for y in z)";
|
||||
let parse_ast = parse_expression(source, "<test>").unwrap();
|
||||
|
@ -432,6 +446,7 @@ class Foo(A, B):
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_parse_if_else_generator_comprehension() {
|
||||
let source = "(x if y else y for y in z)";
|
||||
let parse_ast = parse_expression(source, "<test>").unwrap();
|
||||
|
@ -460,6 +475,7 @@ class Foo(A, B):
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_with_statement() {
|
||||
let source = "\
|
||||
with 0: pass
|
||||
|
@ -529,6 +545,7 @@ array[3:5, *indexes_to_select]
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_generator_expression_argument() {
|
||||
let source = r#"' '.join(
|
||||
sql
|
||||
|
@ -588,6 +605,7 @@ except* OSError as e:
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_match_as_identifier() {
|
||||
let parse_ast = parse_program(
|
||||
r#"
|
||||
|
@ -620,6 +638,7 @@ print(match(12))
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_patma() {
|
||||
let source = r#"# Cases sampled from Lib/test/test_patma.py
|
||||
|
||||
|
@ -791,6 +810,7 @@ match w := x,:
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_match() {
|
||||
let parse_ast = parse_program(
|
||||
r#"
|
||||
|
@ -821,6 +841,7 @@ match x:
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(feature = "all-nodes-with-ranges"))]
|
||||
fn test_variadic_generics() {
|
||||
let parse_ast = parse_program(
|
||||
r#"
|
||||
|
|
File diff suppressed because it is too large
Load diff
27858
parser/src/python.rs
generated
27858
parser/src/python.rs
generated
File diff suppressed because it is too large
Load diff
|
@ -3,51 +3,39 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: AnnAssign(
|
||||
StmtAnnAssign {
|
||||
target: Attributed {
|
||||
AnnAssign(
|
||||
StmtAnnAssign {
|
||||
range: 0..10,
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
annotation: Attributed {
|
||||
),
|
||||
annotation: Name(
|
||||
ExprName {
|
||||
range: 3..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"int",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"int",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
value: Some(
|
||||
Attributed {
|
||||
),
|
||||
value: Some(
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
simple: true,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
simple: true,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,86 +3,65 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..15,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..15,
|
||||
targets: [
|
||||
Attribute(
|
||||
ExprAttribute {
|
||||
range: 0..3,
|
||||
custom: (),
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Attributed {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: Identifier(
|
||||
"y",
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
attr: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
),
|
||||
],
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 6..15,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 7..8,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 10..11,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 13..14,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,80 +3,62 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..24,
|
||||
custom: (),
|
||||
node: For(
|
||||
StmtFor {
|
||||
target: Attributed {
|
||||
For(
|
||||
StmtFor {
|
||||
range: 0..24,
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 4..5,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
iter: Attributed {
|
||||
),
|
||||
iter: Tuple(
|
||||
ExprTuple {
|
||||
range: 9..18,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 16..17,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 10..11,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 13..14,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 16..17,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
),
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 20..24,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
],
|
||||
orelse: [],
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
orelse: [],
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,97 +3,73 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..18,
|
||||
targets: [
|
||||
List(
|
||||
ExprList {
|
||||
range: 0..6,
|
||||
custom: (),
|
||||
node: List(
|
||||
ExprList {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 1..2,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 4..5,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
elts: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 1..2,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
Name(
|
||||
ExprName {
|
||||
range: 4..5,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 9..18,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 10..11,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
range: 9..18,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 16..17,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 13..14,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 16..17,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,112 +3,86 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..26,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..26,
|
||||
targets: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
),
|
||||
],
|
||||
value: ListComp(
|
||||
ExprListComp {
|
||||
range: 4..26,
|
||||
custom: (),
|
||||
node: ListComp(
|
||||
ExprListComp {
|
||||
elt: Attributed {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
range: 11..12,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Attributed {
|
||||
range: 16..25,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 17..18,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 20..21,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 23..24,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
elt: Name(
|
||||
ExprName {
|
||||
range: 5..6,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 11..12,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
iter: Tuple(
|
||||
ExprTuple {
|
||||
range: 16..25,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 17..18,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 20..21,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 23..24,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
],
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,74 +3,56 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..13,
|
||||
targets: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 4..13,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 5..6,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
ctx: Store,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
range: 4..13,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 8..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 11..12,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 8..9,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 11..12,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,52 +3,40 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: If(
|
||||
StmtIf {
|
||||
test: Attributed {
|
||||
If(
|
||||
StmtIf {
|
||||
range: 0..14,
|
||||
test: NamedExpr(
|
||||
ExprNamedExpr {
|
||||
range: 3..8,
|
||||
custom: (),
|
||||
node: NamedExpr(
|
||||
ExprNamedExpr {
|
||||
target: Attributed {
|
||||
range: 3..4,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
value: Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 3..4,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 7..8,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
),
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 10..14,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
],
|
||||
orelse: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
orelse: [],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,112 +3,86 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..26,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..26,
|
||||
targets: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
),
|
||||
],
|
||||
value: SetComp(
|
||||
ExprSetComp {
|
||||
range: 4..26,
|
||||
custom: (),
|
||||
node: SetComp(
|
||||
ExprSetComp {
|
||||
elt: Attributed {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
range: 11..12,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Attributed {
|
||||
range: 16..25,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 17..18,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 20..21,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 23..24,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
elt: Name(
|
||||
ExprName {
|
||||
range: 5..6,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 11..12,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
iter: Tuple(
|
||||
ExprTuple {
|
||||
range: 16..25,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 17..18,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 20..21,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 23..24,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
],
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,106 +3,79 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..19,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..19,
|
||||
targets: [
|
||||
Tuple(
|
||||
ExprTuple {
|
||||
range: 0..7,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 1..2,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 4..6,
|
||||
custom: (),
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Attributed {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
elts: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 1..2,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
Starred(
|
||||
ExprStarred {
|
||||
range: 4..6,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 5..6,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 10..19,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 11..12,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
range: 10..19,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 11..12,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 14..15,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 17..18,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 14..15,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 17..18,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,95 +3,71 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..16,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..16,
|
||||
targets: [
|
||||
Subscript(
|
||||
ExprSubscript {
|
||||
range: 0..4,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Attributed {
|
||||
range: 2..3,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Store,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
slice: Name(
|
||||
ExprName {
|
||||
range: 2..3,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
),
|
||||
],
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 7..16,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 8..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 11..12,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 14..15,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 8..9,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 11..12,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 14..15,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,97 +3,73 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..18,
|
||||
targets: [
|
||||
Tuple(
|
||||
ExprTuple {
|
||||
range: 0..6,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 1..2,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 4..5,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
elts: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 1..2,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
Name(
|
||||
ExprName {
|
||||
range: 4..5,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 9..18,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 10..11,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
range: 9..18,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 16..17,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 13..14,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 16..17,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,50 +3,42 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: With(
|
||||
StmtWith {
|
||||
items: [
|
||||
Withitem {
|
||||
context_expr: Attributed {
|
||||
With(
|
||||
StmtWith {
|
||||
range: 0..17,
|
||||
items: [
|
||||
Withitem {
|
||||
context_expr: Constant(
|
||||
ExprConstant {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
optional_vars: Some(
|
||||
Attributed {
|
||||
),
|
||||
optional_vars: Some(
|
||||
Name(
|
||||
ExprName {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
body: [
|
||||
Attributed {
|
||||
),
|
||||
range: (),
|
||||
},
|
||||
],
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 13..17,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
],
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,84 +3,63 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..16,
|
||||
custom: (),
|
||||
node: AugAssign(
|
||||
StmtAugAssign {
|
||||
target: Attributed {
|
||||
AugAssign(
|
||||
StmtAugAssign {
|
||||
range: 0..16,
|
||||
target: Attribute(
|
||||
ExprAttribute {
|
||||
range: 0..3,
|
||||
custom: (),
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Attributed {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: Identifier(
|
||||
"y",
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Add,
|
||||
value: Attributed {
|
||||
range: 7..16,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 8..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 11..12,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 14..15,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
attr: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
op: Add,
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 7..16,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 8..9,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 11..12,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 14..15,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,37 +3,28 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..6,
|
||||
custom: (),
|
||||
node: AugAssign(
|
||||
StmtAugAssign {
|
||||
target: Attributed {
|
||||
AugAssign(
|
||||
StmtAugAssign {
|
||||
range: 0..6,
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
op: Add,
|
||||
value: Attributed {
|
||||
),
|
||||
op: Add,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,93 +3,69 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: AugAssign(
|
||||
StmtAugAssign {
|
||||
target: Attributed {
|
||||
AugAssign(
|
||||
StmtAugAssign {
|
||||
range: 0..17,
|
||||
target: Subscript(
|
||||
ExprSubscript {
|
||||
range: 0..4,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Attributed {
|
||||
range: 2..3,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Add,
|
||||
value: Attributed {
|
||||
range: 8..17,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 15..16,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
slice: Name(
|
||||
ExprName {
|
||||
range: 2..3,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
op: Add,
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 8..17,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 9..10,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 12..13,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 15..16,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,38 +3,29 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..7,
|
||||
custom: (),
|
||||
node: Delete(
|
||||
StmtDelete {
|
||||
targets: [
|
||||
Attributed {
|
||||
Delete(
|
||||
StmtDelete {
|
||||
range: 0..7,
|
||||
targets: [
|
||||
Attribute(
|
||||
ExprAttribute {
|
||||
range: 4..7,
|
||||
custom: (),
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Attributed {
|
||||
range: 4..5,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: Identifier(
|
||||
"y",
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 4..5,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Del,
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
attr: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Del,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,26 +3,20 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..5,
|
||||
custom: (),
|
||||
node: Delete(
|
||||
StmtDelete {
|
||||
targets: [
|
||||
Attributed {
|
||||
Delete(
|
||||
StmtDelete {
|
||||
range: 0..5,
|
||||
targets: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 4..5,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Del,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Del,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,47 +3,35 @@ source: parser/src/context.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: Delete(
|
||||
StmtDelete {
|
||||
targets: [
|
||||
Attributed {
|
||||
Delete(
|
||||
StmtDelete {
|
||||
range: 0..8,
|
||||
targets: [
|
||||
Subscript(
|
||||
ExprSubscript {
|
||||
range: 4..8,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
range: 4..5,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Del,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 4..5,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
slice: Name(
|
||||
ExprName {
|
||||
range: 6..7,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Del,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -4,69 +4,58 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..23,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 15..16,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 19..23,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..23,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 9..10,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 12..13,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 15..16,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 19..23,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,94 +4,77 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..29,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 18..19,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Attributed {
|
||||
range: 14..16,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 20..22,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 25..29,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..29,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 9..10,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 12..13,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 18..19,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
kw_defaults: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 14..16,
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 20..22,
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 25..29,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,35 +4,33 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 9..13,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..13,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 9..13,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,103 +4,83 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..32,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 18..19,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 21..22,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 24..25,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"f",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 28..32,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..32,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 6..7,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 9..10,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 12..13,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 18..19,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 21..22,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"f",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 24..25,
|
||||
},
|
||||
],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 28..32,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,128 +4,102 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 18..19,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 21..22,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 27..28,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"f",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Attributed {
|
||||
range: 23..25,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 29..31,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 34..38,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..38,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 6..7,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 9..10,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 12..13,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 18..19,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 21..22,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"f",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 27..28,
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 23..25,
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 29..31,
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 34..38,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,140 +4,111 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..42,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: Some(
|
||||
Attributed {
|
||||
range: 16..20,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"args",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 22..23,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 25..26,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 31..32,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"f",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Attributed {
|
||||
range: 27..29,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 33..35,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 38..42,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..42,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 6..7,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 9..10,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 12..13,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
vararg: Some(
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"args",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 16..20,
|
||||
},
|
||||
),
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 22..23,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 25..26,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"f",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 31..32,
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 27..29,
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 33..35,
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 38..42,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,152 +4,120 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..52,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: Some(
|
||||
Attributed {
|
||||
range: 16..20,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"args",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 22..23,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 25..26,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 31..32,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"f",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Attributed {
|
||||
range: 27..29,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 33..35,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: Some(
|
||||
Attributed {
|
||||
range: 39..45,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"kwargs",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 48..52,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..52,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 6..7,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 9..10,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 12..13,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
vararg: Some(
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"args",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 16..20,
|
||||
},
|
||||
),
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 22..23,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 25..26,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"f",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 31..32,
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 27..29,
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 33..35,
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
kwarg: Some(
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"kwargs",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 39..45,
|
||||
},
|
||||
),
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 48..52,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,69 +4,58 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..20,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 16..20,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..20,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 6..7,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 9..10,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 12..13,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 16..20,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,94 +4,77 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..26,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 9..10,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 15..16,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [
|
||||
Attributed {
|
||||
range: 11..13,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 17..19,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 22..26,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 0..26,
|
||||
name: Identifier(
|
||||
"f",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 6..7,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 9..10,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 15..16,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 11..13,
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 17..19,
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
range: (),
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 22..26,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,76 +4,59 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..20,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..20,
|
||||
value: Lambda(
|
||||
ExprLambda {
|
||||
range: 0..20,
|
||||
custom: (),
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 16..17,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: Attributed {
|
||||
range: 19..20,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 10..11,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 13..14,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 16..17,
|
||||
},
|
||||
],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
body: Constant(
|
||||
ExprConstant {
|
||||
range: 19..20,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,101 +4,78 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..26,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..26,
|
||||
value: Lambda(
|
||||
ExprLambda {
|
||||
range: 0..26,
|
||||
custom: (),
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 19..20,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Attributed {
|
||||
range: 15..17,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 21..23,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: Attributed {
|
||||
range: 25..26,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 10..11,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 13..14,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 19..20,
|
||||
},
|
||||
],
|
||||
kw_defaults: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 15..17,
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 21..23,
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
body: Constant(
|
||||
ExprConstant {
|
||||
range: 25..26,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,42 +4,34 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..9,
|
||||
value: Lambda(
|
||||
ExprLambda {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: Attributed {
|
||||
range: 8..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
body: Constant(
|
||||
ExprConstant {
|
||||
range: 8..9,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,99 +4,76 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..26,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..26,
|
||||
value: Lambda(
|
||||
ExprLambda {
|
||||
range: 0..26,
|
||||
custom: (),
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Attributed {
|
||||
range: 19..20,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 22..23,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: Attributed {
|
||||
range: 25..26,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 7..8,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 10..11,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 13..14,
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"d",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 19..20,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"e",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 22..23,
|
||||
},
|
||||
],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
body: Constant(
|
||||
ExprConstant {
|
||||
range: 25..26,
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,76 +4,59 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..17,
|
||||
value: Lambda(
|
||||
ExprLambda {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: Attributed {
|
||||
range: 16..17,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 7..8,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 10..11,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 13..14,
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
body: Constant(
|
||||
ExprConstant {
|
||||
range: 16..17,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -4,101 +4,78 @@ expression: parse_ast
|
|||
---
|
||||
Ok(
|
||||
[
|
||||
Attributed {
|
||||
range: 0..23,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..23,
|
||||
value: Lambda(
|
||||
ExprLambda {
|
||||
range: 0..23,
|
||||
custom: (),
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 16..17,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [
|
||||
Attributed {
|
||||
range: 12..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 18..20,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
body: Attributed {
|
||||
range: 22..23,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"a",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 7..8,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"b",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 10..11,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"c",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 16..17,
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 12..14,
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 18..20,
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
range: (),
|
||||
},
|
||||
body: Constant(
|
||||
ExprConstant {
|
||||
range: 22..23,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
)
|
||||
|
|
|
@ -2,80 +2,62 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..25,
|
||||
custom: (),
|
||||
node: Dict(
|
||||
ExprDict {
|
||||
keys: [
|
||||
Some(
|
||||
Attributed {
|
||||
Dict(
|
||||
ExprDict {
|
||||
range: 0..25,
|
||||
keys: [
|
||||
Some(
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 1..4,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"a",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"a",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
None,
|
||||
Some(
|
||||
Attributed {
|
||||
),
|
||||
None,
|
||||
Some(
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 16..19,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
values: [
|
||||
Attributed {
|
||||
),
|
||||
],
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 6..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"b",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"b",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
Attributed {
|
||||
),
|
||||
Name(
|
||||
ExprName {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"c",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"c",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
Attributed {
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 21..24,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"e",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"e",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
),
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -2,213 +2,157 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..141,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
Call(
|
||||
ExprCall {
|
||||
range: 0..141,
|
||||
func: Attribute(
|
||||
ExprAttribute {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Attributed {
|
||||
range: 0..3,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: Identifier(
|
||||
"join",
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..3,
|
||||
value: Str(
|
||||
" ",
|
||||
),
|
||||
ctx: Load,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
attr: Identifier(
|
||||
"join",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
),
|
||||
args: [
|
||||
GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
range: 14..139,
|
||||
custom: (),
|
||||
node: GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
elt: Attributed {
|
||||
range: 14..17,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"sql",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
range: 26..29,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"sql",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Attributed {
|
||||
range: 33..139,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 43..80,
|
||||
custom: (),
|
||||
node: IfExp(
|
||||
ExprIfExp {
|
||||
test: Attributed {
|
||||
range: 65..70,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"limit",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: Attributed {
|
||||
range: 43..61,
|
||||
custom: (),
|
||||
node: BinOp(
|
||||
ExprBinOp {
|
||||
left: Attributed {
|
||||
range: 43..53,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"LIMIT %d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Mod,
|
||||
right: Attributed {
|
||||
range: 56..61,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"limit",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
orelse: Attributed {
|
||||
range: 76..80,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: None,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 90..132,
|
||||
custom: (),
|
||||
node: IfExp(
|
||||
ExprIfExp {
|
||||
test: Attributed {
|
||||
range: 116..122,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"offset",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: Attributed {
|
||||
range: 91..111,
|
||||
custom: (),
|
||||
node: BinOp(
|
||||
ExprBinOp {
|
||||
left: Attributed {
|
||||
range: 91..102,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"OFFSET %d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Mod,
|
||||
right: Attributed {
|
||||
range: 105..111,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"offset",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
orelse: Attributed {
|
||||
range: 128..132,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: None,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
elt: Name(
|
||||
ExprName {
|
||||
range: 14..17,
|
||||
id: Identifier(
|
||||
"sql",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 26..29,
|
||||
id: Identifier(
|
||||
"sql",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
iter: Tuple(
|
||||
ExprTuple {
|
||||
range: 33..139,
|
||||
elts: [
|
||||
IfExp(
|
||||
ExprIfExp {
|
||||
range: 43..80,
|
||||
test: Name(
|
||||
ExprName {
|
||||
range: 65..70,
|
||||
id: Identifier(
|
||||
"limit",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
body: BinOp(
|
||||
ExprBinOp {
|
||||
range: 43..61,
|
||||
left: Constant(
|
||||
ExprConstant {
|
||||
range: 43..53,
|
||||
value: Str(
|
||||
"LIMIT %d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
op: Mod,
|
||||
right: Name(
|
||||
ExprName {
|
||||
range: 56..61,
|
||||
id: Identifier(
|
||||
"limit",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
orelse: Constant(
|
||||
ExprConstant {
|
||||
range: 76..80,
|
||||
value: None,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
IfExp(
|
||||
ExprIfExp {
|
||||
range: 90..132,
|
||||
test: Name(
|
||||
ExprName {
|
||||
range: 116..122,
|
||||
id: Identifier(
|
||||
"offset",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
body: BinOp(
|
||||
ExprBinOp {
|
||||
range: 91..111,
|
||||
left: Constant(
|
||||
ExprConstant {
|
||||
range: 91..102,
|
||||
value: Str(
|
||||
"OFFSET %d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
op: Mod,
|
||||
right: Name(
|
||||
ExprName {
|
||||
range: 105..111,
|
||||
id: Identifier(
|
||||
"offset",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
orelse: Constant(
|
||||
ExprConstant {
|
||||
range: 128..132,
|
||||
value: None,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
}
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
)
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -2,38 +2,29 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..7,
|
||||
custom: (),
|
||||
node: BoolOp(
|
||||
ExprBoolOp {
|
||||
op: And,
|
||||
values: [
|
||||
Attributed {
|
||||
BoolOp(
|
||||
ExprBoolOp {
|
||||
range: 0..7,
|
||||
op: And,
|
||||
values: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
Attributed {
|
||||
),
|
||||
Name(
|
||||
ExprName {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
),
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -2,38 +2,29 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..6,
|
||||
custom: (),
|
||||
node: BoolOp(
|
||||
ExprBoolOp {
|
||||
op: Or,
|
||||
values: [
|
||||
Attributed {
|
||||
BoolOp(
|
||||
ExprBoolOp {
|
||||
range: 0..6,
|
||||
op: Or,
|
||||
values: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
Attributed {
|
||||
),
|
||||
Name(
|
||||
ExprName {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
),
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -3,153 +3,128 @@ source: parser/src/parser.rs
|
|||
expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..98,
|
||||
custom: (),
|
||||
node: ClassDef(
|
||||
StmtClassDef {
|
||||
name: Identifier(
|
||||
"Foo",
|
||||
),
|
||||
bases: [
|
||||
Attributed {
|
||||
ClassDef(
|
||||
StmtClassDef {
|
||||
range: 0..98,
|
||||
name: Identifier(
|
||||
"Foo",
|
||||
),
|
||||
bases: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"A",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"A",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
Attributed {
|
||||
),
|
||||
Name(
|
||||
ExprName {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"B",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"B",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
body: [
|
||||
Attributed {
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
body: [
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 18..44,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"__init__",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 31..35,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"self",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 40..44,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
name: Identifier(
|
||||
"__init__",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"self",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 31..35,
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 40..44,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
Attributed {
|
||||
),
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 46..98,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"method_with_default",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 70..74,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"self",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 76..79,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"arg",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [
|
||||
Attributed {
|
||||
range: 80..89,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"default",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 94..98,
|
||||
custom: (),
|
||||
node: Pass,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
name: Identifier(
|
||||
"method_with_default",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"self",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 70..74,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"arg",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 76..79,
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 80..89,
|
||||
value: Str(
|
||||
"default",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
range: (),
|
||||
},
|
||||
body: [
|
||||
Pass(
|
||||
StmtPass {
|
||||
range: 94..98,
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
decorator_list: [],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,65 +2,51 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..19,
|
||||
custom: (),
|
||||
node: DictComp(
|
||||
ExprDictComp {
|
||||
key: Attributed {
|
||||
DictComp(
|
||||
ExprDictComp {
|
||||
range: 0..19,
|
||||
key: Name(
|
||||
ExprName {
|
||||
range: 1..3,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x1",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"x1",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
value: Attributed {
|
||||
),
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 5..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
id: Identifier(
|
||||
"x2",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 12..13,
|
||||
id: Identifier(
|
||||
"x2",
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
iter: Name(
|
||||
ExprName {
|
||||
range: 17..18,
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Attributed {
|
||||
range: 17..18,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -2,179 +2,139 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..48,
|
||||
custom: (),
|
||||
node: ListComp(
|
||||
ExprListComp {
|
||||
elt: Attributed {
|
||||
ListComp(
|
||||
ExprListComp {
|
||||
range: 0..48,
|
||||
elt: Name(
|
||||
ExprName {
|
||||
range: 1..2,
|
||||
custom: (),
|
||||
node: Name(
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Tuple(
|
||||
ExprTuple {
|
||||
range: 7..12,
|
||||
elts: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 7..8,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
Name(
|
||||
ExprName {
|
||||
range: 10..12,
|
||||
id: Identifier(
|
||||
"y2",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
iter: Name(
|
||||
ExprName {
|
||||
range: 16..17,
|
||||
id: Identifier(
|
||||
"x",
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
range: 7..12,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 10..12,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y2",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Attributed {
|
||||
range: 16..17,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 22..23,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
iter: Attributed {
|
||||
),
|
||||
iter: Name(
|
||||
ExprName {
|
||||
range: 27..28,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"b",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"b",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
ifs: [
|
||||
Attributed {
|
||||
),
|
||||
ifs: [
|
||||
Compare(
|
||||
ExprCompare {
|
||||
range: 32..37,
|
||||
custom: (),
|
||||
node: Compare(
|
||||
ExprCompare {
|
||||
left: Attributed {
|
||||
range: 32..33,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ops: [
|
||||
Lt,
|
||||
],
|
||||
comparators: [
|
||||
Attributed {
|
||||
range: 36..37,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
left: Name(
|
||||
ExprName {
|
||||
range: 32..33,
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ops: [
|
||||
Lt,
|
||||
],
|
||||
comparators: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 36..37,
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
Attributed {
|
||||
),
|
||||
Compare(
|
||||
ExprCompare {
|
||||
range: 41..47,
|
||||
custom: (),
|
||||
node: Compare(
|
||||
ExprCompare {
|
||||
left: Attributed {
|
||||
range: 41..42,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ops: [
|
||||
Gt,
|
||||
],
|
||||
comparators: [
|
||||
Attributed {
|
||||
range: 45..47,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
10,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
left: Name(
|
||||
ExprName {
|
||||
range: 41..42,
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ops: [
|
||||
Gt,
|
||||
],
|
||||
comparators: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 45..47,
|
||||
value: Int(
|
||||
10,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
),
|
||||
],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -3,34 +3,25 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..14,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..14,
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,53 +2,42 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
elt: Attributed {
|
||||
GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
range: 0..14,
|
||||
elt: Name(
|
||||
ExprName {
|
||||
range: 1..2,
|
||||
custom: (),
|
||||
node: Name(
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 7..8,
|
||||
id: Identifier(
|
||||
"x",
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
iter: Name(
|
||||
ExprName {
|
||||
range: 12..13,
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -3,112 +3,82 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..28,
|
||||
custom: (),
|
||||
node: If(
|
||||
StmtIf {
|
||||
test: Attributed {
|
||||
If(
|
||||
StmtIf {
|
||||
range: 0..28,
|
||||
test: Constant(
|
||||
ExprConstant {
|
||||
range: 3..4,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
),
|
||||
body: [
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 6..8,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
range: 6..8,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
10,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 6..8,
|
||||
value: Int(
|
||||
10,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
orelse: [
|
||||
Attributed {
|
||||
),
|
||||
],
|
||||
orelse: [
|
||||
If(
|
||||
StmtIf {
|
||||
range: 9..28,
|
||||
custom: (),
|
||||
node: If(
|
||||
StmtIf {
|
||||
test: Attributed {
|
||||
range: 14..15,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
test: Constant(
|
||||
ExprConstant {
|
||||
range: 14..15,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
body: [
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 17..19,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 17..19,
|
||||
value: Int(
|
||||
2,
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 17..19,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
range: 17..19,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
orelse: [
|
||||
Attributed {
|
||||
range: 26..28,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
range: 26..28,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
orelse: [
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 26..28,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 26..28,
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,85 +2,65 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..26,
|
||||
custom: (),
|
||||
node: GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
elt: Attributed {
|
||||
GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
range: 0..26,
|
||||
elt: IfExp(
|
||||
ExprIfExp {
|
||||
range: 1..14,
|
||||
custom: (),
|
||||
node: IfExp(
|
||||
ExprIfExp {
|
||||
test: Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: Attributed {
|
||||
range: 1..2,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
orelse: Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
test: Name(
|
||||
ExprName {
|
||||
range: 6..7,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
body: Name(
|
||||
ExprName {
|
||||
range: 1..2,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
orelse: Name(
|
||||
ExprName {
|
||||
range: 13..14,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 19..20,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
iter: Attributed {
|
||||
),
|
||||
iter: Name(
|
||||
ExprName {
|
||||
range: 24..25,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -3,71 +3,53 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..32,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..32,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 0..32,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 0..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"my_func",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 8..20,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"positional",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [
|
||||
Attributed {
|
||||
range: 22..31,
|
||||
custom: (),
|
||||
node: KeywordData {
|
||||
arg: Some(
|
||||
Identifier(
|
||||
"keyword",
|
||||
),
|
||||
),
|
||||
value: Attributed {
|
||||
range: 30..31,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 0..7,
|
||||
id: Identifier(
|
||||
"my_func",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 8..20,
|
||||
value: Str(
|
||||
"positional",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [
|
||||
Keyword {
|
||||
arg: Some(
|
||||
Identifier(
|
||||
"keyword",
|
||||
),
|
||||
),
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 30..31,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
range: 22..31,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,85 +3,65 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..18,
|
||||
value: Lambda(
|
||||
ExprLambda {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"x",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"y",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: Attributed {
|
||||
range: 13..18,
|
||||
custom: (),
|
||||
node: BinOp(
|
||||
ExprBinOp {
|
||||
left: Attributed {
|
||||
range: 13..14,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Mult,
|
||||
right: Attributed {
|
||||
range: 17..18,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"x",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 7..8,
|
||||
},
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"y",
|
||||
),
|
||||
annotation: None,
|
||||
type_comment: None,
|
||||
range: 10..11,
|
||||
},
|
||||
],
|
||||
vararg: None,
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
body: BinOp(
|
||||
ExprBinOp {
|
||||
range: 13..18,
|
||||
left: Name(
|
||||
ExprName {
|
||||
range: 13..14,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
op: Mult,
|
||||
right: Name(
|
||||
ExprName {
|
||||
range: 17..18,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -2,53 +2,42 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: ListComp(
|
||||
ExprListComp {
|
||||
elt: Attributed {
|
||||
ListComp(
|
||||
ExprListComp {
|
||||
range: 0..14,
|
||||
elt: Name(
|
||||
ExprName {
|
||||
range: 1..2,
|
||||
custom: (),
|
||||
node: Name(
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 7..8,
|
||||
id: Identifier(
|
||||
"x",
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
iter: Name(
|
||||
ExprName {
|
||||
range: 12..13,
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Attributed {
|
||||
range: 12..13,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -2,94 +2,71 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..23,
|
||||
custom: (),
|
||||
node: GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
elt: Attributed {
|
||||
GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
range: 0..23,
|
||||
elt: NamedExpr(
|
||||
ExprNamedExpr {
|
||||
range: 1..11,
|
||||
custom: (),
|
||||
node: NamedExpr(
|
||||
ExprNamedExpr {
|
||||
target: Attributed {
|
||||
range: 1..2,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
value: Attributed {
|
||||
range: 6..11,
|
||||
custom: (),
|
||||
node: BinOp(
|
||||
ExprBinOp {
|
||||
left: Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Add,
|
||||
right: Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 1..2,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Attributed {
|
||||
range: 16..17,
|
||||
custom: (),
|
||||
node: Name(
|
||||
value: BinOp(
|
||||
ExprBinOp {
|
||||
range: 6..11,
|
||||
left: Name(
|
||||
ExprName {
|
||||
range: 6..7,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Attributed {
|
||||
range: 21..22,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
op: Add,
|
||||
right: Constant(
|
||||
ExprConstant {
|
||||
range: 10..11,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
),
|
||||
},
|
||||
),
|
||||
generators: [
|
||||
Comprehension {
|
||||
target: Name(
|
||||
ExprName {
|
||||
range: 16..17,
|
||||
id: Identifier(
|
||||
"y",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
iter: Name(
|
||||
ExprName {
|
||||
range: 21..22,
|
||||
id: Identifier(
|
||||
"z",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ifs: [],
|
||||
is_async: false,
|
||||
range: (),
|
||||
},
|
||||
],
|
||||
},
|
||||
)
|
||||
|
|
|
@ -3,59 +3,44 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..23,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..23,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 0..23,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 0..5,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 6..19,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 21..22,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 0..5,
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 6..19,
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 21..22,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,47 +3,35 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..20,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..20,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 0..20,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 0..5,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 6..19,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 0..5,
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 6..19,
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..13,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,85 +3,64 @@ source: parser/src/parser.rs
|
|||
expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..11,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..11,
|
||||
targets: [
|
||||
Tuple(
|
||||
ExprTuple {
|
||||
range: 0..4,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 3..4,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"b",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
elts: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
Name(
|
||||
ExprName {
|
||||
range: 3..4,
|
||||
id: Identifier(
|
||||
"b",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
value: Tuple(
|
||||
ExprTuple {
|
||||
range: 7..11,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 7..8,
|
||||
value: Int(
|
||||
4,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
range: 7..11,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
4,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 10..11,
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,74 +2,56 @@
|
|||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Attributed {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
Subscript(
|
||||
ExprSubscript {
|
||||
range: 0..8,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
slice: Attributed {
|
||||
),
|
||||
slice: Slice(
|
||||
ExprSlice {
|
||||
range: 2..7,
|
||||
custom: (),
|
||||
node: Slice(
|
||||
ExprSlice {
|
||||
lower: Some(
|
||||
Attributed {
|
||||
range: 2..3,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
upper: Some(
|
||||
Attributed {
|
||||
range: 4..5,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
step: Some(
|
||||
Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
lower: Some(
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 2..3,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
),
|
||||
upper: Some(
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 4..5,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
),
|
||||
step: Some(
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 6..7,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
}
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -3,402 +3,291 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..36,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 0..36,
|
||||
targets: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 0..11,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"array_slice",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
id: Identifier(
|
||||
"array_slice",
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
),
|
||||
],
|
||||
value: Subscript(
|
||||
ExprSubscript {
|
||||
range: 14..36,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
range: 14..19,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"array",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Attributed {
|
||||
range: 20..35,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 20..21,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 23..31,
|
||||
custom: (),
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Attributed {
|
||||
range: 24..31,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"indexes",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 33..35,
|
||||
custom: (),
|
||||
node: UnaryOp(
|
||||
ExprUnaryOp {
|
||||
op: USub,
|
||||
operand: Attributed {
|
||||
range: 34..35,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 37..73,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Attributed {
|
||||
range: 37..59,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
range: 37..42,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"array",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Attributed {
|
||||
range: 43..58,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 43..44,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 46..54,
|
||||
custom: (),
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Attributed {
|
||||
range: 47..54,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"indexes",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 56..58,
|
||||
custom: (),
|
||||
node: UnaryOp(
|
||||
ExprUnaryOp {
|
||||
op: USub,
|
||||
operand: Attributed {
|
||||
range: 57..58,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Attributed {
|
||||
range: 62..73,
|
||||
custom: (),
|
||||
node: Name(
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 14..19,
|
||||
id: Identifier(
|
||||
"array_slice",
|
||||
"array",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
slice: Tuple(
|
||||
ExprTuple {
|
||||
range: 20..35,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 20..21,
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Starred(
|
||||
ExprStarred {
|
||||
range: 23..31,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 24..31,
|
||||
id: Identifier(
|
||||
"indexes",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
UnaryOp(
|
||||
ExprUnaryOp {
|
||||
range: 33..35,
|
||||
op: USub,
|
||||
operand: Constant(
|
||||
ExprConstant {
|
||||
range: 34..35,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 74..119,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
Assign(
|
||||
StmtAssign {
|
||||
range: 37..73,
|
||||
targets: [
|
||||
Subscript(
|
||||
ExprSubscript {
|
||||
range: 37..59,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 37..42,
|
||||
id: Identifier(
|
||||
"array",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
slice: Tuple(
|
||||
ExprTuple {
|
||||
range: 43..58,
|
||||
elts: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 43..44,
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Starred(
|
||||
ExprStarred {
|
||||
range: 46..54,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 47..54,
|
||||
id: Identifier(
|
||||
"indexes",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
UnaryOp(
|
||||
ExprUnaryOp {
|
||||
range: 56..58,
|
||||
op: USub,
|
||||
operand: Constant(
|
||||
ExprConstant {
|
||||
range: 57..58,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
],
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 62..73,
|
||||
id: Identifier(
|
||||
"array_slice",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 74..119,
|
||||
value: Subscript(
|
||||
ExprSubscript {
|
||||
range: 74..119,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
range: 74..79,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"array",
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 74..79,
|
||||
id: Identifier(
|
||||
"array",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
slice: Tuple(
|
||||
ExprTuple {
|
||||
range: 80..118,
|
||||
elts: [
|
||||
Starred(
|
||||
ExprStarred {
|
||||
range: 80..98,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 81..98,
|
||||
id: Identifier(
|
||||
"indexes_to_select",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Attributed {
|
||||
range: 80..118,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 80..98,
|
||||
custom: (),
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Attributed {
|
||||
range: 81..98,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"indexes_to_select",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
Starred(
|
||||
ExprStarred {
|
||||
range: 100..118,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 101..118,
|
||||
id: Identifier(
|
||||
"indexes_to_select",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
Attributed {
|
||||
range: 100..118,
|
||||
custom: (),
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Attributed {
|
||||
range: 101..118,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"indexes_to_select",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 120..150,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
),
|
||||
},
|
||||
),
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 120..150,
|
||||
value: Subscript(
|
||||
ExprSubscript {
|
||||
range: 120..150,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
range: 120..125,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"array",
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 120..125,
|
||||
id: Identifier(
|
||||
"array",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
slice: Tuple(
|
||||
ExprTuple {
|
||||
range: 126..149,
|
||||
elts: [
|
||||
Slice(
|
||||
ExprSlice {
|
||||
range: 126..129,
|
||||
lower: Some(
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 126..127,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
),
|
||||
upper: Some(
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 128..129,
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
),
|
||||
step: None,
|
||||
},
|
||||
),
|
||||
Starred(
|
||||
ExprStarred {
|
||||
range: 131..149,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 132..149,
|
||||
id: Identifier(
|
||||
"indexes_to_select",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Attributed {
|
||||
range: 126..149,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 126..129,
|
||||
custom: (),
|
||||
node: Slice(
|
||||
ExprSlice {
|
||||
lower: Some(
|
||||
Attributed {
|
||||
range: 126..127,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
upper: Some(
|
||||
Attributed {
|
||||
range: 128..129,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
step: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 131..149,
|
||||
custom: (),
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Attributed {
|
||||
range: 132..149,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"indexes_to_select",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,322 +3,241 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..134,
|
||||
custom: (),
|
||||
node: Try(
|
||||
StmtTry {
|
||||
body: [
|
||||
Attributed {
|
||||
Try(
|
||||
StmtTry {
|
||||
range: 0..134,
|
||||
body: [
|
||||
Raise(
|
||||
StmtRaise {
|
||||
range: 9..28,
|
||||
custom: (),
|
||||
node: Raise(
|
||||
StmtRaise {
|
||||
exc: Some(
|
||||
Attributed {
|
||||
range: 15..28,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 15..25,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"ValueError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 26..27,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
exc: Some(
|
||||
Call(
|
||||
ExprCall {
|
||||
range: 15..28,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 15..25,
|
||||
id: Identifier(
|
||||
"ValueError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 26..27,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
cause: None,
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
),
|
||||
cause: None,
|
||||
},
|
||||
],
|
||||
handlers: [
|
||||
Attributed {
|
||||
),
|
||||
],
|
||||
handlers: [
|
||||
ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
range: 29..82,
|
||||
custom: (),
|
||||
node: ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
type_: Some(
|
||||
Attributed {
|
||||
range: 36..45,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"TypeError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
Identifier(
|
||||
"e",
|
||||
type_: Some(
|
||||
Name(
|
||||
ExprName {
|
||||
range: 36..45,
|
||||
id: Identifier(
|
||||
"TypeError",
|
||||
),
|
||||
),
|
||||
body: [
|
||||
Attributed {
|
||||
range: 56..82,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
range: 56..82,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 56..61,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
),
|
||||
name: Some(
|
||||
Identifier(
|
||||
"e",
|
||||
),
|
||||
),
|
||||
body: [
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 56..82,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 56..82,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 56..61,
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 62..81,
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 62..81,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 62..81,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 62..81,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 72..79,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 72..76,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"type",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 77..78,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 62..81,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 72..79,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 72..76,
|
||||
id: Identifier(
|
||||
"type",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 77..78,
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 83..134,
|
||||
custom: (),
|
||||
node: ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
type_: Some(
|
||||
Attributed {
|
||||
range: 90..97,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"OSError",
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
Identifier(
|
||||
"e",
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
),
|
||||
body: [
|
||||
Attributed {
|
||||
range: 108..134,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
range: 108..134,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 108..113,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
range: 83..134,
|
||||
type_: Some(
|
||||
Name(
|
||||
ExprName {
|
||||
range: 90..97,
|
||||
id: Identifier(
|
||||
"OSError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
),
|
||||
name: Some(
|
||||
Identifier(
|
||||
"e",
|
||||
),
|
||||
),
|
||||
body: [
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 108..134,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 108..134,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 108..113,
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 114..133,
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 114..133,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 114..133,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 114..133,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 124..131,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 124..128,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"type",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 129..130,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 114..133,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 124..131,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 124..128,
|
||||
id: Identifier(
|
||||
"type",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 129..130,
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
orelse: [],
|
||||
finalbody: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
orelse: [],
|
||||
finalbody: [],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,569 +3,425 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..260,
|
||||
custom: (),
|
||||
node: TryStar(
|
||||
StmtTryStar {
|
||||
body: [
|
||||
Attributed {
|
||||
TryStar(
|
||||
StmtTryStar {
|
||||
range: 0..260,
|
||||
body: [
|
||||
Raise(
|
||||
StmtRaise {
|
||||
range: 9..98,
|
||||
custom: (),
|
||||
node: Raise(
|
||||
StmtRaise {
|
||||
exc: Some(
|
||||
Attributed {
|
||||
range: 15..98,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 15..29,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"ExceptionGroup",
|
||||
exc: Some(
|
||||
Call(
|
||||
ExprCall {
|
||||
range: 15..98,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 15..29,
|
||||
id: Identifier(
|
||||
"ExceptionGroup",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 30..34,
|
||||
value: Str(
|
||||
"eg",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
List(
|
||||
ExprList {
|
||||
range: 44..97,
|
||||
elts: [
|
||||
Call(
|
||||
ExprCall {
|
||||
range: 45..58,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 45..55,
|
||||
id: Identifier(
|
||||
"ValueError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 56..57,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 30..34,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"eg",
|
||||
Call(
|
||||
ExprCall {
|
||||
range: 60..72,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 60..69,
|
||||
id: Identifier(
|
||||
"TypeError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 70..71,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 44..97,
|
||||
custom: (),
|
||||
node: List(
|
||||
ExprList {
|
||||
elts: [
|
||||
Attributed {
|
||||
range: 45..58,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 45..55,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"ValueError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 56..57,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
Call(
|
||||
ExprCall {
|
||||
range: 74..84,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 74..81,
|
||||
id: Identifier(
|
||||
"OSError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 82..83,
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
Attributed {
|
||||
range: 60..72,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 60..69,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"TypeError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 70..71,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
Call(
|
||||
ExprCall {
|
||||
range: 86..96,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 86..93,
|
||||
id: Identifier(
|
||||
"OSError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 94..95,
|
||||
value: Int(
|
||||
4,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
Attributed {
|
||||
range: 74..84,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 74..81,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"OSError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 82..83,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 86..96,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 86..93,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"OSError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 94..95,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
4,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
cause: None,
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
),
|
||||
cause: None,
|
||||
},
|
||||
],
|
||||
handlers: [
|
||||
Attributed {
|
||||
),
|
||||
],
|
||||
handlers: [
|
||||
ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
range: 99..180,
|
||||
custom: (),
|
||||
node: ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
type_: Some(
|
||||
Attributed {
|
||||
range: 107..116,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"TypeError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
Identifier(
|
||||
"e",
|
||||
type_: Some(
|
||||
Name(
|
||||
ExprName {
|
||||
range: 107..116,
|
||||
id: Identifier(
|
||||
"TypeError",
|
||||
),
|
||||
),
|
||||
body: [
|
||||
Attributed {
|
||||
range: 127..180,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
range: 127..180,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 127..132,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
),
|
||||
name: Some(
|
||||
Identifier(
|
||||
"e",
|
||||
),
|
||||
),
|
||||
body: [
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 127..180,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 127..180,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 127..132,
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 133..179,
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 133..179,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 133..179,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 133..179,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 143..150,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 143..147,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"type",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 148..149,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 133..179,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" with nested ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 133..179,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 165..177,
|
||||
custom: (),
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Attributed {
|
||||
range: 165..166,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: Identifier(
|
||||
"exceptions",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 133..179,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 143..150,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 143..147,
|
||||
id: Identifier(
|
||||
"type",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 148..149,
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 181..260,
|
||||
custom: (),
|
||||
node: ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
type_: Some(
|
||||
Attributed {
|
||||
range: 189..196,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"OSError",
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 133..179,
|
||||
value: Str(
|
||||
" with nested ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 133..179,
|
||||
value: Attribute(
|
||||
ExprAttribute {
|
||||
range: 165..177,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 165..166,
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
attr: Identifier(
|
||||
"exceptions",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
Identifier(
|
||||
"e",
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
),
|
||||
body: [
|
||||
Attributed {
|
||||
range: 207..260,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
range: 207..260,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 207..212,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
range: 181..260,
|
||||
type_: Some(
|
||||
Name(
|
||||
ExprName {
|
||||
range: 189..196,
|
||||
id: Identifier(
|
||||
"OSError",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
),
|
||||
name: Some(
|
||||
Identifier(
|
||||
"e",
|
||||
),
|
||||
),
|
||||
body: [
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 207..260,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 207..260,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 207..212,
|
||||
id: Identifier(
|
||||
"print",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 213..259,
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 213..259,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 213..259,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 213..259,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 223..230,
|
||||
custom: (),
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Attributed {
|
||||
range: 223..227,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"type",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Attributed {
|
||||
range: 228..229,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 213..259,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" with nested ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 213..259,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 245..257,
|
||||
custom: (),
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Attributed {
|
||||
range: 245..246,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: Identifier(
|
||||
"exceptions",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 213..259,
|
||||
value: Call(
|
||||
ExprCall {
|
||||
range: 223..230,
|
||||
func: Name(
|
||||
ExprName {
|
||||
range: 223..227,
|
||||
id: Identifier(
|
||||
"type",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
args: [
|
||||
Name(
|
||||
ExprName {
|
||||
range: 228..229,
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 213..259,
|
||||
value: Str(
|
||||
" with nested ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 213..259,
|
||||
value: Attribute(
|
||||
ExprAttribute {
|
||||
range: 245..257,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 245..246,
|
||||
id: Identifier(
|
||||
"e",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
attr: Identifier(
|
||||
"exceptions",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
],
|
||||
orelse: [],
|
||||
finalbody: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
orelse: [],
|
||||
finalbody: [],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,124 +3,95 @@ source: parser/src/parser.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 1..49,
|
||||
custom: (),
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: Identifier(
|
||||
"args_to_tuple",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: Some(
|
||||
Attributed {
|
||||
range: 20..29,
|
||||
custom: (),
|
||||
node: ArgData {
|
||||
arg: Identifier(
|
||||
"args",
|
||||
),
|
||||
annotation: Some(
|
||||
Attributed {
|
||||
range: 26..29,
|
||||
custom: (),
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Attributed {
|
||||
range: 27..29,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"Ts",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
},
|
||||
body: [
|
||||
Attributed {
|
||||
range: 46..49,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
range: 46..49,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Ellipsis,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
FunctionDef(
|
||||
StmtFunctionDef {
|
||||
range: 1..49,
|
||||
name: Identifier(
|
||||
"args_to_tuple",
|
||||
),
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
vararg: Some(
|
||||
Arg {
|
||||
arg: Identifier(
|
||||
"args",
|
||||
),
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: Some(
|
||||
Attributed {
|
||||
range: 34..44,
|
||||
custom: (),
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Attributed {
|
||||
range: 34..39,
|
||||
custom: (),
|
||||
node: Name(
|
||||
annotation: Some(
|
||||
Starred(
|
||||
ExprStarred {
|
||||
range: 26..29,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 27..29,
|
||||
id: Identifier(
|
||||
"Tuple",
|
||||
"Ts",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
slice: Attributed {
|
||||
range: 40..43,
|
||||
custom: (),
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Attributed {
|
||||
range: 41..43,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"Ts",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
),
|
||||
),
|
||||
type_comment: None,
|
||||
range: 20..29,
|
||||
},
|
||||
),
|
||||
kwonlyargs: [],
|
||||
kw_defaults: [],
|
||||
kwarg: None,
|
||||
defaults: [],
|
||||
range: (),
|
||||
},
|
||||
body: [
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 46..49,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 46..49,
|
||||
value: Ellipsis,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
returns: Some(
|
||||
Subscript(
|
||||
ExprSubscript {
|
||||
range: 34..44,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 34..39,
|
||||
id: Identifier(
|
||||
"Tuple",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
slice: Starred(
|
||||
ExprStarred {
|
||||
range: 40..43,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 41..43,
|
||||
id: Identifier(
|
||||
"Ts",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..15,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..15,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..15,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{8}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"\u{8}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..9,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{7}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"\u{7}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..21,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..21,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..21,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\r",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"\r",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..45,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..45,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..45,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{89}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"\u{89}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..12,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..12,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..12,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{7f}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"\u{7f}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,281 +3,275 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..738,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..738,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..738,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Bytes(
|
||||
[
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36,
|
||||
37,
|
||||
38,
|
||||
39,
|
||||
40,
|
||||
41,
|
||||
42,
|
||||
43,
|
||||
44,
|
||||
45,
|
||||
46,
|
||||
47,
|
||||
48,
|
||||
49,
|
||||
50,
|
||||
51,
|
||||
52,
|
||||
53,
|
||||
54,
|
||||
55,
|
||||
56,
|
||||
57,
|
||||
58,
|
||||
59,
|
||||
60,
|
||||
61,
|
||||
62,
|
||||
63,
|
||||
64,
|
||||
65,
|
||||
66,
|
||||
67,
|
||||
68,
|
||||
69,
|
||||
70,
|
||||
71,
|
||||
72,
|
||||
73,
|
||||
74,
|
||||
75,
|
||||
76,
|
||||
77,
|
||||
78,
|
||||
79,
|
||||
80,
|
||||
81,
|
||||
82,
|
||||
83,
|
||||
84,
|
||||
85,
|
||||
86,
|
||||
87,
|
||||
88,
|
||||
89,
|
||||
90,
|
||||
91,
|
||||
92,
|
||||
93,
|
||||
94,
|
||||
95,
|
||||
96,
|
||||
97,
|
||||
98,
|
||||
99,
|
||||
100,
|
||||
101,
|
||||
102,
|
||||
103,
|
||||
104,
|
||||
105,
|
||||
106,
|
||||
107,
|
||||
108,
|
||||
109,
|
||||
110,
|
||||
111,
|
||||
112,
|
||||
113,
|
||||
114,
|
||||
115,
|
||||
116,
|
||||
117,
|
||||
118,
|
||||
119,
|
||||
120,
|
||||
121,
|
||||
122,
|
||||
123,
|
||||
124,
|
||||
125,
|
||||
126,
|
||||
127,
|
||||
128,
|
||||
129,
|
||||
130,
|
||||
131,
|
||||
132,
|
||||
133,
|
||||
134,
|
||||
135,
|
||||
136,
|
||||
137,
|
||||
138,
|
||||
139,
|
||||
140,
|
||||
141,
|
||||
142,
|
||||
143,
|
||||
144,
|
||||
145,
|
||||
146,
|
||||
147,
|
||||
148,
|
||||
149,
|
||||
150,
|
||||
151,
|
||||
152,
|
||||
153,
|
||||
154,
|
||||
155,
|
||||
156,
|
||||
157,
|
||||
158,
|
||||
159,
|
||||
160,
|
||||
161,
|
||||
162,
|
||||
163,
|
||||
164,
|
||||
165,
|
||||
166,
|
||||
167,
|
||||
168,
|
||||
169,
|
||||
170,
|
||||
171,
|
||||
172,
|
||||
173,
|
||||
174,
|
||||
175,
|
||||
176,
|
||||
177,
|
||||
178,
|
||||
179,
|
||||
180,
|
||||
181,
|
||||
182,
|
||||
183,
|
||||
184,
|
||||
185,
|
||||
186,
|
||||
187,
|
||||
188,
|
||||
189,
|
||||
190,
|
||||
191,
|
||||
192,
|
||||
193,
|
||||
194,
|
||||
195,
|
||||
196,
|
||||
197,
|
||||
198,
|
||||
199,
|
||||
200,
|
||||
201,
|
||||
202,
|
||||
203,
|
||||
204,
|
||||
205,
|
||||
206,
|
||||
207,
|
||||
208,
|
||||
209,
|
||||
210,
|
||||
211,
|
||||
212,
|
||||
213,
|
||||
214,
|
||||
215,
|
||||
216,
|
||||
217,
|
||||
218,
|
||||
219,
|
||||
220,
|
||||
221,
|
||||
222,
|
||||
223,
|
||||
224,
|
||||
225,
|
||||
226,
|
||||
227,
|
||||
228,
|
||||
229,
|
||||
230,
|
||||
231,
|
||||
232,
|
||||
233,
|
||||
234,
|
||||
235,
|
||||
236,
|
||||
237,
|
||||
238,
|
||||
239,
|
||||
240,
|
||||
241,
|
||||
242,
|
||||
243,
|
||||
244,
|
||||
245,
|
||||
246,
|
||||
247,
|
||||
248,
|
||||
249,
|
||||
250,
|
||||
251,
|
||||
252,
|
||||
253,
|
||||
254,
|
||||
255,
|
||||
],
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Bytes(
|
||||
[
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36,
|
||||
37,
|
||||
38,
|
||||
39,
|
||||
40,
|
||||
41,
|
||||
42,
|
||||
43,
|
||||
44,
|
||||
45,
|
||||
46,
|
||||
47,
|
||||
48,
|
||||
49,
|
||||
50,
|
||||
51,
|
||||
52,
|
||||
53,
|
||||
54,
|
||||
55,
|
||||
56,
|
||||
57,
|
||||
58,
|
||||
59,
|
||||
60,
|
||||
61,
|
||||
62,
|
||||
63,
|
||||
64,
|
||||
65,
|
||||
66,
|
||||
67,
|
||||
68,
|
||||
69,
|
||||
70,
|
||||
71,
|
||||
72,
|
||||
73,
|
||||
74,
|
||||
75,
|
||||
76,
|
||||
77,
|
||||
78,
|
||||
79,
|
||||
80,
|
||||
81,
|
||||
82,
|
||||
83,
|
||||
84,
|
||||
85,
|
||||
86,
|
||||
87,
|
||||
88,
|
||||
89,
|
||||
90,
|
||||
91,
|
||||
92,
|
||||
93,
|
||||
94,
|
||||
95,
|
||||
96,
|
||||
97,
|
||||
98,
|
||||
99,
|
||||
100,
|
||||
101,
|
||||
102,
|
||||
103,
|
||||
104,
|
||||
105,
|
||||
106,
|
||||
107,
|
||||
108,
|
||||
109,
|
||||
110,
|
||||
111,
|
||||
112,
|
||||
113,
|
||||
114,
|
||||
115,
|
||||
116,
|
||||
117,
|
||||
118,
|
||||
119,
|
||||
120,
|
||||
121,
|
||||
122,
|
||||
123,
|
||||
124,
|
||||
125,
|
||||
126,
|
||||
127,
|
||||
128,
|
||||
129,
|
||||
130,
|
||||
131,
|
||||
132,
|
||||
133,
|
||||
134,
|
||||
135,
|
||||
136,
|
||||
137,
|
||||
138,
|
||||
139,
|
||||
140,
|
||||
141,
|
||||
142,
|
||||
143,
|
||||
144,
|
||||
145,
|
||||
146,
|
||||
147,
|
||||
148,
|
||||
149,
|
||||
150,
|
||||
151,
|
||||
152,
|
||||
153,
|
||||
154,
|
||||
155,
|
||||
156,
|
||||
157,
|
||||
158,
|
||||
159,
|
||||
160,
|
||||
161,
|
||||
162,
|
||||
163,
|
||||
164,
|
||||
165,
|
||||
166,
|
||||
167,
|
||||
168,
|
||||
169,
|
||||
170,
|
||||
171,
|
||||
172,
|
||||
173,
|
||||
174,
|
||||
175,
|
||||
176,
|
||||
177,
|
||||
178,
|
||||
179,
|
||||
180,
|
||||
181,
|
||||
182,
|
||||
183,
|
||||
184,
|
||||
185,
|
||||
186,
|
||||
187,
|
||||
188,
|
||||
189,
|
||||
190,
|
||||
191,
|
||||
192,
|
||||
193,
|
||||
194,
|
||||
195,
|
||||
196,
|
||||
197,
|
||||
198,
|
||||
199,
|
||||
200,
|
||||
201,
|
||||
202,
|
||||
203,
|
||||
204,
|
||||
205,
|
||||
206,
|
||||
207,
|
||||
208,
|
||||
209,
|
||||
210,
|
||||
211,
|
||||
212,
|
||||
213,
|
||||
214,
|
||||
215,
|
||||
216,
|
||||
217,
|
||||
218,
|
||||
219,
|
||||
220,
|
||||
221,
|
||||
222,
|
||||
223,
|
||||
224,
|
||||
225,
|
||||
226,
|
||||
227,
|
||||
228,
|
||||
229,
|
||||
230,
|
||||
231,
|
||||
232,
|
||||
233,
|
||||
234,
|
||||
235,
|
||||
236,
|
||||
237,
|
||||
238,
|
||||
239,
|
||||
240,
|
||||
241,
|
||||
242,
|
||||
243,
|
||||
244,
|
||||
245,
|
||||
246,
|
||||
247,
|
||||
248,
|
||||
249,
|
||||
250,
|
||||
251,
|
||||
252,
|
||||
253,
|
||||
254,
|
||||
255,
|
||||
],
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..12,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..12,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..12,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{1b}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"\u{1b}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,35 +3,29 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..13,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Bytes(
|
||||
[
|
||||
111,
|
||||
109,
|
||||
107,
|
||||
109,
|
||||
111,
|
||||
107,
|
||||
92,
|
||||
88,
|
||||
97,
|
||||
97,
|
||||
],
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Bytes(
|
||||
[
|
||||
111,
|
||||
109,
|
||||
107,
|
||||
109,
|
||||
111,
|
||||
107,
|
||||
92,
|
||||
88,
|
||||
97,
|
||||
97,
|
||||
],
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,30 +3,24 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..14,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Bytes(
|
||||
[
|
||||
35,
|
||||
97,
|
||||
4,
|
||||
83,
|
||||
52,
|
||||
],
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Bytes(
|
||||
[
|
||||
35,
|
||||
97,
|
||||
4,
|
||||
83,
|
||||
52,
|
||||
],
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..15,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..15,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..15,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{c}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"\u{c}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,58 +3,43 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..8,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\\",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..8,
|
||||
value: Str(
|
||||
"\\",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..8,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 5..6,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,58 +3,43 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..8,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..8,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 5..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..8,
|
||||
value: Str(
|
||||
"\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..8,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 5..6,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,58 +3,43 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..9,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\\\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..9,
|
||||
value: Str(
|
||||
"\\\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..9,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 6..7,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,52 +3,40 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..10,
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..10,
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..10,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 3..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"user",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"user",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,124 +3,94 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"mix ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..38,
|
||||
value: Str(
|
||||
"mix ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..38,
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..38,
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..38,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 7..11,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"user",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"user",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" with text and ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"second=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..38,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
),
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..38,
|
||||
value: Str(
|
||||
" with text and ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..38,
|
||||
value: Str(
|
||||
"second=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..38,
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..38,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 29..35,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"second",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"second",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,75 +3,57 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..14,
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..14,
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..14,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 3..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"user",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"user",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: Some(
|
||||
Attributed {
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: Some(
|
||||
JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..14,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
">10",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..14,
|
||||
value: Str(
|
||||
">10",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,58 +3,43 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..11,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..11,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..11,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..11,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 6..7,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..11,
|
||||
value: Str(
|
||||
"\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..11,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 6..7,
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..9,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{88}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"\u{88}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,34 +3,25 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..17,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..17,
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,34 +3,25 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..17,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..17,
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,58 +3,43 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..22,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..22,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..22,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..22,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 9..22,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 17..20,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"!",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..22,
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 9..22,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 17..20,
|
||||
value: Str(
|
||||
"!",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,64 +3,49 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..18,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 3..4,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"a",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..18,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"b",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"b",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"{foo}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..18,
|
||||
value: Str(
|
||||
"{foo}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,53 +3,41 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..13,
|
||||
value: Compare(
|
||||
ExprCompare {
|
||||
range: 3..11,
|
||||
custom: (),
|
||||
node: Compare(
|
||||
ExprCompare {
|
||||
left: Attributed {
|
||||
range: 3..5,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
42,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
ops: [
|
||||
Eq,
|
||||
],
|
||||
comparators: [
|
||||
Attributed {
|
||||
range: 9..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
42,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
left: Constant(
|
||||
ExprConstant {
|
||||
range: 3..5,
|
||||
value: Int(
|
||||
42,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
ops: [
|
||||
Eq,
|
||||
],
|
||||
comparators: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 9..11,
|
||||
value: Int(
|
||||
42,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,63 +3,48 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..15,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..15,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 3..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"foo",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"foo",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: Some(
|
||||
Attributed {
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: Some(
|
||||
JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..15,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..15,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
range: 8..12,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"spec",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..15,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 8..12,
|
||||
id: Identifier(
|
||||
"spec",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,53 +3,41 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..11,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..11,
|
||||
value: Compare(
|
||||
ExprCompare {
|
||||
range: 3..9,
|
||||
custom: (),
|
||||
node: Compare(
|
||||
ExprCompare {
|
||||
left: Attributed {
|
||||
range: 3..4,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
ops: [
|
||||
NotEq,
|
||||
],
|
||||
comparators: [
|
||||
Attributed {
|
||||
range: 8..9,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
left: Constant(
|
||||
ExprConstant {
|
||||
range: 3..4,
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
ops: [
|
||||
NotEq,
|
||||
],
|
||||
comparators: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 8..9,
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,51 +3,39 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..13,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 3..6,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"foo",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"foo",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: Some(
|
||||
Attributed {
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: Some(
|
||||
JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..13,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"spec",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..13,
|
||||
value: Str(
|
||||
"spec",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,52 +3,40 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"x =",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..10,
|
||||
value: Str(
|
||||
"x =",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..10,
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..10,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 3..4,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,52 +3,40 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"x=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..10,
|
||||
value: Str(
|
||||
"x=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..10,
|
||||
value: Str(
|
||||
" ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..10,
|
||||
value: Name(
|
||||
ExprName {
|
||||
range: 3..4,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
id: Identifier(
|
||||
"x",
|
||||
),
|
||||
ctx: Load,
|
||||
},
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
114,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,25 +3,19 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..10,
|
||||
custom: (),
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Attributed {
|
||||
FormattedValue(
|
||||
ExprFormattedValue {
|
||||
range: 0..10,
|
||||
value: Yield(
|
||||
ExprYield {
|
||||
range: 3..8,
|
||||
custom: (),
|
||||
node: Yield(
|
||||
ExprYield {
|
||||
value: None,
|
||||
},
|
||||
),
|
||||
value: None,
|
||||
},
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
conversion: Int(
|
||||
0,
|
||||
),
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..16,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..16,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..16,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,26 +3,20 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..20,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..20,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..20,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello, world!",
|
||||
),
|
||||
kind: Some(
|
||||
"u",
|
||||
),
|
||||
},
|
||||
value: Str(
|
||||
"Hello, world!",
|
||||
),
|
||||
kind: Some(
|
||||
"u",
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,36 +3,27 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..18,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..18,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: Some(
|
||||
"u",
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..18,
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: Some(
|
||||
"u",
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,36 +3,27 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..22,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..22,
|
||||
value: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
range: 0..22,
|
||||
custom: (),
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Attributed {
|
||||
range: 0..22,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world!",
|
||||
),
|
||||
kind: Some(
|
||||
"u",
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
values: [
|
||||
Constant(
|
||||
ExprConstant {
|
||||
range: 0..22,
|
||||
value: Str(
|
||||
"Hello world!",
|
||||
),
|
||||
kind: Some(
|
||||
"u",
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -3,24 +3,18 @@ source: parser/src/string.rs
|
|||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Attributed {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Attributed {
|
||||
Expr(
|
||||
StmtExpr {
|
||||
range: 0..17,
|
||||
value: Constant(
|
||||
ExprConstant {
|
||||
range: 0..17,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue