mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-24 13:34:52 +00:00
Refactor ast to hold data as seperated type
This commit is contained in:
parent
9f1a538eba
commit
6d7358090b
111 changed files with 23485 additions and 20218 deletions
129
ast/asdl_rs.py
129
ast/asdl_rs.py
|
@ -131,6 +131,9 @@ class FindUserdataTypesVisitor(asdl.VisitorBase):
|
|||
if is_simple(sum):
|
||||
info.has_userdata = False
|
||||
else:
|
||||
for t in sum.types:
|
||||
self.typeinfo[t.name] = TypeInfo(t.name)
|
||||
self.add_children(t.name, t.fields)
|
||||
if len(sum.types) > 1:
|
||||
info.boxed = True
|
||||
if sum.attributes:
|
||||
|
@ -205,16 +208,49 @@ class StructVisitor(TypeInfoEmitVisitor):
|
|||
|
||||
def sum_with_constructors(self, sum, name, depth):
|
||||
typeinfo = self.typeinfo[name]
|
||||
generics, generics_applied = self.get_generics(name, "U = ()", "U")
|
||||
enumname = rustname = get_rust_type(name)
|
||||
# all the attributes right now are for location, so if it has attrs we
|
||||
# can just wrap it in Located<>
|
||||
if sum.attributes:
|
||||
enumname = rustname + "Kind"
|
||||
|
||||
for t in sum.types:
|
||||
if not t.fields:
|
||||
continue
|
||||
self.emit_attrs(depth)
|
||||
self.typeinfo[t] = TypeInfo(t)
|
||||
t_generics, t_generics_applied = self.get_generics(t.name, "U = ()", "U")
|
||||
payload_name = f"{rustname}{t.name}"
|
||||
self.emit(f"pub struct {payload_name}{t_generics} {{", depth)
|
||||
for f in t.fields:
|
||||
self.visit(f, typeinfo, "pub ", depth + 1, t.name)
|
||||
self.emit("}", depth)
|
||||
self.emit(
|
||||
textwrap.dedent(
|
||||
f"""
|
||||
impl{t_generics_applied} From<{payload_name}{t_generics_applied}> for {enumname}{t_generics_applied} {{
|
||||
fn from(payload: {payload_name}{t_generics_applied}) -> Self {{
|
||||
{enumname}::{t.name}(payload)
|
||||
}}
|
||||
}}
|
||||
"""
|
||||
),
|
||||
depth,
|
||||
)
|
||||
|
||||
generics, generics_applied = self.get_generics(name, "U = ()", "U")
|
||||
self.emit_attrs(depth)
|
||||
self.emit(f"pub enum {enumname}{generics} {{", depth)
|
||||
for t in sum.types:
|
||||
self.visit(t, typeinfo, depth + 1)
|
||||
if t.fields:
|
||||
t_generics, t_generics_applied = self.get_generics(
|
||||
t.name, "U = ()", "U"
|
||||
)
|
||||
self.emit(
|
||||
f"{t.name}({rustname}{t.name}{t_generics_applied}),", depth + 1
|
||||
)
|
||||
else:
|
||||
self.emit(f"{t.name},", depth + 1)
|
||||
self.emit("}", depth)
|
||||
if sum.attributes:
|
||||
self.emit(
|
||||
|
@ -238,13 +274,18 @@ class StructVisitor(TypeInfoEmitVisitor):
|
|||
if fieldtype and fieldtype.has_userdata:
|
||||
typ = f"{typ}<U>"
|
||||
# don't box if we're doing Vec<T>, but do box if we're doing Vec<Option<Box<T>>>
|
||||
if fieldtype and fieldtype.boxed and (not (parent.product or field.seq) or field.opt):
|
||||
if (
|
||||
fieldtype
|
||||
and fieldtype.boxed
|
||||
and (not (parent.product or field.seq) or field.opt)
|
||||
):
|
||||
typ = f"Box<{typ}>"
|
||||
if field.opt or (
|
||||
# When a dictionary literal contains dictionary unpacking (e.g., `{**d}`),
|
||||
# the expression to be unpacked goes in `values` with a `None` at the corresponding
|
||||
# position in `keys`. To handle this, the type of `keys` needs to be `Option<Vec<T>>`.
|
||||
constructor == "Dict" and field.name == "keys"
|
||||
constructor == "Dict"
|
||||
and field.name == "keys"
|
||||
):
|
||||
typ = f"Option<{typ}>"
|
||||
if field.seq:
|
||||
|
@ -344,14 +385,21 @@ class FoldImplVisitor(TypeInfoEmitVisitor):
|
|||
)
|
||||
if is_located:
|
||||
self.emit("fold_located(folder, node, |folder, node| {", depth)
|
||||
enumname += "Kind"
|
||||
rustname = enumname + "Kind"
|
||||
else:
|
||||
rustname = enumname
|
||||
self.emit("match node {", depth + 1)
|
||||
for cons in sum.types:
|
||||
fields_pattern = self.make_pattern(cons.fields)
|
||||
self.emit(
|
||||
f"{enumname}::{cons.name} {{ {fields_pattern} }} => {{", depth + 2
|
||||
fields_pattern = self.make_pattern(
|
||||
enumname, rustname, cons.name, cons.fields
|
||||
)
|
||||
self.emit(
|
||||
f"{fields_pattern[0]} {{ {fields_pattern[1]} }} {fields_pattern[2]} => {{",
|
||||
depth + 2,
|
||||
)
|
||||
self.gen_construction(
|
||||
fields_pattern[0], cons.fields, fields_pattern[2], depth + 3
|
||||
)
|
||||
self.gen_construction(f"{enumname}::{cons.name}", cons.fields, depth + 3)
|
||||
self.emit("}", depth + 2)
|
||||
self.emit("}", depth + 1)
|
||||
if is_located:
|
||||
|
@ -381,23 +429,33 @@ class FoldImplVisitor(TypeInfoEmitVisitor):
|
|||
)
|
||||
if is_located:
|
||||
self.emit("fold_located(folder, node, |folder, node| {", depth)
|
||||
structname += "Data"
|
||||
fields_pattern = self.make_pattern(product.fields)
|
||||
self.emit(f"let {structname} {{ {fields_pattern} }} = node;", depth + 1)
|
||||
self.gen_construction(structname, product.fields, depth + 1)
|
||||
rustname = structname + "Data"
|
||||
else:
|
||||
rustname = structname
|
||||
fields_pattern = self.make_pattern(rustname, structname, None, product.fields)
|
||||
self.emit(f"let {rustname} {{ {fields_pattern[1]} }} = node;", depth + 1)
|
||||
self.gen_construction(rustname, product.fields, "", depth + 1)
|
||||
if is_located:
|
||||
self.emit("})", depth)
|
||||
self.emit("}", depth)
|
||||
|
||||
def make_pattern(self, fields):
|
||||
return ",".join(rust_field(f.name) for f in fields)
|
||||
def make_pattern(self, rustname, pyname, fieldname, fields):
|
||||
if fields:
|
||||
header = f"{pyname}::{fieldname}({rustname}{fieldname}"
|
||||
footer = ")"
|
||||
else:
|
||||
header = f"{pyname}::{fieldname}"
|
||||
footer = ""
|
||||
|
||||
def gen_construction(self, cons_path, fields, depth):
|
||||
self.emit(f"Ok({cons_path} {{", depth)
|
||||
body = ",".join(rust_field(f.name) for f in fields)
|
||||
return header, body, footer
|
||||
|
||||
def gen_construction(self, header, fields, footer, depth):
|
||||
self.emit(f"Ok({header} {{", depth)
|
||||
for field in fields:
|
||||
name = rust_field(field.name)
|
||||
self.emit(f"{name}: Foldable::fold({name}, folder)?,", depth + 1)
|
||||
self.emit("})", depth)
|
||||
self.emit(f"}}{footer})", depth)
|
||||
|
||||
|
||||
class FoldModuleVisitor(TypeInfoEmitVisitor):
|
||||
|
@ -514,33 +572,36 @@ class TraitImplVisitor(EmitVisitor):
|
|||
self.visit(type.value, type.name, depth)
|
||||
|
||||
def visitSum(self, sum, name, depth):
|
||||
enumname = get_rust_type(name)
|
||||
rustname = enumname = get_rust_type(name)
|
||||
if sum.attributes:
|
||||
enumname += "Kind"
|
||||
rustname = enumname + "Kind"
|
||||
|
||||
self.emit(f"impl NamedNode for ast::{enumname} {{", depth)
|
||||
self.emit(f"impl NamedNode for ast::{rustname} {{", depth)
|
||||
self.emit(f"const NAME: &'static str = {json.dumps(name)};", depth + 1)
|
||||
self.emit("}", depth)
|
||||
self.emit(f"impl Node for ast::{enumname} {{", depth)
|
||||
self.emit(f"impl Node for ast::{rustname} {{", depth)
|
||||
self.emit(
|
||||
"fn ast_to_object(self, _vm: &VirtualMachine) -> PyObjectRef {", depth + 1
|
||||
)
|
||||
self.emit("match self {", depth + 2)
|
||||
for variant in sum.types:
|
||||
self.constructor_to_object(variant, enumname, depth + 3)
|
||||
self.constructor_to_object(variant, enumname, rustname, depth + 3)
|
||||
self.emit("}", depth + 2)
|
||||
self.emit("}", depth + 1)
|
||||
self.emit(
|
||||
"fn ast_from_object(_vm: &VirtualMachine, _object: PyObjectRef) -> PyResult<Self> {",
|
||||
depth + 1,
|
||||
)
|
||||
self.gen_sum_fromobj(sum, name, enumname, depth + 2)
|
||||
self.gen_sum_fromobj(sum, name, enumname, rustname, depth + 2)
|
||||
self.emit("}", depth + 1)
|
||||
self.emit("}", depth)
|
||||
|
||||
def constructor_to_object(self, cons, enumname, depth):
|
||||
def constructor_to_object(self, cons, enumname, rustname, depth):
|
||||
self.emit(f"ast::{rustname}::{cons.name}", depth)
|
||||
if cons.fields:
|
||||
fields_pattern = self.make_pattern(cons.fields)
|
||||
self.emit(f"ast::{enumname}::{cons.name} {{ {fields_pattern} }} => {{", depth)
|
||||
self.emit(f"( ast::{enumname}{cons.name} {{ {fields_pattern} }} )", depth)
|
||||
self.emit(" => {", depth)
|
||||
self.make_node(cons.name, cons.fields, depth + 1)
|
||||
self.emit("}", depth)
|
||||
|
||||
|
@ -586,7 +647,7 @@ class TraitImplVisitor(EmitVisitor):
|
|||
def make_pattern(self, fields):
|
||||
return ",".join(rust_field(f.name) for f in fields)
|
||||
|
||||
def gen_sum_fromobj(self, sum, sumname, enumname, depth):
|
||||
def gen_sum_fromobj(self, sum, sumname, enumname, rustname, depth):
|
||||
if sum.attributes:
|
||||
self.extract_location(sumname, depth)
|
||||
|
||||
|
@ -594,7 +655,12 @@ class TraitImplVisitor(EmitVisitor):
|
|||
self.emit("Ok(", depth)
|
||||
for cons in sum.types:
|
||||
self.emit(f"if _cls.is(Node{cons.name}::static_type()) {{", depth)
|
||||
self.gen_construction(f"{enumname}::{cons.name}", cons, sumname, depth + 1)
|
||||
if cons.fields:
|
||||
self.emit(f"ast::{rustname}::{cons.name} (ast::{enumname}{cons.name} {{", depth + 1)
|
||||
self.gen_construction_fields(cons, sumname, depth + 1)
|
||||
self.emit("})", depth + 1)
|
||||
else:
|
||||
self.emit(f"ast::{rustname}::{cons.name}", depth + 1)
|
||||
self.emit("} else", depth)
|
||||
|
||||
self.emit("{", depth)
|
||||
|
@ -610,13 +676,16 @@ class TraitImplVisitor(EmitVisitor):
|
|||
self.gen_construction(structname, product, prodname, depth + 1)
|
||||
self.emit(")", depth)
|
||||
|
||||
def gen_construction(self, cons_path, cons, name, depth):
|
||||
self.emit(f"ast::{cons_path} {{", depth)
|
||||
def gen_construction_fields(self, cons, name, depth):
|
||||
for field in cons.fields:
|
||||
self.emit(
|
||||
f"{rust_field(field.name)}: {self.decode_field(field, name)},",
|
||||
depth + 1,
|
||||
)
|
||||
|
||||
def gen_construction(self, cons_path, cons, name, depth):
|
||||
self.emit(f"ast::{cons_path} {{", depth)
|
||||
self.gen_construction_fields(cons, name, depth + 1)
|
||||
self.emit("}", depth)
|
||||
|
||||
def extract_location(self, typename, depth):
|
||||
|
|
1488
ast/src/ast_gen.rs
1488
ast/src/ast_gen.rs
File diff suppressed because it is too large
Load diff
|
@ -100,7 +100,7 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
|
|||
}
|
||||
fn fold_expr(&mut self, node: crate::Expr<U>) -> Result<crate::Expr<U>, Self::Error> {
|
||||
match node.node {
|
||||
crate::ExprKind::Tuple { elts, ctx } => {
|
||||
crate::ExprKind::Tuple(crate::ExprTuple { elts, ctx }) => {
|
||||
let elts = elts
|
||||
.into_iter()
|
||||
.map(|x| self.fold_expr(x))
|
||||
|
@ -112,16 +112,16 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
|
|||
let tuple = elts
|
||||
.into_iter()
|
||||
.map(|e| match e.node {
|
||||
crate::ExprKind::Constant { value, .. } => value,
|
||||
crate::ExprKind::Constant(crate::ExprConstant { value, .. }) => value,
|
||||
_ => unreachable!(),
|
||||
})
|
||||
.collect();
|
||||
crate::ExprKind::Constant {
|
||||
crate::ExprKind::Constant(crate::ExprConstant {
|
||||
value: Constant::Tuple(tuple),
|
||||
kind: None,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
crate::ExprKind::Tuple { elts, ctx }
|
||||
crate::ExprKind::Tuple(crate::ExprTuple { elts, ctx })
|
||||
};
|
||||
Ok(crate::Expr {
|
||||
node: expr,
|
||||
|
@ -151,66 +151,73 @@ mod tests {
|
|||
location: start,
|
||||
end_location: end,
|
||||
custom,
|
||||
node: ExprKind::Tuple {
|
||||
node: ExprTuple {
|
||||
ctx: ExprContext::Load,
|
||||
elts: vec![
|
||||
Located {
|
||||
location: start,
|
||||
end_location: end,
|
||||
custom,
|
||||
node: ExprKind::Constant {
|
||||
node: ExprConstant {
|
||||
value: BigInt::from(1).into(),
|
||||
kind: None,
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
},
|
||||
Located {
|
||||
location: start,
|
||||
end_location: end,
|
||||
custom,
|
||||
node: ExprKind::Constant {
|
||||
node: ExprConstant {
|
||||
value: BigInt::from(2).into(),
|
||||
kind: None,
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
},
|
||||
Located {
|
||||
location: start,
|
||||
end_location: end,
|
||||
custom,
|
||||
node: ExprKind::Tuple {
|
||||
node: ExprTuple {
|
||||
ctx: ExprContext::Load,
|
||||
elts: vec![
|
||||
Located {
|
||||
location: start,
|
||||
end_location: end,
|
||||
custom,
|
||||
node: ExprKind::Constant {
|
||||
node: ExprConstant {
|
||||
value: BigInt::from(3).into(),
|
||||
kind: None,
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
},
|
||||
Located {
|
||||
location: start,
|
||||
end_location: end,
|
||||
custom,
|
||||
node: ExprKind::Constant {
|
||||
node: ExprConstant {
|
||||
value: BigInt::from(4).into(),
|
||||
kind: None,
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
},
|
||||
Located {
|
||||
location: start,
|
||||
end_location: end,
|
||||
custom,
|
||||
node: ExprKind::Constant {
|
||||
node: ExprConstant {
|
||||
value: BigInt::from(5).into(),
|
||||
kind: None,
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
};
|
||||
let new_ast = ConstantOptimizer::new()
|
||||
.fold_expr(ast)
|
||||
|
@ -221,7 +228,7 @@ mod tests {
|
|||
location: start,
|
||||
end_location: end,
|
||||
custom,
|
||||
node: ExprKind::Constant {
|
||||
node: ExprConstant {
|
||||
value: Constant::Tuple(vec![
|
||||
BigInt::from(1).into(),
|
||||
BigInt::from(2).into(),
|
||||
|
@ -232,7 +239,8 @@ mod tests {
|
|||
])
|
||||
]),
|
||||
kind: None
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ impl<U> ExprKind<U> {
|
|||
ExprKind::Compare { .. } => "comparison",
|
||||
ExprKind::Attribute { .. } => "attribute",
|
||||
ExprKind::Call { .. } => "function call",
|
||||
ExprKind::Constant { value, .. } => match value {
|
||||
ExprKind::Constant(crate::ExprConstant { value, .. }) => match value {
|
||||
Constant::Str(_)
|
||||
| Constant::Int(_)
|
||||
| Constant::Float(_)
|
||||
|
@ -40,7 +40,7 @@ impl<U> ExprKind<U> {
|
|||
ExprKind::GeneratorExp { .. } => "generator expression",
|
||||
ExprKind::Starred { .. } => "starred",
|
||||
ExprKind::Slice { .. } => "slice",
|
||||
ExprKind::JoinedStr { values } => {
|
||||
ExprKind::JoinedStr(crate::ExprJoinedStr { values }) => {
|
||||
if values
|
||||
.iter()
|
||||
.any(|e| matches!(e.node, ExprKind::JoinedStr { .. }))
|
||||
|
|
|
@ -71,7 +71,7 @@ impl<'a> Unparser<'a> {
|
|||
}};
|
||||
}
|
||||
match &ast.node {
|
||||
ExprKind::BoolOp { op, values } => {
|
||||
ExprKind::BoolOp(crate::ExprBoolOp { op, values }) => {
|
||||
let (op, prec) = op_prec!(bin, op, Boolop, And("and", AND), Or("or", OR));
|
||||
group_if!(prec, {
|
||||
let mut first = true;
|
||||
|
@ -81,14 +81,14 @@ impl<'a> Unparser<'a> {
|
|||
}
|
||||
})
|
||||
}
|
||||
ExprKind::NamedExpr { target, value } => {
|
||||
ExprKind::NamedExpr(crate::ExprNamedExpr { target, value }) => {
|
||||
group_if!(precedence::TUPLE, {
|
||||
self.unparse_expr(target, precedence::ATOM)?;
|
||||
self.p(" := ")?;
|
||||
self.unparse_expr(value, precedence::ATOM)?;
|
||||
})
|
||||
}
|
||||
ExprKind::BinOp { left, op, right } => {
|
||||
ExprKind::BinOp(crate::ExprBinOp { left, op, right }) => {
|
||||
let right_associative = matches!(op, Operator::Pow);
|
||||
let (op, prec) = op_prec!(
|
||||
bin,
|
||||
|
@ -114,7 +114,7 @@ impl<'a> Unparser<'a> {
|
|||
self.unparse_expr(right, prec + !right_associative as u8)?;
|
||||
})
|
||||
}
|
||||
ExprKind::UnaryOp { op, operand } => {
|
||||
ExprKind::UnaryOp(crate::ExprUnaryOp { op, operand }) => {
|
||||
let (op, prec) = op_prec!(
|
||||
un,
|
||||
op,
|
||||
|
@ -129,7 +129,7 @@ impl<'a> Unparser<'a> {
|
|||
self.unparse_expr(operand, prec)?;
|
||||
})
|
||||
}
|
||||
ExprKind::Lambda { args, body } => {
|
||||
ExprKind::Lambda(crate::ExprLambda { args, body }) => {
|
||||
group_if!(precedence::TEST, {
|
||||
let pos = args.args.len() + args.posonlyargs.len();
|
||||
self.p(if pos > 0 { "lambda " } else { "lambda" })?;
|
||||
|
@ -137,7 +137,7 @@ impl<'a> Unparser<'a> {
|
|||
write!(self, ": {}", **body)?;
|
||||
})
|
||||
}
|
||||
ExprKind::IfExp { test, body, orelse } => {
|
||||
ExprKind::IfExp(crate::ExprIfExp { test, body, orelse }) => {
|
||||
group_if!(precedence::TEST, {
|
||||
self.unparse_expr(body, precedence::TEST + 1)?;
|
||||
self.p(" if ")?;
|
||||
|
@ -146,7 +146,7 @@ impl<'a> Unparser<'a> {
|
|||
self.unparse_expr(orelse, precedence::TEST)?;
|
||||
})
|
||||
}
|
||||
ExprKind::Dict { keys, values } => {
|
||||
ExprKind::Dict(crate::ExprDict { keys, values }) => {
|
||||
self.p("{")?;
|
||||
let mut first = true;
|
||||
let (packed, unpacked) = values.split_at(keys.len());
|
||||
|
@ -164,7 +164,7 @@ impl<'a> Unparser<'a> {
|
|||
}
|
||||
self.p("}")?;
|
||||
}
|
||||
ExprKind::Set { elts } => {
|
||||
ExprKind::Set(crate::ExprSet { elts }) => {
|
||||
self.p("{")?;
|
||||
let mut first = true;
|
||||
for v in elts {
|
||||
|
@ -173,23 +173,23 @@ impl<'a> Unparser<'a> {
|
|||
}
|
||||
self.p("}")?;
|
||||
}
|
||||
ExprKind::ListComp { elt, generators } => {
|
||||
ExprKind::ListComp(crate::ExprListComp { elt, generators }) => {
|
||||
self.p("[")?;
|
||||
self.unparse_expr(elt, precedence::TEST)?;
|
||||
self.unparse_comp(generators)?;
|
||||
self.p("]")?;
|
||||
}
|
||||
ExprKind::SetComp { elt, generators } => {
|
||||
ExprKind::SetComp(crate::ExprSetComp { elt, generators }) => {
|
||||
self.p("{")?;
|
||||
self.unparse_expr(elt, precedence::TEST)?;
|
||||
self.unparse_comp(generators)?;
|
||||
self.p("}")?;
|
||||
}
|
||||
ExprKind::DictComp {
|
||||
ExprKind::DictComp(crate::ExprDictComp {
|
||||
key,
|
||||
value,
|
||||
generators,
|
||||
} => {
|
||||
}) => {
|
||||
self.p("{")?;
|
||||
self.unparse_expr(key, precedence::TEST)?;
|
||||
self.p(": ")?;
|
||||
|
@ -197,33 +197,33 @@ impl<'a> Unparser<'a> {
|
|||
self.unparse_comp(generators)?;
|
||||
self.p("}")?;
|
||||
}
|
||||
ExprKind::GeneratorExp { elt, generators } => {
|
||||
ExprKind::GeneratorExp(crate::ExprGeneratorExp { elt, generators }) => {
|
||||
self.p("(")?;
|
||||
self.unparse_expr(elt, precedence::TEST)?;
|
||||
self.unparse_comp(generators)?;
|
||||
self.p(")")?;
|
||||
}
|
||||
ExprKind::Await { value } => {
|
||||
ExprKind::Await(crate::ExprAwait { value }) => {
|
||||
group_if!(precedence::AWAIT, {
|
||||
self.p("await ")?;
|
||||
self.unparse_expr(value, precedence::ATOM)?;
|
||||
})
|
||||
}
|
||||
ExprKind::Yield { value } => {
|
||||
ExprKind::Yield(crate::ExprYield { value }) => {
|
||||
if let Some(value) = value {
|
||||
write!(self, "(yield {})", **value)?;
|
||||
} else {
|
||||
self.p("(yield)")?;
|
||||
}
|
||||
}
|
||||
ExprKind::YieldFrom { value } => {
|
||||
ExprKind::YieldFrom(crate::ExprYieldFrom { value }) => {
|
||||
write!(self, "(yield from {})", **value)?;
|
||||
}
|
||||
ExprKind::Compare {
|
||||
ExprKind::Compare(crate::ExprCompare {
|
||||
left,
|
||||
ops,
|
||||
comparators,
|
||||
} => {
|
||||
}) => {
|
||||
group_if!(precedence::CMP, {
|
||||
let new_lvl = precedence::CMP + 1;
|
||||
self.unparse_expr(left, new_lvl)?;
|
||||
|
@ -245,16 +245,16 @@ impl<'a> Unparser<'a> {
|
|||
}
|
||||
})
|
||||
}
|
||||
ExprKind::Call {
|
||||
ExprKind::Call(crate::ExprCall {
|
||||
func,
|
||||
args,
|
||||
keywords,
|
||||
} => {
|
||||
}) => {
|
||||
self.unparse_expr(func, precedence::ATOM)?;
|
||||
self.p("(")?;
|
||||
if let (
|
||||
[Expr {
|
||||
node: ExprKind::GeneratorExp { elt, generators },
|
||||
node: ExprKind::GeneratorExp(crate::ExprGeneratorExp { elt, generators }),
|
||||
..
|
||||
}],
|
||||
[],
|
||||
|
@ -282,13 +282,15 @@ impl<'a> Unparser<'a> {
|
|||
}
|
||||
self.p(")")?;
|
||||
}
|
||||
ExprKind::FormattedValue {
|
||||
ExprKind::FormattedValue(crate::ExprFormattedValue {
|
||||
value,
|
||||
conversion,
|
||||
format_spec,
|
||||
} => self.unparse_formatted(value, *conversion, format_spec.as_deref())?,
|
||||
ExprKind::JoinedStr { values } => self.unparse_joined_str(values, false)?,
|
||||
ExprKind::Constant { value, kind } => {
|
||||
}) => self.unparse_formatted(value, *conversion, format_spec.as_deref())?,
|
||||
ExprKind::JoinedStr(crate::ExprJoinedStr { values }) => {
|
||||
self.unparse_joined_str(values, false)?
|
||||
}
|
||||
ExprKind::Constant(crate::ExprConstant { value, kind }) => {
|
||||
if let Some(kind) = kind {
|
||||
self.p(kind)?;
|
||||
}
|
||||
|
@ -304,12 +306,12 @@ impl<'a> Unparser<'a> {
|
|||
_ => fmt::Display::fmt(value, &mut self.f)?,
|
||||
}
|
||||
}
|
||||
ExprKind::Attribute { value, attr, .. } => {
|
||||
ExprKind::Attribute(crate::ExprAttribute { value, attr, .. }) => {
|
||||
self.unparse_expr(value, precedence::ATOM)?;
|
||||
let period = if let ExprKind::Constant {
|
||||
let period = if let ExprKind::Constant(crate::ExprConstant {
|
||||
value: Constant::Int(_),
|
||||
..
|
||||
} = &value.node
|
||||
}) = &value.node
|
||||
{
|
||||
" ."
|
||||
} else {
|
||||
|
@ -318,10 +320,10 @@ impl<'a> Unparser<'a> {
|
|||
self.p(period)?;
|
||||
self.p(attr)?;
|
||||
}
|
||||
ExprKind::Subscript { value, slice, .. } => {
|
||||
ExprKind::Subscript(crate::ExprSubscript { value, slice, .. }) => {
|
||||
self.unparse_expr(value, precedence::ATOM)?;
|
||||
let mut lvl = precedence::TUPLE;
|
||||
if let ExprKind::Tuple { elts, .. } = &slice.node {
|
||||
if let ExprKind::Tuple(crate::ExprTuple { elts, .. }) = &slice.node {
|
||||
if elts
|
||||
.iter()
|
||||
.any(|expr| matches!(expr.node, ExprKind::Starred { .. }))
|
||||
|
@ -333,12 +335,12 @@ impl<'a> Unparser<'a> {
|
|||
self.unparse_expr(slice, lvl)?;
|
||||
self.p("]")?;
|
||||
}
|
||||
ExprKind::Starred { value, .. } => {
|
||||
ExprKind::Starred(crate::ExprStarred { value, .. }) => {
|
||||
self.p("*")?;
|
||||
self.unparse_expr(value, precedence::EXPR)?;
|
||||
}
|
||||
ExprKind::Name { id, .. } => self.p(id)?,
|
||||
ExprKind::List { elts, .. } => {
|
||||
ExprKind::Name(crate::ExprName { id, .. }) => self.p(id)?,
|
||||
ExprKind::List(crate::ExprList { elts, .. }) => {
|
||||
self.p("[")?;
|
||||
let mut first = true;
|
||||
for elt in elts {
|
||||
|
@ -347,7 +349,7 @@ impl<'a> Unparser<'a> {
|
|||
}
|
||||
self.p("]")?;
|
||||
}
|
||||
ExprKind::Tuple { elts, .. } => {
|
||||
ExprKind::Tuple(crate::ExprTuple { elts, .. }) => {
|
||||
if elts.is_empty() {
|
||||
self.p("()")?;
|
||||
} else {
|
||||
|
@ -361,7 +363,7 @@ impl<'a> Unparser<'a> {
|
|||
})
|
||||
}
|
||||
}
|
||||
ExprKind::Slice { lower, upper, step } => {
|
||||
ExprKind::Slice(crate::ExprSlice { lower, upper, step }) => {
|
||||
if let Some(lower) = lower {
|
||||
self.unparse_expr(lower, precedence::TEST)?;
|
||||
}
|
||||
|
@ -483,19 +485,21 @@ impl<'a> Unparser<'a> {
|
|||
|
||||
fn unparse_fstring_elem<U>(&mut self, expr: &Expr<U>, is_spec: bool) -> fmt::Result {
|
||||
match &expr.node {
|
||||
ExprKind::Constant { value, .. } => {
|
||||
ExprKind::Constant(crate::ExprConstant { value, .. }) => {
|
||||
if let Constant::Str(s) = value {
|
||||
self.unparse_fstring_str(s)
|
||||
} else {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
ExprKind::JoinedStr { values } => self.unparse_joined_str(values, is_spec),
|
||||
ExprKind::FormattedValue {
|
||||
ExprKind::JoinedStr(crate::ExprJoinedStr { values }) => {
|
||||
self.unparse_joined_str(values, is_spec)
|
||||
}
|
||||
ExprKind::FormattedValue(crate::ExprFormattedValue {
|
||||
value,
|
||||
conversion,
|
||||
format_spec,
|
||||
} => self.unparse_formatted(value, *conversion, format_spec.as_deref()),
|
||||
}) => self.unparse_formatted(value, *conversion, format_spec.as_deref()),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,44 +1,47 @@
|
|||
use rustpython_ast::{Expr, ExprContext, ExprKind};
|
||||
use crate::ast::{self, Expr, ExprContext, ExprKind};
|
||||
|
||||
pub(crate) fn set_context(expr: Expr, ctx: ExprContext) -> Expr {
|
||||
match expr.node {
|
||||
ExprKind::Name { id, .. } => Expr {
|
||||
node: ExprKind::Name { id, ctx },
|
||||
ExprKind::Name(ast::ExprName { id, .. }) => Expr {
|
||||
node: ast::ExprName { id, ctx }.into(),
|
||||
..expr
|
||||
},
|
||||
ExprKind::Tuple { elts, .. } => Expr {
|
||||
node: ExprKind::Tuple {
|
||||
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 { elts, .. } => Expr {
|
||||
node: ExprKind::List {
|
||||
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 { value, attr, .. } => Expr {
|
||||
node: ExprKind::Attribute { value, attr, ctx },
|
||||
ExprKind::Attribute(ast::ExprAttribute { value, attr, .. }) => Expr {
|
||||
node: ast::ExprAttribute { value, attr, ctx }.into(),
|
||||
..expr
|
||||
},
|
||||
ExprKind::Subscript { value, slice, .. } => Expr {
|
||||
node: ExprKind::Subscript { value, slice, ctx },
|
||||
ExprKind::Subscript(ast::ExprSubscript { value, slice, .. }) => Expr {
|
||||
node: ast::ExprSubscript { value, slice, ctx }.into(),
|
||||
..expr
|
||||
},
|
||||
ExprKind::Starred { value, .. } => Expr {
|
||||
node: ExprKind::Starred {
|
||||
ExprKind::Starred(ast::ExprStarred { value, .. }) => Expr {
|
||||
node: ast::ExprStarred {
|
||||
value: Box::new(set_context(*value, ctx.clone())),
|
||||
ctx,
|
||||
},
|
||||
}
|
||||
.into(),
|
||||
..expr
|
||||
},
|
||||
_ => expr,
|
||||
|
|
|
@ -46,7 +46,7 @@ pub(super) use lalrpop_util::ParseError as LalrpopError;
|
|||
/// ```
|
||||
pub fn parse_program(source: &str, source_path: &str) -> Result<ast::Suite, ParseError> {
|
||||
parse(source, Mode::Module, source_path).map(|top| match top {
|
||||
ast::Mod::Module { body, .. } => body,
|
||||
ast::Mod::Module(ast::ModModule { body, .. }) => body,
|
||||
_ => unreachable!(),
|
||||
})
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ pub fn parse_expression_located(
|
|||
location: Location,
|
||||
) -> Result<ast::Expr, ParseError> {
|
||||
parse_located(source, Mode::Expression, path, location).map(|top| match top {
|
||||
ast::Mod::Expression { body } => *body,
|
||||
ast::Mod::Expression(ast::ModExpression { body }) => *body,
|
||||
_ => unreachable!(),
|
||||
})
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
422
parser/src/python.rs
generated
422
parser/src/python.rs
generated
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: AnnAssign {
|
||||
node: AnnAssign(
|
||||
StmtAnnAssign {
|
||||
target: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
annotation: Located {
|
||||
location: Location {
|
||||
|
@ -45,10 +48,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "int",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
value: Some(
|
||||
Located {
|
||||
|
@ -63,15 +68,18 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
simple: 1,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -42,14 +44,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -64,7 +69,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -78,12 +84,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -97,12 +105,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -116,18 +126,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: For {
|
||||
node: For(
|
||||
StmtFor {
|
||||
target: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -45,7 +48,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -59,12 +63,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -78,12 +84,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -97,16 +105,19 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Located {
|
||||
|
@ -127,5 +138,6 @@ expression: parse_ast
|
|||
orelse: [],
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: List {
|
||||
node: List(
|
||||
ExprList {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -43,10 +45,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -60,14 +64,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -82,7 +89,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -96,12 +104,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -115,12 +125,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -134,18 +146,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,10 +30,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ListComp {
|
||||
node: ListComp(
|
||||
ExprListComp {
|
||||
elt: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -60,10 +64,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -79,10 +85,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -96,7 +104,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -110,12 +119,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -129,12 +140,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -148,24 +161,29 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,10 +30,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -61,12 +65,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -80,12 +86,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -99,18 +107,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: If {
|
||||
node: If(
|
||||
StmtIf {
|
||||
test: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: NamedExpr {
|
||||
node: NamedExpr(
|
||||
ExprNamedExpr {
|
||||
target: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
value: Located {
|
||||
location: Location {
|
||||
|
@ -58,14 +62,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Located {
|
||||
|
@ -85,5 +92,6 @@ expression: parse_ast
|
|||
],
|
||||
orelse: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,10 +30,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: SetComp {
|
||||
node: SetComp(
|
||||
ExprSetComp {
|
||||
elt: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -60,10 +64,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -79,10 +85,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -96,7 +104,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -110,12 +119,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -129,12 +140,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -148,24 +161,29 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -43,10 +45,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -60,7 +64,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -73,17 +78,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -98,7 +107,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -112,12 +122,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -131,12 +143,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -150,18 +164,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -42,10 +44,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -59,13 +63,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -80,7 +87,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -94,12 +102,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -113,12 +123,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -132,18 +144,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -43,10 +45,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -60,14 +64,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -82,7 +89,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -96,12 +104,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -115,12 +125,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -134,18 +146,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: With {
|
||||
node: With(
|
||||
StmtWith {
|
||||
items: [
|
||||
Withitem {
|
||||
context_expr: Located {
|
||||
|
@ -30,12 +31,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
optional_vars: Some(
|
||||
Located {
|
||||
|
@ -50,10 +53,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
|
@ -76,5 +81,6 @@ expression: parse_ast
|
|||
],
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: AugAssign {
|
||||
node: AugAssign(
|
||||
StmtAugAssign {
|
||||
target: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -41,14 +43,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Add,
|
||||
value: Located {
|
||||
|
@ -63,7 +68,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -77,12 +83,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -96,12 +104,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -115,17 +125,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: AugAssign {
|
||||
node: AugAssign(
|
||||
StmtAugAssign {
|
||||
target: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Add,
|
||||
value: Located {
|
||||
|
@ -46,13 +49,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: AugAssign {
|
||||
node: AugAssign(
|
||||
StmtAugAssign {
|
||||
target: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -58,13 +62,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Add,
|
||||
value: Located {
|
||||
|
@ -79,7 +86,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -93,12 +101,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -112,12 +122,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -131,17 +143,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Delete {
|
||||
node: Delete(
|
||||
StmtDelete {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -42,16 +44,20 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: "y",
|
||||
ctx: Del,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Delete {
|
||||
node: Delete(
|
||||
StmtDelete {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,12 +30,15 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Del,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
source: parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Delete {
|
||||
node: Delete(
|
||||
StmtDelete {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -42,10 +44,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -59,15 +63,19 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Del,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -102,6 +103,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -91,12 +92,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -110,12 +113,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: None,
|
||||
|
@ -141,6 +146,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -47,6 +48,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -157,6 +158,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -146,12 +147,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -165,12 +168,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: None,
|
||||
|
@ -196,6 +201,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -165,12 +166,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -184,12 +187,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: None,
|
||||
|
@ -215,6 +220,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -165,12 +166,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -184,12 +187,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: Some(
|
||||
|
@ -234,6 +239,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -102,6 +103,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "f",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -93,12 +94,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -112,12 +115,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -141,6 +146,7 @@ Ok(
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -29,7 +30,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Lambda {
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
|
@ -106,16 +108,20 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -29,7 +30,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Lambda {
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
|
@ -103,12 +105,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -122,12 +126,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
kwarg: None,
|
||||
|
@ -145,16 +151,20 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -29,7 +30,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Lambda {
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [],
|
||||
|
@ -51,16 +53,20 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -29,7 +30,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Lambda {
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
|
@ -143,16 +145,20 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -29,7 +30,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Lambda {
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
|
@ -106,16 +108,20 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/function.rs
|
||||
source: parser/src/function.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Ok(
|
||||
|
@ -16,7 +16,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -29,7 +30,8 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Lambda {
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
|
@ -105,12 +107,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -124,12 +128,14 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -145,16 +151,20 @@ Ok(
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Dict {
|
||||
node: Dict(
|
||||
ExprDict {
|
||||
keys: [
|
||||
Some(
|
||||
Located {
|
||||
|
@ -29,12 +30,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"a",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
None,
|
||||
|
@ -51,12 +54,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
|
@ -73,12 +78,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"b",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -92,10 +99,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "c",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -109,13 +118,16 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"e",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -27,7 +28,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -40,16 +42,19 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: "join",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -64,7 +69,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: GeneratorExp {
|
||||
node: GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
elt: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -77,10 +83,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "sql",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -96,10 +104,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "sql",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -113,7 +123,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -127,7 +138,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: IfExp {
|
||||
node: IfExp(
|
||||
ExprIfExp {
|
||||
test: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -140,10 +152,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "limit",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: Located {
|
||||
location: Location {
|
||||
|
@ -157,7 +171,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: BinOp {
|
||||
node: BinOp(
|
||||
ExprBinOp {
|
||||
left: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -170,12 +185,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"LIMIT %d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Mod,
|
||||
right: Located {
|
||||
|
@ -190,12 +207,15 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "limit",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
orelse: Located {
|
||||
location: Location {
|
||||
|
@ -209,12 +229,15 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: None,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -228,7 +251,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: IfExp {
|
||||
node: IfExp(
|
||||
ExprIfExp {
|
||||
test: Located {
|
||||
location: Location {
|
||||
row: 5,
|
||||
|
@ -241,10 +265,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "offset",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: Located {
|
||||
location: Location {
|
||||
|
@ -258,7 +284,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: BinOp {
|
||||
node: BinOp(
|
||||
ExprBinOp {
|
||||
left: Located {
|
||||
location: Location {
|
||||
row: 5,
|
||||
|
@ -271,12 +298,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"OFFSET %d",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Mod,
|
||||
right: Located {
|
||||
|
@ -291,12 +320,15 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "offset",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
orelse: Located {
|
||||
location: Location {
|
||||
|
@ -310,24 +342,30 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: None,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Match {
|
||||
node: Match(
|
||||
StmtMatch {
|
||||
subject: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Dict {
|
||||
node: Dict(
|
||||
ExprDict {
|
||||
keys: [
|
||||
Some(
|
||||
Located {
|
||||
|
@ -43,12 +45,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"test",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
|
@ -65,15 +69,18 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
cases: [
|
||||
MatchCase {
|
||||
|
@ -89,13 +96,15 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchMapping {
|
||||
node: MatchMapping(
|
||||
PatternMatchMapping {
|
||||
keys: [],
|
||||
patterns: [],
|
||||
rest: Some(
|
||||
"rest",
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
guard: None,
|
||||
body: [
|
||||
|
@ -111,7 +120,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 6,
|
||||
|
@ -124,7 +134,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 6,
|
||||
|
@ -137,10 +148,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "print",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -155,21 +168,26 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "rest",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -183,7 +201,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Match {
|
||||
node: Match(
|
||||
StmtMatch {
|
||||
subject: Located {
|
||||
location: Location {
|
||||
row: 7,
|
||||
|
@ -196,7 +215,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Dict {
|
||||
node: Dict(
|
||||
ExprDict {
|
||||
keys: [
|
||||
Some(
|
||||
Located {
|
||||
|
@ -211,12 +231,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"label",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
],
|
||||
|
@ -233,15 +255,18 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"test",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
cases: [
|
||||
MatchCase {
|
||||
|
@ -257,7 +282,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchMapping {
|
||||
node: MatchMapping(
|
||||
PatternMatchMapping {
|
||||
keys: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -271,12 +297,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"label",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
patterns: [
|
||||
|
@ -292,7 +320,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchAs {
|
||||
node: MatchAs(
|
||||
PatternMatchAs {
|
||||
pattern: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -306,7 +335,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchOr {
|
||||
node: MatchOr(
|
||||
PatternMatchOr {
|
||||
patterns: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -320,7 +350,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchClass {
|
||||
node: MatchClass(
|
||||
PatternMatchClass {
|
||||
cls: Located {
|
||||
location: Location {
|
||||
row: 9,
|
||||
|
@ -333,15 +364,18 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "str",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
patterns: [],
|
||||
kwd_attrs: [],
|
||||
kwd_patterns: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -355,22 +389,27 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchSingleton {
|
||||
node: MatchSingleton(
|
||||
PatternMatchSingleton {
|
||||
value: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
"label",
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
rest: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
guard: None,
|
||||
body: [
|
||||
|
@ -386,7 +425,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 11,
|
||||
|
@ -399,7 +439,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 11,
|
||||
|
@ -412,10 +453,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "print",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -430,21 +473,26 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "label",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -458,7 +506,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Match {
|
||||
node: Match(
|
||||
StmtMatch {
|
||||
subject: Located {
|
||||
location: Location {
|
||||
row: 12,
|
||||
|
@ -471,10 +520,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
cases: [
|
||||
MatchCase {
|
||||
|
@ -490,7 +541,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchSequence {
|
||||
node: MatchSequence(
|
||||
PatternMatchSequence {
|
||||
patterns: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -504,7 +556,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchValue {
|
||||
node: MatchValue(
|
||||
PatternMatchValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 13,
|
||||
|
@ -517,14 +570,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -538,7 +594,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchValue {
|
||||
node: MatchValue(
|
||||
PatternMatchValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 13,
|
||||
|
@ -551,17 +608,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
guard: None,
|
||||
body: [
|
||||
|
@ -577,7 +638,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -591,10 +653,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -609,20 +673,24 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -636,7 +704,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Match {
|
||||
node: Match(
|
||||
StmtMatch {
|
||||
subject: Located {
|
||||
location: Location {
|
||||
row: 15,
|
||||
|
@ -649,10 +718,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
cases: [
|
||||
MatchCase {
|
||||
|
@ -668,7 +739,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchSequence {
|
||||
node: MatchSequence(
|
||||
PatternMatchSequence {
|
||||
patterns: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -682,7 +754,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchValue {
|
||||
node: MatchValue(
|
||||
PatternMatchValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 16,
|
||||
|
@ -695,14 +768,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -716,7 +792,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchValue {
|
||||
node: MatchValue(
|
||||
PatternMatchValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 16,
|
||||
|
@ -729,17 +806,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
guard: None,
|
||||
body: [
|
||||
|
@ -755,7 +836,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -769,10 +851,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -787,20 +871,24 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -814,7 +902,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Match {
|
||||
node: Match(
|
||||
StmtMatch {
|
||||
subject: Located {
|
||||
location: Location {
|
||||
row: 18,
|
||||
|
@ -827,10 +916,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
cases: [
|
||||
MatchCase {
|
||||
|
@ -846,7 +937,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchSequence {
|
||||
node: MatchSequence(
|
||||
PatternMatchSequence {
|
||||
patterns: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -860,7 +952,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: MatchValue {
|
||||
node: MatchValue(
|
||||
PatternMatchValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 19,
|
||||
|
@ -873,17 +966,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
guard: None,
|
||||
body: [
|
||||
|
@ -899,7 +996,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -913,10 +1011,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -931,19 +1031,23 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: BoolOp {
|
||||
node: BoolOp(
|
||||
ExprBoolOp {
|
||||
op: And,
|
||||
values: [
|
||||
Located {
|
||||
|
@ -29,10 +30,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -46,11 +49,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: BoolOp {
|
||||
node: BoolOp(
|
||||
ExprBoolOp {
|
||||
op: Or,
|
||||
values: [
|
||||
Located {
|
||||
|
@ -29,10 +30,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -46,11 +49,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ClassDef {
|
||||
node: ClassDef(
|
||||
StmtClassDef {
|
||||
name: "Foo",
|
||||
bases: [
|
||||
Located {
|
||||
|
@ -30,10 +31,12 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "A",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -47,10 +50,12 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "B",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
|
@ -67,7 +72,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "__init__",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -117,6 +123,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -130,7 +137,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "method_with_default",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -189,12 +197,14 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"default",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -218,9 +228,11 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
returns: None,
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: DictComp {
|
||||
node: DictComp(
|
||||
ExprDictComp {
|
||||
key: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -27,10 +28,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x1",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
value: Located {
|
||||
location: Location {
|
||||
|
@ -44,10 +47,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x2",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -63,10 +68,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -80,14 +87,17 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "z",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ListComp {
|
||||
node: ListComp(
|
||||
ExprListComp {
|
||||
elt: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -27,10 +28,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -46,7 +49,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -60,10 +64,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -77,14 +83,17 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y2",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -98,10 +107,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "z",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
|
@ -119,10 +130,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "a",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -136,10 +149,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "b",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [
|
||||
Located {
|
||||
|
@ -154,7 +169,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Compare {
|
||||
node: Compare(
|
||||
ExprCompare {
|
||||
left: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -167,10 +183,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "a",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ops: [
|
||||
Lt,
|
||||
|
@ -188,15 +206,18 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -210,7 +231,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Compare {
|
||||
node: Compare(
|
||||
ExprCompare {
|
||||
left: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -223,10 +245,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "a",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ops: [
|
||||
Gt,
|
||||
|
@ -244,19 +268,23 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
10,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -42,16 +44,20 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: GeneratorExp {
|
||||
node: GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
elt: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -27,10 +28,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -46,10 +49,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -63,14 +68,17 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "z",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: If {
|
||||
node: If(
|
||||
StmtIf {
|
||||
test: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,12 +29,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Located {
|
||||
|
@ -48,7 +51,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -61,14 +65,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
10,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
orelse: [
|
||||
|
@ -84,7 +91,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: If {
|
||||
node: If(
|
||||
StmtIf {
|
||||
test: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -97,12 +105,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: [
|
||||
Located {
|
||||
|
@ -117,7 +127,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -130,14 +141,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
20,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
orelse: [
|
||||
|
@ -153,7 +167,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -166,19 +181,24 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
30,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: GeneratorExp {
|
||||
node: GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
elt: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -27,7 +28,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: IfExp {
|
||||
node: IfExp(
|
||||
ExprIfExp {
|
||||
test: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -40,10 +42,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
body: Located {
|
||||
location: Location {
|
||||
|
@ -57,10 +61,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
orelse: Located {
|
||||
location: Location {
|
||||
|
@ -74,12 +80,15 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -95,10 +104,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -112,14 +123,17 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "z",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "my_func",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -59,12 +63,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"positional",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [
|
||||
|
@ -96,18 +102,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Lambda {
|
||||
node: Lambda(
|
||||
ExprLambda {
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
args: [
|
||||
|
@ -87,7 +89,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: BinOp {
|
||||
node: BinOp(
|
||||
ExprBinOp {
|
||||
left: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -100,10 +103,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Mult,
|
||||
right: Located {
|
||||
|
@ -118,15 +123,20 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ListComp {
|
||||
node: ListComp(
|
||||
ExprListComp {
|
||||
elt: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -27,10 +28,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -46,10 +49,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -63,14 +68,17 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "z",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: GeneratorExp {
|
||||
node: GeneratorExp(
|
||||
ExprGeneratorExp {
|
||||
elt: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -27,7 +28,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: NamedExpr {
|
||||
node: NamedExpr(
|
||||
ExprNamedExpr {
|
||||
target: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -40,10 +42,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
value: Located {
|
||||
location: Location {
|
||||
|
@ -57,7 +61,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: BinOp {
|
||||
node: BinOp(
|
||||
ExprBinOp {
|
||||
left: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -70,10 +75,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
op: Add,
|
||||
right: Located {
|
||||
|
@ -88,16 +95,20 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
generators: [
|
||||
Comprehension {
|
||||
|
@ -113,10 +124,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "y",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
iter: Located {
|
||||
location: Location {
|
||||
|
@ -130,14 +143,17 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "z",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ifs: [],
|
||||
is_async: 0,
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "print",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -59,12 +63,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -78,17 +84,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "print",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -59,17 +63,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -43,10 +45,12 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "a",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -60,14 +64,17 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "b",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -82,7 +89,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -96,12 +104,14 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
4,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -115,18 +125,22 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
Located {
|
||||
|
@ -14,7 +14,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -27,10 +28,12 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -44,7 +47,8 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Slice {
|
||||
node: Slice(
|
||||
ExprSlice {
|
||||
lower: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -58,12 +62,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
upper: Some(
|
||||
|
@ -79,12 +85,14 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
step: Some(
|
||||
|
@ -100,16 +108,20 @@ Located {
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,10 +30,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "array_slice",
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -60,10 +64,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "array",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -77,7 +83,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -91,12 +98,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -110,7 +119,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -123,13 +133,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "indexes",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -143,7 +156,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: UnaryOp {
|
||||
node: UnaryOp(
|
||||
ExprUnaryOp {
|
||||
op: USub,
|
||||
operand: Located {
|
||||
location: Location {
|
||||
|
@ -157,24 +171,30 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -188,7 +208,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -202,7 +223,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -215,10 +237,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "array",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -232,7 +256,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -246,12 +271,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
0,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -265,7 +292,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -278,13 +306,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "indexes",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -298,7 +329,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: UnaryOp {
|
||||
node: UnaryOp(
|
||||
ExprUnaryOp {
|
||||
op: USub,
|
||||
operand: Located {
|
||||
location: Location {
|
||||
|
@ -312,21 +344,26 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Store,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
|
@ -341,13 +378,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "array_slice",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -361,7 +401,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -374,7 +415,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -387,10 +429,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "array",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -404,7 +448,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -418,7 +463,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -431,13 +477,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "indexes_to_select",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -451,7 +500,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -464,22 +514,28 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "indexes_to_select",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -493,7 +549,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -506,7 +563,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -519,10 +577,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "array",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -536,7 +596,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -550,7 +611,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Slice {
|
||||
node: Slice(
|
||||
ExprSlice {
|
||||
lower: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -564,12 +626,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
upper: Some(
|
||||
|
@ -585,16 +649,19 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
5,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
step: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -608,7 +675,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -621,21 +689,27 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "indexes_to_select",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Try {
|
||||
node: Try(
|
||||
StmtTry {
|
||||
body: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Raise {
|
||||
node: Raise(
|
||||
StmtRaise {
|
||||
exc: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -43,7 +45,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -56,10 +59,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "ValueError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -74,20 +79,24 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
cause: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
handlers: [
|
||||
|
@ -103,7 +112,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ExceptHandler {
|
||||
node: ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
type_: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -117,10 +127,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "TypeError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
|
@ -139,7 +151,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -152,7 +165,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -165,10 +179,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "print",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -183,7 +199,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -197,12 +214,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -216,7 +235,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -229,7 +249,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 4,
|
||||
|
@ -242,10 +263,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "type",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -260,30 +283,38 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "e",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -297,7 +328,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ExceptHandler {
|
||||
node: ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
type_: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -311,10 +343,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "OSError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
|
@ -333,7 +367,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 6,
|
||||
|
@ -346,7 +381,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 6,
|
||||
|
@ -359,10 +395,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "print",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -377,7 +415,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -391,12 +430,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -410,7 +451,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 6,
|
||||
|
@ -423,7 +465,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 6,
|
||||
|
@ -436,10 +479,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "type",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -454,34 +499,43 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "e",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
orelse: [],
|
||||
finalbody: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: TryStar {
|
||||
node: TryStar(
|
||||
StmtTryStar {
|
||||
body: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Raise {
|
||||
node: Raise(
|
||||
StmtRaise {
|
||||
exc: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -43,7 +45,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -56,10 +59,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "ExceptionGroup",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -74,12 +79,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"eg",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -93,7 +100,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: List {
|
||||
node: List(
|
||||
ExprList {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -107,7 +115,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -120,10 +129,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "ValueError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -138,16 +149,19 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -161,7 +175,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -174,10 +189,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "TypeError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -192,16 +209,19 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -215,7 +235,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -228,10 +249,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "OSError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -246,16 +269,19 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -269,7 +295,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 3,
|
||||
|
@ -282,10 +309,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "OSError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -300,28 +329,34 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
4,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
cause: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
handlers: [
|
||||
|
@ -337,7 +372,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ExceptHandler {
|
||||
node: ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
type_: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -351,10 +387,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "TypeError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
|
@ -373,7 +411,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 5,
|
||||
|
@ -386,7 +425,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 5,
|
||||
|
@ -399,10 +439,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "print",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -417,7 +459,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -431,12 +474,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -450,7 +495,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 5,
|
||||
|
@ -463,7 +509,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 5,
|
||||
|
@ -476,10 +523,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "type",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -494,18 +543,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "e",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -519,12 +572,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" with nested ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -538,7 +593,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 5,
|
||||
|
@ -551,7 +607,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 5,
|
||||
|
@ -564,30 +621,38 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "e",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: "exceptions",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -601,7 +666,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: ExceptHandler {
|
||||
node: ExceptHandler(
|
||||
ExcepthandlerExceptHandler {
|
||||
type_: Some(
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -615,10 +681,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "OSError",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
name: Some(
|
||||
|
@ -637,7 +705,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 7,
|
||||
|
@ -650,7 +719,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 7,
|
||||
|
@ -663,10 +733,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "print",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -681,7 +753,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -695,12 +768,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"caught ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -714,7 +789,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 7,
|
||||
|
@ -727,7 +803,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Call {
|
||||
node: Call(
|
||||
ExprCall {
|
||||
func: Located {
|
||||
location: Location {
|
||||
row: 7,
|
||||
|
@ -740,10 +817,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "type",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
args: [
|
||||
Located {
|
||||
|
@ -758,18 +837,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "e",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -783,12 +866,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" with nested ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -802,7 +887,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 7,
|
||||
|
@ -815,7 +901,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Attribute {
|
||||
node: Attribute(
|
||||
ExprAttribute {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 7,
|
||||
|
@ -828,34 +915,43 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "e",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
attr: "exceptions",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
keywords: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
orelse: [],
|
||||
finalbody: [],
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/parser.rs
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FunctionDef {
|
||||
node: FunctionDef(
|
||||
StmtFunctionDef {
|
||||
name: "args_to_tuple",
|
||||
args: Arguments {
|
||||
posonlyargs: [],
|
||||
|
@ -48,7 +49,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -61,13 +63,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "Ts",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
|
@ -92,7 +97,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -105,12 +111,15 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Ellipsis,
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
decorator_list: [],
|
||||
|
@ -127,7 +136,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Subscript {
|
||||
node: Subscript(
|
||||
ExprSubscript {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -140,10 +150,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "Tuple",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
slice: Located {
|
||||
location: Location {
|
||||
|
@ -157,7 +169,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Starred {
|
||||
node: Starred(
|
||||
ExprStarred {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -170,19 +183,24 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "Ts",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
type_comment: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{8}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{7}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\r",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{89}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{7f}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Bytes(
|
||||
[
|
||||
0,
|
||||
|
@ -291,7 +293,9 @@ expression: parse_ast
|
|||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{1b}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Bytes(
|
||||
[
|
||||
111,
|
||||
|
@ -45,7 +47,9 @@ expression: parse_ast
|
|||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Bytes(
|
||||
[
|
||||
35,
|
||||
|
@ -40,7 +42,9 @@ expression: parse_ast
|
|||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{c}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\\",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -74,18 +79,23 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -74,18 +79,23 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\\\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -74,18 +79,23 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -53,7 +57,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -66,13 +71,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "user",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 114,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"mix ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -53,12 +57,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -72,7 +78,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -85,14 +92,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "user",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 114,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -106,12 +116,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" with text and ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -125,12 +137,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"second=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -144,12 +158,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -163,7 +179,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -176,13 +193,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "second",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 114,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"user=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -53,7 +57,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -66,10 +71,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "user",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: Some(
|
||||
|
@ -85,7 +92,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -99,17 +107,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
">10",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\n",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 2,
|
||||
|
@ -74,18 +79,23 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"\u{88}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -42,16 +44,20 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -42,16 +44,20 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"Hello world",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -74,20 +79,25 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"!",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,14 +29,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "a",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -49,7 +53,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -62,14 +67,17 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "b",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -83,11 +91,13 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"{foo}",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Compare {
|
||||
node: Compare(
|
||||
ExprCompare {
|
||||
left: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -41,12 +43,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
42,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
ops: [
|
||||
Eq,
|
||||
|
@ -64,18 +68,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
42,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "foo",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: Some(
|
||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -74,19 +79,24 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "spec",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Compare {
|
||||
node: Compare(
|
||||
ExprCompare {
|
||||
left: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -41,12 +43,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
ops: [
|
||||
NotEq,
|
||||
|
@ -64,18 +68,22 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "foo",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: Some(
|
||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: JoinedStr {
|
||||
node: JoinedStr(
|
||||
ExprJoinedStr {
|
||||
values: [
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -61,17 +65,21 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"spec",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"x =",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -53,7 +57,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -66,13 +71,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 114,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
"x=",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
value: Str(
|
||||
" ",
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
|
@ -53,7 +57,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -66,13 +71,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
node: Name(
|
||||
ExprName {
|
||||
id: "x",
|
||||
ctx: Load,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 114,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: FormattedValue {
|
||||
node: FormattedValue(
|
||||
ExprFormattedValue {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,12 +29,15 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Yield {
|
||||
node: Yield(
|
||||
ExprYield {
|
||||
value: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
conversion: 0,
|
||||
format_spec: None,
|
||||
},
|
||||
),
|
||||
},
|
||||
]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
source: compiler/parser/src/string.rs
|
||||
source: parser/src/string.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Expr {
|
||||
node: Expr(
|
||||
StmtExpr {
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
|||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
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