mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-09 22:25:23 +00:00
Replace row/column based Location with byte-offsets.
This commit is contained in:
parent
48920a034e
commit
56f3371b73
131 changed files with 12128 additions and 23200 deletions
|
@ -12,6 +12,7 @@ include = ["LICENSE", "Cargo.toml", "src/**/*.rs"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"ast", "core", "literal", "parser",
|
"ast", "core", "literal", "parser",
|
||||||
|
"ruff_text_size",
|
||||||
]
|
]
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
|
|
@ -16,5 +16,6 @@ unparse = ["rustpython-literal"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustpython-compiler-core = { path = "../core", version = "0.2.0" }
|
rustpython-compiler-core = { path = "../core", version = "0.2.0" }
|
||||||
rustpython-literal = { path = "../literal", version = "0.2.0", optional = true }
|
rustpython-literal = { path = "../literal", version = "0.2.0", optional = true }
|
||||||
|
ruff_text_size = { path = "../ruff_text_size" }
|
||||||
|
|
||||||
num-bigint = { workspace = true }
|
num-bigint = { workspace = true }
|
||||||
|
|
|
@ -238,13 +238,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:
|
||||||
|
@ -311,7 +316,7 @@ class FoldImplVisitor(TypeInfoEmitVisitor):
|
||||||
depth,
|
depth,
|
||||||
)
|
)
|
||||||
self.emit(
|
self.emit(
|
||||||
"Ok(Located { custom: folder.map_user(node.custom)?, location: node.location, end_location: node.end_location, node: f(folder, node.node)? })",
|
"Ok(Located { custom: folder.map_user(node.custom)?, range: node.range, node: f(folder, node.node)? })",
|
||||||
depth + 1,
|
depth + 1,
|
||||||
)
|
)
|
||||||
self.emit("}", depth)
|
self.emit("}", depth)
|
||||||
|
@ -649,7 +654,7 @@ def write_ast_def(mod, typeinfo, f):
|
||||||
#![allow(clippy::derive_partial_eq_without_eq)]
|
#![allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
|
||||||
pub use crate::constant::*;
|
pub use crate::constant::*;
|
||||||
pub use crate::Location;
|
pub use ruff_text_size::{TextSize, TextRange};
|
||||||
|
|
||||||
type Ident = String;
|
type Ident = String;
|
||||||
\n
|
\n
|
||||||
|
@ -661,25 +666,53 @@ def write_ast_def(mod, typeinfo, f):
|
||||||
textwrap.dedent(
|
textwrap.dedent(
|
||||||
"""
|
"""
|
||||||
pub struct Located<T, U = ()> {
|
pub struct Located<T, U = ()> {
|
||||||
pub location: Location,
|
pub range: TextRange,
|
||||||
pub end_location: Option<Location>,
|
|
||||||
pub custom: U,
|
pub custom: U,
|
||||||
pub node: T,
|
pub node: T,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Located<T> {
|
impl<T> Located<T> {
|
||||||
pub fn new(location: Location, end_location: Location, node: T) -> Self {
|
pub fn new(start: TextSize, end: TextSize, node: T) -> Self {
|
||||||
Self { location, end_location: Some(end_location), custom: (), node }
|
Self { range: TextRange::new(start, end), custom: (), node }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const fn start(&self) -> Location {
|
/// Creates a new node that spans the position specified by `range`.
|
||||||
self.location
|
pub fn with_range(node: T, range: TextRange) -> Self {
|
||||||
|
Self {
|
||||||
|
range,
|
||||||
|
custom: (),
|
||||||
|
node,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the node's [`end_location`](Located::end_location) or [`location`](Located::start) if
|
/// Returns the absolute start position of the node from the beginning of the document.
|
||||||
/// [`end_location`](Located::end_location) is `None`.
|
#[inline]
|
||||||
pub fn end(&self) -> Location {
|
pub const fn start(&self) -> TextSize {
|
||||||
self.end_location.unwrap_or(self.location)
|
self.range.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the node
|
||||||
|
#[inline]
|
||||||
|
pub fn node(&self) -> &T {
|
||||||
|
&self.node
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Consumes self and returns the node.
|
||||||
|
#[inline]
|
||||||
|
pub fn into_node(self) -> T {
|
||||||
|
self.node
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the `range` of the node. The range offsets are absolute to the start of the document.
|
||||||
|
#[inline]
|
||||||
|
pub const fn range(&self) -> TextRange {
|
||||||
|
self.range
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the absolute position at which the node ends in the source document.
|
||||||
|
#[inline]
|
||||||
|
pub const fn end(&self) -> TextSize {
|
||||||
|
self.range.end()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,36 +3,63 @@
|
||||||
#![allow(clippy::derive_partial_eq_without_eq)]
|
#![allow(clippy::derive_partial_eq_without_eq)]
|
||||||
|
|
||||||
pub use crate::constant::*;
|
pub use crate::constant::*;
|
||||||
pub use crate::Location;
|
pub use ruff_text_size::{TextRange, TextSize};
|
||||||
|
|
||||||
type Ident = String;
|
type Ident = String;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
pub struct Located<T, U = ()> {
|
pub struct Located<T, U = ()> {
|
||||||
pub location: Location,
|
pub range: TextRange,
|
||||||
pub end_location: Option<Location>,
|
|
||||||
pub custom: U,
|
pub custom: U,
|
||||||
pub node: T,
|
pub node: T,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> Located<T> {
|
impl<T> Located<T> {
|
||||||
pub fn new(location: Location, end_location: Location, node: T) -> Self {
|
pub fn new(start: TextSize, end: TextSize, node: T) -> Self {
|
||||||
Self {
|
Self {
|
||||||
location,
|
range: TextRange::new(start, end),
|
||||||
end_location: Some(end_location),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node,
|
node,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const fn start(&self) -> Location {
|
/// Creates a new node that spans the position specified by `range`.
|
||||||
self.location
|
pub fn with_range(node: T, range: TextRange) -> Self {
|
||||||
|
Self {
|
||||||
|
range,
|
||||||
|
custom: (),
|
||||||
|
node,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the node's [`end_location`](Located::end_location) or [`location`](Located::start) if
|
/// Returns the absolute start position of the node from the beginning of the document.
|
||||||
/// [`end_location`](Located::end_location) is `None`.
|
#[inline]
|
||||||
pub fn end(&self) -> Location {
|
pub const fn start(&self) -> TextSize {
|
||||||
self.end_location.unwrap_or(self.location)
|
self.range.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the node
|
||||||
|
#[inline]
|
||||||
|
pub fn node(&self) -> &T {
|
||||||
|
&self.node
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Consumes self and returns the node.
|
||||||
|
#[inline]
|
||||||
|
pub fn into_node(self) -> T {
|
||||||
|
self.node
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the `range` of the node. The range offsets are absolute to the start of the document.
|
||||||
|
#[inline]
|
||||||
|
pub const fn range(&self) -> TextRange {
|
||||||
|
self.range
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the absolute position at which the node ends in the source document.
|
||||||
|
#[inline]
|
||||||
|
pub const fn end(&self) -> TextSize {
|
||||||
|
self.range.end()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,8 +581,7 @@ pub mod fold {
|
||||||
) -> Result<Located<MT, F::TargetU>, F::Error> {
|
) -> Result<Located<MT, F::TargetU>, F::Error> {
|
||||||
Ok(Located {
|
Ok(Located {
|
||||||
custom: folder.map_user(node.custom)?,
|
custom: folder.map_user(node.custom)?,
|
||||||
location: node.location,
|
range: node.range,
|
||||||
end_location: node.end_location,
|
|
||||||
node: f(folder, node.node)?,
|
node: f(folder, node.node)?,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,8 +126,7 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
|
||||||
Ok(crate::Expr {
|
Ok(crate::Expr {
|
||||||
node: expr,
|
node: expr,
|
||||||
custom: node.custom,
|
custom: node.custom,
|
||||||
location: node.location,
|
range: node.range,
|
||||||
end_location: node.end_location,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
_ => crate::fold::fold_expr(self, node),
|
_ => crate::fold::fold_expr(self, node),
|
||||||
|
@ -144,19 +143,17 @@ mod tests {
|
||||||
fn test_constant_opt() {
|
fn test_constant_opt() {
|
||||||
use crate::{fold::Fold, *};
|
use crate::{fold::Fold, *};
|
||||||
|
|
||||||
let start = Default::default();
|
let range = TextRange::default();
|
||||||
let end = None;
|
#[allow(clippy::let_unit_value)]
|
||||||
let custom = ();
|
let custom = ();
|
||||||
let ast = Located {
|
let ast = Located {
|
||||||
location: start,
|
range,
|
||||||
end_location: end,
|
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Tuple {
|
node: ExprKind::Tuple {
|
||||||
ctx: ExprContext::Load,
|
ctx: ExprContext::Load,
|
||||||
elts: vec![
|
elts: vec![
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
range,
|
||||||
end_location: end,
|
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprKind::Constant {
|
||||||
value: BigInt::from(1).into(),
|
value: BigInt::from(1).into(),
|
||||||
|
@ -164,8 +161,7 @@ mod tests {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
range,
|
||||||
end_location: end,
|
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprKind::Constant {
|
||||||
value: BigInt::from(2).into(),
|
value: BigInt::from(2).into(),
|
||||||
|
@ -173,15 +169,13 @@ mod tests {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
range,
|
||||||
end_location: end,
|
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Tuple {
|
node: ExprKind::Tuple {
|
||||||
ctx: ExprContext::Load,
|
ctx: ExprContext::Load,
|
||||||
elts: vec![
|
elts: vec![
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
range,
|
||||||
end_location: end,
|
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprKind::Constant {
|
||||||
value: BigInt::from(3).into(),
|
value: BigInt::from(3).into(),
|
||||||
|
@ -189,8 +183,7 @@ mod tests {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
range,
|
||||||
end_location: end,
|
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprKind::Constant {
|
||||||
value: BigInt::from(4).into(),
|
value: BigInt::from(4).into(),
|
||||||
|
@ -198,8 +191,7 @@ mod tests {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
range,
|
||||||
end_location: end,
|
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprKind::Constant {
|
||||||
value: BigInt::from(5).into(),
|
value: BigInt::from(5).into(),
|
||||||
|
@ -218,8 +210,7 @@ mod tests {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
new_ast,
|
new_ast,
|
||||||
Located {
|
Located {
|
||||||
location: start,
|
range,
|
||||||
end_location: end,
|
|
||||||
custom,
|
custom,
|
||||||
node: ExprKind::Constant {
|
node: ExprKind::Constant {
|
||||||
value: Constant::Tuple(vec![
|
value: Constant::Tuple(vec![
|
||||||
|
|
|
@ -7,6 +7,5 @@ mod impls;
|
||||||
mod unparse;
|
mod unparse;
|
||||||
|
|
||||||
pub use ast_gen::*;
|
pub use ast_gen::*;
|
||||||
pub use rustpython_compiler_core::Location;
|
|
||||||
|
|
||||||
pub type Suite<U = ()> = Vec<Stmt<U>>;
|
pub type Suite<U = ()> = Vec<Stmt<U>>;
|
||||||
|
|
|
@ -9,10 +9,11 @@ license = "MIT"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bitflags = { workspace = true }
|
bitflags = { workspace = true }
|
||||||
bstr = { workspace = true }
|
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
num-bigint = { workspace = true }
|
num-bigint = { workspace = true }
|
||||||
num-complex = { workspace = true }
|
num-complex = { workspace = true }
|
||||||
serde = { version = "1.0.133", optional = true, default-features = false, features = ["derive"] }
|
serde = { version = "1.0.133", optional = true, default-features = false, features = ["derive"] }
|
||||||
|
ruff_text_size = { path = "../ruff_text_size" }
|
||||||
|
|
||||||
lz4_flex = "0.9.2"
|
lz4_flex = "0.9.2"
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
use crate::Location;
|
use ruff_text_size::TextSize;
|
||||||
use std::error::Error as StdError;
|
use std::error::Error as StdError;
|
||||||
use std::fmt::Display;
|
use std::fmt::Display;
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Eq)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
pub struct BaseError<T> {
|
pub struct BaseError<T> {
|
||||||
pub error: T,
|
pub error: T,
|
||||||
pub location: Location,
|
pub location: TextSize,
|
||||||
pub source_path: String,
|
pub source_path: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,12 @@ where
|
||||||
T: std::fmt::Display,
|
T: std::fmt::Display,
|
||||||
{
|
{
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||||
self.location.fmt_with(f, &self.error)
|
write!(
|
||||||
|
f,
|
||||||
|
"{} at byte offset {}",
|
||||||
|
&self.error,
|
||||||
|
u32::from(self.location)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ tiny-keccak = { version = "2", features = ["sha3"] }
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustpython-ast = { path = "../ast", version = "0.2.0" }
|
rustpython-ast = { path = "../ast", version = "0.2.0" }
|
||||||
rustpython-compiler-core = { path = "../core", version = "0.2.0" }
|
rustpython-compiler-core = { path = "../core", version = "0.2.0" }
|
||||||
|
ruff_text_size = { path = "../ruff_text_size" }
|
||||||
|
|
||||||
ahash = { workspace = true }
|
ahash = { workspace = true }
|
||||||
itertools = { workspace = true }
|
itertools = { workspace = true }
|
||||||
|
|
|
@ -4,6 +4,7 @@ use crate::{
|
||||||
ast,
|
ast,
|
||||||
lexer::{LexicalError, LexicalErrorType},
|
lexer::{LexicalError, LexicalErrorType},
|
||||||
};
|
};
|
||||||
|
use ruff_text_size::TextSize;
|
||||||
use rustc_hash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
pub(crate) struct ArgumentList {
|
pub(crate) struct ArgumentList {
|
||||||
|
@ -83,10 +84,7 @@ pub(crate) fn parse_params(
|
||||||
Ok((pos_only, names, defaults))
|
Ok((pos_only, names, defaults))
|
||||||
}
|
}
|
||||||
|
|
||||||
type FunctionArgument = (
|
type FunctionArgument = (Option<(TextSize, TextSize, Option<String>)>, ast::Expr);
|
||||||
Option<(ast::Location, ast::Location, Option<String>)>,
|
|
||||||
ast::Expr,
|
|
||||||
);
|
|
||||||
|
|
||||||
// Parse arguments as supplied during a function/lambda *call*.
|
// Parse arguments as supplied during a function/lambda *call*.
|
||||||
pub(crate) fn parse_args(func_args: Vec<FunctionArgument>) -> Result<ArgumentList, LexicalError> {
|
pub(crate) fn parse_args(func_args: Vec<FunctionArgument>) -> Result<ArgumentList, LexicalError> {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
//! The primary function in this module is [`lex`], which takes a string slice
|
//! The primary function in this module is [`lex`], which takes a string slice
|
||||||
//! and returns an iterator over the tokens in the source code. The tokens are currently returned
|
//! and returns an iterator over the tokens in the source code. The tokens are currently returned
|
||||||
//! as a `Result<Spanned, LexicalError>`, where [`Spanned`] is a tuple containing the
|
//! as a `Result<Spanned, LexicalError>`, where [`Spanned`] is a tuple containing the
|
||||||
//! start and end [`Location`] and a [`Tok`] denoting the token.
|
//! start and end [`TextSize`] and a [`Tok`] denoting the token.
|
||||||
//!
|
//!
|
||||||
//! # Example
|
//! # Example
|
||||||
//!
|
//!
|
||||||
|
@ -19,20 +19,15 @@
|
||||||
//! .map(|tok| tok.expect("Failed to lex"))
|
//! .map(|tok| tok.expect("Failed to lex"))
|
||||||
//! .collect::<Vec<_>>();
|
//! .collect::<Vec<_>>();
|
||||||
//!
|
//!
|
||||||
//! for (start, token, end) in tokens {
|
//! for (token, range) in tokens {
|
||||||
//! println!(
|
//! println!(
|
||||||
//! "{0},{1}-{2},{3:<5} {token:?}",
|
//! "{token:?}@{range:?}",
|
||||||
//! start.row(),
|
|
||||||
//! start.column(),
|
|
||||||
//! end.row(),
|
|
||||||
//! end.column(),
|
|
||||||
//! );
|
//! );
|
||||||
//! }
|
//! }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! [Lexical analysis]: https://docs.python.org/3/reference/lexical_analysis.html
|
//! [Lexical analysis]: https://docs.python.org/3/reference/lexical_analysis.html
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::Location,
|
|
||||||
mode::Mode,
|
mode::Mode,
|
||||||
soft_keywords::SoftKeywordTransformer,
|
soft_keywords::SoftKeywordTransformer,
|
||||||
string::FStringErrorType,
|
string::FStringErrorType,
|
||||||
|
@ -41,6 +36,7 @@ use crate::{
|
||||||
use log::trace;
|
use log::trace;
|
||||||
use num_bigint::BigInt;
|
use num_bigint::BigInt;
|
||||||
use num_traits::{Num, Zero};
|
use num_traits::{Num, Zero};
|
||||||
|
use ruff_text_size::{TextLen, TextRange, TextSize};
|
||||||
use std::{char, cmp::Ordering, ops::Index, slice::SliceIndex, str::FromStr};
|
use std::{char, cmp::Ordering, ops::Index, slice::SliceIndex, str::FromStr};
|
||||||
use unic_emoji_char::is_emoji_presentation;
|
use unic_emoji_char::is_emoji_presentation;
|
||||||
use unic_ucd_ident::{is_xid_continue, is_xid_start};
|
use unic_ucd_ident::{is_xid_continue, is_xid_start};
|
||||||
|
@ -57,7 +53,7 @@ impl IndentationLevel {
|
||||||
fn compare_strict(
|
fn compare_strict(
|
||||||
&self,
|
&self,
|
||||||
other: &IndentationLevel,
|
other: &IndentationLevel,
|
||||||
location: Location,
|
location: TextSize,
|
||||||
) -> Result<Ordering, LexicalError> {
|
) -> Result<Ordering, LexicalError> {
|
||||||
// We only know for sure that we're smaller or bigger if tabs
|
// We only know for sure that we're smaller or bigger if tabs
|
||||||
// and spaces both differ in the same direction. Otherwise we're
|
// and spaces both differ in the same direction. Otherwise we're
|
||||||
|
@ -178,7 +174,7 @@ pub struct Lexer<T: Iterator<Item = char>> {
|
||||||
// Pending list of tokens to be returned.
|
// Pending list of tokens to be returned.
|
||||||
pending: Vec<Spanned>,
|
pending: Vec<Spanned>,
|
||||||
// The current location.
|
// The current location.
|
||||||
location: Location,
|
location: TextSize,
|
||||||
}
|
}
|
||||||
|
|
||||||
// generated in build.rs, in gen_phf()
|
// generated in build.rs, in gen_phf()
|
||||||
|
@ -186,8 +182,8 @@ pub struct Lexer<T: Iterator<Item = char>> {
|
||||||
pub static KEYWORDS: phf::Map<&'static str, Tok> =
|
pub static KEYWORDS: phf::Map<&'static str, Tok> =
|
||||||
include!(concat!(env!("OUT_DIR"), "/keywords.rs"));
|
include!(concat!(env!("OUT_DIR"), "/keywords.rs"));
|
||||||
|
|
||||||
/// Contains a Token along with its start and end location.
|
/// Contains a Token along with its `range`.
|
||||||
pub type Spanned = (Location, Tok, Location);
|
pub type Spanned = (Tok, TextRange);
|
||||||
/// The result of lexing a token.
|
/// The result of lexing a token.
|
||||||
pub type LexResult = Result<Spanned, LexicalError>;
|
pub type LexResult = Result<Spanned, LexicalError>;
|
||||||
|
|
||||||
|
@ -207,7 +203,7 @@ pub type LexResult = Result<Spanned, LexicalError>;
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn lex(source: &str, mode: Mode) -> impl Iterator<Item = LexResult> + '_ {
|
pub fn lex(source: &str, mode: Mode) -> impl Iterator<Item = LexResult> + '_ {
|
||||||
lex_located(source, mode, Location::default())
|
lex_located(source, mode, TextSize::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new lexer from a source string, starting at a given location.
|
/// Create a new lexer from a source string, starting at a given location.
|
||||||
|
@ -215,7 +211,7 @@ pub fn lex(source: &str, mode: Mode) -> impl Iterator<Item = LexResult> + '_ {
|
||||||
pub fn lex_located(
|
pub fn lex_located(
|
||||||
source: &str,
|
source: &str,
|
||||||
mode: Mode,
|
mode: Mode,
|
||||||
start_location: Location,
|
start_location: TextSize,
|
||||||
) -> impl Iterator<Item = LexResult> + '_ {
|
) -> impl Iterator<Item = LexResult> + '_ {
|
||||||
SoftKeywordTransformer::new(Lexer::new(source.chars(), start_location), mode)
|
SoftKeywordTransformer::new(Lexer::new(source.chars(), start_location), mode)
|
||||||
}
|
}
|
||||||
|
@ -226,7 +222,7 @@ where
|
||||||
{
|
{
|
||||||
/// Create a new lexer from T and a starting location. You probably want to use
|
/// Create a new lexer from T and a starting location. You probably want to use
|
||||||
/// [`lex`] instead.
|
/// [`lex`] instead.
|
||||||
pub fn new(input: T, start: Location) -> Self {
|
pub fn new(input: T, start: TextSize) -> Self {
|
||||||
let mut lxr = Lexer {
|
let mut lxr = Lexer {
|
||||||
at_begin_of_line: true,
|
at_begin_of_line: true,
|
||||||
nesting: 0,
|
nesting: 0,
|
||||||
|
@ -244,6 +240,7 @@ where
|
||||||
// spell-checker:ignore feff
|
// spell-checker:ignore feff
|
||||||
if let Some('\u{feff}') = lxr.window[0] {
|
if let Some('\u{feff}') = lxr.window[0] {
|
||||||
lxr.window.slide();
|
lxr.window.slide();
|
||||||
|
lxr.location += '\u{feff}'.text_len();
|
||||||
}
|
}
|
||||||
lxr
|
lxr
|
||||||
}
|
}
|
||||||
|
@ -273,9 +270,9 @@ where
|
||||||
let end_pos = self.get_pos();
|
let end_pos = self.get_pos();
|
||||||
|
|
||||||
if let Some(tok) = KEYWORDS.get(&name) {
|
if let Some(tok) = KEYWORDS.get(&name) {
|
||||||
Ok((start_pos, tok.clone(), end_pos))
|
Ok((tok.clone(), TextRange::new(start_pos, end_pos)))
|
||||||
} else {
|
} else {
|
||||||
Ok((start_pos, Tok::Name { name }, end_pos))
|
Ok((Tok::Name { name }, TextRange::new(start_pos, end_pos)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,14 +303,14 @@ where
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lex a hex/octal/decimal/binary number without a decimal point.
|
/// Lex a hex/octal/decimal/binary number without a decimal point.
|
||||||
fn lex_number_radix(&mut self, start_pos: Location, radix: u32) -> LexResult {
|
fn lex_number_radix(&mut self, start_pos: TextSize, radix: u32) -> LexResult {
|
||||||
let value_text = self.radix_run(radix);
|
let value_text = self.radix_run(radix);
|
||||||
let end_pos = self.get_pos();
|
let end_pos = self.get_pos();
|
||||||
let value = BigInt::from_str_radix(&value_text, radix).map_err(|e| LexicalError {
|
let value = BigInt::from_str_radix(&value_text, radix).map_err(|e| LexicalError {
|
||||||
error: LexicalErrorType::OtherError(format!("{e:?}")),
|
error: LexicalErrorType::OtherError(format!("{e:?}")),
|
||||||
location: start_pos,
|
location: start_pos,
|
||||||
})?;
|
})?;
|
||||||
Ok((start_pos, Tok::Int { value }, end_pos))
|
Ok((Tok::Int { value }, TextRange::new(start_pos, end_pos)))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lex a normal number, that is, no octal, hex or binary number.
|
/// Lex a normal number, that is, no octal, hex or binary number.
|
||||||
|
@ -370,16 +367,15 @@ where
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let end_pos = self.get_pos();
|
let end_pos = self.get_pos();
|
||||||
Ok((
|
Ok((
|
||||||
start_pos,
|
|
||||||
Tok::Complex {
|
Tok::Complex {
|
||||||
real: 0.0,
|
real: 0.0,
|
||||||
imag: value,
|
imag: value,
|
||||||
},
|
},
|
||||||
end_pos,
|
TextRange::new(start_pos, end_pos),
|
||||||
))
|
))
|
||||||
} else {
|
} else {
|
||||||
let end_pos = self.get_pos();
|
let end_pos = self.get_pos();
|
||||||
Ok((start_pos, Tok::Float { value }, end_pos))
|
Ok((Tok::Float { value }, TextRange::new(start_pos, end_pos)))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Parse trailing 'j':
|
// Parse trailing 'j':
|
||||||
|
@ -387,7 +383,10 @@ where
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let end_pos = self.get_pos();
|
let end_pos = self.get_pos();
|
||||||
let imag = f64::from_str(&value_text).unwrap();
|
let imag = f64::from_str(&value_text).unwrap();
|
||||||
Ok((start_pos, Tok::Complex { real: 0.0, imag }, end_pos))
|
Ok((
|
||||||
|
Tok::Complex { real: 0.0, imag },
|
||||||
|
TextRange::new(start_pos, end_pos),
|
||||||
|
))
|
||||||
} else {
|
} else {
|
||||||
let end_pos = self.get_pos();
|
let end_pos = self.get_pos();
|
||||||
let value = value_text.parse::<BigInt>().unwrap();
|
let value = value_text.parse::<BigInt>().unwrap();
|
||||||
|
@ -398,7 +397,7 @@ where
|
||||||
location: self.get_pos(),
|
location: self.get_pos(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
Ok((start_pos, Tok::Int { value }, end_pos))
|
Ok((Tok::Int { value }, TextRange::new(start_pos, end_pos)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -458,7 +457,7 @@ where
|
||||||
match self.window[0] {
|
match self.window[0] {
|
||||||
Some('\n' | '\r') | None => {
|
Some('\n' | '\r') | None => {
|
||||||
let end_pos = self.get_pos();
|
let end_pos = self.get_pos();
|
||||||
return Ok((start_pos, Tok::Comment(value), end_pos));
|
return Ok((Tok::Comment(value), TextRange::new(start_pos, end_pos)));
|
||||||
}
|
}
|
||||||
Some(_) => {}
|
Some(_) => {}
|
||||||
}
|
}
|
||||||
|
@ -469,7 +468,7 @@ where
|
||||||
/// Lex a string literal.
|
/// Lex a string literal.
|
||||||
fn lex_string(&mut self, kind: StringKind) -> LexResult {
|
fn lex_string(&mut self, kind: StringKind) -> LexResult {
|
||||||
let start_pos = self.get_pos();
|
let start_pos = self.get_pos();
|
||||||
for _ in 0..kind.prefix_len() {
|
for _ in 0..u32::from(kind.prefix_len()) {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
}
|
}
|
||||||
let quote_char = self.next_char().unwrap();
|
let quote_char = self.next_char().unwrap();
|
||||||
|
@ -538,7 +537,7 @@ where
|
||||||
kind,
|
kind,
|
||||||
triple_quoted,
|
triple_quoted,
|
||||||
};
|
};
|
||||||
Ok((start_pos, tok, end_pos))
|
Ok((tok, TextRange::new(start_pos, end_pos)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks if the character c is a valid starting character as described
|
// Checks if the character c is a valid starting character as described
|
||||||
|
@ -664,7 +663,15 @@ where
|
||||||
// New indentation level:
|
// New indentation level:
|
||||||
self.indentations.push(indentation_level);
|
self.indentations.push(indentation_level);
|
||||||
let tok_pos = self.get_pos();
|
let tok_pos = self.get_pos();
|
||||||
self.emit((tok_pos, Tok::Indent, tok_pos));
|
self.emit((
|
||||||
|
Tok::Indent,
|
||||||
|
TextRange::new(
|
||||||
|
tok_pos
|
||||||
|
- TextSize::new(indentation_level.spaces)
|
||||||
|
- TextSize::new(indentation_level.tabs),
|
||||||
|
tok_pos,
|
||||||
|
),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
Ordering::Less => {
|
Ordering::Less => {
|
||||||
// One or more dedentations
|
// One or more dedentations
|
||||||
|
@ -678,7 +685,7 @@ where
|
||||||
Ordering::Less => {
|
Ordering::Less => {
|
||||||
self.indentations.pop();
|
self.indentations.pop();
|
||||||
let tok_pos = self.get_pos();
|
let tok_pos = self.get_pos();
|
||||||
self.emit((tok_pos, Tok::Dedent, tok_pos));
|
self.emit((Tok::Dedent, TextRange::empty(tok_pos)));
|
||||||
}
|
}
|
||||||
Ordering::Equal => {
|
Ordering::Equal => {
|
||||||
// We arrived at proper level of indentation.
|
// We arrived at proper level of indentation.
|
||||||
|
@ -723,16 +730,16 @@ where
|
||||||
// Next, insert a trailing newline, if required.
|
// Next, insert a trailing newline, if required.
|
||||||
if !self.at_begin_of_line {
|
if !self.at_begin_of_line {
|
||||||
self.at_begin_of_line = true;
|
self.at_begin_of_line = true;
|
||||||
self.emit((tok_pos, Tok::Newline, tok_pos));
|
self.emit((Tok::Newline, TextRange::empty(tok_pos)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next, flush the indentation stack to zero.
|
// Next, flush the indentation stack to zero.
|
||||||
while !self.indentations.is_empty() {
|
while !self.indentations.is_empty() {
|
||||||
self.indentations.pop();
|
self.indentations.pop();
|
||||||
self.emit((tok_pos, Tok::Dedent, tok_pos));
|
self.emit((Tok::Dedent, TextRange::empty(tok_pos)));
|
||||||
}
|
}
|
||||||
|
|
||||||
self.emit((tok_pos, Tok::EndOfFile, tok_pos));
|
self.emit((Tok::EndOfFile, TextRange::empty(tok_pos)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -760,11 +767,11 @@ where
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::EqEqual, tok_end));
|
self.emit((Tok::EqEqual, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Equal, tok_end));
|
self.emit((Tok::Equal, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -774,10 +781,10 @@ where
|
||||||
if let Some('=') = self.window[0] {
|
if let Some('=') = self.window[0] {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::PlusEqual, tok_end));
|
self.emit((Tok::PlusEqual, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Plus, tok_end));
|
self.emit((Tok::Plus, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'*' => {
|
'*' => {
|
||||||
|
@ -787,7 +794,7 @@ where
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::StarEqual, tok_end));
|
self.emit((Tok::StarEqual, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
Some('*') => {
|
Some('*') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
|
@ -795,17 +802,20 @@ where
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::DoubleStarEqual, tok_end));
|
self.emit((
|
||||||
|
Tok::DoubleStarEqual,
|
||||||
|
TextRange::new(tok_start, tok_end),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::DoubleStar, tok_end));
|
self.emit((Tok::DoubleStar, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Star, tok_end));
|
self.emit((Tok::Star, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -816,7 +826,7 @@ where
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::SlashEqual, tok_end));
|
self.emit((Tok::SlashEqual, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
Some('/') => {
|
Some('/') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
|
@ -824,17 +834,20 @@ where
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::DoubleSlashEqual, tok_end));
|
self.emit((
|
||||||
|
Tok::DoubleSlashEqual,
|
||||||
|
TextRange::new(tok_start, tok_end),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::DoubleSlash, tok_end));
|
self.emit((Tok::DoubleSlash, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Slash, tok_end));
|
self.emit((Tok::Slash, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -844,10 +857,10 @@ where
|
||||||
if let Some('=') = self.window[0] {
|
if let Some('=') = self.window[0] {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::PercentEqual, tok_end));
|
self.emit((Tok::PercentEqual, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Percent, tok_end));
|
self.emit((Tok::Percent, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'|' => {
|
'|' => {
|
||||||
|
@ -856,10 +869,10 @@ where
|
||||||
if let Some('=') = self.window[0] {
|
if let Some('=') = self.window[0] {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::VbarEqual, tok_end));
|
self.emit((Tok::VbarEqual, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Vbar, tok_end));
|
self.emit((Tok::Vbar, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'^' => {
|
'^' => {
|
||||||
|
@ -868,10 +881,10 @@ where
|
||||||
if let Some('=') = self.window[0] {
|
if let Some('=') = self.window[0] {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::CircumflexEqual, tok_end));
|
self.emit((Tok::CircumflexEqual, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::CircumFlex, tok_end));
|
self.emit((Tok::CircumFlex, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'&' => {
|
'&' => {
|
||||||
|
@ -880,10 +893,10 @@ where
|
||||||
if let Some('=') = self.window[0] {
|
if let Some('=') = self.window[0] {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::AmperEqual, tok_end));
|
self.emit((Tok::AmperEqual, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Amper, tok_end));
|
self.emit((Tok::Amper, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'-' => {
|
'-' => {
|
||||||
|
@ -893,16 +906,16 @@ where
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::MinusEqual, tok_end));
|
self.emit((Tok::MinusEqual, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
Some('>') => {
|
Some('>') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Rarrow, tok_end));
|
self.emit((Tok::Rarrow, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Minus, tok_end));
|
self.emit((Tok::Minus, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -912,10 +925,10 @@ where
|
||||||
if let Some('=') = self.window[0] {
|
if let Some('=') = self.window[0] {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::AtEqual, tok_end));
|
self.emit((Tok::AtEqual, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::At, tok_end));
|
self.emit((Tok::At, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'!' => {
|
'!' => {
|
||||||
|
@ -924,7 +937,7 @@ where
|
||||||
if let Some('=') = self.window[0] {
|
if let Some('=') = self.window[0] {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::NotEqual, tok_end));
|
self.emit((Tok::NotEqual, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
return Err(LexicalError {
|
return Err(LexicalError {
|
||||||
error: LexicalErrorType::UnrecognizedToken { tok: '!' },
|
error: LexicalErrorType::UnrecognizedToken { tok: '!' },
|
||||||
|
@ -983,10 +996,10 @@ where
|
||||||
if let Some('=') = self.window[0] {
|
if let Some('=') = self.window[0] {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::ColonEqual, tok_end));
|
self.emit((Tok::ColonEqual, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Colon, tok_end));
|
self.emit((Tok::Colon, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
';' => {
|
';' => {
|
||||||
|
@ -1002,22 +1015,25 @@ where
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::LeftShiftEqual, tok_end));
|
self.emit((
|
||||||
|
Tok::LeftShiftEqual,
|
||||||
|
TextRange::new(tok_start, tok_end),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::LeftShift, tok_end));
|
self.emit((Tok::LeftShift, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::LessEqual, tok_end));
|
self.emit((Tok::LessEqual, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Less, tok_end));
|
self.emit((Tok::Less, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1031,22 +1047,25 @@ where
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::RightShiftEqual, tok_end));
|
self.emit((
|
||||||
|
Tok::RightShiftEqual,
|
||||||
|
TextRange::new(tok_start, tok_end),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::RightShift, tok_end));
|
self.emit((Tok::RightShift, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some('=') => {
|
Some('=') => {
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::GreaterEqual, tok_end));
|
self.emit((Tok::GreaterEqual, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Greater, tok_end));
|
self.emit((Tok::Greater, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1064,10 +1083,10 @@ where
|
||||||
self.next_char();
|
self.next_char();
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Ellipsis, tok_end));
|
self.emit((Tok::Ellipsis, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, Tok::Dot, tok_end));
|
self.emit((Tok::Dot, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1080,9 +1099,9 @@ where
|
||||||
// non-logical newline:
|
// non-logical newline:
|
||||||
if self.nesting == 0 {
|
if self.nesting == 0 {
|
||||||
self.at_begin_of_line = true;
|
self.at_begin_of_line = true;
|
||||||
self.emit((tok_start, Tok::Newline, tok_end));
|
self.emit((Tok::Newline, TextRange::new(tok_start, tok_end)));
|
||||||
} else {
|
} else {
|
||||||
self.emit((tok_start, Tok::NonLogicalNewline, tok_end));
|
self.emit((Tok::NonLogicalNewline, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
' ' | '\t' | '\x0C' => {
|
' ' | '\t' | '\x0C' => {
|
||||||
|
@ -1119,11 +1138,10 @@ where
|
||||||
self.next_char();
|
self.next_char();
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((
|
self.emit((
|
||||||
tok_start,
|
|
||||||
Tok::Name {
|
Tok::Name {
|
||||||
name: c.to_string(),
|
name: c.to_string(),
|
||||||
},
|
},
|
||||||
tok_end,
|
TextRange::new(tok_start, tok_end),
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
let c = self.next_char();
|
let c = self.next_char();
|
||||||
|
@ -1147,7 +1165,7 @@ where
|
||||||
std::hint::unreachable_unchecked()
|
std::hint::unreachable_unchecked()
|
||||||
});
|
});
|
||||||
let tok_end = self.get_pos();
|
let tok_end = self.get_pos();
|
||||||
self.emit((tok_start, ty, tok_end));
|
self.emit((ty, TextRange::new(tok_start, tok_end)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper function to go to the next character coming up.
|
// Helper function to go to the next character coming up.
|
||||||
|
@ -1155,25 +1173,26 @@ where
|
||||||
let mut c = self.window[0];
|
let mut c = self.window[0];
|
||||||
self.window.slide();
|
self.window.slide();
|
||||||
match c {
|
match c {
|
||||||
Some('\n') => {
|
|
||||||
self.location.newline();
|
|
||||||
}
|
|
||||||
Some('\r') => {
|
Some('\r') => {
|
||||||
if self.window[0] == Some('\n') {
|
if self.window[0] == Some('\n') {
|
||||||
|
self.location += TextSize::from(1);
|
||||||
self.window.slide();
|
self.window.slide();
|
||||||
}
|
}
|
||||||
self.location.newline();
|
|
||||||
|
self.location += TextSize::from(1);
|
||||||
c = Some('\n');
|
c = Some('\n');
|
||||||
}
|
}
|
||||||
_ => {
|
#[allow(unused_variables)]
|
||||||
self.location.go_right();
|
Some(c) => {
|
||||||
|
self.location += c.text_len();
|
||||||
}
|
}
|
||||||
|
_ => {}
|
||||||
}
|
}
|
||||||
c
|
c
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper function to retrieve the current position.
|
// Helper function to retrieve the current position.
|
||||||
fn get_pos(&self) -> Location {
|
fn get_pos(&self) -> TextSize {
|
||||||
self.location
|
self.location
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1202,7 +1221,7 @@ where
|
||||||
);
|
);
|
||||||
|
|
||||||
match token {
|
match token {
|
||||||
Ok((_, Tok::EndOfFile, _)) => None,
|
Ok((Tok::EndOfFile, _)) => None,
|
||||||
r => Some(r),
|
r => Some(r),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1218,12 +1237,12 @@ pub struct LexicalError {
|
||||||
/// The type of error that occurred.
|
/// The type of error that occurred.
|
||||||
pub error: LexicalErrorType,
|
pub error: LexicalErrorType,
|
||||||
/// The location of the error.
|
/// The location of the error.
|
||||||
pub location: Location,
|
pub location: TextSize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LexicalError {
|
impl LexicalError {
|
||||||
/// Creates a new `LexicalError` with the given error type and location.
|
/// Creates a new `LexicalError` with the given error type and location.
|
||||||
pub fn new(error: LexicalErrorType, location: Location) -> Self {
|
pub fn new(error: LexicalErrorType, location: TextSize) -> Self {
|
||||||
Self { error, location }
|
Self { error, location }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1325,7 +1344,7 @@ mod tests {
|
||||||
|
|
||||||
pub fn lex_source(source: &str) -> Vec<Tok> {
|
pub fn lex_source(source: &str) -> Vec<Tok> {
|
||||||
let lexer = lex(source, Mode::Module);
|
let lexer = lex(source, Mode::Module);
|
||||||
lexer.map(|x| x.unwrap().1).collect()
|
lexer.map(|x| x.unwrap().0).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn str_tok(s: &str) -> Tok {
|
fn str_tok(s: &str) -> Tok {
|
||||||
|
|
|
@ -113,6 +113,7 @@
|
||||||
#![doc(html_root_url = "https://docs.rs/rustpython-parser/")]
|
#![doc(html_root_url = "https://docs.rs/rustpython-parser/")]
|
||||||
|
|
||||||
pub use rustpython_ast as ast;
|
pub use rustpython_ast as ast;
|
||||||
|
pub use rustpython_compiler_core::ConversionFlag;
|
||||||
|
|
||||||
mod function;
|
mod function;
|
||||||
// Skip flattening lexer to distinguish from full parser
|
// Skip flattening lexer to distinguish from full parser
|
||||||
|
@ -124,11 +125,14 @@ mod soft_keywords;
|
||||||
mod string;
|
mod string;
|
||||||
mod token;
|
mod token;
|
||||||
|
|
||||||
|
type Location = TextSize;
|
||||||
|
|
||||||
pub use mode::Mode;
|
pub use mode::Mode;
|
||||||
pub use parser::{
|
pub use parser::{
|
||||||
parse, parse_expression, parse_expression_located, parse_located, parse_program, parse_tokens,
|
parse, parse_expression, parse_expression_located, parse_located, parse_program, parse_tokens,
|
||||||
ParseError, ParseErrorType,
|
ParseError, ParseErrorType,
|
||||||
};
|
};
|
||||||
|
use ruff_text_size::TextSize;
|
||||||
pub use string::FStringErrorType;
|
pub use string::FStringErrorType;
|
||||||
pub use token::{StringKind, Tok};
|
pub use token::{StringKind, Tok};
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,12 @@
|
||||||
//! [`Mode`]: crate::mode
|
//! [`Mode`]: crate::mode
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::{self, Location},
|
ast::{self},
|
||||||
lexer::{self, LexResult, LexicalError, LexicalErrorType},
|
lexer::{self, LexResult, LexicalError, LexicalErrorType},
|
||||||
mode::Mode,
|
mode::Mode,
|
||||||
python,
|
python,
|
||||||
token::Tok,
|
token::Tok,
|
||||||
|
Location,
|
||||||
};
|
};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use std::iter;
|
use std::iter;
|
||||||
|
@ -69,7 +70,7 @@ pub fn parse_program(source: &str, source_path: &str) -> Result<ast::Suite, Pars
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
pub fn parse_expression(source: &str, path: &str) -> Result<ast::Expr, ParseError> {
|
pub fn parse_expression(source: &str, path: &str) -> Result<ast::Expr, ParseError> {
|
||||||
parse_expression_located(source, path, Location::new(1, 0))
|
parse_expression_located(source, path, Location::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parses a Python expression from a given location.
|
/// Parses a Python expression from a given location.
|
||||||
|
@ -83,9 +84,10 @@ pub fn parse_expression(source: &str, path: &str) -> Result<ast::Expr, ParseErro
|
||||||
/// somewhat silly, location:
|
/// somewhat silly, location:
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustpython_parser::{ast::Location, parse_expression_located};
|
/// use ruff_text_size::TextSize;
|
||||||
|
/// use rustpython_parser::{parse_expression_located};
|
||||||
///
|
///
|
||||||
/// let expr = parse_expression_located("1 + 2", "<embedded>", Location::new(5, 20));
|
/// let expr = parse_expression_located("1 + 2", "<embedded>", TextSize::from(400));
|
||||||
/// assert!(expr.is_ok());
|
/// assert!(expr.is_ok());
|
||||||
/// ```
|
/// ```
|
||||||
pub fn parse_expression_located(
|
pub fn parse_expression_located(
|
||||||
|
@ -131,7 +133,7 @@ pub fn parse_expression_located(
|
||||||
/// assert!(program.is_ok());
|
/// assert!(program.is_ok());
|
||||||
/// ```
|
/// ```
|
||||||
pub fn parse(source: &str, mode: Mode, source_path: &str) -> Result<ast::Mod, ParseError> {
|
pub fn parse(source: &str, mode: Mode, source_path: &str) -> Result<ast::Mod, ParseError> {
|
||||||
parse_located(source, mode, source_path, Location::new(1, 0))
|
parse_located(source, mode, source_path, Location::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parse the given Python source code using the specified [`Mode`] and [`Location`].
|
/// Parse the given Python source code using the specified [`Mode`] and [`Location`].
|
||||||
|
@ -142,7 +144,8 @@ pub fn parse(source: &str, mode: Mode, source_path: &str) -> Result<ast::Mod, Pa
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// use rustpython_parser::{ast::Location, Mode, parse_located};
|
/// use ruff_text_size::TextSize;
|
||||||
|
/// use rustpython_parser::{Mode, parse_located};
|
||||||
///
|
///
|
||||||
/// let source = r#"
|
/// let source = r#"
|
||||||
/// def fib(i):
|
/// def fib(i):
|
||||||
|
@ -153,7 +156,7 @@ pub fn parse(source: &str, mode: Mode, source_path: &str) -> Result<ast::Mod, Pa
|
||||||
///
|
///
|
||||||
/// print(fib(42))
|
/// print(fib(42))
|
||||||
/// "#;
|
/// "#;
|
||||||
/// let program = parse_located(source, Mode::Module, "<embedded>", Location::new(1, 0));
|
/// let program = parse_located(source, Mode::Module, "<embedded>", TextSize::from(0));
|
||||||
/// assert!(program.is_ok());
|
/// assert!(program.is_ok());
|
||||||
/// ```
|
/// ```
|
||||||
pub fn parse_located(
|
pub fn parse_located(
|
||||||
|
@ -186,12 +189,16 @@ pub fn parse_tokens(
|
||||||
mode: Mode,
|
mode: Mode,
|
||||||
source_path: &str,
|
source_path: &str,
|
||||||
) -> Result<ast::Mod, ParseError> {
|
) -> Result<ast::Mod, ParseError> {
|
||||||
let marker_token = (Default::default(), mode.to_marker(), Default::default());
|
let marker_token = (mode.to_marker(), Default::default());
|
||||||
let lexer = iter::once(Ok(marker_token))
|
let lexer = iter::once(Ok(marker_token))
|
||||||
.chain(lxr)
|
.chain(lxr)
|
||||||
.filter_ok(|(_, tok, _)| !matches!(tok, Tok::Comment { .. } | Tok::NonLogicalNewline));
|
.filter_ok(|(tok, _)| !matches!(tok, Tok::Comment { .. } | Tok::NonLogicalNewline));
|
||||||
python::TopParser::new()
|
python::TopParser::new()
|
||||||
.parse(lexer.into_iter())
|
.parse(
|
||||||
|
lexer
|
||||||
|
.into_iter()
|
||||||
|
.map_ok(|(t, range)| (range.start(), t, range.end())),
|
||||||
|
)
|
||||||
.map_err(|e| parse_error_from_lalrpop(e, source_path))
|
.map_err(|e| parse_error_from_lalrpop(e, source_path))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,6 +230,7 @@ fn parse_error_from_lalrpop(
|
||||||
source_path: &str,
|
source_path: &str,
|
||||||
) -> ParseError {
|
) -> ParseError {
|
||||||
let source_path = source_path.to_owned();
|
let source_path = source_path.to_owned();
|
||||||
|
|
||||||
match err {
|
match err {
|
||||||
// TODO: Are there cases where this isn't an EOF?
|
// TODO: Are there cases where this isn't an EOF?
|
||||||
LalrpopError::InvalidToken { location } => ParseError {
|
LalrpopError::InvalidToken { location } => ParseError {
|
||||||
|
@ -246,7 +254,7 @@ fn parse_error_from_lalrpop(
|
||||||
let expected = (expected.len() == 1).then(|| expected[0].clone());
|
let expected = (expected.len() == 1).then(|| expected[0].clone());
|
||||||
ParseError {
|
ParseError {
|
||||||
error: ParseErrorType::UnrecognizedToken(token.1, expected),
|
error: ParseErrorType::UnrecognizedToken(token.1, expected),
|
||||||
location: token.0.with_col_offset(1),
|
location: token.0,
|
||||||
source_path,
|
source_path,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -576,9 +584,9 @@ except* OSError as e:
|
||||||
fn test_modes() {
|
fn test_modes() {
|
||||||
let source = "a[0][1][2][3][4]";
|
let source = "a[0][1][2][3][4]";
|
||||||
|
|
||||||
assert!(parse(&source, Mode::Expression, "<embedded>").is_ok());
|
assert!(parse(source, Mode::Expression, "<embedded>").is_ok());
|
||||||
assert!(parse(&source, Mode::Module, "<embedded>").is_ok());
|
assert!(parse(source, Mode::Module, "<embedded>").is_ok());
|
||||||
assert!(parse(&source, Mode::Interactive, "<embedded>").is_ok());
|
assert!(parse(source, Mode::Interactive, "<embedded>").is_ok());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -1721,7 +1721,7 @@ ArgumentList: ArgumentList = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
FunctionArgument: (Option<(ast::Location, ast::Location, Option<String>)>, ast::Expr) = {
|
FunctionArgument: (Option<(crate::Location, crate::Location, Option<String>)>, ast::Expr) = {
|
||||||
<location:@L> <e:NamedExpressionTest> <c:CompFor?> <end_location:@R> => {
|
<location:@L> <e:NamedExpressionTest> <c:CompFor?> <end_location:@R> => {
|
||||||
let expr = match c {
|
let expr = match c {
|
||||||
Some(c) => ast::Expr::new(
|
Some(c) => ast::Expr::new(
|
||||||
|
@ -1776,7 +1776,7 @@ Identifier: String = <s:name> => s;
|
||||||
|
|
||||||
// Hook external lexer:
|
// Hook external lexer:
|
||||||
extern {
|
extern {
|
||||||
type Location = ast::Location;
|
type Location = crate::Location;
|
||||||
type Error = LexicalError;
|
type Error = LexicalError;
|
||||||
|
|
||||||
enum token::Tok {
|
enum token::Tok {
|
||||||
|
|
18786
parser/src/python.rs
18786
parser/src/python.rs
File diff suppressed because it is too large
Load diff
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..10,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: AnnAssign {
|
node: AnnAssign {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -34,16 +16,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
annotation: Located {
|
annotation: Located {
|
||||||
location: Location {
|
range: 3..6,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "int",
|
id: "int",
|
||||||
|
@ -52,16 +25,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
value: Some(
|
value: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..15,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..3,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -53,30 +26,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 6..15,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -86,16 +41,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -105,16 +51,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..24,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: For {
|
node: For {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 4..5,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -34,30 +16,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 9..18,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -67,16 +31,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -86,16 +41,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -110,16 +56,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 20..24,
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,44 +4,17 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..18,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..6,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: List {
|
node: List {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 1..2,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -49,16 +22,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 4..5,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -71,30 +35,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 9..18,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -104,16 +50,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -123,16 +60,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,30 +4,12 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..26,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -36,29 +18,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 4..26,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ListComp {
|
node: ListComp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -68,16 +32,7 @@ expression: parse_ast
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 11..12,
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -85,30 +40,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 16..25,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 17..18,
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -118,16 +55,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 20..21,
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -137,16 +65,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 23..24,
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,30 +4,12 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..13,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -36,30 +18,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 4..13,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -69,16 +33,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 8..9,
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -88,16 +43,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 11..12,
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,42 +4,15 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: If {
|
node: If {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
range: 3..8,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: NamedExpr {
|
node: NamedExpr {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 3..4,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -47,16 +20,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -69,16 +33,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..14,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,30 +4,12 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..26,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -36,29 +18,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 4..26,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: SetComp {
|
node: SetComp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -68,16 +32,7 @@ expression: parse_ast
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 11..12,
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -85,30 +40,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 16..25,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 17..18,
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -118,16 +55,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 20..21,
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -137,16 +65,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 23..24,
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,44 +4,17 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..19,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..7,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 1..2,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -49,29 +22,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 4..6,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -87,30 +42,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 10..19,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 11..12,
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -120,16 +57,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 14..15,
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -139,16 +67,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 17..18,
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..16,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..4,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -48,16 +21,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 2..3,
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -69,30 +33,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 7..16,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 8..9,
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -102,16 +48,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 11..12,
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -121,16 +58,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 14..15,
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,44 +4,17 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..18,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..6,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 1..2,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -49,16 +22,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 4..5,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -71,30 +35,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 9..18,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -104,16 +50,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -123,16 +60,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,31 +4,13 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: With {
|
node: With {
|
||||||
items: [
|
items: [
|
||||||
Withitem {
|
Withitem {
|
||||||
context_expr: Located {
|
context_expr: Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -39,16 +21,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
optional_vars: Some(
|
optional_vars: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -60,16 +33,7 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..17,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,42 +4,15 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..16,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: AugAssign {
|
node: AugAssign {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 0..3,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -52,30 +25,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
op: Add,
|
op: Add,
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 7..16,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 8..9,
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -85,16 +40,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 11..12,
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -104,16 +50,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 14..15,
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..6,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: AugAssign {
|
node: AugAssign {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -35,16 +17,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
op: Add,
|
op: Add,
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,42 +4,15 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: AugAssign {
|
node: AugAssign {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 0..4,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -47,16 +20,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 2..3,
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -68,30 +32,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
op: Add,
|
op: Add,
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 8..17,
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -101,16 +47,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -120,16 +57,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 15..16,
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..7,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Delete {
|
node: Delete {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 4..7,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 4..5,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
|
|
@ -4,30 +4,12 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..5,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Delete {
|
node: Delete {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 4..5,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Delete {
|
node: Delete {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 4..8,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 4..5,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -48,16 +21,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..23,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -24,16 +15,7 @@ Ok(
|
||||||
vararg: None,
|
vararg: None,
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -42,16 +24,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -60,16 +33,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 15..16,
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -84,16 +48,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 19..23,
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..29,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -24,16 +15,7 @@ Ok(
|
||||||
vararg: None,
|
vararg: None,
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -42,16 +24,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -60,16 +33,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 18..19,
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -80,16 +44,7 @@ Ok(
|
||||||
],
|
],
|
||||||
kw_defaults: [
|
kw_defaults: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 14..16,
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -99,16 +54,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 20..22,
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -123,16 +69,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 25..29,
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..13,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -29,16 +20,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..13,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..32,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 32,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -22,16 +13,7 @@ Ok(
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -40,16 +22,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -58,16 +31,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -79,16 +43,7 @@ Ok(
|
||||||
vararg: None,
|
vararg: None,
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 18..19,
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "d",
|
arg: "d",
|
||||||
|
@ -97,16 +52,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 21..22,
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "e",
|
arg: "e",
|
||||||
|
@ -115,16 +61,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 24..25,
|
||||||
row: 1,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "f",
|
arg: "f",
|
||||||
|
@ -139,16 +76,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 28..32,
|
||||||
row: 1,
|
|
||||||
column: 28,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 32,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -22,16 +13,7 @@ Ok(
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -40,16 +22,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -58,16 +31,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -79,16 +43,7 @@ Ok(
|
||||||
vararg: None,
|
vararg: None,
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 18..19,
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "d",
|
arg: "d",
|
||||||
|
@ -97,16 +52,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 21..22,
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "e",
|
arg: "e",
|
||||||
|
@ -115,16 +61,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 27..28,
|
||||||
row: 1,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 28,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "f",
|
arg: "f",
|
||||||
|
@ -135,16 +72,7 @@ Ok(
|
||||||
],
|
],
|
||||||
kw_defaults: [
|
kw_defaults: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 23..25,
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -154,16 +82,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 29..31,
|
||||||
row: 1,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 31,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -178,16 +97,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 34..38,
|
||||||
row: 1,
|
|
||||||
column: 34,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..42,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -22,16 +13,7 @@ Ok(
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -40,16 +22,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -58,16 +31,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -78,16 +42,7 @@ Ok(
|
||||||
],
|
],
|
||||||
vararg: Some(
|
vararg: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..20,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "args",
|
arg: "args",
|
||||||
|
@ -98,16 +53,7 @@ Ok(
|
||||||
),
|
),
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 22..23,
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "d",
|
arg: "d",
|
||||||
|
@ -116,16 +62,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 25..26,
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "e",
|
arg: "e",
|
||||||
|
@ -134,16 +71,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 31..32,
|
||||||
row: 1,
|
|
||||||
column: 31,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 32,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "f",
|
arg: "f",
|
||||||
|
@ -154,16 +82,7 @@ Ok(
|
||||||
],
|
],
|
||||||
kw_defaults: [
|
kw_defaults: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 27..29,
|
||||||
row: 1,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -173,16 +92,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 33..35,
|
||||||
row: 1,
|
|
||||||
column: 33,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -197,16 +107,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 38..42,
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..52,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 52,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -22,16 +13,7 @@ Ok(
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -40,16 +22,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -58,16 +31,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -78,16 +42,7 @@ Ok(
|
||||||
],
|
],
|
||||||
vararg: Some(
|
vararg: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..20,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "args",
|
arg: "args",
|
||||||
|
@ -98,16 +53,7 @@ Ok(
|
||||||
),
|
),
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 22..23,
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "d",
|
arg: "d",
|
||||||
|
@ -116,16 +62,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 25..26,
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "e",
|
arg: "e",
|
||||||
|
@ -134,16 +71,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 31..32,
|
||||||
row: 1,
|
|
||||||
column: 31,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 32,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "f",
|
arg: "f",
|
||||||
|
@ -154,16 +82,7 @@ Ok(
|
||||||
],
|
],
|
||||||
kw_defaults: [
|
kw_defaults: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 27..29,
|
||||||
row: 1,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -173,16 +92,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 33..35,
|
||||||
row: 1,
|
|
||||||
column: 33,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -194,16 +104,7 @@ Ok(
|
||||||
],
|
],
|
||||||
kwarg: Some(
|
kwarg: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 39..45,
|
||||||
row: 1,
|
|
||||||
column: 39,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "kwargs",
|
arg: "kwargs",
|
||||||
|
@ -216,16 +117,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 48..52,
|
||||||
row: 1,
|
|
||||||
column: 48,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 52,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..20,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -22,16 +13,7 @@ Ok(
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -40,16 +22,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -58,16 +31,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -84,16 +48,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..20,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,7 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..26,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "f",
|
name: "f",
|
||||||
|
@ -22,16 +13,7 @@ Ok(
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -40,16 +22,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..10,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -58,16 +31,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 15..16,
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -82,16 +46,7 @@ Ok(
|
||||||
kwarg: None,
|
kwarg: None,
|
||||||
defaults: [
|
defaults: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 11..13,
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -101,16 +56,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 17..19,
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -123,16 +69,7 @@ Ok(
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 22..26,
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,29 +5,11 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..20,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..20,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
|
@ -36,16 +18,7 @@ Ok(
|
||||||
vararg: None,
|
vararg: None,
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -54,16 +27,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -72,16 +36,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -95,16 +50,7 @@ Ok(
|
||||||
defaults: [],
|
defaults: [],
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 19..20,
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -5,29 +5,11 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..26,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..26,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
|
@ -36,16 +18,7 @@ Ok(
|
||||||
vararg: None,
|
vararg: None,
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -54,16 +27,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -72,16 +36,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 19..20,
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -92,16 +47,7 @@ Ok(
|
||||||
],
|
],
|
||||||
kw_defaults: [
|
kw_defaults: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 15..17,
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -111,16 +57,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 21..23,
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -134,16 +71,7 @@ Ok(
|
||||||
defaults: [],
|
defaults: [],
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 25..26,
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -5,29 +5,11 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
|
@ -40,16 +22,7 @@ Ok(
|
||||||
defaults: [],
|
defaults: [],
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 8..9,
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -5,45 +5,18 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..26,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..26,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -52,16 +25,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -70,16 +34,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -91,16 +46,7 @@ Ok(
|
||||||
vararg: None,
|
vararg: None,
|
||||||
kwonlyargs: [
|
kwonlyargs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 19..20,
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "d",
|
arg: "d",
|
||||||
|
@ -109,16 +55,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 22..23,
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "e",
|
arg: "e",
|
||||||
|
@ -132,16 +69,7 @@ Ok(
|
||||||
defaults: [],
|
defaults: [],
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 25..26,
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -5,45 +5,18 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -52,16 +25,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -70,16 +34,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -95,16 +50,7 @@ Ok(
|
||||||
defaults: [],
|
defaults: [],
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -5,45 +5,18 @@ expression: parse_ast
|
||||||
Ok(
|
Ok(
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..23,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..23,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "a",
|
arg: "a",
|
||||||
|
@ -52,16 +25,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "b",
|
arg: "b",
|
||||||
|
@ -70,16 +34,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "c",
|
arg: "c",
|
||||||
|
@ -94,16 +49,7 @@ Ok(
|
||||||
kwarg: None,
|
kwarg: None,
|
||||||
defaults: [
|
defaults: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 12..14,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -113,16 +59,7 @@ Ok(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 18..20,
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -134,16 +71,7 @@ Ok(
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 22..23,
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -3,31 +3,13 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..25,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Dict {
|
node: Dict {
|
||||||
keys: [
|
keys: [
|
||||||
Some(
|
Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 1..4,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -40,16 +22,7 @@ Located {
|
||||||
None,
|
None,
|
||||||
Some(
|
Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..19,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -62,16 +35,7 @@ Located {
|
||||||
],
|
],
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..9,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -81,16 +45,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "c",
|
id: "c",
|
||||||
|
@ -98,16 +53,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 21..24,
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -3,42 +3,15 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..141,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..3,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -53,29 +26,11 @@ Located {
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 14..139,
|
||||||
row: 2,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: GeneratorExp {
|
node: GeneratorExp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
range: 14..17,
|
||||||
row: 2,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "sql",
|
id: "sql",
|
||||||
|
@ -85,16 +40,7 @@ Located {
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 26..29,
|
||||||
row: 3,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "sql",
|
id: "sql",
|
||||||
|
@ -102,43 +48,16 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 33..139,
|
||||||
row: 3,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 43..80,
|
||||||
row: 4,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: IfExp {
|
node: IfExp {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
range: 65..70,
|
||||||
row: 4,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "limit",
|
id: "limit",
|
||||||
|
@ -146,29 +65,11 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 43..61,
|
||||||
row: 4,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BinOp {
|
node: BinOp {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
range: 43..53,
|
||||||
row: 4,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -179,16 +80,7 @@ Located {
|
||||||
},
|
},
|
||||||
op: Mod,
|
op: Mod,
|
||||||
right: Located {
|
right: Located {
|
||||||
location: Location {
|
range: 56..61,
|
||||||
row: 4,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "limit",
|
id: "limit",
|
||||||
|
@ -198,16 +90,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
orelse: Located {
|
orelse: Located {
|
||||||
location: Location {
|
range: 76..80,
|
||||||
row: 4,
|
|
||||||
column: 41,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: None,
|
value: None,
|
||||||
|
@ -217,29 +100,11 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 90..132,
|
||||||
row: 5,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 50,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: IfExp {
|
node: IfExp {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
range: 116..122,
|
||||||
row: 5,
|
|
||||||
column: 34,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 40,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "offset",
|
id: "offset",
|
||||||
|
@ -247,29 +112,11 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 91..111,
|
||||||
row: 5,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BinOp {
|
node: BinOp {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
range: 91..102,
|
||||||
row: 5,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -280,16 +127,7 @@ Located {
|
||||||
},
|
},
|
||||||
op: Mod,
|
op: Mod,
|
||||||
right: Located {
|
right: Located {
|
||||||
location: Location {
|
range: 105..111,
|
||||||
row: 5,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "offset",
|
id: "offset",
|
||||||
|
@ -299,16 +137,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
orelse: Located {
|
orelse: Located {
|
||||||
location: Location {
|
range: 128..132,
|
||||||
row: 5,
|
|
||||||
column: 46,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 50,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: None,
|
value: None,
|
||||||
|
|
|
@ -4,44 +4,17 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 1..73,
|
||||||
row: 2,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
range: 7..18,
|
||||||
row: 2,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Dict {
|
node: Dict {
|
||||||
keys: [
|
keys: [
|
||||||
Some(
|
Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 8..14,
|
||||||
row: 2,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -54,16 +27,7 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 2,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -78,16 +42,7 @@ expression: parse_ast
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
pattern: Located {
|
pattern: Located {
|
||||||
location: Location {
|
range: 29..52,
|
||||||
row: 3,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchMapping {
|
node: MatchMapping {
|
||||||
keys: [],
|
keys: [],
|
||||||
|
@ -100,42 +55,15 @@ expression: parse_ast
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 62..73,
|
||||||
row: 6,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 62..73,
|
||||||
row: 6,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 62..67,
|
||||||
row: 6,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "print",
|
id: "print",
|
||||||
|
@ -144,16 +72,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 68..72,
|
||||||
row: 6,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "rest",
|
id: "rest",
|
||||||
|
@ -172,44 +91,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 74..177,
|
||||||
row: 7,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 11,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
range: 80..97,
|
||||||
row: 7,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Dict {
|
node: Dict {
|
||||||
keys: [
|
keys: [
|
||||||
Some(
|
Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 81..88,
|
||||||
row: 7,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -222,16 +114,7 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 90..96,
|
||||||
row: 7,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -246,30 +129,12 @@ expression: parse_ast
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
pattern: Located {
|
pattern: Located {
|
||||||
location: Location {
|
range: 108..155,
|
||||||
row: 8,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 10,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchMapping {
|
node: MatchMapping {
|
||||||
keys: [
|
keys: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 118..125,
|
||||||
row: 9,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 9,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -281,57 +146,21 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 127..148,
|
||||||
row: 9,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 9,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchAs {
|
node: MatchAs {
|
||||||
pattern: Some(
|
pattern: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 127..139,
|
||||||
row: 9,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 9,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchOr {
|
node: MatchOr {
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 127..132,
|
||||||
row: 9,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 9,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchClass {
|
node: MatchClass {
|
||||||
cls: Located {
|
cls: Located {
|
||||||
location: Location {
|
range: 127..130,
|
||||||
row: 9,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 9,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "str",
|
id: "str",
|
||||||
|
@ -344,16 +173,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 135..139,
|
||||||
row: 9,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 9,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchSingleton {
|
node: MatchSingleton {
|
||||||
value: None,
|
value: None,
|
||||||
|
@ -375,42 +195,15 @@ expression: parse_ast
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 165..177,
|
||||||
row: 11,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 11,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 165..177,
|
||||||
row: 11,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 11,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 165..170,
|
||||||
row: 11,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 11,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "print",
|
id: "print",
|
||||||
|
@ -419,16 +212,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 171..176,
|
||||||
row: 11,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 11,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "label",
|
id: "label",
|
||||||
|
@ -447,29 +231,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 178..218,
|
||||||
row: 12,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 14,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
range: 184..185,
|
||||||
row: 12,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 12,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -479,43 +245,16 @@ expression: parse_ast
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
pattern: Located {
|
pattern: Located {
|
||||||
location: Location {
|
range: 196..203,
|
||||||
row: 13,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 13,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchSequence {
|
node: MatchSequence {
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 197..198,
|
||||||
row: 13,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 13,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 197..198,
|
||||||
row: 13,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 13,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -527,29 +266,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 200..201,
|
||||||
row: 13,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 13,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 200..201,
|
||||||
row: 13,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 13,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -566,30 +287,12 @@ expression: parse_ast
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 213..218,
|
||||||
row: 14,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 14,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 213..214,
|
||||||
row: 14,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 14,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -598,16 +301,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 217..218,
|
||||||
row: 14,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 14,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -625,29 +319,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 219..259,
|
||||||
row: 15,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 17,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
range: 225..226,
|
||||||
row: 15,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 15,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -657,43 +333,16 @@ expression: parse_ast
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
pattern: Located {
|
pattern: Located {
|
||||||
location: Location {
|
range: 237..244,
|
||||||
row: 16,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 16,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchSequence {
|
node: MatchSequence {
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 238..239,
|
||||||
row: 16,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 16,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 238..239,
|
||||||
row: 16,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 16,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -705,29 +354,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 241..242,
|
||||||
row: 16,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 16,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 241..242,
|
||||||
row: 16,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 16,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -744,30 +375,12 @@ expression: parse_ast
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 254..259,
|
||||||
row: 17,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 17,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 254..255,
|
||||||
row: 17,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 17,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -776,16 +389,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 258..259,
|
||||||
row: 17,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 17,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -803,29 +407,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 260..297,
|
||||||
row: 18,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 20,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Match {
|
node: Match {
|
||||||
subject: Located {
|
subject: Located {
|
||||||
location: Location {
|
range: 266..267,
|
||||||
row: 18,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 18,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -835,43 +421,16 @@ expression: parse_ast
|
||||||
cases: [
|
cases: [
|
||||||
MatchCase {
|
MatchCase {
|
||||||
pattern: Located {
|
pattern: Located {
|
||||||
location: Location {
|
range: 278..282,
|
||||||
row: 19,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 19,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchSequence {
|
node: MatchSequence {
|
||||||
patterns: [
|
patterns: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 279..280,
|
||||||
row: 19,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 19,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: MatchValue {
|
node: MatchValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 279..280,
|
||||||
row: 19,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 19,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -888,30 +447,12 @@ expression: parse_ast
|
||||||
guard: None,
|
guard: None,
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 292..297,
|
||||||
row: 20,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 20,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 292..293,
|
||||||
row: 20,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 20,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -920,16 +461,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 296..297,
|
||||||
row: 20,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 20,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,31 +3,13 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..7,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BoolOp {
|
node: BoolOp {
|
||||||
op: And,
|
op: And,
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -35,16 +17,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
|
|
@ -3,31 +3,13 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..6,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BoolOp {
|
node: BoolOp {
|
||||||
op: Or,
|
op: Or,
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -35,16 +17,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
|
|
@ -4,31 +4,13 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..98,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ClassDef {
|
node: ClassDef {
|
||||||
name: "Foo",
|
name: "Foo",
|
||||||
bases: [
|
bases: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "A",
|
id: "A",
|
||||||
|
@ -36,16 +18,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "B",
|
id: "B",
|
||||||
|
@ -56,16 +29,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
keywords: [],
|
keywords: [],
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 18..44,
|
||||||
row: 2,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "__init__",
|
name: "__init__",
|
||||||
|
@ -73,16 +37,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 31..35,
|
||||||
row: 2,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "self",
|
arg: "self",
|
||||||
|
@ -99,16 +54,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 40..44,
|
||||||
row: 3,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
@ -119,16 +65,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 46..98,
|
||||||
row: 4,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "method_with_default",
|
name: "method_with_default",
|
||||||
|
@ -136,16 +73,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 70..74,
|
||||||
row: 4,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "self",
|
arg: "self",
|
||||||
|
@ -154,16 +82,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 76..79,
|
||||||
row: 4,
|
|
||||||
column: 31,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 34,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "arg",
|
arg: "arg",
|
||||||
|
@ -178,16 +97,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
kwarg: None,
|
kwarg: None,
|
||||||
defaults: [
|
defaults: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 80..89,
|
||||||
row: 4,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 44,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -200,16 +110,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 94..98,
|
||||||
row: 5,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Pass,
|
node: Pass,
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,29 +3,11 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..19,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: DictComp {
|
node: DictComp {
|
||||||
key: Located {
|
key: Located {
|
||||||
location: Location {
|
range: 1..3,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x1",
|
id: "x1",
|
||||||
|
@ -33,16 +15,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 5..7,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x2",
|
id: "x2",
|
||||||
|
@ -52,16 +25,7 @@ Located {
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -69,16 +33,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 17..18,
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "z",
|
id: "z",
|
||||||
|
|
|
@ -3,29 +3,11 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..48,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 48,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ListComp {
|
node: ListComp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
range: 1..2,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -35,30 +17,12 @@ Located {
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 7..12,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -66,16 +30,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..12,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y2",
|
id: "y2",
|
||||||
|
@ -87,16 +42,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "z",
|
id: "z",
|
||||||
|
@ -108,16 +54,7 @@ Located {
|
||||||
},
|
},
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 22..23,
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "a",
|
id: "a",
|
||||||
|
@ -125,16 +62,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 27..28,
|
||||||
row: 1,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 28,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "b",
|
id: "b",
|
||||||
|
@ -143,29 +71,11 @@ Located {
|
||||||
},
|
},
|
||||||
ifs: [
|
ifs: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 32..37,
|
||||||
row: 1,
|
|
||||||
column: 32,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 37,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Compare {
|
node: Compare {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
range: 32..33,
|
||||||
row: 1,
|
|
||||||
column: 32,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 33,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "a",
|
id: "a",
|
||||||
|
@ -177,16 +87,7 @@ Located {
|
||||||
],
|
],
|
||||||
comparators: [
|
comparators: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 36..37,
|
||||||
row: 1,
|
|
||||||
column: 36,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 37,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -199,29 +100,11 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 41..47,
|
||||||
row: 1,
|
|
||||||
column: 41,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 47,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Compare {
|
node: Compare {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
range: 41..42,
|
||||||
row: 1,
|
|
||||||
column: 41,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "a",
|
id: "a",
|
||||||
|
@ -233,16 +116,7 @@ Located {
|
||||||
],
|
],
|
||||||
comparators: [
|
comparators: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 45..47,
|
||||||
row: 1,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 47,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -3,29 +3,11 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: GeneratorExp {
|
node: GeneratorExp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
range: 1..2,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -35,16 +17,7 @@ Located {
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -52,16 +25,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "z",
|
id: "z",
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..28,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: If {
|
node: If {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
range: 3..4,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -37,29 +19,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..8,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 6..8,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -73,29 +37,11 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
orelse: [
|
orelse: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..28,
|
||||||
row: 2,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: If {
|
node: If {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
range: 14..15,
|
||||||
row: 2,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -106,29 +52,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 17..19,
|
||||||
row: 2,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 17..19,
|
||||||
row: 2,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -142,29 +70,11 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
orelse: [
|
orelse: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 26..28,
|
||||||
row: 3,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 26..28,
|
||||||
row: 3,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -3,42 +3,15 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..26,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: GeneratorExp {
|
node: GeneratorExp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
range: 1..14,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: IfExp {
|
node: IfExp {
|
||||||
test: Located {
|
test: Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -46,16 +19,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 1..2,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -63,16 +27,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
orelse: Located {
|
orelse: Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -84,16 +39,7 @@ Located {
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 19..20,
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -101,16 +47,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 24..25,
|
||||||
row: 1,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "z",
|
id: "z",
|
||||||
|
|
|
@ -4,42 +4,15 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..32,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 32,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..32,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 32,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 0..7,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "my_func",
|
id: "my_func",
|
||||||
|
@ -48,16 +21,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 8..20,
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -69,32 +33,14 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
keywords: [
|
keywords: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 22..31,
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 31,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: KeywordData {
|
node: KeywordData {
|
||||||
arg: Some(
|
arg: Some(
|
||||||
"keyword",
|
"keyword",
|
||||||
),
|
),
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 30..31,
|
||||||
row: 1,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 31,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,45 +4,18 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..18,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..18,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Lambda {
|
node: Lambda {
|
||||||
args: Arguments {
|
args: Arguments {
|
||||||
posonlyargs: [],
|
posonlyargs: [],
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "x",
|
arg: "x",
|
||||||
|
@ -51,16 +24,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "y",
|
arg: "y",
|
||||||
|
@ -76,29 +40,11 @@ expression: parse_ast
|
||||||
defaults: [],
|
defaults: [],
|
||||||
},
|
},
|
||||||
body: Located {
|
body: Located {
|
||||||
location: Location {
|
range: 13..18,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BinOp {
|
node: BinOp {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
range: 13..14,
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -107,16 +53,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
op: Mult,
|
op: Mult,
|
||||||
right: Located {
|
right: Located {
|
||||||
location: Location {
|
range: 17..18,
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
|
|
@ -3,29 +3,11 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ListComp {
|
node: ListComp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
range: 1..2,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -35,16 +17,7 @@ Located {
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -52,16 +25,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 12..13,
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "z",
|
id: "z",
|
||||||
|
|
|
@ -3,42 +3,15 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..23,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: GeneratorExp {
|
node: GeneratorExp {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
range: 1..11,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: NamedExpr {
|
node: NamedExpr {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 1..2,
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -46,29 +19,11 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 6..11,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: BinOp {
|
node: BinOp {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -77,16 +32,7 @@ Located {
|
||||||
},
|
},
|
||||||
op: Add,
|
op: Add,
|
||||||
right: Located {
|
right: Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -102,16 +48,7 @@ Located {
|
||||||
generators: [
|
generators: [
|
||||||
Comprehension {
|
Comprehension {
|
||||||
target: Located {
|
target: Located {
|
||||||
location: Location {
|
range: 16..17,
|
||||||
row: 1,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "y",
|
id: "y",
|
||||||
|
@ -119,16 +56,7 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
iter: Located {
|
iter: Located {
|
||||||
location: Location {
|
range: 21..22,
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "z",
|
id: "z",
|
||||||
|
|
|
@ -4,42 +4,15 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..23,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..23,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 0..5,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "print",
|
id: "print",
|
||||||
|
@ -48,16 +21,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..19,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -67,16 +31,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 21..22,
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,42 +4,15 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..20,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..20,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 0..5,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "print",
|
id: "print",
|
||||||
|
@ -48,16 +21,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..19,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..13,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..13,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,44 +4,17 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..11,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..4,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "a",
|
id: "a",
|
||||||
|
@ -49,16 +22,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 3..4,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "b",
|
id: "b",
|
||||||
|
@ -71,30 +35,12 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 7..11,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -104,16 +50,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 10..11,
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,29 +3,11 @@ source: compiler/parser/src/parser.rs
|
||||||
expression: parse_ast
|
expression: parse_ast
|
||||||
---
|
---
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..1,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
@ -33,30 +15,12 @@ Located {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 2..7,
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Slice {
|
node: Slice {
|
||||||
lower: Some(
|
lower: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 2..3,
|
||||||
row: 1,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -68,16 +32,7 @@ Located {
|
||||||
),
|
),
|
||||||
upper: Some(
|
upper: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 4..5,
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -89,16 +44,7 @@ Located {
|
||||||
),
|
),
|
||||||
step: Some(
|
step: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,30 +4,12 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..36,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 36,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..11,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "array_slice",
|
id: "array_slice",
|
||||||
|
@ -36,29 +18,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 14..36,
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 36,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 14..19,
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "array",
|
id: "array",
|
||||||
|
@ -66,30 +30,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 20..35,
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 20..21,
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -99,29 +45,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 23..31,
|
||||||
row: 1,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 31,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 24..31,
|
||||||
row: 1,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 31,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "indexes",
|
id: "indexes",
|
||||||
|
@ -132,30 +60,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 33..35,
|
||||||
row: 1,
|
|
||||||
column: 33,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: UnaryOp {
|
node: UnaryOp {
|
||||||
op: USub,
|
op: USub,
|
||||||
operand: Located {
|
operand: Located {
|
||||||
location: Location {
|
range: 34..35,
|
||||||
row: 1,
|
|
||||||
column: 34,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -177,43 +87,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 37..73,
|
||||||
row: 2,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 36,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Assign {
|
node: Assign {
|
||||||
targets: [
|
targets: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 37..59,
|
||||||
row: 2,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 37..42,
|
||||||
row: 2,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "array",
|
id: "array",
|
||||||
|
@ -221,30 +104,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 43..58,
|
||||||
row: 2,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 43..44,
|
||||||
row: 2,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -254,29 +119,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 46..54,
|
||||||
row: 2,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 47..54,
|
||||||
row: 2,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "indexes",
|
id: "indexes",
|
||||||
|
@ -287,30 +134,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 56..58,
|
||||||
row: 2,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: UnaryOp {
|
node: UnaryOp {
|
||||||
op: USub,
|
op: USub,
|
||||||
operand: Located {
|
operand: Located {
|
||||||
location: Location {
|
range: 57..58,
|
||||||
row: 2,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -330,16 +159,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 62..73,
|
||||||
row: 2,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 36,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "array_slice",
|
id: "array_slice",
|
||||||
|
@ -350,42 +170,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 74..119,
|
||||||
row: 3,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 74..119,
|
||||||
row: 3,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 74..79,
|
||||||
row: 3,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "array",
|
id: "array",
|
||||||
|
@ -393,43 +186,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 80..118,
|
||||||
row: 3,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 44,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 80..98,
|
||||||
row: 3,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 81..98,
|
||||||
row: 3,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "indexes_to_select",
|
id: "indexes_to_select",
|
||||||
|
@ -440,29 +206,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 100..118,
|
||||||
row: 3,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 44,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 101..118,
|
||||||
row: 3,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 44,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "indexes_to_select",
|
id: "indexes_to_select",
|
||||||
|
@ -482,42 +230,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 120..150,
|
||||||
row: 4,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 120..150,
|
||||||
row: 4,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 120..125,
|
||||||
row: 4,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "array",
|
id: "array",
|
||||||
|
@ -525,44 +246,17 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 126..149,
|
||||||
row: 4,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Tuple {
|
node: Tuple {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 126..129,
|
||||||
row: 4,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Slice {
|
node: Slice {
|
||||||
lower: Some(
|
lower: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 126..127,
|
||||||
row: 4,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -574,16 +268,7 @@ expression: parse_ast
|
||||||
),
|
),
|
||||||
upper: Some(
|
upper: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 128..129,
|
||||||
row: 4,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -597,29 +282,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 131..149,
|
||||||
row: 4,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 132..149,
|
||||||
row: 4,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "indexes_to_select",
|
id: "indexes_to_select",
|
||||||
|
|
|
@ -4,57 +4,21 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..134,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Try {
|
node: Try {
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..28,
|
||||||
row: 2,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Raise {
|
node: Raise {
|
||||||
exc: Some(
|
exc: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 15..28,
|
||||||
row: 2,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 23,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 15..25,
|
||||||
row: 2,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "ValueError",
|
id: "ValueError",
|
||||||
|
@ -63,16 +27,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 26..27,
|
||||||
row: 2,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -92,30 +47,12 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
handlers: [
|
handlers: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 29..82,
|
||||||
row: 3,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ExceptHandler {
|
node: ExceptHandler {
|
||||||
type_: Some(
|
type_: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 36..45,
|
||||||
row: 3,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 16,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "TypeError",
|
id: "TypeError",
|
||||||
|
@ -128,42 +65,15 @@ expression: parse_ast
|
||||||
),
|
),
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 56..82,
|
||||||
row: 4,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 56..82,
|
||||||
row: 4,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 56..61,
|
||||||
row: 4,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "print",
|
id: "print",
|
||||||
|
@ -172,30 +82,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 62..81,
|
||||||
row: 4,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 62..81,
|
||||||
row: 4,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -205,42 +97,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 62..81,
|
||||||
row: 4,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 72..79,
|
||||||
row: 4,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 72..76,
|
||||||
row: 4,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "type",
|
id: "type",
|
||||||
|
@ -249,16 +114,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 77..78,
|
||||||
row: 4,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "e",
|
id: "e",
|
||||||
|
@ -286,30 +142,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 83..134,
|
||||||
row: 5,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ExceptHandler {
|
node: ExceptHandler {
|
||||||
type_: Some(
|
type_: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 90..97,
|
||||||
row: 5,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "OSError",
|
id: "OSError",
|
||||||
|
@ -322,42 +160,15 @@ expression: parse_ast
|
||||||
),
|
),
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 108..134,
|
||||||
row: 6,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 108..134,
|
||||||
row: 6,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 30,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 108..113,
|
||||||
row: 6,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "print",
|
id: "print",
|
||||||
|
@ -366,30 +177,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 114..133,
|
||||||
row: 6,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 114..133,
|
||||||
row: 6,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -399,42 +192,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 114..133,
|
||||||
row: 6,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 124..131,
|
||||||
row: 6,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 124..128,
|
||||||
row: 6,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "type",
|
id: "type",
|
||||||
|
@ -443,16 +209,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 129..130,
|
||||||
row: 6,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "e",
|
id: "e",
|
||||||
|
|
|
@ -4,57 +4,21 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..260,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 57,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: TryStar {
|
node: TryStar {
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..98,
|
||||||
row: 2,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 62,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Raise {
|
node: Raise {
|
||||||
exc: Some(
|
exc: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 15..98,
|
||||||
row: 2,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 62,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 15..29,
|
||||||
row: 2,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "ExceptionGroup",
|
id: "ExceptionGroup",
|
||||||
|
@ -63,16 +27,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 30..34,
|
||||||
row: 2,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -82,43 +37,16 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 44..97,
|
||||||
row: 3,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 61,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: List {
|
node: List {
|
||||||
elts: [
|
elts: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 45..58,
|
||||||
row: 3,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 45..55,
|
||||||
row: 3,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "ValueError",
|
id: "ValueError",
|
||||||
|
@ -127,16 +55,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 56..57,
|
||||||
row: 3,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -150,29 +69,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 60..72,
|
||||||
row: 3,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 36,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 60..69,
|
||||||
row: 3,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 33,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "TypeError",
|
id: "TypeError",
|
||||||
|
@ -181,16 +82,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 70..71,
|
||||||
row: 3,
|
|
||||||
column: 34,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -204,29 +96,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 74..84,
|
||||||
row: 3,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 48,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 74..81,
|
||||||
row: 3,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "OSError",
|
id: "OSError",
|
||||||
|
@ -235,16 +109,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 82..83,
|
||||||
row: 3,
|
|
||||||
column: 46,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 47,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -258,29 +123,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 86..96,
|
||||||
row: 3,
|
|
||||||
column: 50,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 60,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 86..93,
|
||||||
row: 3,
|
|
||||||
column: 50,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 57,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "OSError",
|
id: "OSError",
|
||||||
|
@ -289,16 +136,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 94..95,
|
||||||
row: 3,
|
|
||||||
column: 58,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 3,
|
|
||||||
column: 59,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -326,30 +164,12 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
handlers: [
|
handlers: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 99..180,
|
||||||
row: 4,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 57,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ExceptHandler {
|
node: ExceptHandler {
|
||||||
type_: Some(
|
type_: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 107..116,
|
||||||
row: 4,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 4,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "TypeError",
|
id: "TypeError",
|
||||||
|
@ -362,42 +182,15 @@ expression: parse_ast
|
||||||
),
|
),
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 127..180,
|
||||||
row: 5,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 57,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 127..180,
|
||||||
row: 5,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 57,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 127..132,
|
||||||
row: 5,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "print",
|
id: "print",
|
||||||
|
@ -406,30 +199,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 133..179,
|
||||||
row: 5,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 133..179,
|
||||||
row: 5,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -439,42 +214,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 133..179,
|
||||||
row: 5,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 143..150,
|
||||||
row: 5,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 143..147,
|
||||||
row: 5,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "type",
|
id: "type",
|
||||||
|
@ -483,16 +231,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 148..149,
|
||||||
row: 5,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "e",
|
id: "e",
|
||||||
|
@ -508,16 +247,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 133..179,
|
||||||
row: 5,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -527,42 +257,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 133..179,
|
||||||
row: 5,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 165..177,
|
||||||
row: 5,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 54,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 165..166,
|
||||||
row: 5,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 5,
|
|
||||||
column: 43,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "e",
|
id: "e",
|
||||||
|
@ -590,30 +293,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 181..260,
|
||||||
row: 6,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 57,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ExceptHandler {
|
node: ExceptHandler {
|
||||||
type_: Some(
|
type_: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 189..196,
|
||||||
row: 6,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 6,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "OSError",
|
id: "OSError",
|
||||||
|
@ -626,42 +311,15 @@ expression: parse_ast
|
||||||
),
|
),
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 207..260,
|
||||||
row: 7,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 57,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 207..260,
|
||||||
row: 7,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 57,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 207..212,
|
||||||
row: 7,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "print",
|
id: "print",
|
||||||
|
@ -670,30 +328,12 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 213..259,
|
||||||
row: 7,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 213..259,
|
||||||
row: 7,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -703,42 +343,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 213..259,
|
||||||
row: 7,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 223..230,
|
||||||
row: 7,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 27,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Call {
|
node: Call {
|
||||||
func: Located {
|
func: Located {
|
||||||
location: Location {
|
range: 223..227,
|
||||||
row: 7,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 24,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "type",
|
id: "type",
|
||||||
|
@ -747,16 +360,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
args: [
|
args: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 228..229,
|
||||||
row: 7,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "e",
|
id: "e",
|
||||||
|
@ -772,16 +376,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 213..259,
|
||||||
row: 7,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -791,42 +386,15 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 213..259,
|
||||||
row: 7,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 56,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 245..257,
|
||||||
row: 7,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 54,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Attribute {
|
node: Attribute {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 245..246,
|
||||||
row: 7,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 7,
|
|
||||||
column: 43,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "e",
|
id: "e",
|
||||||
|
|
|
@ -4,16 +4,7 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 1..49,
|
||||||
row: 2,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 48,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FunctionDef {
|
node: FunctionDef {
|
||||||
name: "args_to_tuple",
|
name: "args_to_tuple",
|
||||||
|
@ -22,44 +13,17 @@ expression: parse_ast
|
||||||
args: [],
|
args: [],
|
||||||
vararg: Some(
|
vararg: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 20..29,
|
||||||
row: 2,
|
|
||||||
column: 19,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 28,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: ArgData {
|
node: ArgData {
|
||||||
arg: "args",
|
arg: "args",
|
||||||
annotation: Some(
|
annotation: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 26..29,
|
||||||
row: 2,
|
|
||||||
column: 25,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 28,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 27..29,
|
||||||
row: 2,
|
|
||||||
column: 26,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 28,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "Ts",
|
id: "Ts",
|
||||||
|
@ -81,29 +45,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
body: [
|
body: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 46..49,
|
||||||
row: 2,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 48,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 46..49,
|
||||||
row: 2,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 48,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Ellipsis,
|
value: Ellipsis,
|
||||||
|
@ -116,29 +62,11 @@ expression: parse_ast
|
||||||
decorator_list: [],
|
decorator_list: [],
|
||||||
returns: Some(
|
returns: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 34..44,
|
||||||
row: 2,
|
|
||||||
column: 33,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 43,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Subscript {
|
node: Subscript {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 34..39,
|
||||||
row: 2,
|
|
||||||
column: 33,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "Tuple",
|
id: "Tuple",
|
||||||
|
@ -146,29 +74,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
slice: Located {
|
slice: Located {
|
||||||
location: Location {
|
range: 40..43,
|
||||||
row: 2,
|
|
||||||
column: 39,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Starred {
|
node: Starred {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 41..43,
|
||||||
row: 2,
|
|
||||||
column: 40,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 42,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "Ts",
|
id: "Ts",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..15,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..15,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..21,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..21,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 21,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..45,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..45,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 45,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..12,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..12,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..738,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 738,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..738,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 738,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Bytes(
|
value: Bytes(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..12,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..12,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..13,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..13,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Bytes(
|
value: Bytes(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Bytes(
|
value: Bytes(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..15,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..15,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -50,29 +23,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -50,29 +23,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..8,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 5..6,
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -50,29 +23,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 2,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
|
|
@ -4,16 +4,7 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..10,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -23,16 +14,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..10,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -42,29 +24,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..10,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 10,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 3..7,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "user",
|
id: "user",
|
||||||
|
|
|
@ -4,16 +4,7 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -23,16 +14,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -42,16 +24,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -61,29 +34,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 7..11,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "user",
|
id: "user",
|
||||||
|
@ -95,16 +50,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -114,16 +60,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -133,16 +70,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -152,29 +80,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..38,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 38,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 29..35,
|
||||||
row: 1,
|
|
||||||
column: 29,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 35,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "second",
|
id: "second",
|
||||||
|
|
|
@ -4,16 +4,7 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -23,16 +14,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -42,29 +24,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 3..7,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "user",
|
id: "user",
|
||||||
|
@ -74,30 +38,12 @@ expression: parse_ast
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: Some(
|
format_spec: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..14,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 14,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..11,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..11,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..11,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -50,29 +23,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..11,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 6..7,
|
||||||
row: 2,
|
|
||||||
column: 1,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 2,
|
|
||||||
column: 2,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "x",
|
id: "x",
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..9,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..17,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,43 +4,16 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..22,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Expr {
|
node: Expr {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 0..22,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..22,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
@ -50,29 +23,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..22,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 22,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 17..20,
|
||||||
row: 1,
|
|
||||||
column: 17,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 20,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..18,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 3..4,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 4,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "a",
|
id: "a",
|
||||||
|
@ -38,29 +20,11 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..18,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 7..8,
|
||||||
row: 1,
|
|
||||||
column: 7,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "b",
|
id: "b",
|
||||||
|
@ -72,16 +36,7 @@ expression: parse_ast
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..18,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 18,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Str(
|
value: Str(
|
||||||
|
|
|
@ -4,42 +4,15 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..13,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 13,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 3..11,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Compare {
|
node: Compare {
|
||||||
left: Located {
|
left: Located {
|
||||||
location: Location {
|
range: 3..5,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 5,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
@ -53,16 +26,7 @@ expression: parse_ast
|
||||||
],
|
],
|
||||||
comparators: [
|
comparators: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 9..11,
|
||||||
row: 1,
|
|
||||||
column: 9,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 11,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Constant {
|
node: Constant {
|
||||||
value: Int(
|
value: Int(
|
||||||
|
|
|
@ -4,29 +4,11 @@ expression: parse_ast
|
||||||
---
|
---
|
||||||
[
|
[
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..15,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 3..6,
|
||||||
row: 1,
|
|
||||||
column: 3,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 6,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "foo",
|
id: "foo",
|
||||||
|
@ -36,43 +18,16 @@ expression: parse_ast
|
||||||
conversion: 0,
|
conversion: 0,
|
||||||
format_spec: Some(
|
format_spec: Some(
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..15,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: JoinedStr {
|
node: JoinedStr {
|
||||||
values: [
|
values: [
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
range: 0..15,
|
||||||
row: 1,
|
|
||||||
column: 0,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 15,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: FormattedValue {
|
node: FormattedValue {
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
range: 8..12,
|
||||||
row: 1,
|
|
||||||
column: 8,
|
|
||||||
},
|
|
||||||
end_location: Some(
|
|
||||||
Location {
|
|
||||||
row: 1,
|
|
||||||
column: 12,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
custom: (),
|
custom: (),
|
||||||
node: Name {
|
node: Name {
|
||||||
id: "spec",
|
id: "spec",
|
||||||
|
|
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