mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-31 00:44:19 +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):
|
if is_simple(sum):
|
||||||
info.has_userdata = False
|
info.has_userdata = False
|
||||||
else:
|
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:
|
if len(sum.types) > 1:
|
||||||
info.boxed = True
|
info.boxed = True
|
||||||
if sum.attributes:
|
if sum.attributes:
|
||||||
|
@ -205,16 +208,49 @@ class StructVisitor(TypeInfoEmitVisitor):
|
||||||
|
|
||||||
def sum_with_constructors(self, sum, name, depth):
|
def sum_with_constructors(self, sum, name, depth):
|
||||||
typeinfo = self.typeinfo[name]
|
typeinfo = self.typeinfo[name]
|
||||||
generics, generics_applied = self.get_generics(name, "U = ()", "U")
|
|
||||||
enumname = rustname = get_rust_type(name)
|
enumname = rustname = get_rust_type(name)
|
||||||
# all the attributes right now are for location, so if it has attrs we
|
# all the attributes right now are for location, so if it has attrs we
|
||||||
# can just wrap it in Located<>
|
# can just wrap it in Located<>
|
||||||
if sum.attributes:
|
if sum.attributes:
|
||||||
enumname = rustname + "Kind"
|
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_attrs(depth)
|
||||||
self.emit(f"pub enum {enumname}{generics} {{", depth)
|
self.emit(f"pub enum {enumname}{generics} {{", depth)
|
||||||
for t in sum.types:
|
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)
|
self.emit("}", depth)
|
||||||
if sum.attributes:
|
if sum.attributes:
|
||||||
self.emit(
|
self.emit(
|
||||||
|
@ -238,13 +274,18 @@ class StructVisitor(TypeInfoEmitVisitor):
|
||||||
if fieldtype and fieldtype.has_userdata:
|
if fieldtype and fieldtype.has_userdata:
|
||||||
typ = f"{typ}<U>"
|
typ = f"{typ}<U>"
|
||||||
# don't box if we're doing Vec<T>, but do box if we're doing Vec<Option<Box<T>>>
|
# 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}>"
|
typ = f"Box<{typ}>"
|
||||||
if field.opt or (
|
if field.opt or (
|
||||||
# When a dictionary literal contains dictionary unpacking (e.g., `{**d}`),
|
# When a dictionary literal contains dictionary unpacking (e.g., `{**d}`),
|
||||||
# the expression to be unpacked goes in `values` with a `None` at the corresponding
|
# 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>>`.
|
# 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}>"
|
typ = f"Option<{typ}>"
|
||||||
if field.seq:
|
if field.seq:
|
||||||
|
@ -344,14 +385,21 @@ class FoldImplVisitor(TypeInfoEmitVisitor):
|
||||||
)
|
)
|
||||||
if is_located:
|
if is_located:
|
||||||
self.emit("fold_located(folder, node, |folder, node| {", depth)
|
self.emit("fold_located(folder, node, |folder, node| {", depth)
|
||||||
enumname += "Kind"
|
rustname = enumname + "Kind"
|
||||||
|
else:
|
||||||
|
rustname = enumname
|
||||||
self.emit("match node {", depth + 1)
|
self.emit("match node {", depth + 1)
|
||||||
for cons in sum.types:
|
for cons in sum.types:
|
||||||
fields_pattern = self.make_pattern(cons.fields)
|
fields_pattern = self.make_pattern(
|
||||||
self.emit(
|
enumname, rustname, cons.name, cons.fields
|
||||||
f"{enumname}::{cons.name} {{ {fields_pattern} }} => {{", depth + 2
|
)
|
||||||
|
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 + 2)
|
||||||
self.emit("}", depth + 1)
|
self.emit("}", depth + 1)
|
||||||
if is_located:
|
if is_located:
|
||||||
|
@ -381,23 +429,33 @@ class FoldImplVisitor(TypeInfoEmitVisitor):
|
||||||
)
|
)
|
||||||
if is_located:
|
if is_located:
|
||||||
self.emit("fold_located(folder, node, |folder, node| {", depth)
|
self.emit("fold_located(folder, node, |folder, node| {", depth)
|
||||||
structname += "Data"
|
rustname = structname + "Data"
|
||||||
fields_pattern = self.make_pattern(product.fields)
|
else:
|
||||||
self.emit(f"let {structname} {{ {fields_pattern} }} = node;", depth + 1)
|
rustname = structname
|
||||||
self.gen_construction(structname, product.fields, depth + 1)
|
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:
|
if is_located:
|
||||||
self.emit("})", depth)
|
self.emit("})", depth)
|
||||||
self.emit("}", depth)
|
self.emit("}", depth)
|
||||||
|
|
||||||
def make_pattern(self, fields):
|
def make_pattern(self, rustname, pyname, fieldname, fields):
|
||||||
return ",".join(rust_field(f.name) for f in fields)
|
if fields:
|
||||||
|
header = f"{pyname}::{fieldname}({rustname}{fieldname}"
|
||||||
|
footer = ")"
|
||||||
|
else:
|
||||||
|
header = f"{pyname}::{fieldname}"
|
||||||
|
footer = ""
|
||||||
|
|
||||||
def gen_construction(self, cons_path, fields, depth):
|
body = ",".join(rust_field(f.name) for f in fields)
|
||||||
self.emit(f"Ok({cons_path} {{", depth)
|
return header, body, footer
|
||||||
|
|
||||||
|
def gen_construction(self, header, fields, footer, depth):
|
||||||
|
self.emit(f"Ok({header} {{", depth)
|
||||||
for field in fields:
|
for field in fields:
|
||||||
name = rust_field(field.name)
|
name = rust_field(field.name)
|
||||||
self.emit(f"{name}: Foldable::fold({name}, folder)?,", depth + 1)
|
self.emit(f"{name}: Foldable::fold({name}, folder)?,", depth + 1)
|
||||||
self.emit("})", depth)
|
self.emit(f"}}{footer})", depth)
|
||||||
|
|
||||||
|
|
||||||
class FoldModuleVisitor(TypeInfoEmitVisitor):
|
class FoldModuleVisitor(TypeInfoEmitVisitor):
|
||||||
|
@ -514,33 +572,36 @@ class TraitImplVisitor(EmitVisitor):
|
||||||
self.visit(type.value, type.name, depth)
|
self.visit(type.value, type.name, depth)
|
||||||
|
|
||||||
def visitSum(self, sum, name, depth):
|
def visitSum(self, sum, name, depth):
|
||||||
enumname = get_rust_type(name)
|
rustname = enumname = get_rust_type(name)
|
||||||
if sum.attributes:
|
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(f"const NAME: &'static str = {json.dumps(name)};", depth + 1)
|
||||||
self.emit("}", depth)
|
self.emit("}", depth)
|
||||||
self.emit(f"impl Node for ast::{enumname} {{", depth)
|
self.emit(f"impl Node for ast::{rustname} {{", depth)
|
||||||
self.emit(
|
self.emit(
|
||||||
"fn ast_to_object(self, _vm: &VirtualMachine) -> PyObjectRef {", depth + 1
|
"fn ast_to_object(self, _vm: &VirtualMachine) -> PyObjectRef {", depth + 1
|
||||||
)
|
)
|
||||||
self.emit("match self {", depth + 2)
|
self.emit("match self {", depth + 2)
|
||||||
for variant in sum.types:
|
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 + 2)
|
||||||
self.emit("}", depth + 1)
|
self.emit("}", depth + 1)
|
||||||
self.emit(
|
self.emit(
|
||||||
"fn ast_from_object(_vm: &VirtualMachine, _object: PyObjectRef) -> PyResult<Self> {",
|
"fn ast_from_object(_vm: &VirtualMachine, _object: PyObjectRef) -> PyResult<Self> {",
|
||||||
depth + 1,
|
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 + 1)
|
||||||
self.emit("}", depth)
|
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)
|
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.make_node(cons.name, cons.fields, depth + 1)
|
||||||
self.emit("}", depth)
|
self.emit("}", depth)
|
||||||
|
|
||||||
|
@ -586,7 +647,7 @@ class TraitImplVisitor(EmitVisitor):
|
||||||
def make_pattern(self, fields):
|
def make_pattern(self, fields):
|
||||||
return ",".join(rust_field(f.name) for f in 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:
|
if sum.attributes:
|
||||||
self.extract_location(sumname, depth)
|
self.extract_location(sumname, depth)
|
||||||
|
|
||||||
|
@ -594,7 +655,12 @@ class TraitImplVisitor(EmitVisitor):
|
||||||
self.emit("Ok(", depth)
|
self.emit("Ok(", depth)
|
||||||
for cons in sum.types:
|
for cons in sum.types:
|
||||||
self.emit(f"if _cls.is(Node{cons.name}::static_type()) {{", depth)
|
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("} else", depth)
|
||||||
|
|
||||||
self.emit("{", depth)
|
self.emit("{", depth)
|
||||||
|
@ -610,13 +676,16 @@ class TraitImplVisitor(EmitVisitor):
|
||||||
self.gen_construction(structname, product, prodname, depth + 1)
|
self.gen_construction(structname, product, prodname, depth + 1)
|
||||||
self.emit(")", depth)
|
self.emit(")", depth)
|
||||||
|
|
||||||
def gen_construction(self, cons_path, cons, name, depth):
|
def gen_construction_fields(self, cons, name, depth):
|
||||||
self.emit(f"ast::{cons_path} {{", depth)
|
|
||||||
for field in cons.fields:
|
for field in cons.fields:
|
||||||
self.emit(
|
self.emit(
|
||||||
f"{rust_field(field.name)}: {self.decode_field(field, name)},",
|
f"{rust_field(field.name)}: {self.decode_field(field, name)},",
|
||||||
depth + 1,
|
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)
|
self.emit("}", depth)
|
||||||
|
|
||||||
def extract_location(self, typename, 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> {
|
fn fold_expr(&mut self, node: crate::Expr<U>) -> Result<crate::Expr<U>, Self::Error> {
|
||||||
match node.node {
|
match node.node {
|
||||||
crate::ExprKind::Tuple { elts, ctx } => {
|
crate::ExprKind::Tuple(crate::ExprTuple { elts, ctx }) => {
|
||||||
let elts = elts
|
let elts = elts
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|x| self.fold_expr(x))
|
.map(|x| self.fold_expr(x))
|
||||||
|
@ -112,16 +112,16 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
|
||||||
let tuple = elts
|
let tuple = elts
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|e| match e.node {
|
.map(|e| match e.node {
|
||||||
crate::ExprKind::Constant { value, .. } => value,
|
crate::ExprKind::Constant(crate::ExprConstant { value, .. }) => value,
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
crate::ExprKind::Constant {
|
crate::ExprKind::Constant(crate::ExprConstant {
|
||||||
value: Constant::Tuple(tuple),
|
value: Constant::Tuple(tuple),
|
||||||
kind: None,
|
kind: None,
|
||||||
}
|
})
|
||||||
} else {
|
} else {
|
||||||
crate::ExprKind::Tuple { elts, ctx }
|
crate::ExprKind::Tuple(crate::ExprTuple { elts, ctx })
|
||||||
};
|
};
|
||||||
Ok(crate::Expr {
|
Ok(crate::Expr {
|
||||||
node: expr,
|
node: expr,
|
||||||
|
@ -151,66 +151,73 @@ mod tests {
|
||||||
location: start,
|
location: start,
|
||||||
end_location: end,
|
end_location: end,
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Tuple {
|
node: ExprTuple {
|
||||||
ctx: ExprContext::Load,
|
ctx: ExprContext::Load,
|
||||||
elts: vec![
|
elts: vec![
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
location: start,
|
||||||
end_location: end,
|
end_location: end,
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprConstant {
|
||||||
value: BigInt::from(1).into(),
|
value: BigInt::from(1).into(),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
location: start,
|
||||||
end_location: end,
|
end_location: end,
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprConstant {
|
||||||
value: BigInt::from(2).into(),
|
value: BigInt::from(2).into(),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
location: start,
|
||||||
end_location: end,
|
end_location: end,
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Tuple {
|
node: ExprTuple {
|
||||||
ctx: ExprContext::Load,
|
ctx: ExprContext::Load,
|
||||||
elts: vec![
|
elts: vec![
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
location: start,
|
||||||
end_location: end,
|
end_location: end,
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprConstant {
|
||||||
value: BigInt::from(3).into(),
|
value: BigInt::from(3).into(),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
location: start,
|
||||||
end_location: end,
|
end_location: end,
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprConstant {
|
||||||
value: BigInt::from(4).into(),
|
value: BigInt::from(4).into(),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
location: start,
|
||||||
end_location: end,
|
end_location: end,
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprConstant {
|
||||||
value: BigInt::from(5).into(),
|
value: BigInt::from(5).into(),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
};
|
};
|
||||||
let new_ast = ConstantOptimizer::new()
|
let new_ast = ConstantOptimizer::new()
|
||||||
.fold_expr(ast)
|
.fold_expr(ast)
|
||||||
|
@ -221,7 +228,7 @@ mod tests {
|
||||||
location: start,
|
location: start,
|
||||||
end_location: end,
|
end_location: end,
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprConstant {
|
||||||
value: Constant::Tuple(vec![
|
value: Constant::Tuple(vec![
|
||||||
BigInt::from(1).into(),
|
BigInt::from(1).into(),
|
||||||
BigInt::from(2).into(),
|
BigInt::from(2).into(),
|
||||||
|
@ -232,7 +239,8 @@ mod tests {
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
kind: None
|
kind: None
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ impl<U> ExprKind<U> {
|
||||||
ExprKind::Compare { .. } => "comparison",
|
ExprKind::Compare { .. } => "comparison",
|
||||||
ExprKind::Attribute { .. } => "attribute",
|
ExprKind::Attribute { .. } => "attribute",
|
||||||
ExprKind::Call { .. } => "function call",
|
ExprKind::Call { .. } => "function call",
|
||||||
ExprKind::Constant { value, .. } => match value {
|
ExprKind::Constant(crate::ExprConstant { value, .. }) => match value {
|
||||||
Constant::Str(_)
|
Constant::Str(_)
|
||||||
| Constant::Int(_)
|
| Constant::Int(_)
|
||||||
| Constant::Float(_)
|
| Constant::Float(_)
|
||||||
|
@ -40,7 +40,7 @@ impl<U> ExprKind<U> {
|
||||||
ExprKind::GeneratorExp { .. } => "generator expression",
|
ExprKind::GeneratorExp { .. } => "generator expression",
|
||||||
ExprKind::Starred { .. } => "starred",
|
ExprKind::Starred { .. } => "starred",
|
||||||
ExprKind::Slice { .. } => "slice",
|
ExprKind::Slice { .. } => "slice",
|
||||||
ExprKind::JoinedStr { values } => {
|
ExprKind::JoinedStr(crate::ExprJoinedStr { values }) => {
|
||||||
if values
|
if values
|
||||||
.iter()
|
.iter()
|
||||||
.any(|e| matches!(e.node, ExprKind::JoinedStr { .. }))
|
.any(|e| matches!(e.node, ExprKind::JoinedStr { .. }))
|
||||||
|
|
|
@ -71,7 +71,7 @@ impl<'a> Unparser<'a> {
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
match &ast.node {
|
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));
|
let (op, prec) = op_prec!(bin, op, Boolop, And("and", AND), Or("or", OR));
|
||||||
group_if!(prec, {
|
group_if!(prec, {
|
||||||
let mut first = true;
|
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, {
|
group_if!(precedence::TUPLE, {
|
||||||
self.unparse_expr(target, precedence::ATOM)?;
|
self.unparse_expr(target, precedence::ATOM)?;
|
||||||
self.p(" := ")?;
|
self.p(" := ")?;
|
||||||
self.unparse_expr(value, precedence::ATOM)?;
|
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 right_associative = matches!(op, Operator::Pow);
|
||||||
let (op, prec) = op_prec!(
|
let (op, prec) = op_prec!(
|
||||||
bin,
|
bin,
|
||||||
|
@ -114,7 +114,7 @@ impl<'a> Unparser<'a> {
|
||||||
self.unparse_expr(right, prec + !right_associative as u8)?;
|
self.unparse_expr(right, prec + !right_associative as u8)?;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ExprKind::UnaryOp { op, operand } => {
|
ExprKind::UnaryOp(crate::ExprUnaryOp { op, operand }) => {
|
||||||
let (op, prec) = op_prec!(
|
let (op, prec) = op_prec!(
|
||||||
un,
|
un,
|
||||||
op,
|
op,
|
||||||
|
@ -129,7 +129,7 @@ impl<'a> Unparser<'a> {
|
||||||
self.unparse_expr(operand, prec)?;
|
self.unparse_expr(operand, prec)?;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ExprKind::Lambda { args, body } => {
|
ExprKind::Lambda(crate::ExprLambda { args, body }) => {
|
||||||
group_if!(precedence::TEST, {
|
group_if!(precedence::TEST, {
|
||||||
let pos = args.args.len() + args.posonlyargs.len();
|
let pos = args.args.len() + args.posonlyargs.len();
|
||||||
self.p(if pos > 0 { "lambda " } else { "lambda" })?;
|
self.p(if pos > 0 { "lambda " } else { "lambda" })?;
|
||||||
|
@ -137,7 +137,7 @@ impl<'a> Unparser<'a> {
|
||||||
write!(self, ": {}", **body)?;
|
write!(self, ": {}", **body)?;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ExprKind::IfExp { test, body, orelse } => {
|
ExprKind::IfExp(crate::ExprIfExp { test, body, orelse }) => {
|
||||||
group_if!(precedence::TEST, {
|
group_if!(precedence::TEST, {
|
||||||
self.unparse_expr(body, precedence::TEST + 1)?;
|
self.unparse_expr(body, precedence::TEST + 1)?;
|
||||||
self.p(" if ")?;
|
self.p(" if ")?;
|
||||||
|
@ -146,7 +146,7 @@ impl<'a> Unparser<'a> {
|
||||||
self.unparse_expr(orelse, precedence::TEST)?;
|
self.unparse_expr(orelse, precedence::TEST)?;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ExprKind::Dict { keys, values } => {
|
ExprKind::Dict(crate::ExprDict { keys, values }) => {
|
||||||
self.p("{")?;
|
self.p("{")?;
|
||||||
let mut first = true;
|
let mut first = true;
|
||||||
let (packed, unpacked) = values.split_at(keys.len());
|
let (packed, unpacked) = values.split_at(keys.len());
|
||||||
|
@ -164,7 +164,7 @@ impl<'a> Unparser<'a> {
|
||||||
}
|
}
|
||||||
self.p("}")?;
|
self.p("}")?;
|
||||||
}
|
}
|
||||||
ExprKind::Set { elts } => {
|
ExprKind::Set(crate::ExprSet { elts }) => {
|
||||||
self.p("{")?;
|
self.p("{")?;
|
||||||
let mut first = true;
|
let mut first = true;
|
||||||
for v in elts {
|
for v in elts {
|
||||||
|
@ -173,23 +173,23 @@ impl<'a> Unparser<'a> {
|
||||||
}
|
}
|
||||||
self.p("}")?;
|
self.p("}")?;
|
||||||
}
|
}
|
||||||
ExprKind::ListComp { elt, generators } => {
|
ExprKind::ListComp(crate::ExprListComp { elt, generators }) => {
|
||||||
self.p("[")?;
|
self.p("[")?;
|
||||||
self.unparse_expr(elt, precedence::TEST)?;
|
self.unparse_expr(elt, precedence::TEST)?;
|
||||||
self.unparse_comp(generators)?;
|
self.unparse_comp(generators)?;
|
||||||
self.p("]")?;
|
self.p("]")?;
|
||||||
}
|
}
|
||||||
ExprKind::SetComp { elt, generators } => {
|
ExprKind::SetComp(crate::ExprSetComp { elt, generators }) => {
|
||||||
self.p("{")?;
|
self.p("{")?;
|
||||||
self.unparse_expr(elt, precedence::TEST)?;
|
self.unparse_expr(elt, precedence::TEST)?;
|
||||||
self.unparse_comp(generators)?;
|
self.unparse_comp(generators)?;
|
||||||
self.p("}")?;
|
self.p("}")?;
|
||||||
}
|
}
|
||||||
ExprKind::DictComp {
|
ExprKind::DictComp(crate::ExprDictComp {
|
||||||
key,
|
key,
|
||||||
value,
|
value,
|
||||||
generators,
|
generators,
|
||||||
} => {
|
}) => {
|
||||||
self.p("{")?;
|
self.p("{")?;
|
||||||
self.unparse_expr(key, precedence::TEST)?;
|
self.unparse_expr(key, precedence::TEST)?;
|
||||||
self.p(": ")?;
|
self.p(": ")?;
|
||||||
|
@ -197,33 +197,33 @@ impl<'a> Unparser<'a> {
|
||||||
self.unparse_comp(generators)?;
|
self.unparse_comp(generators)?;
|
||||||
self.p("}")?;
|
self.p("}")?;
|
||||||
}
|
}
|
||||||
ExprKind::GeneratorExp { elt, generators } => {
|
ExprKind::GeneratorExp(crate::ExprGeneratorExp { elt, generators }) => {
|
||||||
self.p("(")?;
|
self.p("(")?;
|
||||||
self.unparse_expr(elt, precedence::TEST)?;
|
self.unparse_expr(elt, precedence::TEST)?;
|
||||||
self.unparse_comp(generators)?;
|
self.unparse_comp(generators)?;
|
||||||
self.p(")")?;
|
self.p(")")?;
|
||||||
}
|
}
|
||||||
ExprKind::Await { value } => {
|
ExprKind::Await(crate::ExprAwait { value }) => {
|
||||||
group_if!(precedence::AWAIT, {
|
group_if!(precedence::AWAIT, {
|
||||||
self.p("await ")?;
|
self.p("await ")?;
|
||||||
self.unparse_expr(value, precedence::ATOM)?;
|
self.unparse_expr(value, precedence::ATOM)?;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ExprKind::Yield { value } => {
|
ExprKind::Yield(crate::ExprYield { value }) => {
|
||||||
if let Some(value) = value {
|
if let Some(value) = value {
|
||||||
write!(self, "(yield {})", **value)?;
|
write!(self, "(yield {})", **value)?;
|
||||||
} else {
|
} else {
|
||||||
self.p("(yield)")?;
|
self.p("(yield)")?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ExprKind::YieldFrom { value } => {
|
ExprKind::YieldFrom(crate::ExprYieldFrom { value }) => {
|
||||||
write!(self, "(yield from {})", **value)?;
|
write!(self, "(yield from {})", **value)?;
|
||||||
}
|
}
|
||||||
ExprKind::Compare {
|
ExprKind::Compare(crate::ExprCompare {
|
||||||
left,
|
left,
|
||||||
ops,
|
ops,
|
||||||
comparators,
|
comparators,
|
||||||
} => {
|
}) => {
|
||||||
group_if!(precedence::CMP, {
|
group_if!(precedence::CMP, {
|
||||||
let new_lvl = precedence::CMP + 1;
|
let new_lvl = precedence::CMP + 1;
|
||||||
self.unparse_expr(left, new_lvl)?;
|
self.unparse_expr(left, new_lvl)?;
|
||||||
|
@ -245,16 +245,16 @@ impl<'a> Unparser<'a> {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
ExprKind::Call {
|
ExprKind::Call(crate::ExprCall {
|
||||||
func,
|
func,
|
||||||
args,
|
args,
|
||||||
keywords,
|
keywords,
|
||||||
} => {
|
}) => {
|
||||||
self.unparse_expr(func, precedence::ATOM)?;
|
self.unparse_expr(func, precedence::ATOM)?;
|
||||||
self.p("(")?;
|
self.p("(")?;
|
||||||
if let (
|
if let (
|
||||||
[Expr {
|
[Expr {
|
||||||
node: ExprKind::GeneratorExp { elt, generators },
|
node: ExprKind::GeneratorExp(crate::ExprGeneratorExp { elt, generators }),
|
||||||
..
|
..
|
||||||
}],
|
}],
|
||||||
[],
|
[],
|
||||||
|
@ -282,13 +282,15 @@ impl<'a> Unparser<'a> {
|
||||||
}
|
}
|
||||||
self.p(")")?;
|
self.p(")")?;
|
||||||
}
|
}
|
||||||
ExprKind::FormattedValue {
|
ExprKind::FormattedValue(crate::ExprFormattedValue {
|
||||||
value,
|
value,
|
||||||
conversion,
|
conversion,
|
||||||
format_spec,
|
format_spec,
|
||||||
} => self.unparse_formatted(value, *conversion, format_spec.as_deref())?,
|
}) => self.unparse_formatted(value, *conversion, format_spec.as_deref())?,
|
||||||
ExprKind::JoinedStr { values } => self.unparse_joined_str(values, false)?,
|
ExprKind::JoinedStr(crate::ExprJoinedStr { values }) => {
|
||||||
ExprKind::Constant { value, kind } => {
|
self.unparse_joined_str(values, false)?
|
||||||
|
}
|
||||||
|
ExprKind::Constant(crate::ExprConstant { value, kind }) => {
|
||||||
if let Some(kind) = kind {
|
if let Some(kind) = kind {
|
||||||
self.p(kind)?;
|
self.p(kind)?;
|
||||||
}
|
}
|
||||||
|
@ -304,12 +306,12 @@ impl<'a> Unparser<'a> {
|
||||||
_ => fmt::Display::fmt(value, &mut self.f)?,
|
_ => fmt::Display::fmt(value, &mut self.f)?,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ExprKind::Attribute { value, attr, .. } => {
|
ExprKind::Attribute(crate::ExprAttribute { value, attr, .. }) => {
|
||||||
self.unparse_expr(value, precedence::ATOM)?;
|
self.unparse_expr(value, precedence::ATOM)?;
|
||||||
let period = if let ExprKind::Constant {
|
let period = if let ExprKind::Constant(crate::ExprConstant {
|
||||||
value: Constant::Int(_),
|
value: Constant::Int(_),
|
||||||
..
|
..
|
||||||
} = &value.node
|
}) = &value.node
|
||||||
{
|
{
|
||||||
" ."
|
" ."
|
||||||
} else {
|
} else {
|
||||||
|
@ -318,10 +320,10 @@ impl<'a> Unparser<'a> {
|
||||||
self.p(period)?;
|
self.p(period)?;
|
||||||
self.p(attr)?;
|
self.p(attr)?;
|
||||||
}
|
}
|
||||||
ExprKind::Subscript { value, slice, .. } => {
|
ExprKind::Subscript(crate::ExprSubscript { value, slice, .. }) => {
|
||||||
self.unparse_expr(value, precedence::ATOM)?;
|
self.unparse_expr(value, precedence::ATOM)?;
|
||||||
let mut lvl = precedence::TUPLE;
|
let mut lvl = precedence::TUPLE;
|
||||||
if let ExprKind::Tuple { elts, .. } = &slice.node {
|
if let ExprKind::Tuple(crate::ExprTuple { elts, .. }) = &slice.node {
|
||||||
if elts
|
if elts
|
||||||
.iter()
|
.iter()
|
||||||
.any(|expr| matches!(expr.node, ExprKind::Starred { .. }))
|
.any(|expr| matches!(expr.node, ExprKind::Starred { .. }))
|
||||||
|
@ -333,12 +335,12 @@ impl<'a> Unparser<'a> {
|
||||||
self.unparse_expr(slice, lvl)?;
|
self.unparse_expr(slice, lvl)?;
|
||||||
self.p("]")?;
|
self.p("]")?;
|
||||||
}
|
}
|
||||||
ExprKind::Starred { value, .. } => {
|
ExprKind::Starred(crate::ExprStarred { value, .. }) => {
|
||||||
self.p("*")?;
|
self.p("*")?;
|
||||||
self.unparse_expr(value, precedence::EXPR)?;
|
self.unparse_expr(value, precedence::EXPR)?;
|
||||||
}
|
}
|
||||||
ExprKind::Name { id, .. } => self.p(id)?,
|
ExprKind::Name(crate::ExprName { id, .. }) => self.p(id)?,
|
||||||
ExprKind::List { elts, .. } => {
|
ExprKind::List(crate::ExprList { elts, .. }) => {
|
||||||
self.p("[")?;
|
self.p("[")?;
|
||||||
let mut first = true;
|
let mut first = true;
|
||||||
for elt in elts {
|
for elt in elts {
|
||||||
|
@ -347,7 +349,7 @@ impl<'a> Unparser<'a> {
|
||||||
}
|
}
|
||||||
self.p("]")?;
|
self.p("]")?;
|
||||||
}
|
}
|
||||||
ExprKind::Tuple { elts, .. } => {
|
ExprKind::Tuple(crate::ExprTuple { elts, .. }) => {
|
||||||
if elts.is_empty() {
|
if elts.is_empty() {
|
||||||
self.p("()")?;
|
self.p("()")?;
|
||||||
} else {
|
} 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 {
|
if let Some(lower) = lower {
|
||||||
self.unparse_expr(lower, precedence::TEST)?;
|
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 {
|
fn unparse_fstring_elem<U>(&mut self, expr: &Expr<U>, is_spec: bool) -> fmt::Result {
|
||||||
match &expr.node {
|
match &expr.node {
|
||||||
ExprKind::Constant { value, .. } => {
|
ExprKind::Constant(crate::ExprConstant { value, .. }) => {
|
||||||
if let Constant::Str(s) = value {
|
if let Constant::Str(s) = value {
|
||||||
self.unparse_fstring_str(s)
|
self.unparse_fstring_str(s)
|
||||||
} else {
|
} else {
|
||||||
unreachable!()
|
unreachable!()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ExprKind::JoinedStr { values } => self.unparse_joined_str(values, is_spec),
|
ExprKind::JoinedStr(crate::ExprJoinedStr { values }) => {
|
||||||
ExprKind::FormattedValue {
|
self.unparse_joined_str(values, is_spec)
|
||||||
|
}
|
||||||
|
ExprKind::FormattedValue(crate::ExprFormattedValue {
|
||||||
value,
|
value,
|
||||||
conversion,
|
conversion,
|
||||||
format_spec,
|
format_spec,
|
||||||
} => self.unparse_formatted(value, *conversion, format_spec.as_deref()),
|
}) => self.unparse_formatted(value, *conversion, format_spec.as_deref()),
|
||||||
_ => unreachable!(),
|
_ => 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 {
|
pub(crate) fn set_context(expr: Expr, ctx: ExprContext) -> Expr {
|
||||||
match expr.node {
|
match expr.node {
|
||||||
ExprKind::Name { id, .. } => Expr {
|
ExprKind::Name(ast::ExprName { id, .. }) => Expr {
|
||||||
node: ExprKind::Name { id, ctx },
|
node: ast::ExprName { id, ctx }.into(),
|
||||||
..expr
|
..expr
|
||||||
},
|
},
|
||||||
ExprKind::Tuple { elts, .. } => Expr {
|
ExprKind::Tuple(ast::ExprTuple { elts, .. }) => Expr {
|
||||||
node: ExprKind::Tuple {
|
node: ast::ExprTuple {
|
||||||
elts: elts
|
elts: elts
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|elt| set_context(elt, ctx.clone()))
|
.map(|elt| set_context(elt, ctx.clone()))
|
||||||
.collect(),
|
.collect(),
|
||||||
ctx,
|
ctx,
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
..expr
|
..expr
|
||||||
},
|
},
|
||||||
ExprKind::List { elts, .. } => Expr {
|
ExprKind::List(ast::ExprList { elts, .. }) => Expr {
|
||||||
node: ExprKind::List {
|
node: ast::ExprList {
|
||||||
elts: elts
|
elts: elts
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|elt| set_context(elt, ctx.clone()))
|
.map(|elt| set_context(elt, ctx.clone()))
|
||||||
.collect(),
|
.collect(),
|
||||||
ctx,
|
ctx,
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
..expr
|
..expr
|
||||||
},
|
},
|
||||||
ExprKind::Attribute { value, attr, .. } => Expr {
|
ExprKind::Attribute(ast::ExprAttribute { value, attr, .. }) => Expr {
|
||||||
node: ExprKind::Attribute { value, attr, ctx },
|
node: ast::ExprAttribute { value, attr, ctx }.into(),
|
||||||
..expr
|
..expr
|
||||||
},
|
},
|
||||||
ExprKind::Subscript { value, slice, .. } => Expr {
|
ExprKind::Subscript(ast::ExprSubscript { value, slice, .. }) => Expr {
|
||||||
node: ExprKind::Subscript { value, slice, ctx },
|
node: ast::ExprSubscript { value, slice, ctx }.into(),
|
||||||
..expr
|
..expr
|
||||||
},
|
},
|
||||||
ExprKind::Starred { value, .. } => Expr {
|
ExprKind::Starred(ast::ExprStarred { value, .. }) => Expr {
|
||||||
node: ExprKind::Starred {
|
node: ast::ExprStarred {
|
||||||
value: Box::new(set_context(*value, ctx.clone())),
|
value: Box::new(set_context(*value, ctx.clone())),
|
||||||
ctx,
|
ctx,
|
||||||
},
|
}
|
||||||
|
.into(),
|
||||||
..expr
|
..expr
|
||||||
},
|
},
|
||||||
_ => 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> {
|
pub fn parse_program(source: &str, source_path: &str) -> Result<ast::Suite, ParseError> {
|
||||||
parse(source, Mode::Module, source_path).map(|top| match top {
|
parse(source, Mode::Module, source_path).map(|top| match top {
|
||||||
ast::Mod::Module { body, .. } => body,
|
ast::Mod::Module(ast::ModModule { body, .. }) => body,
|
||||||
_ => unreachable!(),
|
_ => unreachable!(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ pub fn parse_expression_located(
|
||||||
location: Location,
|
location: Location,
|
||||||
) -> Result<ast::Expr, ParseError> {
|
) -> Result<ast::Expr, ParseError> {
|
||||||
parse_located(source, Mode::Expression, path, location).map(|top| match top {
|
parse_located(source, Mode::Expression, path, location).map(|top| match top {
|
||||||
ast::Mod::Expression { body } => *body,
|
ast::Mod::Expression(ast::ModExpression { body }) => *body,
|
||||||
_ => unreachable!(),
|
_ => 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
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: AnnAssign {
|
node: AnnAssign(
|
||||||
|
StmtAnnAssign {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
annotation: Located {
|
annotation: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -45,10 +48,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "int",
|
id: "int",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
value: Some(
|
value: Some(
|
||||||
Located {
|
Located {
|
||||||
|
@ -63,15 +68,18 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
simple: 1,
|
simple: 1,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute(
|
||||||
|
ExprAttribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -42,14 +44,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
attr: "y",
|
attr: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -64,7 +69,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -78,12 +84,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -97,12 +105,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -116,18 +126,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: For {
|
node: For(
|
||||||
|
StmtFor {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -45,7 +48,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -59,12 +63,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -78,12 +84,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -97,16 +105,19 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -127,5 +138,6 @@ expression: parse_ast
|
||||||
orelse: [],
|
orelse: [],
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: List {
|
node: List(
|
||||||
|
ExprList {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -43,10 +45,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -60,14 +64,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -82,7 +89,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -96,12 +104,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -115,12 +125,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -134,18 +146,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,10 +30,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ListComp {
|
node: ListComp(
|
||||||
|
ExprListComp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -60,10 +64,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -79,10 +85,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -96,7 +104,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -110,12 +119,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -129,12 +140,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -148,24 +161,29 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,10 +30,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -61,12 +65,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -80,12 +86,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -99,18 +107,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: If {
|
node: If(
|
||||||
|
StmtIf {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: NamedExpr {
|
node: NamedExpr(
|
||||||
|
ExprNamedExpr {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -58,14 +62,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -85,5 +92,6 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
orelse: [],
|
orelse: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,10 +30,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: SetComp {
|
node: SetComp(
|
||||||
|
ExprSetComp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -60,10 +64,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -79,10 +85,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -96,7 +104,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -110,12 +119,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -129,12 +140,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -148,24 +161,29 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -43,10 +45,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -60,7 +64,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred(
|
||||||
|
ExprStarred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -73,17 +78,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -98,7 +107,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -112,12 +122,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -131,12 +143,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -150,18 +164,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -42,10 +44,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -59,13 +63,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -80,7 +87,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -94,12 +102,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -113,12 +123,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -132,18 +144,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -43,10 +45,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -60,14 +64,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -82,7 +89,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -96,12 +104,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -115,12 +125,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -134,18 +146,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: With {
|
node: With(
|
||||||
|
StmtWith {
|
||||||
items: [
|
items: [
|
||||||
Withitem {
|
Withitem {
|
||||||
context_expr: Located {
|
context_expr: Located {
|
||||||
|
@ -30,12 +31,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
optional_vars: Some(
|
optional_vars: Some(
|
||||||
Located {
|
Located {
|
||||||
|
@ -50,10 +53,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
@ -76,5 +81,6 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: AugAssign {
|
node: AugAssign(
|
||||||
|
StmtAugAssign {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute(
|
||||||
|
ExprAttribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -41,14 +43,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
attr: "y",
|
attr: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
op: Add,
|
op: Add,
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -63,7 +68,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -77,12 +83,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -96,12 +104,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -115,17 +125,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: AugAssign {
|
node: AugAssign(
|
||||||
|
StmtAugAssign {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
op: Add,
|
op: Add,
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -46,13 +49,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: AugAssign {
|
node: AugAssign(
|
||||||
|
StmtAugAssign {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -58,13 +62,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
op: Add,
|
op: Add,
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -79,7 +86,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -93,12 +101,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -112,12 +122,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -131,17 +143,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Delete {
|
node: Delete(
|
||||||
|
StmtDelete {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute(
|
||||||
|
ExprAttribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -42,16 +44,20 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
attr: "y",
|
attr: "y",
|
||||||
ctx: Del,
|
ctx: Del,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Delete {
|
node: Delete(
|
||||||
|
StmtDelete {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,12 +30,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Del,
|
ctx: Del,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/context.rs
|
source: parser/src/context.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Delete {
|
node: Delete(
|
||||||
|
StmtDelete {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -42,10 +44,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -59,15 +63,19 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Del,
|
ctx: Del,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -102,6 +103,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -91,12 +92,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -110,12 +113,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
kwarg: None,
|
kwarg: None,
|
||||||
|
@ -141,6 +146,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -47,6 +48,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -157,6 +158,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -146,12 +147,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -165,12 +168,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
kwarg: None,
|
kwarg: None,
|
||||||
|
@ -196,6 +201,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -165,12 +166,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -184,12 +187,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
kwarg: None,
|
kwarg: None,
|
||||||
|
@ -215,6 +220,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -165,12 +166,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -184,12 +187,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
kwarg: Some(
|
kwarg: Some(
|
||||||
|
@ -234,6 +239,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -102,6 +103,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -93,12 +94,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -112,12 +115,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -141,6 +146,7 @@ Ok(
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -29,7 +30,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda(
|
||||||
|
ExprLambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [],
|
args: [],
|
||||||
|
@ -106,16 +108,20 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -29,7 +30,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda(
|
||||||
|
ExprLambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [],
|
args: [],
|
||||||
|
@ -103,12 +105,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -122,12 +126,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
kwarg: None,
|
kwarg: None,
|
||||||
|
@ -145,16 +151,20 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -29,7 +30,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda(
|
||||||
|
ExprLambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [],
|
args: [],
|
||||||
|
@ -51,16 +53,20 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -29,7 +30,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda(
|
||||||
|
ExprLambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
|
@ -143,16 +145,20 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -29,7 +30,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda(
|
||||||
|
ExprLambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
|
@ -106,16 +108,20 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/function.rs
|
source: parser/src/function.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Ok(
|
Ok(
|
||||||
|
@ -16,7 +16,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -29,7 +30,8 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda(
|
||||||
|
ExprLambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
|
@ -105,12 +107,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -124,12 +128,14 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -145,16 +151,20 @@ Ok(
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Dict {
|
node: Dict(
|
||||||
|
ExprDict {
|
||||||
keys: [
|
keys: [
|
||||||
Some(
|
Some(
|
||||||
Located {
|
Located {
|
||||||
|
@ -29,12 +30,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"a",
|
"a",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
None,
|
None,
|
||||||
|
@ -51,12 +54,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"d",
|
"d",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -73,12 +78,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"b",
|
"b",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -92,10 +99,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "c",
|
id: "c",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -109,13 +118,16 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"e",
|
"e",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -27,7 +28,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute(
|
||||||
|
ExprAttribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -40,16 +42,19 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
" ",
|
" ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
attr: "join",
|
attr: "join",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -64,7 +69,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: GeneratorExp {
|
node: GeneratorExp(
|
||||||
|
ExprGeneratorExp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -77,10 +83,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "sql",
|
id: "sql",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -96,10 +104,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "sql",
|
id: "sql",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -113,7 +123,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -127,7 +138,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: IfExp {
|
node: IfExp(
|
||||||
|
ExprIfExp {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -140,10 +152,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "limit",
|
id: "limit",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -157,7 +171,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BinOp {
|
node: BinOp(
|
||||||
|
ExprBinOp {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -170,12 +185,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"LIMIT %d",
|
"LIMIT %d",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
op: Mod,
|
op: Mod,
|
||||||
right: Located {
|
right: Located {
|
||||||
|
@ -190,12 +207,15 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "limit",
|
id: "limit",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
orelse: Located {
|
orelse: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -209,12 +229,15 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: None,
|
value: None,
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -228,7 +251,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: IfExp {
|
node: IfExp(
|
||||||
|
ExprIfExp {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
|
@ -241,10 +265,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "offset",
|
id: "offset",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -258,7 +284,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BinOp {
|
node: BinOp(
|
||||||
|
ExprBinOp {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
|
@ -271,12 +298,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"OFFSET %d",
|
"OFFSET %d",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
op: Mod,
|
op: Mod,
|
||||||
right: Located {
|
right: Located {
|
||||||
|
@ -291,12 +320,15 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "offset",
|
id: "offset",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
orelse: Located {
|
orelse: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -310,24 +342,30 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: None,
|
value: None,
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match(
|
||||||
|
StmtMatch {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Dict {
|
node: Dict(
|
||||||
|
ExprDict {
|
||||||
keys: [
|
keys: [
|
||||||
Some(
|
Some(
|
||||||
Located {
|
Located {
|
||||||
|
@ -43,12 +45,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"test",
|
"test",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -65,15 +69,18 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
|
@ -89,13 +96,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchMapping {
|
node: MatchMapping(
|
||||||
|
PatternMatchMapping {
|
||||||
keys: [],
|
keys: [],
|
||||||
patterns: [],
|
patterns: [],
|
||||||
rest: Some(
|
rest: Some(
|
||||||
"rest",
|
"rest",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
|
@ -111,7 +120,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 6,
|
row: 6,
|
||||||
|
@ -124,7 +134,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 6,
|
row: 6,
|
||||||
|
@ -137,10 +148,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "print",
|
id: "print",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -155,21 +168,26 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "rest",
|
id: "rest",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -183,7 +201,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match(
|
||||||
|
StmtMatch {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 7,
|
row: 7,
|
||||||
|
@ -196,7 +215,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Dict {
|
node: Dict(
|
||||||
|
ExprDict {
|
||||||
keys: [
|
keys: [
|
||||||
Some(
|
Some(
|
||||||
Located {
|
Located {
|
||||||
|
@ -211,12 +231,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"label",
|
"label",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -233,15 +255,18 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"test",
|
"test",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
|
@ -257,7 +282,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchMapping {
|
node: MatchMapping(
|
||||||
|
PatternMatchMapping {
|
||||||
keys: [
|
keys: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -271,12 +297,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"label",
|
"label",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
patterns: [
|
patterns: [
|
||||||
|
@ -292,7 +320,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchAs {
|
node: MatchAs(
|
||||||
|
PatternMatchAs {
|
||||||
pattern: Some(
|
pattern: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -306,7 +335,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchOr {
|
node: MatchOr(
|
||||||
|
PatternMatchOr {
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -320,7 +350,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchClass {
|
node: MatchClass(
|
||||||
|
PatternMatchClass {
|
||||||
cls: Located {
|
cls: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 9,
|
row: 9,
|
||||||
|
@ -333,15 +364,18 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "str",
|
id: "str",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
patterns: [],
|
patterns: [],
|
||||||
kwd_attrs: [],
|
kwd_attrs: [],
|
||||||
kwd_patterns: [],
|
kwd_patterns: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -355,22 +389,27 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchSingleton {
|
node: MatchSingleton(
|
||||||
|
PatternMatchSingleton {
|
||||||
value: None,
|
value: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
name: Some(
|
name: Some(
|
||||||
"label",
|
"label",
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
rest: None,
|
rest: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
|
@ -386,7 +425,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 11,
|
row: 11,
|
||||||
|
@ -399,7 +439,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 11,
|
row: 11,
|
||||||
|
@ -412,10 +453,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "print",
|
id: "print",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -430,21 +473,26 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "label",
|
id: "label",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -458,7 +506,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match(
|
||||||
|
StmtMatch {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 12,
|
row: 12,
|
||||||
|
@ -471,10 +520,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
|
@ -490,7 +541,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchSequence {
|
node: MatchSequence(
|
||||||
|
PatternMatchSequence {
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -504,7 +556,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue(
|
||||||
|
PatternMatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 13,
|
row: 13,
|
||||||
|
@ -517,14 +570,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -538,7 +594,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue(
|
||||||
|
PatternMatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 13,
|
row: 13,
|
||||||
|
@ -551,17 +608,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
|
@ -577,7 +638,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -591,10 +653,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -609,20 +673,24 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -636,7 +704,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match(
|
||||||
|
StmtMatch {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 15,
|
row: 15,
|
||||||
|
@ -649,10 +718,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
|
@ -668,7 +739,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchSequence {
|
node: MatchSequence(
|
||||||
|
PatternMatchSequence {
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -682,7 +754,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue(
|
||||||
|
PatternMatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 16,
|
row: 16,
|
||||||
|
@ -695,14 +768,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -716,7 +792,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue(
|
||||||
|
PatternMatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 16,
|
row: 16,
|
||||||
|
@ -729,17 +806,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
|
@ -755,7 +836,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -769,10 +851,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -787,20 +871,24 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -814,7 +902,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match(
|
||||||
|
StmtMatch {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 18,
|
row: 18,
|
||||||
|
@ -827,10 +916,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
|
@ -846,7 +937,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchSequence {
|
node: MatchSequence(
|
||||||
|
PatternMatchSequence {
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -860,7 +952,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue(
|
||||||
|
PatternMatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 19,
|
row: 19,
|
||||||
|
@ -873,17 +966,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
|
@ -899,7 +996,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -913,10 +1011,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -931,19 +1031,23 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: 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
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BoolOp {
|
node: BoolOp(
|
||||||
|
ExprBoolOp {
|
||||||
op: And,
|
op: And,
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -29,10 +30,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -46,11 +49,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BoolOp {
|
node: BoolOp(
|
||||||
|
ExprBoolOp {
|
||||||
op: Or,
|
op: Or,
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -29,10 +30,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -46,11 +49,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: "parse_program(source, \"<test>\").unwrap()"
|
expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ClassDef {
|
node: ClassDef(
|
||||||
|
StmtClassDef {
|
||||||
name: "Foo",
|
name: "Foo",
|
||||||
bases: [
|
bases: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -30,10 +31,12 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "A",
|
id: "A",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -47,10 +50,12 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "B",
|
id: "B",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
|
@ -67,7 +72,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "__init__",
|
name: "__init__",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -117,6 +123,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -130,7 +137,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "method_with_default",
|
name: "method_with_default",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -189,12 +197,14 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"default",
|
"default",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -218,9 +228,11 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
returns: None,
|
returns: None,
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
decorator_list: [],
|
decorator_list: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: DictComp {
|
node: DictComp(
|
||||||
|
ExprDictComp {
|
||||||
key: Located {
|
key: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -27,10 +28,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x1",
|
id: "x1",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -44,10 +47,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x2",
|
id: "x2",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -63,10 +68,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -80,14 +87,17 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "z",
|
id: "z",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ListComp {
|
node: ListComp(
|
||||||
|
ExprListComp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -27,10 +28,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -46,7 +49,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -60,10 +64,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -77,14 +83,17 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y2",
|
id: "y2",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -98,10 +107,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "z",
|
id: "z",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
|
@ -119,10 +130,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "a",
|
id: "a",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -136,10 +149,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "b",
|
id: "b",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [
|
ifs: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -154,7 +169,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Compare {
|
node: Compare(
|
||||||
|
ExprCompare {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -167,10 +183,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "a",
|
id: "a",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ops: [
|
ops: [
|
||||||
Lt,
|
Lt,
|
||||||
|
@ -188,15 +206,18 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
5,
|
5,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -210,7 +231,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Compare {
|
node: Compare(
|
||||||
|
ExprCompare {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -223,10 +245,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "a",
|
id: "a",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ops: [
|
ops: [
|
||||||
Gt,
|
Gt,
|
||||||
|
@ -244,19 +268,23 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
10,
|
10,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -42,16 +44,20 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"Hello world",
|
"Hello world",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: GeneratorExp {
|
node: GeneratorExp(
|
||||||
|
ExprGeneratorExp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -27,10 +28,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -46,10 +49,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -63,14 +68,17 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "z",
|
id: "z",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: If {
|
node: If(
|
||||||
|
StmtIf {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,12 +29,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -48,7 +51,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -61,14 +65,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
10,
|
10,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
orelse: [
|
orelse: [
|
||||||
|
@ -84,7 +91,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: If {
|
node: If(
|
||||||
|
StmtIf {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -97,12 +105,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -117,7 +127,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -130,14 +141,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
20,
|
20,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
orelse: [
|
orelse: [
|
||||||
|
@ -153,7 +167,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -166,19 +181,24 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: GeneratorExp {
|
node: GeneratorExp(
|
||||||
|
ExprGeneratorExp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -27,7 +28,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: IfExp {
|
node: IfExp(
|
||||||
|
ExprIfExp {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -40,10 +42,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -57,10 +61,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
orelse: Located {
|
orelse: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -74,12 +80,15 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -95,10 +104,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -112,14 +123,17 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "z",
|
id: "z",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "my_func",
|
id: "my_func",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -59,12 +63,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"positional",
|
"positional",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [
|
keywords: [
|
||||||
|
@ -96,18 +102,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda(
|
||||||
|
ExprLambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
|
@ -87,7 +89,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BinOp {
|
node: BinOp(
|
||||||
|
ExprBinOp {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -100,10 +103,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
op: Mult,
|
op: Mult,
|
||||||
right: Located {
|
right: Located {
|
||||||
|
@ -118,15 +123,20 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ListComp {
|
node: ListComp(
|
||||||
|
ExprListComp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -27,10 +28,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -46,10 +49,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -63,14 +68,17 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "z",
|
id: "z",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: GeneratorExp {
|
node: GeneratorExp(
|
||||||
|
ExprGeneratorExp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -27,7 +28,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: NamedExpr {
|
node: NamedExpr(
|
||||||
|
ExprNamedExpr {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -40,10 +42,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -57,7 +61,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BinOp {
|
node: BinOp(
|
||||||
|
ExprBinOp {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -70,10 +75,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
op: Add,
|
op: Add,
|
||||||
right: Located {
|
right: Located {
|
||||||
|
@ -88,16 +95,20 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
|
@ -113,10 +124,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "y",
|
id: "y",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -130,14 +143,17 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "z",
|
id: "z",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ifs: [],
|
ifs: [],
|
||||||
is_async: 0,
|
is_async: 0,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "print",
|
id: "print",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -59,12 +63,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"Hello world",
|
"Hello world",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -78,17 +84,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -41,10 +43,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "print",
|
id: "print",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -59,17 +63,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"Hello world",
|
"Hello world",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"Hello world",
|
"Hello world",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: "parse_program(source, \"<test>\").unwrap()"
|
expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -43,10 +45,12 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "a",
|
id: "a",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -60,14 +64,17 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "b",
|
id: "b",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -82,7 +89,8 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -96,12 +104,14 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
4,
|
4,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -115,18 +125,22 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
5,
|
5,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: 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
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
|
@ -14,7 +14,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -27,10 +28,12 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -44,7 +47,8 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Slice {
|
node: Slice(
|
||||||
|
ExprSlice {
|
||||||
lower: Some(
|
lower: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -58,12 +62,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
upper: Some(
|
upper: Some(
|
||||||
|
@ -79,12 +85,14 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
step: Some(
|
step: Some(
|
||||||
|
@ -100,16 +108,20 @@ Located {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,10 +30,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "array_slice",
|
id: "array_slice",
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -60,10 +64,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "array",
|
id: "array",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -77,7 +83,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -91,12 +98,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -110,7 +119,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred(
|
||||||
|
ExprStarred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -123,13 +133,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "indexes",
|
id: "indexes",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -143,7 +156,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: UnaryOp {
|
node: UnaryOp(
|
||||||
|
ExprUnaryOp {
|
||||||
op: USub,
|
op: USub,
|
||||||
operand: Located {
|
operand: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -157,24 +171,30 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -188,7 +208,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign(
|
||||||
|
StmtAssign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -202,7 +223,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -215,10 +237,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "array",
|
id: "array",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -232,7 +256,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -246,12 +271,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -265,7 +292,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred(
|
||||||
|
ExprStarred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -278,13 +306,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "indexes",
|
id: "indexes",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -298,7 +329,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: UnaryOp {
|
node: UnaryOp(
|
||||||
|
ExprUnaryOp {
|
||||||
op: USub,
|
op: USub,
|
||||||
operand: Located {
|
operand: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -312,21 +344,26 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Store,
|
ctx: Store,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
|
@ -341,13 +378,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "array_slice",
|
id: "array_slice",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -361,7 +401,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -374,7 +415,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -387,10 +429,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "array",
|
id: "array",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -404,7 +448,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -418,7 +463,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred(
|
||||||
|
ExprStarred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -431,13 +477,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "indexes_to_select",
|
id: "indexes_to_select",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -451,7 +500,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred(
|
||||||
|
ExprStarred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -464,22 +514,28 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "indexes_to_select",
|
id: "indexes_to_select",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -493,7 +549,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -506,7 +563,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -519,10 +577,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "array",
|
id: "array",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -536,7 +596,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple(
|
||||||
|
ExprTuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -550,7 +611,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Slice {
|
node: Slice(
|
||||||
|
ExprSlice {
|
||||||
lower: Some(
|
lower: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -564,12 +626,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
upper: Some(
|
upper: Some(
|
||||||
|
@ -585,16 +649,19 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
5,
|
5,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
step: None,
|
step: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -608,7 +675,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred(
|
||||||
|
ExprStarred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -621,21 +689,27 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "indexes_to_select",
|
id: "indexes_to_select",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
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
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Try {
|
node: Try(
|
||||||
|
StmtTry {
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Raise {
|
node: Raise(
|
||||||
|
StmtRaise {
|
||||||
exc: Some(
|
exc: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -43,7 +45,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -56,10 +59,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "ValueError",
|
id: "ValueError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -74,20 +79,24 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
cause: None,
|
cause: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
handlers: [
|
handlers: [
|
||||||
|
@ -103,7 +112,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ExceptHandler {
|
node: ExceptHandler(
|
||||||
|
ExcepthandlerExceptHandler {
|
||||||
type_: Some(
|
type_: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -117,10 +127,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "TypeError",
|
id: "TypeError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
name: Some(
|
name: Some(
|
||||||
|
@ -139,7 +151,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -152,7 +165,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -165,10 +179,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "print",
|
id: "print",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -183,7 +199,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -197,12 +214,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"caught ",
|
"caught ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -216,7 +235,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -229,7 +249,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 4,
|
row: 4,
|
||||||
|
@ -242,10 +263,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "type",
|
id: "type",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -260,30 +283,38 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "e",
|
id: "e",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -297,7 +328,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ExceptHandler {
|
node: ExceptHandler(
|
||||||
|
ExcepthandlerExceptHandler {
|
||||||
type_: Some(
|
type_: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -311,10 +343,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "OSError",
|
id: "OSError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
name: Some(
|
name: Some(
|
||||||
|
@ -333,7 +367,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 6,
|
row: 6,
|
||||||
|
@ -346,7 +381,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 6,
|
row: 6,
|
||||||
|
@ -359,10 +395,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "print",
|
id: "print",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -377,7 +415,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -391,12 +430,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"caught ",
|
"caught ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -410,7 +451,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 6,
|
row: 6,
|
||||||
|
@ -423,7 +465,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 6,
|
row: 6,
|
||||||
|
@ -436,10 +479,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "type",
|
id: "type",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -454,34 +499,43 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "e",
|
id: "e",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
orelse: [],
|
orelse: [],
|
||||||
finalbody: [],
|
finalbody: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: TryStar {
|
node: TryStar(
|
||||||
|
StmtTryStar {
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -29,7 +30,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Raise {
|
node: Raise(
|
||||||
|
StmtRaise {
|
||||||
exc: Some(
|
exc: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -43,7 +45,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -56,10 +59,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "ExceptionGroup",
|
id: "ExceptionGroup",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -74,12 +79,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"eg",
|
"eg",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -93,7 +100,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: List {
|
node: List(
|
||||||
|
ExprList {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -107,7 +115,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -120,10 +129,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "ValueError",
|
id: "ValueError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -138,16 +149,19 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -161,7 +175,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -174,10 +189,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "TypeError",
|
id: "TypeError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -192,16 +209,19 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -215,7 +235,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -228,10 +249,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "OSError",
|
id: "OSError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -246,16 +269,19 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
3,
|
3,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -269,7 +295,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 3,
|
row: 3,
|
||||||
|
@ -282,10 +309,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "OSError",
|
id: "OSError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -300,28 +329,34 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
4,
|
4,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
cause: None,
|
cause: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
handlers: [
|
handlers: [
|
||||||
|
@ -337,7 +372,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ExceptHandler {
|
node: ExceptHandler(
|
||||||
|
ExcepthandlerExceptHandler {
|
||||||
type_: Some(
|
type_: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -351,10 +387,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "TypeError",
|
id: "TypeError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
name: Some(
|
name: Some(
|
||||||
|
@ -373,7 +411,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
|
@ -386,7 +425,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
|
@ -399,10 +439,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "print",
|
id: "print",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -417,7 +459,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -431,12 +474,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"caught ",
|
"caught ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -450,7 +495,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
|
@ -463,7 +509,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
|
@ -476,10 +523,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "type",
|
id: "type",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -494,18 +543,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "e",
|
id: "e",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -519,12 +572,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
" with nested ",
|
" with nested ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -538,7 +593,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
|
@ -551,7 +607,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute(
|
||||||
|
ExprAttribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
|
@ -564,30 +621,38 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "e",
|
id: "e",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
attr: "exceptions",
|
attr: "exceptions",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -601,7 +666,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ExceptHandler {
|
node: ExceptHandler(
|
||||||
|
ExcepthandlerExceptHandler {
|
||||||
type_: Some(
|
type_: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -615,10 +681,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "OSError",
|
id: "OSError",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
name: Some(
|
name: Some(
|
||||||
|
@ -637,7 +705,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 7,
|
row: 7,
|
||||||
|
@ -650,7 +719,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 7,
|
row: 7,
|
||||||
|
@ -663,10 +733,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "print",
|
id: "print",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -681,7 +753,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -695,12 +768,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"caught ",
|
"caught ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -714,7 +789,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 7,
|
row: 7,
|
||||||
|
@ -727,7 +803,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call(
|
||||||
|
ExprCall {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 7,
|
row: 7,
|
||||||
|
@ -740,10 +817,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "type",
|
id: "type",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
|
@ -758,18 +837,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "e",
|
id: "e",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -783,12 +866,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
" with nested ",
|
" with nested ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -802,7 +887,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 7,
|
row: 7,
|
||||||
|
@ -815,7 +901,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute(
|
||||||
|
ExprAttribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 7,
|
row: 7,
|
||||||
|
@ -828,34 +915,43 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "e",
|
id: "e",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
attr: "exceptions",
|
attr: "exceptions",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
keywords: [],
|
keywords: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
orelse: [],
|
orelse: [],
|
||||||
finalbody: [],
|
finalbody: [],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/parser.rs
|
source: parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef(
|
||||||
|
StmtFunctionDef {
|
||||||
name: "args_to_tuple",
|
name: "args_to_tuple",
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
|
@ -48,7 +49,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred(
|
||||||
|
ExprStarred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -61,13 +63,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "Ts",
|
id: "Ts",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
type_comment: None,
|
type_comment: None,
|
||||||
|
@ -92,7 +97,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -105,12 +111,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Ellipsis,
|
value: Ellipsis,
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
decorator_list: [],
|
decorator_list: [],
|
||||||
|
@ -127,7 +136,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript(
|
||||||
|
ExprSubscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -140,10 +150,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "Tuple",
|
id: "Tuple",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -157,7 +169,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred(
|
||||||
|
ExprStarred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -170,19 +183,24 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "Ts",
|
id: "Ts",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
type_comment: None,
|
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
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\u{8}",
|
"\u{8}",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\u{7}",
|
"\u{7}",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\r",
|
"\r",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\u{89}",
|
"\u{89}",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\u{7f}",
|
"\u{7f}",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Bytes(
|
value: Bytes(
|
||||||
[
|
[
|
||||||
0,
|
0,
|
||||||
|
@ -291,7 +293,9 @@ expression: parse_ast
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\u{1b}",
|
"\u{1b}",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Bytes(
|
value: Bytes(
|
||||||
[
|
[
|
||||||
111,
|
111,
|
||||||
|
@ -45,7 +47,9 @@ expression: parse_ast
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Bytes(
|
value: Bytes(
|
||||||
[
|
[
|
||||||
35,
|
35,
|
||||||
|
@ -40,7 +42,9 @@ expression: parse_ast
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\u{c}",
|
"\u{c}",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\\",
|
"\\",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -74,18 +79,23 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\n",
|
"\n",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -74,18 +79,23 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\\\n",
|
"\\\n",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -74,18 +79,23 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"user=",
|
"user=",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -53,7 +57,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -66,13 +71,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "user",
|
id: "user",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 114,
|
conversion: 114,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"mix ",
|
"mix ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"user=",
|
"user=",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -53,12 +57,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -72,7 +78,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -85,14 +92,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "user",
|
id: "user",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 114,
|
conversion: 114,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -106,12 +116,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
" with text and ",
|
" with text and ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -125,12 +137,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"second=",
|
"second=",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -144,12 +158,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -163,7 +179,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -176,13 +193,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "second",
|
id: "second",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 114,
|
conversion: 114,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"user=",
|
"user=",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -53,7 +57,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -66,10 +71,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "user",
|
id: "user",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: Some(
|
format_spec: Some(
|
||||||
|
@ -85,7 +92,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -99,17 +107,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
">10",
|
">10",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\n",
|
"\n",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 2,
|
row: 2,
|
||||||
|
@ -74,18 +79,23 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"\u{88}",
|
"\u{88}",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -42,16 +44,20 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"Hello world",
|
"Hello world",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -42,16 +44,20 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"Hello world",
|
"Hello world",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -42,12 +44,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"Hello world",
|
"Hello world",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -74,20 +79,25 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"!",
|
"!",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,14 +29,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "a",
|
id: "a",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -49,7 +53,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -62,14 +67,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "b",
|
id: "b",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -83,11 +91,13 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"{foo}",
|
"{foo}",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Compare {
|
node: Compare(
|
||||||
|
ExprCompare {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -41,12 +43,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
42,
|
42,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ops: [
|
ops: [
|
||||||
Eq,
|
Eq,
|
||||||
|
@ -64,18 +68,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
42,
|
42,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "foo",
|
id: "foo",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: Some(
|
format_spec: Some(
|
||||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -61,7 +65,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -74,19 +79,24 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "spec",
|
id: "spec",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,7 +29,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Compare {
|
node: Compare(
|
||||||
|
ExprCompare {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -41,12 +43,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
ops: [
|
ops: [
|
||||||
NotEq,
|
NotEq,
|
||||||
|
@ -64,18 +68,22 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Int(
|
value: Int(
|
||||||
2,
|
2,
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,10 +29,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "foo",
|
id: "foo",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: Some(
|
format_spec: Some(
|
||||||
|
@ -47,7 +50,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr(
|
||||||
|
ExprJoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -61,17 +65,21 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"spec",
|
"spec",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"x =",
|
"x =",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"",
|
"",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -53,7 +57,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -66,13 +71,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 114,
|
conversion: 114,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,12 +15,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"x=",
|
"x=",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -34,12 +36,14 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
" ",
|
" ",
|
||||||
),
|
),
|
||||||
kind: None,
|
kind: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
|
@ -53,7 +57,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -66,13 +71,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name(
|
||||||
|
ExprName {
|
||||||
id: "x",
|
id: "x",
|
||||||
ctx: Load,
|
ctx: Load,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 114,
|
conversion: 114,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue(
|
||||||
|
ExprFormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,12 +29,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Yield {
|
node: Yield(
|
||||||
|
ExprYield {
|
||||||
value: None,
|
value: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: None,
|
format_spec: None,
|
||||||
},
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
source: compiler/parser/src/string.rs
|
source: parser/src/string.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
|
@ -15,7 +15,8 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr(
|
||||||
|
StmtExpr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
|
@ -28,13 +29,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant(
|
||||||
|
ExprConstant {
|
||||||
value: Str(
|
value: Str(
|
||||||
"Hello world",
|
"Hello world",
|
||||||
),
|
),
|
||||||
kind: None,
|
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