Replace row/column based Location with byte-offsets.

This commit is contained in:
Micha Reiser 2023-05-06 15:54:14 +09:00 committed by Jeong YunWon
parent 7b8844bd3e
commit 58c35ab458
131 changed files with 12120 additions and 23198 deletions

View file

@ -12,6 +12,7 @@ include = ["LICENSE", "Cargo.toml", "src/**/*.rs"]
resolver = "2"
members = [
"ast", "core", "literal", "parser",
"ruff_text_size",
]
[workspace.dependencies]

View file

@ -16,5 +16,6 @@ unparse = ["rustpython-literal"]
[dependencies]
rustpython-compiler-core = { path = "../core", version = "0.2.0" }
rustpython-literal = { path = "../literal", version = "0.2.0", optional = true }
ruff_text_size = { path = "../ruff_text_size" }
num-bigint = { workspace = true }

View file

@ -352,7 +352,7 @@ class FoldImplVisitor(TypeInfoEmitVisitor):
depth,
)
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,
)
self.emit("}", depth)
@ -718,7 +718,7 @@ def write_ast_def(mod, typeinfo, f):
#![allow(clippy::derive_partial_eq_without_eq)]
pub use crate::constant::*;
pub use crate::Location;
pub use ruff_text_size::{TextSize, TextRange};
type Ident = String;
\n
@ -730,26 +730,54 @@ def write_ast_def(mod, typeinfo, f):
textwrap.dedent(
"""
pub struct Located<T, U = ()> {
pub location: Location,
pub end_location: Option<Location>,
pub range: TextRange,
pub custom: U,
pub node: T,
}
impl<T> Located<T> {
pub fn new(location: Location, end_location: Location, node: T) -> Self {
Self { location, end_location: Some(end_location), custom: (), node }
pub fn new(start: TextSize, end: TextSize, node: T) -> Self {
Self { range: TextRange::new(start, end), custom: (), node }
}
pub const fn start(&self) -> Location {
self.location
/// Creates a new node that spans the position specified by `range`.
pub fn with_range(node: T, range: TextRange) -> Self {
Self {
range,
custom: (),
node,
}
}
/// Returns the absolute start position of the node from the beginning of the document.
#[inline]
pub const fn start(&self) -> TextSize {
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()
}
/// Returns the node's [`end_location`](Located::end_location) or [`location`](Located::start) if
/// [`end_location`](Located::end_location) is `None`.
pub fn end(&self) -> Location {
self.end_location.unwrap_or(self.location)
}
}
impl<T, U> std::ops::Deref for Located<T, U> {

View file

@ -3,36 +3,63 @@
#![allow(clippy::derive_partial_eq_without_eq)]
pub use crate::constant::*;
pub use crate::Location;
pub use ruff_text_size::{TextRange, TextSize};
type Ident = String;
#[derive(Clone, Debug, PartialEq)]
pub struct Located<T, U = ()> {
pub location: Location,
pub end_location: Option<Location>,
pub range: TextRange,
pub custom: U,
pub node: 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),
range: TextRange::new(start, end),
custom: (),
node,
}
}
pub const fn start(&self) -> Location {
self.location
/// Creates a new node that spans the position specified by `range`.
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
/// [`end_location`](Located::end_location) is `None`.
pub fn end(&self) -> Location {
self.end_location.unwrap_or(self.location)
/// Returns the absolute start position of the node from the beginning of the document.
#[inline]
pub const fn start(&self) -> TextSize {
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()
}
}
@ -1142,8 +1169,7 @@ pub mod fold {
) -> Result<Located<MT, F::TargetU>, F::Error> {
Ok(Located {
custom: folder.map_user(node.custom)?,
location: node.location,
end_location: node.end_location,
range: node.range,
node: f(folder, node.node)?,
})
}

View file

@ -126,8 +126,7 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
Ok(crate::Expr {
node: expr,
custom: node.custom,
location: node.location,
end_location: node.end_location,
range: node.range,
})
}
_ => crate::fold::fold_expr(self, node),
@ -144,19 +143,17 @@ mod tests {
fn test_constant_opt() {
use crate::{fold::Fold, *};
let start = Default::default();
let end = None;
let range = TextRange::default();
#[allow(clippy::let_unit_value)]
let custom = ();
let ast = Located {
location: start,
end_location: end,
range,
custom,
node: ExprTuple {
ctx: ExprContext::Load,
elts: vec![
Located {
location: start,
end_location: end,
range,
custom,
node: ExprConstant {
value: BigInt::from(1).into(),
@ -165,8 +162,7 @@ mod tests {
.into(),
},
Located {
location: start,
end_location: end,
range,
custom,
node: ExprConstant {
value: BigInt::from(2).into(),
@ -175,15 +171,13 @@ mod tests {
.into(),
},
Located {
location: start,
end_location: end,
range,
custom,
node: ExprTuple {
ctx: ExprContext::Load,
elts: vec![
Located {
location: start,
end_location: end,
range,
custom,
node: ExprConstant {
value: BigInt::from(3).into(),
@ -192,8 +186,7 @@ mod tests {
.into(),
},
Located {
location: start,
end_location: end,
range,
custom,
node: ExprConstant {
value: BigInt::from(4).into(),
@ -202,8 +195,7 @@ mod tests {
.into(),
},
Located {
location: start,
end_location: end,
range,
custom,
node: ExprConstant {
value: BigInt::from(5).into(),
@ -225,8 +217,7 @@ mod tests {
assert_eq!(
new_ast,
Located {
location: start,
end_location: end,
range,
custom,
node: ExprConstant {
value: Constant::Tuple(vec![

View file

@ -7,6 +7,5 @@ mod impls;
mod unparse;
pub use ast_gen::*;
pub use rustpython_compiler_core::Location;
pub type Suite<U = ()> = Vec<Stmt<U>>;

View file

@ -9,10 +9,11 @@ license = "MIT"
[dependencies]
bitflags = { workspace = true }
bstr = { workspace = true }
itertools = { workspace = true }
num-bigint = { workspace = true }
num-complex = { workspace = true }
serde = { version = "1.0.133", optional = true, default-features = false, features = ["derive"] }
ruff_text_size = { path = "../ruff_text_size" }
lz4_flex = "0.9.2"

View file

@ -1,11 +1,11 @@
use crate::Location;
use ruff_text_size::TextSize;
use std::error::Error as StdError;
use std::fmt::Display;
#[derive(Debug, PartialEq, Eq)]
pub struct BaseError<T> {
pub error: T,
pub location: Location,
pub location: TextSize,
pub source_path: String,
}
@ -31,7 +31,12 @@ where
T: std::fmt::Display,
{
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)
)
}
}

View file

@ -21,6 +21,7 @@ tiny-keccak = { version = "2", features = ["sha3"] }
[dependencies]
rustpython-ast = { path = "../ast", version = "0.2.0" }
rustpython-compiler-core = { path = "../core", version = "0.2.0" }
ruff_text_size = { path = "../ruff_text_size" }
ahash = { workspace = true }
itertools = { workspace = true }

View file

@ -4,6 +4,7 @@ use crate::{
ast,
lexer::{LexicalError, LexicalErrorType},
};
use ruff_text_size::TextSize;
use rustc_hash::FxHashSet;
pub(crate) struct ArgumentList {
@ -83,10 +84,7 @@ pub(crate) fn parse_params(
Ok((pos_only, names, defaults))
}
type FunctionArgument = (
Option<(ast::Location, ast::Location, Option<String>)>,
ast::Expr,
);
type FunctionArgument = (Option<(TextSize, TextSize, Option<String>)>, ast::Expr);
// Parse arguments as supplied during a function/lambda *call*.
pub(crate) fn parse_args(func_args: Vec<FunctionArgument>) -> Result<ArgumentList, LexicalError> {

View file

@ -7,7 +7,7 @@
//! 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
//! 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
//!
@ -19,20 +19,15 @@
//! .map(|tok| tok.expect("Failed to lex"))
//! .collect::<Vec<_>>();
//!
//! for (start, token, end) in tokens {
//! for (token, range) in tokens {
//! println!(
//! "{0},{1}-{2},{3:<5} {token:?}",
//! start.row(),
//! start.column(),
//! end.row(),
//! end.column(),
//! "{token:?}@{range:?}",
//! );
//! }
//! ```
//!
//! [Lexical analysis]: https://docs.python.org/3/reference/lexical_analysis.html
use crate::{
ast::Location,
mode::Mode,
soft_keywords::SoftKeywordTransformer,
string::FStringErrorType,
@ -41,6 +36,7 @@ use crate::{
use log::trace;
use num_bigint::BigInt;
use num_traits::{Num, Zero};
use ruff_text_size::{TextLen, TextRange, TextSize};
use std::{char, cmp::Ordering, ops::Index, slice::SliceIndex, str::FromStr};
use unic_emoji_char::is_emoji_presentation;
use unic_ucd_ident::{is_xid_continue, is_xid_start};
@ -57,7 +53,7 @@ impl IndentationLevel {
fn compare_strict(
&self,
other: &IndentationLevel,
location: Location,
location: TextSize,
) -> Result<Ordering, LexicalError> {
// We only know for sure that we're smaller or bigger if tabs
// 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: Vec<Spanned>,
// The current location.
location: Location,
location: TextSize,
}
// 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> =
include!(concat!(env!("OUT_DIR"), "/keywords.rs"));
/// Contains a Token along with its start and end location.
pub type Spanned = (Location, Tok, Location);
/// Contains a Token along with its `range`.
pub type Spanned = (Tok, TextRange);
/// The result of lexing a token.
pub type LexResult = Result<Spanned, LexicalError>;
@ -207,7 +203,7 @@ pub type LexResult = Result<Spanned, LexicalError>;
/// ```
#[inline]
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.
@ -215,7 +211,7 @@ pub fn lex(source: &str, mode: Mode) -> impl Iterator<Item = LexResult> + '_ {
pub fn lex_located(
source: &str,
mode: Mode,
start_location: Location,
start_location: TextSize,
) -> impl Iterator<Item = LexResult> + '_ {
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
/// [`lex`] instead.
pub fn new(input: T, start: Location) -> Self {
pub fn new(input: T, start: TextSize) -> Self {
let mut lxr = Lexer {
at_begin_of_line: true,
nesting: 0,
@ -244,6 +240,7 @@ where
// spell-checker:ignore feff
if let Some('\u{feff}') = lxr.window[0] {
lxr.window.slide();
lxr.location += '\u{feff}'.text_len();
}
lxr
}
@ -273,9 +270,9 @@ where
let end_pos = self.get_pos();
if let Some(tok) = KEYWORDS.get(&name) {
Ok((start_pos, tok.clone(), end_pos))
Ok((tok.clone(), TextRange::new(start_pos, end_pos)))
} 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.
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 end_pos = self.get_pos();
let value = BigInt::from_str_radix(&value_text, radix).map_err(|e| LexicalError {
error: LexicalErrorType::OtherError(format!("{e:?}")),
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.
@ -370,16 +367,15 @@ where
self.next_char();
let end_pos = self.get_pos();
Ok((
start_pos,
Tok::Complex {
real: 0.0,
imag: value,
},
end_pos,
TextRange::new(start_pos, end_pos),
))
} else {
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 {
// Parse trailing 'j':
@ -387,7 +383,10 @@ where
self.next_char();
let end_pos = self.get_pos();
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 {
let end_pos = self.get_pos();
let value = value_text.parse::<BigInt>().unwrap();
@ -398,7 +397,7 @@ where
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] {
Some('\n' | '\r') | None => {
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(_) => {}
}
@ -469,7 +468,7 @@ where
/// Lex a string literal.
fn lex_string(&mut self, kind: StringKind) -> LexResult {
let start_pos = self.get_pos();
for _ in 0..kind.prefix_len() {
for _ in 0..u32::from(kind.prefix_len()) {
self.next_char();
}
let quote_char = self.next_char().unwrap();
@ -538,7 +537,7 @@ where
kind,
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
@ -664,7 +663,15 @@ where
// New indentation level:
self.indentations.push(indentation_level);
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 => {
// One or more dedentations
@ -678,7 +685,7 @@ where
Ordering::Less => {
self.indentations.pop();
let tok_pos = self.get_pos();
self.emit((tok_pos, Tok::Dedent, tok_pos));
self.emit((Tok::Dedent, TextRange::empty(tok_pos)));
}
Ordering::Equal => {
// We arrived at proper level of indentation.
@ -723,16 +730,16 @@ where
// Next, insert a trailing newline, if required.
if !self.at_begin_of_line {
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.
while !self.indentations.is_empty() {
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(())
@ -760,11 +767,11 @@ where
Some('=') => {
self.next_char();
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();
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] {
self.next_char();
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 {
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('=') => {
self.next_char();
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('*') => {
self.next_char();
@ -795,17 +802,20 @@ where
Some('=') => {
self.next_char();
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();
self.emit((tok_start, Tok::DoubleStar, tok_end));
self.emit((Tok::DoubleStar, TextRange::new(tok_start, tok_end)));
}
}
}
_ => {
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('=') => {
self.next_char();
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('/') => {
self.next_char();
@ -824,17 +834,20 @@ where
Some('=') => {
self.next_char();
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();
self.emit((tok_start, Tok::DoubleSlash, tok_end));
self.emit((Tok::DoubleSlash, TextRange::new(tok_start, tok_end)));
}
}
}
_ => {
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] {
self.next_char();
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 {
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] {
self.next_char();
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 {
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] {
self.next_char();
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 {
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] {
self.next_char();
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 {
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('=') => {
self.next_char();
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('>') => {
self.next_char();
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();
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] {
self.next_char();
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 {
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] {
self.next_char();
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 {
return Err(LexicalError {
error: LexicalErrorType::UnrecognizedToken { tok: '!' },
@ -983,10 +996,10 @@ where
if let Some('=') = self.window[0] {
self.next_char();
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 {
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('=') => {
self.next_char();
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();
self.emit((tok_start, Tok::LeftShift, tok_end));
self.emit((Tok::LeftShift, TextRange::new(tok_start, tok_end)));
}
}
}
Some('=') => {
self.next_char();
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();
self.emit((tok_start, Tok::Less, tok_end));
self.emit((Tok::Less, TextRange::new(tok_start, tok_end)));
}
}
}
@ -1031,22 +1047,25 @@ where
Some('=') => {
self.next_char();
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();
self.emit((tok_start, Tok::RightShift, tok_end));
self.emit((Tok::RightShift, TextRange::new(tok_start, tok_end)));
}
}
}
Some('=') => {
self.next_char();
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();
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();
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 {
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:
if self.nesting == 0 {
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 {
self.emit((tok_start, Tok::NonLogicalNewline, tok_end));
self.emit((Tok::NonLogicalNewline, TextRange::new(tok_start, tok_end)));
}
}
' ' | '\t' | '\x0C' => {
@ -1119,11 +1138,10 @@ where
self.next_char();
let tok_end = self.get_pos();
self.emit((
tok_start,
Tok::Name {
name: c.to_string(),
},
tok_end,
TextRange::new(tok_start, tok_end),
));
} else {
let c = self.next_char();
@ -1147,7 +1165,7 @@ where
std::hint::unreachable_unchecked()
});
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.
@ -1155,25 +1173,26 @@ where
let mut c = self.window[0];
self.window.slide();
match c {
Some('\n') => {
self.location.newline();
}
Some('\r') => {
if self.window[0] == Some('\n') {
self.location += TextSize::from(1);
self.window.slide();
}
self.location.newline();
self.location += TextSize::from(1);
c = Some('\n');
}
_ => {
self.location.go_right();
#[allow(unused_variables)]
Some(c) => {
self.location += c.text_len();
}
_ => {}
}
c
}
// Helper function to retrieve the current position.
fn get_pos(&self) -> Location {
fn get_pos(&self) -> TextSize {
self.location
}
@ -1202,7 +1221,7 @@ where
);
match token {
Ok((_, Tok::EndOfFile, _)) => None,
Ok((Tok::EndOfFile, _)) => None,
r => Some(r),
}
}
@ -1218,12 +1237,12 @@ pub struct LexicalError {
/// The type of error that occurred.
pub error: LexicalErrorType,
/// The location of the error.
pub location: Location,
pub location: TextSize,
}
impl LexicalError {
/// 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 }
}
}
@ -1325,7 +1344,7 @@ mod tests {
pub fn lex_source(source: &str) -> Vec<Tok> {
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 {

View file

@ -113,6 +113,7 @@
#![doc(html_root_url = "https://docs.rs/rustpython-parser/")]
pub use rustpython_ast as ast;
pub use rustpython_compiler_core::ConversionFlag;
mod function;
// Skip flattening lexer to distinguish from full parser
@ -124,11 +125,14 @@ mod soft_keywords;
mod string;
mod token;
type Location = TextSize;
pub use mode::Mode;
pub use parser::{
parse, parse_expression, parse_expression_located, parse_located, parse_program, parse_tokens,
ParseError, ParseErrorType,
};
use ruff_text_size::TextSize;
pub use string::FStringErrorType;
pub use token::{StringKind, Tok};

View file

@ -13,11 +13,12 @@
//! [`Mode`]: crate::mode
use crate::{
ast::{self, Location},
ast::{self},
lexer::{self, LexResult, LexicalError, LexicalErrorType},
mode::Mode,
python,
token::Tok,
Location,
};
use itertools::Itertools;
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> {
parse_expression_located(source, path, Location::new(1, 0))
parse_expression_located(source, path, Location::default())
}
/// 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:
///
/// ```
/// 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());
/// ```
pub fn parse_expression_located(
@ -131,7 +133,7 @@ pub fn parse_expression_located(
/// assert!(program.is_ok());
/// ```
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`].
@ -142,7 +144,8 @@ pub fn parse(source: &str, mode: Mode, source_path: &str) -> Result<ast::Mod, Pa
/// # Example
///
/// ```
/// use rustpython_parser::{ast::Location, Mode, parse_located};
/// use ruff_text_size::TextSize;
/// use rustpython_parser::{Mode, parse_located};
///
/// let source = r#"
/// def fib(i):
@ -153,7 +156,7 @@ pub fn parse(source: &str, mode: Mode, source_path: &str) -> Result<ast::Mod, Pa
///
/// 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());
/// ```
pub fn parse_located(
@ -186,12 +189,16 @@ pub fn parse_tokens(
mode: Mode,
source_path: &str,
) -> 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))
.chain(lxr)
.filter_ok(|(_, tok, _)| !matches!(tok, Tok::Comment { .. } | Tok::NonLogicalNewline));
.filter_ok(|(tok, _)| !matches!(tok, Tok::Comment { .. } | Tok::NonLogicalNewline));
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))
}
@ -223,6 +230,7 @@ fn parse_error_from_lalrpop(
source_path: &str,
) -> ParseError {
let source_path = source_path.to_owned();
match err {
// TODO: Are there cases where this isn't an EOF?
LalrpopError::InvalidToken { location } => ParseError {
@ -246,7 +254,7 @@ fn parse_error_from_lalrpop(
let expected = (expected.len() == 1).then(|| expected[0].clone());
ParseError {
error: ParseErrorType::UnrecognizedToken(token.1, expected),
location: token.0.with_col_offset(1),
location: token.0,
source_path,
}
}
@ -576,9 +584,9 @@ except* OSError as e:
fn test_modes() {
let source = "a[0][1][2][3][4]";
assert!(parse(&source, Mode::Expression, "<embedded>").is_ok());
assert!(parse(&source, Mode::Module, "<embedded>").is_ok());
assert!(parse(&source, Mode::Interactive, "<embedded>").is_ok());
assert!(parse(source, Mode::Expression, "<embedded>").is_ok());
assert!(parse(source, Mode::Module, "<embedded>").is_ok());
assert!(parse(source, Mode::Interactive, "<embedded>").is_ok());
}
#[test]

View file

@ -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> => {
let expr = match c {
Some(c) => ast::Expr::new(
@ -1776,7 +1776,7 @@ Identifier: String = <s:name> => s;
// Hook external lexer:
extern {
type Location = ast::Location;
type Location = crate::Location;
type Error = LexicalError;
enum token::Tok {

18786
parser/src/python.rs generated

File diff suppressed because it is too large Load diff

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 0..10,
custom: (),
node: AnnAssign(
StmtAnnAssign {
target: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -37,16 +19,7 @@ expression: parse_ast
),
},
annotation: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 3..6,
custom: (),
node: Name(
ExprName {
@ -57,16 +30,7 @@ expression: parse_ast
},
value: Some(
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 0..15,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 3,
},
),
range: 0..3,
custom: (),
node: Attribute(
ExprAttribute {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -58,31 +31,13 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 6..15,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: Constant(
ExprConstant {
@ -94,16 +49,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: Constant(
ExprConstant {
@ -115,16 +61,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 24,
},
),
range: 0..24,
custom: (),
node: For(
StmtFor {
target: Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 4..5,
custom: (),
node: Name(
ExprName {
@ -37,31 +19,13 @@ expression: parse_ast
),
},
iter: Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 9..18,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: Constant(
ExprConstant {
@ -73,16 +37,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: Constant(
ExprConstant {
@ -94,16 +49,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 16..17,
custom: (),
node: Constant(
ExprConstant {
@ -121,16 +67,7 @@ expression: parse_ast
},
body: [
Located {
location: Location {
row: 1,
column: 20,
},
end_location: Some(
Location {
row: 1,
column: 24,
},
),
range: 20..24,
custom: (),
node: Pass,
},

View file

@ -4,46 +4,19 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 0..18,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 0..6,
custom: (),
node: List(
ExprList {
elts: [
Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 2,
},
),
range: 1..2,
custom: (),
node: Name(
ExprName {
@ -53,16 +26,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 4..5,
custom: (),
node: Name(
ExprName {
@ -78,31 +42,13 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 9..18,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: Constant(
ExprConstant {
@ -114,16 +60,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: Constant(
ExprConstant {
@ -135,16 +72,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 16..17,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,31 +4,13 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 0..26,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -39,30 +21,12 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 4..26,
custom: (),
node: ListComp(
ExprListComp {
elt: Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Name(
ExprName {
@ -74,16 +38,7 @@ expression: parse_ast
generators: [
Comprehension {
target: Located {
location: Location {
row: 1,
column: 11,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 11..12,
custom: (),
node: Name(
ExprName {
@ -93,31 +48,13 @@ expression: parse_ast
),
},
iter: Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 25,
},
),
range: 16..25,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 17,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 17..18,
custom: (),
node: Constant(
ExprConstant {
@ -129,16 +66,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 20,
},
end_location: Some(
Location {
row: 1,
column: 21,
},
),
range: 20..21,
custom: (),
node: Constant(
ExprConstant {
@ -150,16 +78,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 23,
},
end_location: Some(
Location {
row: 1,
column: 24,
},
),
range: 23..24,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,31 +4,13 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 0..13,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -39,31 +21,13 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 4..13,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Constant(
ExprConstant {
@ -75,16 +39,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 8,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 8..9,
custom: (),
node: Constant(
ExprConstant {
@ -96,16 +51,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 11,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 11..12,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,44 +4,17 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: If(
StmtIf {
test: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 3..8,
custom: (),
node: NamedExpr(
ExprNamedExpr {
target: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 4,
},
),
range: 3..4,
custom: (),
node: Name(
ExprName {
@ -51,16 +24,7 @@ expression: parse_ast
),
},
value: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: Constant(
ExprConstant {
@ -76,16 +40,7 @@ expression: parse_ast
},
body: [
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 10..14,
custom: (),
node: Pass,
},

View file

@ -4,31 +4,13 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 0..26,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -39,30 +21,12 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 4..26,
custom: (),
node: SetComp(
ExprSetComp {
elt: Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Name(
ExprName {
@ -74,16 +38,7 @@ expression: parse_ast
generators: [
Comprehension {
target: Located {
location: Location {
row: 1,
column: 11,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 11..12,
custom: (),
node: Name(
ExprName {
@ -93,31 +48,13 @@ expression: parse_ast
),
},
iter: Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 25,
},
),
range: 16..25,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 17,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 17..18,
custom: (),
node: Constant(
ExprConstant {
@ -129,16 +66,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 20,
},
end_location: Some(
Location {
row: 1,
column: 21,
},
),
range: 20..21,
custom: (),
node: Constant(
ExprConstant {
@ -150,16 +78,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 23,
},
end_location: Some(
Location {
row: 1,
column: 24,
},
),
range: 23..24,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,46 +4,19 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 0..19,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 0..7,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 2,
},
),
range: 1..2,
custom: (),
node: Name(
ExprName {
@ -53,30 +26,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 4..6,
custom: (),
node: Starred(
ExprStarred {
value: Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Name(
ExprName {
@ -96,31 +51,13 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 10..19,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 11,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 11..12,
custom: (),
node: Constant(
ExprConstant {
@ -132,16 +69,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 14,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 14..15,
custom: (),
node: Constant(
ExprConstant {
@ -153,16 +81,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 17,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 17..18,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 16,
},
),
range: 0..16,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 4,
},
),
range: 0..4,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -52,16 +25,7 @@ expression: parse_ast
),
},
slice: Located {
location: Location {
row: 1,
column: 2,
},
end_location: Some(
Location {
row: 1,
column: 3,
},
),
range: 2..3,
custom: (),
node: Name(
ExprName {
@ -76,31 +40,13 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 16,
},
),
range: 7..16,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 8,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 8..9,
custom: (),
node: Constant(
ExprConstant {
@ -112,16 +58,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 11,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 11..12,
custom: (),
node: Constant(
ExprConstant {
@ -133,16 +70,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 14,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 14..15,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,46 +4,19 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 0..18,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 0..6,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 2,
},
),
range: 1..2,
custom: (),
node: Name(
ExprName {
@ -53,16 +26,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 4..5,
custom: (),
node: Name(
ExprName {
@ -78,31 +42,13 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 9..18,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: Constant(
ExprConstant {
@ -114,16 +60,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: Constant(
ExprConstant {
@ -135,16 +72,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 16..17,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,32 +4,14 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: With(
StmtWith {
items: [
Withitem {
context_expr: Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Constant(
ExprConstant {
@ -42,16 +24,7 @@ expression: parse_ast
},
optional_vars: Some(
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: Name(
ExprName {
@ -65,16 +38,7 @@ expression: parse_ast
],
body: [
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 13..17,
custom: (),
node: Pass,
},

View file

@ -4,44 +4,17 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 16,
},
),
range: 0..16,
custom: (),
node: AugAssign(
StmtAugAssign {
target: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 3,
},
),
range: 0..3,
custom: (),
node: Attribute(
ExprAttribute {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -57,31 +30,13 @@ expression: parse_ast
},
op: Add,
value: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 16,
},
),
range: 7..16,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 8,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 8..9,
custom: (),
node: Constant(
ExprConstant {
@ -93,16 +48,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 11,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 11..12,
custom: (),
node: Constant(
ExprConstant {
@ -114,16 +60,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 14,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 14..15,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 0..6,
custom: (),
node: AugAssign(
StmtAugAssign {
target: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -38,16 +20,7 @@ expression: parse_ast
},
op: Add,
value: Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,44 +4,17 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: AugAssign(
StmtAugAssign {
target: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 4,
},
),
range: 0..4,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -51,16 +24,7 @@ expression: parse_ast
),
},
slice: Located {
location: Location {
row: 1,
column: 2,
},
end_location: Some(
Location {
row: 1,
column: 3,
},
),
range: 2..3,
custom: (),
node: Name(
ExprName {
@ -75,31 +39,13 @@ expression: parse_ast
},
op: Add,
value: Located {
location: Location {
row: 1,
column: 8,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 8..17,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: Constant(
ExprConstant {
@ -111,16 +57,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: Constant(
ExprConstant {
@ -132,16 +69,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 15,
},
end_location: Some(
Location {
row: 1,
column: 16,
},
),
range: 15..16,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 0..7,
custom: (),
node: Delete(
StmtDelete {
targets: [
Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 4..7,
custom: (),
node: Attribute(
ExprAttribute {
value: Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 4..5,
custom: (),
node: Name(
ExprName {

View file

@ -4,31 +4,13 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 0..5,
custom: (),
node: Delete(
StmtDelete {
targets: [
Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 4..5,
custom: (),
node: Name(
ExprName {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: Delete(
StmtDelete {
targets: [
Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 4..8,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 4..5,
custom: (),
node: Name(
ExprName {
@ -52,16 +25,7 @@ expression: parse_ast
),
},
slice: Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: Name(
ExprName {

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 0..23,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -25,16 +16,7 @@ Ok(
vararg: None,
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: ArgData {
arg: "a",
@ -43,16 +25,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: ArgData {
arg: "b",
@ -61,16 +34,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 15,
},
end_location: Some(
Location {
row: 1,
column: 16,
},
),
range: 15..16,
custom: (),
node: ArgData {
arg: "c",
@ -85,16 +49,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 19,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 19..23,
custom: (),
node: Pass,
},

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 29,
},
),
range: 0..29,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -25,16 +16,7 @@ Ok(
vararg: None,
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: ArgData {
arg: "a",
@ -43,16 +25,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: ArgData {
arg: "b",
@ -61,16 +34,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 18,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 18..19,
custom: (),
node: ArgData {
arg: "c",
@ -81,16 +45,7 @@ Ok(
],
kw_defaults: [
Located {
location: Location {
row: 1,
column: 14,
},
end_location: Some(
Location {
row: 1,
column: 16,
},
),
range: 14..16,
custom: (),
node: Constant(
ExprConstant {
@ -102,16 +57,7 @@ Ok(
),
},
Located {
location: Location {
row: 1,
column: 20,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 20..22,
custom: (),
node: Constant(
ExprConstant {
@ -128,16 +74,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 25,
},
end_location: Some(
Location {
row: 1,
column: 29,
},
),
range: 25..29,
custom: (),
node: Pass,
},

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 0..13,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -30,16 +21,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 9..13,
custom: (),
node: Pass,
},

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 32,
},
),
range: 0..32,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -23,16 +14,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: ArgData {
arg: "a",
@ -41,16 +23,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: ArgData {
arg: "b",
@ -59,16 +32,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: ArgData {
arg: "c",
@ -80,16 +44,7 @@ Ok(
vararg: None,
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 18,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 18..19,
custom: (),
node: ArgData {
arg: "d",
@ -98,16 +53,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 21,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 21..22,
custom: (),
node: ArgData {
arg: "e",
@ -116,16 +62,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 24,
},
end_location: Some(
Location {
row: 1,
column: 25,
},
),
range: 24..25,
custom: (),
node: ArgData {
arg: "f",
@ -140,16 +77,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 28,
},
end_location: Some(
Location {
row: 1,
column: 32,
},
),
range: 28..32,
custom: (),
node: Pass,
},

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -23,16 +14,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: ArgData {
arg: "a",
@ -41,16 +23,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: ArgData {
arg: "b",
@ -59,16 +32,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: ArgData {
arg: "c",
@ -80,16 +44,7 @@ Ok(
vararg: None,
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 18,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 18..19,
custom: (),
node: ArgData {
arg: "d",
@ -98,16 +53,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 21,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 21..22,
custom: (),
node: ArgData {
arg: "e",
@ -116,16 +62,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 27,
},
end_location: Some(
Location {
row: 1,
column: 28,
},
),
range: 27..28,
custom: (),
node: ArgData {
arg: "f",
@ -136,16 +73,7 @@ Ok(
],
kw_defaults: [
Located {
location: Location {
row: 1,
column: 23,
},
end_location: Some(
Location {
row: 1,
column: 25,
},
),
range: 23..25,
custom: (),
node: Constant(
ExprConstant {
@ -157,16 +85,7 @@ Ok(
),
},
Located {
location: Location {
row: 1,
column: 29,
},
end_location: Some(
Location {
row: 1,
column: 31,
},
),
range: 29..31,
custom: (),
node: Constant(
ExprConstant {
@ -183,16 +102,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 34,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 34..38,
custom: (),
node: Pass,
},

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 42,
},
),
range: 0..42,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -23,16 +14,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: ArgData {
arg: "a",
@ -41,16 +23,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: ArgData {
arg: "b",
@ -59,16 +32,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: ArgData {
arg: "c",
@ -79,16 +43,7 @@ Ok(
],
vararg: Some(
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 16..20,
custom: (),
node: ArgData {
arg: "args",
@ -99,16 +54,7 @@ Ok(
),
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 22,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 22..23,
custom: (),
node: ArgData {
arg: "d",
@ -117,16 +63,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 25,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 25..26,
custom: (),
node: ArgData {
arg: "e",
@ -135,16 +72,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 31,
},
end_location: Some(
Location {
row: 1,
column: 32,
},
),
range: 31..32,
custom: (),
node: ArgData {
arg: "f",
@ -155,16 +83,7 @@ Ok(
],
kw_defaults: [
Located {
location: Location {
row: 1,
column: 27,
},
end_location: Some(
Location {
row: 1,
column: 29,
},
),
range: 27..29,
custom: (),
node: Constant(
ExprConstant {
@ -176,16 +95,7 @@ Ok(
),
},
Located {
location: Location {
row: 1,
column: 33,
},
end_location: Some(
Location {
row: 1,
column: 35,
},
),
range: 33..35,
custom: (),
node: Constant(
ExprConstant {
@ -202,16 +112,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 38,
},
end_location: Some(
Location {
row: 1,
column: 42,
},
),
range: 38..42,
custom: (),
node: Pass,
},

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 52,
},
),
range: 0..52,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -23,16 +14,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: ArgData {
arg: "a",
@ -41,16 +23,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: ArgData {
arg: "b",
@ -59,16 +32,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: ArgData {
arg: "c",
@ -79,16 +43,7 @@ Ok(
],
vararg: Some(
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 16..20,
custom: (),
node: ArgData {
arg: "args",
@ -99,16 +54,7 @@ Ok(
),
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 22,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 22..23,
custom: (),
node: ArgData {
arg: "d",
@ -117,16 +63,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 25,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 25..26,
custom: (),
node: ArgData {
arg: "e",
@ -135,16 +72,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 31,
},
end_location: Some(
Location {
row: 1,
column: 32,
},
),
range: 31..32,
custom: (),
node: ArgData {
arg: "f",
@ -155,16 +83,7 @@ Ok(
],
kw_defaults: [
Located {
location: Location {
row: 1,
column: 27,
},
end_location: Some(
Location {
row: 1,
column: 29,
},
),
range: 27..29,
custom: (),
node: Constant(
ExprConstant {
@ -176,16 +95,7 @@ Ok(
),
},
Located {
location: Location {
row: 1,
column: 33,
},
end_location: Some(
Location {
row: 1,
column: 35,
},
),
range: 33..35,
custom: (),
node: Constant(
ExprConstant {
@ -199,16 +109,7 @@ Ok(
],
kwarg: Some(
Located {
location: Location {
row: 1,
column: 39,
},
end_location: Some(
Location {
row: 1,
column: 45,
},
),
range: 39..45,
custom: (),
node: ArgData {
arg: "kwargs",
@ -221,16 +122,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 48,
},
end_location: Some(
Location {
row: 1,
column: 52,
},
),
range: 48..52,
custom: (),
node: Pass,
},

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 0..20,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -23,16 +14,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: ArgData {
arg: "a",
@ -41,16 +23,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: ArgData {
arg: "b",
@ -59,16 +32,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: ArgData {
arg: "c",
@ -85,16 +49,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 16..20,
custom: (),
node: Pass,
},

View file

@ -5,16 +5,7 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 0..26,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -23,16 +14,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: ArgData {
arg: "a",
@ -41,16 +23,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 9..10,
custom: (),
node: ArgData {
arg: "b",
@ -59,16 +32,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 15,
},
end_location: Some(
Location {
row: 1,
column: 16,
},
),
range: 15..16,
custom: (),
node: ArgData {
arg: "c",
@ -83,16 +47,7 @@ Ok(
kwarg: None,
defaults: [
Located {
location: Location {
row: 1,
column: 11,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 11..13,
custom: (),
node: Constant(
ExprConstant {
@ -104,16 +59,7 @@ Ok(
),
},
Located {
location: Location {
row: 1,
column: 17,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 17..19,
custom: (),
node: Constant(
ExprConstant {
@ -128,16 +74,7 @@ Ok(
},
body: [
Located {
location: Location {
row: 1,
column: 22,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 22..26,
custom: (),
node: Pass,
},

View file

@ -5,30 +5,12 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 0..20,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 0..20,
custom: (),
node: Lambda(
ExprLambda {
@ -38,16 +20,7 @@ Ok(
vararg: None,
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: ArgData {
arg: "a",
@ -56,16 +29,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: ArgData {
arg: "b",
@ -74,16 +38,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 16..17,
custom: (),
node: ArgData {
arg: "c",
@ -97,16 +52,7 @@ Ok(
defaults: [],
},
body: Located {
location: Location {
row: 1,
column: 19,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 19..20,
custom: (),
node: Constant(
ExprConstant {

View file

@ -5,30 +5,12 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 0..26,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 0..26,
custom: (),
node: Lambda(
ExprLambda {
@ -38,16 +20,7 @@ Ok(
vararg: None,
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: ArgData {
arg: "a",
@ -56,16 +29,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: ArgData {
arg: "b",
@ -74,16 +38,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 19,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 19..20,
custom: (),
node: ArgData {
arg: "c",
@ -94,16 +49,7 @@ Ok(
],
kw_defaults: [
Located {
location: Location {
row: 1,
column: 15,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 15..17,
custom: (),
node: Constant(
ExprConstant {
@ -115,16 +61,7 @@ Ok(
),
},
Located {
location: Location {
row: 1,
column: 21,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 21..23,
custom: (),
node: Constant(
ExprConstant {
@ -140,16 +77,7 @@ Ok(
defaults: [],
},
body: Located {
location: Location {
row: 1,
column: 25,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 25..26,
custom: (),
node: Constant(
ExprConstant {

View file

@ -5,30 +5,12 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 0..9,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 0..9,
custom: (),
node: Lambda(
ExprLambda {
@ -42,16 +24,7 @@ Ok(
defaults: [],
},
body: Located {
location: Location {
row: 1,
column: 8,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 8..9,
custom: (),
node: Constant(
ExprConstant {

View file

@ -5,30 +5,12 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 0..26,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 0..26,
custom: (),
node: Lambda(
ExprLambda {
@ -36,16 +18,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: ArgData {
arg: "a",
@ -54,16 +27,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: ArgData {
arg: "b",
@ -72,16 +36,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: ArgData {
arg: "c",
@ -93,16 +48,7 @@ Ok(
vararg: None,
kwonlyargs: [
Located {
location: Location {
row: 1,
column: 19,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 19..20,
custom: (),
node: ArgData {
arg: "d",
@ -111,16 +57,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 22,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 22..23,
custom: (),
node: ArgData {
arg: "e",
@ -134,16 +71,7 @@ Ok(
defaults: [],
},
body: Located {
location: Location {
row: 1,
column: 25,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 25..26,
custom: (),
node: Constant(
ExprConstant {

View file

@ -5,30 +5,12 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: Lambda(
ExprLambda {
@ -36,16 +18,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: ArgData {
arg: "a",
@ -54,16 +27,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: ArgData {
arg: "b",
@ -72,16 +36,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: ArgData {
arg: "c",
@ -97,16 +52,7 @@ Ok(
defaults: [],
},
body: Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 16..17,
custom: (),
node: Constant(
ExprConstant {

View file

@ -5,30 +5,12 @@ expression: parse_ast
Ok(
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 0..23,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 0..23,
custom: (),
node: Lambda(
ExprLambda {
@ -36,16 +18,7 @@ Ok(
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: ArgData {
arg: "a",
@ -54,16 +27,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: ArgData {
arg: "b",
@ -72,16 +36,7 @@ Ok(
},
},
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 16..17,
custom: (),
node: ArgData {
arg: "c",
@ -96,16 +51,7 @@ Ok(
kwarg: None,
defaults: [
Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 12..14,
custom: (),
node: Constant(
ExprConstant {
@ -117,16 +63,7 @@ Ok(
),
},
Located {
location: Location {
row: 1,
column: 18,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 18..20,
custom: (),
node: Constant(
ExprConstant {
@ -140,16 +77,7 @@ Ok(
],
},
body: Located {
location: Location {
row: 1,
column: 22,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 22..23,
custom: (),
node: Constant(
ExprConstant {

View file

@ -3,32 +3,14 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 25,
},
),
range: 0..25,
custom: (),
node: Dict(
ExprDict {
keys: [
Some(
Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 4,
},
),
range: 1..4,
custom: (),
node: Constant(
ExprConstant {
@ -43,16 +25,7 @@ Located {
None,
Some(
Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 16..19,
custom: (),
node: Constant(
ExprConstant {
@ -67,16 +40,7 @@ Located {
],
values: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 6..9,
custom: (),
node: Constant(
ExprConstant {
@ -88,16 +52,7 @@ Located {
),
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: Name(
ExprName {
@ -107,16 +62,7 @@ Located {
),
},
Located {
location: Location {
row: 1,
column: 21,
},
end_location: Some(
Location {
row: 1,
column: 24,
},
),
range: 21..24,
custom: (),
node: Constant(
ExprConstant {

View file

@ -3,44 +3,17 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 7,
column: 1,
},
),
range: 0..141,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: Attribute(
ExprAttribute {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 3,
},
),
range: 0..3,
custom: (),
node: Constant(
ExprConstant {
@ -58,30 +31,12 @@ Located {
},
args: [
Located {
location: Location {
row: 2,
column: 4,
},
end_location: Some(
Location {
row: 6,
column: 5,
},
),
range: 14..139,
custom: (),
node: GeneratorExp(
ExprGeneratorExp {
elt: Located {
location: Location {
row: 2,
column: 4,
},
end_location: Some(
Location {
row: 2,
column: 7,
},
),
range: 14..17,
custom: (),
node: Name(
ExprName {
@ -93,16 +48,7 @@ Located {
generators: [
Comprehension {
target: Located {
location: Location {
row: 3,
column: 8,
},
end_location: Some(
Location {
row: 3,
column: 11,
},
),
range: 26..29,
custom: (),
node: Name(
ExprName {
@ -112,45 +58,18 @@ Located {
),
},
iter: Located {
location: Location {
row: 3,
column: 15,
},
end_location: Some(
Location {
row: 6,
column: 5,
},
),
range: 33..139,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 4,
column: 8,
},
end_location: Some(
Location {
row: 4,
column: 45,
},
),
range: 43..80,
custom: (),
node: IfExp(
ExprIfExp {
test: Located {
location: Location {
row: 4,
column: 30,
},
end_location: Some(
Location {
row: 4,
column: 35,
},
),
range: 65..70,
custom: (),
node: Name(
ExprName {
@ -160,30 +79,12 @@ Located {
),
},
body: Located {
location: Location {
row: 4,
column: 8,
},
end_location: Some(
Location {
row: 4,
column: 26,
},
),
range: 43..61,
custom: (),
node: BinOp(
ExprBinOp {
left: Located {
location: Location {
row: 4,
column: 8,
},
end_location: Some(
Location {
row: 4,
column: 18,
},
),
range: 43..53,
custom: (),
node: Constant(
ExprConstant {
@ -196,16 +97,7 @@ Located {
},
op: Mod,
right: Located {
location: Location {
row: 4,
column: 21,
},
end_location: Some(
Location {
row: 4,
column: 26,
},
),
range: 56..61,
custom: (),
node: Name(
ExprName {
@ -218,16 +110,7 @@ Located {
),
},
orelse: Located {
location: Location {
row: 4,
column: 41,
},
end_location: Some(
Location {
row: 4,
column: 45,
},
),
range: 76..80,
custom: (),
node: Constant(
ExprConstant {
@ -240,30 +123,12 @@ Located {
),
},
Located {
location: Location {
row: 5,
column: 8,
},
end_location: Some(
Location {
row: 5,
column: 50,
},
),
range: 90..132,
custom: (),
node: IfExp(
ExprIfExp {
test: Located {
location: Location {
row: 5,
column: 34,
},
end_location: Some(
Location {
row: 5,
column: 40,
},
),
range: 116..122,
custom: (),
node: Name(
ExprName {
@ -273,30 +138,12 @@ Located {
),
},
body: Located {
location: Location {
row: 5,
column: 9,
},
end_location: Some(
Location {
row: 5,
column: 29,
},
),
range: 91..111,
custom: (),
node: BinOp(
ExprBinOp {
left: Located {
location: Location {
row: 5,
column: 9,
},
end_location: Some(
Location {
row: 5,
column: 20,
},
),
range: 91..102,
custom: (),
node: Constant(
ExprConstant {
@ -309,16 +156,7 @@ Located {
},
op: Mod,
right: Located {
location: Location {
row: 5,
column: 23,
},
end_location: Some(
Location {
row: 5,
column: 29,
},
),
range: 105..111,
custom: (),
node: Name(
ExprName {
@ -331,16 +169,7 @@ Located {
),
},
orelse: Located {
location: Location {
row: 5,
column: 46,
},
end_location: Some(
Location {
row: 5,
column: 50,
},
),
range: 128..132,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,46 +4,19 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 2,
column: 0,
},
end_location: Some(
Location {
row: 6,
column: 19,
},
),
range: 1..73,
custom: (),
node: Match(
StmtMatch {
subject: Located {
location: Location {
row: 2,
column: 6,
},
end_location: Some(
Location {
row: 2,
column: 17,
},
),
range: 7..18,
custom: (),
node: Dict(
ExprDict {
keys: [
Some(
Located {
location: Location {
row: 2,
column: 7,
},
end_location: Some(
Location {
row: 2,
column: 13,
},
),
range: 8..14,
custom: (),
node: Constant(
ExprConstant {
@ -58,16 +31,7 @@ expression: parse_ast
],
values: [
Located {
location: Location {
row: 2,
column: 15,
},
end_location: Some(
Location {
row: 2,
column: 16,
},
),
range: 16..17,
custom: (),
node: Constant(
ExprConstant {
@ -85,16 +49,7 @@ expression: parse_ast
cases: [
MatchCase {
pattern: Located {
location: Location {
row: 3,
column: 9,
},
end_location: Some(
Location {
row: 5,
column: 5,
},
),
range: 29..52,
custom: (),
node: MatchMapping(
PatternMatchMapping {
@ -109,44 +64,17 @@ expression: parse_ast
guard: None,
body: [
Located {
location: Location {
row: 6,
column: 8,
},
end_location: Some(
Location {
row: 6,
column: 19,
},
),
range: 62..73,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 6,
column: 8,
},
end_location: Some(
Location {
row: 6,
column: 19,
},
),
range: 62..73,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 6,
column: 8,
},
end_location: Some(
Location {
row: 6,
column: 13,
},
),
range: 62..67,
custom: (),
node: Name(
ExprName {
@ -157,16 +85,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 6,
column: 14,
},
end_location: Some(
Location {
row: 6,
column: 18,
},
),
range: 68..72,
custom: (),
node: Name(
ExprName {
@ -190,46 +109,19 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 7,
column: 0,
},
end_location: Some(
Location {
row: 11,
column: 20,
},
),
range: 74..177,
custom: (),
node: Match(
StmtMatch {
subject: Located {
location: Location {
row: 7,
column: 6,
},
end_location: Some(
Location {
row: 7,
column: 23,
},
),
range: 80..97,
custom: (),
node: Dict(
ExprDict {
keys: [
Some(
Located {
location: Location {
row: 7,
column: 7,
},
end_location: Some(
Location {
row: 7,
column: 14,
},
),
range: 81..88,
custom: (),
node: Constant(
ExprConstant {
@ -244,16 +136,7 @@ expression: parse_ast
],
values: [
Located {
location: Location {
row: 7,
column: 16,
},
end_location: Some(
Location {
row: 7,
column: 22,
},
),
range: 90..96,
custom: (),
node: Constant(
ExprConstant {
@ -271,31 +154,13 @@ expression: parse_ast
cases: [
MatchCase {
pattern: Located {
location: Location {
row: 8,
column: 9,
},
end_location: Some(
Location {
row: 10,
column: 5,
},
),
range: 108..155,
custom: (),
node: MatchMapping(
PatternMatchMapping {
keys: [
Located {
location: Location {
row: 9,
column: 8,
},
end_location: Some(
Location {
row: 9,
column: 15,
},
),
range: 118..125,
custom: (),
node: Constant(
ExprConstant {
@ -309,60 +174,24 @@ expression: parse_ast
],
patterns: [
Located {
location: Location {
row: 9,
column: 17,
},
end_location: Some(
Location {
row: 9,
column: 38,
},
),
range: 127..148,
custom: (),
node: MatchAs(
PatternMatchAs {
pattern: Some(
Located {
location: Location {
row: 9,
column: 17,
},
end_location: Some(
Location {
row: 9,
column: 29,
},
),
range: 127..139,
custom: (),
node: MatchOr(
PatternMatchOr {
patterns: [
Located {
location: Location {
row: 9,
column: 17,
},
end_location: Some(
Location {
row: 9,
column: 22,
},
),
range: 127..132,
custom: (),
node: MatchClass(
PatternMatchClass {
cls: Located {
location: Location {
row: 9,
column: 17,
},
end_location: Some(
Location {
row: 9,
column: 20,
},
),
range: 127..130,
custom: (),
node: Name(
ExprName {
@ -378,16 +207,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 9,
column: 25,
},
end_location: Some(
Location {
row: 9,
column: 29,
},
),
range: 135..139,
custom: (),
node: MatchSingleton(
PatternMatchSingleton {
@ -414,44 +234,17 @@ expression: parse_ast
guard: None,
body: [
Located {
location: Location {
row: 11,
column: 8,
},
end_location: Some(
Location {
row: 11,
column: 20,
},
),
range: 165..177,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 11,
column: 8,
},
end_location: Some(
Location {
row: 11,
column: 20,
},
),
range: 165..177,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 11,
column: 8,
},
end_location: Some(
Location {
row: 11,
column: 13,
},
),
range: 165..170,
custom: (),
node: Name(
ExprName {
@ -462,16 +255,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 11,
column: 14,
},
end_location: Some(
Location {
row: 11,
column: 19,
},
),
range: 171..176,
custom: (),
node: Name(
ExprName {
@ -495,30 +279,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 12,
column: 0,
},
end_location: Some(
Location {
row: 14,
column: 13,
},
),
range: 178..218,
custom: (),
node: Match(
StmtMatch {
subject: Located {
location: Location {
row: 12,
column: 6,
},
end_location: Some(
Location {
row: 12,
column: 7,
},
),
range: 184..185,
custom: (),
node: Name(
ExprName {
@ -530,45 +296,18 @@ expression: parse_ast
cases: [
MatchCase {
pattern: Located {
location: Location {
row: 13,
column: 9,
},
end_location: Some(
Location {
row: 13,
column: 16,
},
),
range: 196..203,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Located {
location: Location {
row: 13,
column: 10,
},
end_location: Some(
Location {
row: 13,
column: 11,
},
),
range: 197..198,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Located {
location: Location {
row: 13,
column: 10,
},
end_location: Some(
Location {
row: 13,
column: 11,
},
),
range: 197..198,
custom: (),
node: Constant(
ExprConstant {
@ -583,30 +322,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 13,
column: 13,
},
end_location: Some(
Location {
row: 13,
column: 14,
},
),
range: 200..201,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Located {
location: Location {
row: 13,
column: 13,
},
end_location: Some(
Location {
row: 13,
column: 14,
},
),
range: 200..201,
custom: (),
node: Constant(
ExprConstant {
@ -627,31 +348,13 @@ expression: parse_ast
guard: None,
body: [
Located {
location: Location {
row: 14,
column: 8,
},
end_location: Some(
Location {
row: 14,
column: 13,
},
),
range: 213..218,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 14,
column: 8,
},
end_location: Some(
Location {
row: 14,
column: 9,
},
),
range: 213..214,
custom: (),
node: Name(
ExprName {
@ -662,16 +365,7 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 14,
column: 12,
},
end_location: Some(
Location {
row: 14,
column: 13,
},
),
range: 217..218,
custom: (),
node: Constant(
ExprConstant {
@ -693,30 +387,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 15,
column: 0,
},
end_location: Some(
Location {
row: 17,
column: 13,
},
),
range: 219..259,
custom: (),
node: Match(
StmtMatch {
subject: Located {
location: Location {
row: 15,
column: 6,
},
end_location: Some(
Location {
row: 15,
column: 7,
},
),
range: 225..226,
custom: (),
node: Name(
ExprName {
@ -728,45 +404,18 @@ expression: parse_ast
cases: [
MatchCase {
pattern: Located {
location: Location {
row: 16,
column: 9,
},
end_location: Some(
Location {
row: 16,
column: 16,
},
),
range: 237..244,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Located {
location: Location {
row: 16,
column: 10,
},
end_location: Some(
Location {
row: 16,
column: 11,
},
),
range: 238..239,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Located {
location: Location {
row: 16,
column: 10,
},
end_location: Some(
Location {
row: 16,
column: 11,
},
),
range: 238..239,
custom: (),
node: Constant(
ExprConstant {
@ -781,30 +430,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 16,
column: 13,
},
end_location: Some(
Location {
row: 16,
column: 14,
},
),
range: 241..242,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Located {
location: Location {
row: 16,
column: 13,
},
end_location: Some(
Location {
row: 16,
column: 14,
},
),
range: 241..242,
custom: (),
node: Constant(
ExprConstant {
@ -825,31 +456,13 @@ expression: parse_ast
guard: None,
body: [
Located {
location: Location {
row: 17,
column: 8,
},
end_location: Some(
Location {
row: 17,
column: 13,
},
),
range: 254..259,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 17,
column: 8,
},
end_location: Some(
Location {
row: 17,
column: 9,
},
),
range: 254..255,
custom: (),
node: Name(
ExprName {
@ -860,16 +473,7 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 17,
column: 12,
},
end_location: Some(
Location {
row: 17,
column: 13,
},
),
range: 258..259,
custom: (),
node: Constant(
ExprConstant {
@ -891,30 +495,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 18,
column: 0,
},
end_location: Some(
Location {
row: 20,
column: 13,
},
),
range: 260..297,
custom: (),
node: Match(
StmtMatch {
subject: Located {
location: Location {
row: 18,
column: 6,
},
end_location: Some(
Location {
row: 18,
column: 7,
},
),
range: 266..267,
custom: (),
node: Name(
ExprName {
@ -926,45 +512,18 @@ expression: parse_ast
cases: [
MatchCase {
pattern: Located {
location: Location {
row: 19,
column: 9,
},
end_location: Some(
Location {
row: 19,
column: 13,
},
),
range: 278..282,
custom: (),
node: MatchSequence(
PatternMatchSequence {
patterns: [
Located {
location: Location {
row: 19,
column: 10,
},
end_location: Some(
Location {
row: 19,
column: 11,
},
),
range: 279..280,
custom: (),
node: MatchValue(
PatternMatchValue {
value: Located {
location: Location {
row: 19,
column: 10,
},
end_location: Some(
Location {
row: 19,
column: 11,
},
),
range: 279..280,
custom: (),
node: Constant(
ExprConstant {
@ -985,31 +544,13 @@ expression: parse_ast
guard: None,
body: [
Located {
location: Location {
row: 20,
column: 8,
},
end_location: Some(
Location {
row: 20,
column: 13,
},
),
range: 292..297,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 20,
column: 8,
},
end_location: Some(
Location {
row: 20,
column: 9,
},
),
range: 292..293,
custom: (),
node: Name(
ExprName {
@ -1020,16 +561,7 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 20,
column: 12,
},
end_location: Some(
Location {
row: 20,
column: 13,
},
),
range: 296..297,
custom: (),
node: Constant(
ExprConstant {

View file

@ -3,32 +3,14 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 0..7,
custom: (),
node: BoolOp(
ExprBoolOp {
op: And,
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -38,16 +20,7 @@ Located {
),
},
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: Name(
ExprName {

View file

@ -3,32 +3,14 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 0..6,
custom: (),
node: BoolOp(
ExprBoolOp {
op: Or,
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -38,16 +20,7 @@ Located {
),
},
Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Name(
ExprName {

View file

@ -4,32 +4,14 @@ expression: "parse_program(source, \"<test>\").unwrap()"
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 5,
column: 6,
},
),
range: 0..98,
custom: (),
node: ClassDef(
StmtClassDef {
name: "Foo",
bases: [
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: Name(
ExprName {
@ -39,16 +21,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
),
},
Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: Name(
ExprName {
@ -61,16 +34,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
keywords: [],
body: [
Located {
location: Location {
row: 2,
column: 1,
},
end_location: Some(
Location {
row: 3,
column: 6,
},
),
range: 18..44,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -79,16 +43,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
posonlyargs: [],
args: [
Located {
location: Location {
row: 2,
column: 14,
},
end_location: Some(
Location {
row: 2,
column: 18,
},
),
range: 31..35,
custom: (),
node: ArgData {
arg: "self",
@ -105,16 +60,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
},
body: [
Located {
location: Location {
row: 3,
column: 2,
},
end_location: Some(
Location {
row: 3,
column: 6,
},
),
range: 40..44,
custom: (),
node: Pass,
},
@ -126,16 +72,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
),
},
Located {
location: Location {
row: 4,
column: 1,
},
end_location: Some(
Location {
row: 5,
column: 6,
},
),
range: 46..98,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -144,16 +81,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
posonlyargs: [],
args: [
Located {
location: Location {
row: 4,
column: 25,
},
end_location: Some(
Location {
row: 4,
column: 29,
},
),
range: 70..74,
custom: (),
node: ArgData {
arg: "self",
@ -162,16 +90,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
},
},
Located {
location: Location {
row: 4,
column: 31,
},
end_location: Some(
Location {
row: 4,
column: 34,
},
),
range: 76..79,
custom: (),
node: ArgData {
arg: "arg",
@ -186,16 +105,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
kwarg: None,
defaults: [
Located {
location: Location {
row: 4,
column: 35,
},
end_location: Some(
Location {
row: 4,
column: 44,
},
),
range: 80..89,
custom: (),
node: Constant(
ExprConstant {
@ -210,16 +120,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
},
body: [
Located {
location: Location {
row: 5,
column: 2,
},
end_location: Some(
Location {
row: 5,
column: 6,
},
),
range: 94..98,
custom: (),
node: Pass,
},

View file

@ -3,30 +3,12 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 0..19,
custom: (),
node: DictComp(
ExprDictComp {
key: Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 3,
},
),
range: 1..3,
custom: (),
node: Name(
ExprName {
@ -36,16 +18,7 @@ Located {
),
},
value: Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 5..7,
custom: (),
node: Name(
ExprName {
@ -57,16 +30,7 @@ Located {
generators: [
Comprehension {
target: Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: Name(
ExprName {
@ -76,16 +40,7 @@ Located {
),
},
iter: Located {
location: Location {
row: 1,
column: 17,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 17..18,
custom: (),
node: Name(
ExprName {

View file

@ -3,30 +3,12 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 48,
},
),
range: 0..48,
custom: (),
node: ListComp(
ExprListComp {
elt: Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 2,
},
),
range: 1..2,
custom: (),
node: Name(
ExprName {
@ -38,31 +20,13 @@ Located {
generators: [
Comprehension {
target: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 7..12,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: Name(
ExprName {
@ -72,16 +36,7 @@ Located {
),
},
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 10..12,
custom: (),
node: Name(
ExprName {
@ -96,16 +51,7 @@ Located {
),
},
iter: Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 16..17,
custom: (),
node: Name(
ExprName {
@ -119,16 +65,7 @@ Located {
},
Comprehension {
target: Located {
location: Location {
row: 1,
column: 22,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 22..23,
custom: (),
node: Name(
ExprName {
@ -138,16 +75,7 @@ Located {
),
},
iter: Located {
location: Location {
row: 1,
column: 27,
},
end_location: Some(
Location {
row: 1,
column: 28,
},
),
range: 27..28,
custom: (),
node: Name(
ExprName {
@ -158,30 +86,12 @@ Located {
},
ifs: [
Located {
location: Location {
row: 1,
column: 32,
},
end_location: Some(
Location {
row: 1,
column: 37,
},
),
range: 32..37,
custom: (),
node: Compare(
ExprCompare {
left: Located {
location: Location {
row: 1,
column: 32,
},
end_location: Some(
Location {
row: 1,
column: 33,
},
),
range: 32..33,
custom: (),
node: Name(
ExprName {
@ -195,16 +105,7 @@ Located {
],
comparators: [
Located {
location: Location {
row: 1,
column: 36,
},
end_location: Some(
Location {
row: 1,
column: 37,
},
),
range: 36..37,
custom: (),
node: Constant(
ExprConstant {
@ -220,30 +121,12 @@ Located {
),
},
Located {
location: Location {
row: 1,
column: 41,
},
end_location: Some(
Location {
row: 1,
column: 47,
},
),
range: 41..47,
custom: (),
node: Compare(
ExprCompare {
left: Located {
location: Location {
row: 1,
column: 41,
},
end_location: Some(
Location {
row: 1,
column: 42,
},
),
range: 41..42,
custom: (),
node: Name(
ExprName {
@ -257,16 +140,7 @@ Located {
],
comparators: [
Located {
location: Location {
row: 1,
column: 45,
},
end_location: Some(
Location {
row: 1,
column: 47,
},
),
range: 45..47,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: Constant(
ExprConstant {

View file

@ -3,30 +3,12 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: GeneratorExp(
ExprGeneratorExp {
elt: Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 2,
},
),
range: 1..2,
custom: (),
node: Name(
ExprName {
@ -38,16 +20,7 @@ Located {
generators: [
Comprehension {
target: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: Name(
ExprName {
@ -57,16 +30,7 @@ Located {
),
},
iter: Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: Name(
ExprName {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 3,
column: 8,
},
),
range: 0..28,
custom: (),
node: If(
StmtIf {
test: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 4,
},
),
range: 3..4,
custom: (),
node: Constant(
ExprConstant {
@ -40,30 +22,12 @@ expression: parse_ast
},
body: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 6..8,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 6..8,
custom: (),
node: Constant(
ExprConstant {
@ -80,30 +44,12 @@ expression: parse_ast
],
orelse: [
Located {
location: Location {
row: 2,
column: 0,
},
end_location: Some(
Location {
row: 3,
column: 8,
},
),
range: 9..28,
custom: (),
node: If(
StmtIf {
test: Located {
location: Location {
row: 2,
column: 5,
},
end_location: Some(
Location {
row: 2,
column: 6,
},
),
range: 14..15,
custom: (),
node: Constant(
ExprConstant {
@ -116,30 +62,12 @@ expression: parse_ast
},
body: [
Located {
location: Location {
row: 2,
column: 8,
},
end_location: Some(
Location {
row: 2,
column: 10,
},
),
range: 17..19,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 2,
column: 8,
},
end_location: Some(
Location {
row: 2,
column: 10,
},
),
range: 17..19,
custom: (),
node: Constant(
ExprConstant {
@ -156,30 +84,12 @@ expression: parse_ast
],
orelse: [
Located {
location: Location {
row: 3,
column: 6,
},
end_location: Some(
Location {
row: 3,
column: 8,
},
),
range: 26..28,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 3,
column: 6,
},
end_location: Some(
Location {
row: 3,
column: 8,
},
),
range: 26..28,
custom: (),
node: Constant(
ExprConstant {

View file

@ -3,44 +3,17 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 26,
},
),
range: 0..26,
custom: (),
node: GeneratorExp(
ExprGeneratorExp {
elt: Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 1..14,
custom: (),
node: IfExp(
ExprIfExp {
test: Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: Name(
ExprName {
@ -50,16 +23,7 @@ Located {
),
},
body: Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 2,
},
),
range: 1..2,
custom: (),
node: Name(
ExprName {
@ -69,16 +33,7 @@ Located {
),
},
orelse: Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: Name(
ExprName {
@ -93,16 +48,7 @@ Located {
generators: [
Comprehension {
target: Located {
location: Location {
row: 1,
column: 19,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 19..20,
custom: (),
node: Name(
ExprName {
@ -112,16 +58,7 @@ Located {
),
},
iter: Located {
location: Location {
row: 1,
column: 24,
},
end_location: Some(
Location {
row: 1,
column: 25,
},
),
range: 24..25,
custom: (),
node: Name(
ExprName {

View file

@ -4,44 +4,17 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 32,
},
),
range: 0..32,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 32,
},
),
range: 0..32,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 0..7,
custom: (),
node: Name(
ExprName {
@ -52,16 +25,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 1,
column: 8,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 8..20,
custom: (),
node: Constant(
ExprConstant {
@ -75,32 +39,14 @@ expression: parse_ast
],
keywords: [
Located {
location: Location {
row: 1,
column: 22,
},
end_location: Some(
Location {
row: 1,
column: 31,
},
),
range: 22..31,
custom: (),
node: KeywordData {
arg: Some(
"keyword",
),
value: Located {
location: Location {
row: 1,
column: 30,
},
end_location: Some(
Location {
row: 1,
column: 31,
},
),
range: 30..31,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 0..18,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 0..18,
custom: (),
node: Lambda(
ExprLambda {
@ -35,16 +17,7 @@ expression: parse_ast
posonlyargs: [],
args: [
Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: ArgData {
arg: "x",
@ -53,16 +26,7 @@ expression: parse_ast
},
},
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: ArgData {
arg: "y",
@ -78,30 +42,12 @@ expression: parse_ast
defaults: [],
},
body: Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 13..18,
custom: (),
node: BinOp(
ExprBinOp {
left: Located {
location: Location {
row: 1,
column: 13,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 13..14,
custom: (),
node: Name(
ExprName {
@ -112,16 +58,7 @@ expression: parse_ast
},
op: Mult,
right: Located {
location: Location {
row: 1,
column: 17,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 17..18,
custom: (),
node: Name(
ExprName {

View file

@ -3,30 +3,12 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: ListComp(
ExprListComp {
elt: Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 2,
},
),
range: 1..2,
custom: (),
node: Name(
ExprName {
@ -38,16 +20,7 @@ Located {
generators: [
Comprehension {
target: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: Name(
ExprName {
@ -57,16 +30,7 @@ Located {
),
},
iter: Located {
location: Location {
row: 1,
column: 12,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 12..13,
custom: (),
node: Name(
ExprName {

View file

@ -3,44 +3,17 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 0..23,
custom: (),
node: GeneratorExp(
ExprGeneratorExp {
elt: Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 1..11,
custom: (),
node: NamedExpr(
ExprNamedExpr {
target: Located {
location: Location {
row: 1,
column: 1,
},
end_location: Some(
Location {
row: 1,
column: 2,
},
),
range: 1..2,
custom: (),
node: Name(
ExprName {
@ -50,30 +23,12 @@ Located {
),
},
value: Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 6..11,
custom: (),
node: BinOp(
ExprBinOp {
left: Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: Name(
ExprName {
@ -84,16 +39,7 @@ Located {
},
op: Add,
right: Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: Constant(
ExprConstant {
@ -113,16 +59,7 @@ Located {
generators: [
Comprehension {
target: Located {
location: Location {
row: 1,
column: 16,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 16..17,
custom: (),
node: Name(
ExprName {
@ -132,16 +69,7 @@ Located {
),
},
iter: Located {
location: Location {
row: 1,
column: 21,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 21..22,
custom: (),
node: Name(
ExprName {

View file

@ -4,44 +4,17 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 0..23,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 23,
},
),
range: 0..23,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 0..5,
custom: (),
node: Name(
ExprName {
@ -52,16 +25,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 6..19,
custom: (),
node: Constant(
ExprConstant {
@ -73,16 +37,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 21,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 21..22,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,44 +4,17 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 0..20,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 0..20,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 0..5,
custom: (),
node: Name(
ExprName {
@ -52,16 +25,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 6..19,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 0..13,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 0..13,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,46 +4,19 @@ expression: "parse_program(source, \"<test>\").unwrap()"
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 0..11,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 4,
},
),
range: 0..4,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -53,16 +26,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
),
},
Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 4,
},
),
range: 3..4,
custom: (),
node: Name(
ExprName {
@ -78,31 +42,13 @@ expression: "parse_program(source, \"<test>\").unwrap()"
},
],
value: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 7..11,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: Constant(
ExprConstant {
@ -114,16 +60,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
),
},
Located {
location: Location {
row: 1,
column: 10,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 10..11,
custom: (),
node: Constant(
ExprConstant {

File diff suppressed because it is too large Load diff

View file

@ -3,30 +3,12 @@ source: parser/src/parser.rs
expression: parse_ast
---
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 1,
},
),
range: 0..1,
custom: (),
node: Name(
ExprName {
@ -36,31 +18,13 @@ Located {
),
},
slice: Located {
location: Location {
row: 1,
column: 2,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 2..7,
custom: (),
node: Slice(
ExprSlice {
lower: Some(
Located {
location: Location {
row: 1,
column: 2,
},
end_location: Some(
Location {
row: 1,
column: 3,
},
),
range: 2..3,
custom: (),
node: Constant(
ExprConstant {
@ -74,16 +38,7 @@ Located {
),
upper: Some(
Located {
location: Location {
row: 1,
column: 4,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 4..5,
custom: (),
node: Constant(
ExprConstant {
@ -97,16 +52,7 @@ Located {
),
step: Some(
Located {
location: Location {
row: 1,
column: 6,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 6..7,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,31 +4,13 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 36,
},
),
range: 0..36,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 0..11,
custom: (),
node: Name(
ExprName {
@ -39,30 +21,12 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 1,
column: 14,
},
end_location: Some(
Location {
row: 1,
column: 36,
},
),
range: 14..36,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 1,
column: 14,
},
end_location: Some(
Location {
row: 1,
column: 19,
},
),
range: 14..19,
custom: (),
node: Name(
ExprName {
@ -72,31 +36,13 @@ expression: parse_ast
),
},
slice: Located {
location: Location {
row: 1,
column: 20,
},
end_location: Some(
Location {
row: 1,
column: 35,
},
),
range: 20..35,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 1,
column: 20,
},
end_location: Some(
Location {
row: 1,
column: 21,
},
),
range: 20..21,
custom: (),
node: Constant(
ExprConstant {
@ -108,30 +54,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 23,
},
end_location: Some(
Location {
row: 1,
column: 31,
},
),
range: 23..31,
custom: (),
node: Starred(
ExprStarred {
value: Located {
location: Location {
row: 1,
column: 24,
},
end_location: Some(
Location {
row: 1,
column: 31,
},
),
range: 24..31,
custom: (),
node: Name(
ExprName {
@ -145,31 +73,13 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 33,
},
end_location: Some(
Location {
row: 1,
column: 35,
},
),
range: 33..35,
custom: (),
node: UnaryOp(
ExprUnaryOp {
op: USub,
operand: Located {
location: Location {
row: 1,
column: 34,
},
end_location: Some(
Location {
row: 1,
column: 35,
},
),
range: 34..35,
custom: (),
node: Constant(
ExprConstant {
@ -197,45 +107,18 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 2,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 36,
},
),
range: 37..73,
custom: (),
node: Assign(
StmtAssign {
targets: [
Located {
location: Location {
row: 2,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 22,
},
),
range: 37..59,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 2,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 5,
},
),
range: 37..42,
custom: (),
node: Name(
ExprName {
@ -245,31 +128,13 @@ expression: parse_ast
),
},
slice: Located {
location: Location {
row: 2,
column: 6,
},
end_location: Some(
Location {
row: 2,
column: 21,
},
),
range: 43..58,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 2,
column: 6,
},
end_location: Some(
Location {
row: 2,
column: 7,
},
),
range: 43..44,
custom: (),
node: Constant(
ExprConstant {
@ -281,30 +146,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 2,
column: 9,
},
end_location: Some(
Location {
row: 2,
column: 17,
},
),
range: 46..54,
custom: (),
node: Starred(
ExprStarred {
value: Located {
location: Location {
row: 2,
column: 10,
},
end_location: Some(
Location {
row: 2,
column: 17,
},
),
range: 47..54,
custom: (),
node: Name(
ExprName {
@ -318,31 +165,13 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 2,
column: 19,
},
end_location: Some(
Location {
row: 2,
column: 21,
},
),
range: 56..58,
custom: (),
node: UnaryOp(
ExprUnaryOp {
op: USub,
operand: Located {
location: Location {
row: 2,
column: 20,
},
end_location: Some(
Location {
row: 2,
column: 21,
},
),
range: 57..58,
custom: (),
node: Constant(
ExprConstant {
@ -367,16 +196,7 @@ expression: parse_ast
},
],
value: Located {
location: Location {
row: 2,
column: 25,
},
end_location: Some(
Location {
row: 2,
column: 36,
},
),
range: 62..73,
custom: (),
node: Name(
ExprName {
@ -390,44 +210,17 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 3,
column: 0,
},
end_location: Some(
Location {
row: 3,
column: 45,
},
),
range: 74..119,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 3,
column: 0,
},
end_location: Some(
Location {
row: 3,
column: 45,
},
),
range: 74..119,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 3,
column: 0,
},
end_location: Some(
Location {
row: 3,
column: 5,
},
),
range: 74..79,
custom: (),
node: Name(
ExprName {
@ -437,45 +230,18 @@ expression: parse_ast
),
},
slice: Located {
location: Location {
row: 3,
column: 6,
},
end_location: Some(
Location {
row: 3,
column: 44,
},
),
range: 80..118,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 3,
column: 6,
},
end_location: Some(
Location {
row: 3,
column: 24,
},
),
range: 80..98,
custom: (),
node: Starred(
ExprStarred {
value: Located {
location: Location {
row: 3,
column: 7,
},
end_location: Some(
Location {
row: 3,
column: 24,
},
),
range: 81..98,
custom: (),
node: Name(
ExprName {
@ -489,30 +255,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 3,
column: 26,
},
end_location: Some(
Location {
row: 3,
column: 44,
},
),
range: 100..118,
custom: (),
node: Starred(
ExprStarred {
value: Located {
location: Location {
row: 3,
column: 27,
},
end_location: Some(
Location {
row: 3,
column: 44,
},
),
range: 101..118,
custom: (),
node: Name(
ExprName {
@ -538,44 +286,17 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 4,
column: 0,
},
end_location: Some(
Location {
row: 4,
column: 30,
},
),
range: 120..150,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 4,
column: 0,
},
end_location: Some(
Location {
row: 4,
column: 30,
},
),
range: 120..150,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 4,
column: 0,
},
end_location: Some(
Location {
row: 4,
column: 5,
},
),
range: 120..125,
custom: (),
node: Name(
ExprName {
@ -585,46 +306,19 @@ expression: parse_ast
),
},
slice: Located {
location: Location {
row: 4,
column: 6,
},
end_location: Some(
Location {
row: 4,
column: 29,
},
),
range: 126..149,
custom: (),
node: Tuple(
ExprTuple {
elts: [
Located {
location: Location {
row: 4,
column: 6,
},
end_location: Some(
Location {
row: 4,
column: 9,
},
),
range: 126..129,
custom: (),
node: Slice(
ExprSlice {
lower: Some(
Located {
location: Location {
row: 4,
column: 6,
},
end_location: Some(
Location {
row: 4,
column: 7,
},
),
range: 126..127,
custom: (),
node: Constant(
ExprConstant {
@ -638,16 +332,7 @@ expression: parse_ast
),
upper: Some(
Located {
location: Location {
row: 4,
column: 8,
},
end_location: Some(
Location {
row: 4,
column: 9,
},
),
range: 128..129,
custom: (),
node: Constant(
ExprConstant {
@ -664,30 +349,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 4,
column: 11,
},
end_location: Some(
Location {
row: 4,
column: 29,
},
),
range: 131..149,
custom: (),
node: Starred(
ExprStarred {
value: Located {
location: Location {
row: 4,
column: 12,
},
end_location: Some(
Location {
row: 4,
column: 29,
},
),
range: 132..149,
custom: (),
node: Name(
ExprName {

View file

@ -4,60 +4,24 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 6,
column: 30,
},
),
range: 0..134,
custom: (),
node: Try(
StmtTry {
body: [
Located {
location: Location {
row: 2,
column: 4,
},
end_location: Some(
Location {
row: 2,
column: 23,
},
),
range: 9..28,
custom: (),
node: Raise(
StmtRaise {
exc: Some(
Located {
location: Location {
row: 2,
column: 10,
},
end_location: Some(
Location {
row: 2,
column: 23,
},
),
range: 15..28,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 2,
column: 10,
},
end_location: Some(
Location {
row: 2,
column: 20,
},
),
range: 15..25,
custom: (),
node: Name(
ExprName {
@ -68,16 +32,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 2,
column: 21,
},
end_location: Some(
Location {
row: 2,
column: 22,
},
),
range: 26..27,
custom: (),
node: Constant(
ExprConstant {
@ -101,31 +56,13 @@ expression: parse_ast
],
handlers: [
Located {
location: Location {
row: 3,
column: 0,
},
end_location: Some(
Location {
row: 4,
column: 30,
},
),
range: 29..82,
custom: (),
node: ExceptHandler(
ExcepthandlerExceptHandler {
type_: Some(
Located {
location: Location {
row: 3,
column: 7,
},
end_location: Some(
Location {
row: 3,
column: 16,
},
),
range: 36..45,
custom: (),
node: Name(
ExprName {
@ -140,44 +77,17 @@ expression: parse_ast
),
body: [
Located {
location: Location {
row: 4,
column: 4,
},
end_location: Some(
Location {
row: 4,
column: 30,
},
),
range: 56..82,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 4,
column: 4,
},
end_location: Some(
Location {
row: 4,
column: 30,
},
),
range: 56..82,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 4,
column: 4,
},
end_location: Some(
Location {
row: 4,
column: 9,
},
),
range: 56..61,
custom: (),
node: Name(
ExprName {
@ -188,31 +98,13 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 4,
column: 10,
},
end_location: Some(
Location {
row: 4,
column: 29,
},
),
range: 62..81,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 4,
column: 10,
},
end_location: Some(
Location {
row: 4,
column: 29,
},
),
range: 62..81,
custom: (),
node: Constant(
ExprConstant {
@ -224,44 +116,17 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 4,
column: 10,
},
end_location: Some(
Location {
row: 4,
column: 29,
},
),
range: 62..81,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 4,
column: 20,
},
end_location: Some(
Location {
row: 4,
column: 27,
},
),
range: 72..79,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 4,
column: 20,
},
end_location: Some(
Location {
row: 4,
column: 24,
},
),
range: 72..76,
custom: (),
node: Name(
ExprName {
@ -272,16 +137,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 4,
column: 25,
},
end_location: Some(
Location {
row: 4,
column: 26,
},
),
range: 77..78,
custom: (),
node: Name(
ExprName {
@ -317,31 +173,13 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 5,
column: 0,
},
end_location: Some(
Location {
row: 6,
column: 30,
},
),
range: 83..134,
custom: (),
node: ExceptHandler(
ExcepthandlerExceptHandler {
type_: Some(
Located {
location: Location {
row: 5,
column: 7,
},
end_location: Some(
Location {
row: 5,
column: 14,
},
),
range: 90..97,
custom: (),
node: Name(
ExprName {
@ -356,44 +194,17 @@ expression: parse_ast
),
body: [
Located {
location: Location {
row: 6,
column: 4,
},
end_location: Some(
Location {
row: 6,
column: 30,
},
),
range: 108..134,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 6,
column: 4,
},
end_location: Some(
Location {
row: 6,
column: 30,
},
),
range: 108..134,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 6,
column: 4,
},
end_location: Some(
Location {
row: 6,
column: 9,
},
),
range: 108..113,
custom: (),
node: Name(
ExprName {
@ -404,31 +215,13 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 6,
column: 10,
},
end_location: Some(
Location {
row: 6,
column: 29,
},
),
range: 114..133,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 6,
column: 10,
},
end_location: Some(
Location {
row: 6,
column: 29,
},
),
range: 114..133,
custom: (),
node: Constant(
ExprConstant {
@ -440,44 +233,17 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 6,
column: 10,
},
end_location: Some(
Location {
row: 6,
column: 29,
},
),
range: 114..133,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 6,
column: 20,
},
end_location: Some(
Location {
row: 6,
column: 27,
},
),
range: 124..131,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 6,
column: 20,
},
end_location: Some(
Location {
row: 6,
column: 24,
},
),
range: 124..128,
custom: (),
node: Name(
ExprName {
@ -488,16 +254,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 6,
column: 25,
},
end_location: Some(
Location {
row: 6,
column: 26,
},
),
range: 129..130,
custom: (),
node: Name(
ExprName {

View file

@ -4,60 +4,24 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 7,
column: 57,
},
),
range: 0..260,
custom: (),
node: TryStar(
StmtTryStar {
body: [
Located {
location: Location {
row: 2,
column: 4,
},
end_location: Some(
Location {
row: 3,
column: 62,
},
),
range: 9..98,
custom: (),
node: Raise(
StmtRaise {
exc: Some(
Located {
location: Location {
row: 2,
column: 10,
},
end_location: Some(
Location {
row: 3,
column: 62,
},
),
range: 15..98,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 2,
column: 10,
},
end_location: Some(
Location {
row: 2,
column: 24,
},
),
range: 15..29,
custom: (),
node: Name(
ExprName {
@ -68,16 +32,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 2,
column: 25,
},
end_location: Some(
Location {
row: 2,
column: 29,
},
),
range: 30..34,
custom: (),
node: Constant(
ExprConstant {
@ -89,45 +44,18 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 3,
column: 8,
},
end_location: Some(
Location {
row: 3,
column: 61,
},
),
range: 44..97,
custom: (),
node: List(
ExprList {
elts: [
Located {
location: Location {
row: 3,
column: 9,
},
end_location: Some(
Location {
row: 3,
column: 22,
},
),
range: 45..58,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 3,
column: 9,
},
end_location: Some(
Location {
row: 3,
column: 19,
},
),
range: 45..55,
custom: (),
node: Name(
ExprName {
@ -138,16 +66,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 3,
column: 20,
},
end_location: Some(
Location {
row: 3,
column: 21,
},
),
range: 56..57,
custom: (),
node: Constant(
ExprConstant {
@ -164,30 +83,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 3,
column: 24,
},
end_location: Some(
Location {
row: 3,
column: 36,
},
),
range: 60..72,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 3,
column: 24,
},
end_location: Some(
Location {
row: 3,
column: 33,
},
),
range: 60..69,
custom: (),
node: Name(
ExprName {
@ -198,16 +99,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 3,
column: 34,
},
end_location: Some(
Location {
row: 3,
column: 35,
},
),
range: 70..71,
custom: (),
node: Constant(
ExprConstant {
@ -224,30 +116,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 3,
column: 38,
},
end_location: Some(
Location {
row: 3,
column: 48,
},
),
range: 74..84,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 3,
column: 38,
},
end_location: Some(
Location {
row: 3,
column: 45,
},
),
range: 74..81,
custom: (),
node: Name(
ExprName {
@ -258,16 +132,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 3,
column: 46,
},
end_location: Some(
Location {
row: 3,
column: 47,
},
),
range: 82..83,
custom: (),
node: Constant(
ExprConstant {
@ -284,30 +149,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 3,
column: 50,
},
end_location: Some(
Location {
row: 3,
column: 60,
},
),
range: 86..96,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 3,
column: 50,
},
end_location: Some(
Location {
row: 3,
column: 57,
},
),
range: 86..93,
custom: (),
node: Name(
ExprName {
@ -318,16 +165,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 3,
column: 58,
},
end_location: Some(
Location {
row: 3,
column: 59,
},
),
range: 94..95,
custom: (),
node: Constant(
ExprConstant {
@ -361,31 +199,13 @@ expression: parse_ast
],
handlers: [
Located {
location: Location {
row: 4,
column: 0,
},
end_location: Some(
Location {
row: 5,
column: 57,
},
),
range: 99..180,
custom: (),
node: ExceptHandler(
ExcepthandlerExceptHandler {
type_: Some(
Located {
location: Location {
row: 4,
column: 8,
},
end_location: Some(
Location {
row: 4,
column: 17,
},
),
range: 107..116,
custom: (),
node: Name(
ExprName {
@ -400,44 +220,17 @@ expression: parse_ast
),
body: [
Located {
location: Location {
row: 5,
column: 4,
},
end_location: Some(
Location {
row: 5,
column: 57,
},
),
range: 127..180,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 5,
column: 4,
},
end_location: Some(
Location {
row: 5,
column: 57,
},
),
range: 127..180,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 5,
column: 4,
},
end_location: Some(
Location {
row: 5,
column: 9,
},
),
range: 127..132,
custom: (),
node: Name(
ExprName {
@ -448,31 +241,13 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 5,
column: 10,
},
end_location: Some(
Location {
row: 5,
column: 56,
},
),
range: 133..179,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 5,
column: 10,
},
end_location: Some(
Location {
row: 5,
column: 56,
},
),
range: 133..179,
custom: (),
node: Constant(
ExprConstant {
@ -484,44 +259,17 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 5,
column: 10,
},
end_location: Some(
Location {
row: 5,
column: 56,
},
),
range: 133..179,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 5,
column: 20,
},
end_location: Some(
Location {
row: 5,
column: 27,
},
),
range: 143..150,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 5,
column: 20,
},
end_location: Some(
Location {
row: 5,
column: 24,
},
),
range: 143..147,
custom: (),
node: Name(
ExprName {
@ -532,16 +280,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 5,
column: 25,
},
end_location: Some(
Location {
row: 5,
column: 26,
},
),
range: 148..149,
custom: (),
node: Name(
ExprName {
@ -561,16 +300,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 5,
column: 10,
},
end_location: Some(
Location {
row: 5,
column: 56,
},
),
range: 133..179,
custom: (),
node: Constant(
ExprConstant {
@ -582,44 +312,17 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 5,
column: 10,
},
end_location: Some(
Location {
row: 5,
column: 56,
},
),
range: 133..179,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 5,
column: 42,
},
end_location: Some(
Location {
row: 5,
column: 54,
},
),
range: 165..177,
custom: (),
node: Attribute(
ExprAttribute {
value: Located {
location: Location {
row: 5,
column: 42,
},
end_location: Some(
Location {
row: 5,
column: 43,
},
),
range: 165..166,
custom: (),
node: Name(
ExprName {
@ -655,31 +358,13 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 6,
column: 0,
},
end_location: Some(
Location {
row: 7,
column: 57,
},
),
range: 181..260,
custom: (),
node: ExceptHandler(
ExcepthandlerExceptHandler {
type_: Some(
Located {
location: Location {
row: 6,
column: 8,
},
end_location: Some(
Location {
row: 6,
column: 15,
},
),
range: 189..196,
custom: (),
node: Name(
ExprName {
@ -694,44 +379,17 @@ expression: parse_ast
),
body: [
Located {
location: Location {
row: 7,
column: 4,
},
end_location: Some(
Location {
row: 7,
column: 57,
},
),
range: 207..260,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 7,
column: 4,
},
end_location: Some(
Location {
row: 7,
column: 57,
},
),
range: 207..260,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 7,
column: 4,
},
end_location: Some(
Location {
row: 7,
column: 9,
},
),
range: 207..212,
custom: (),
node: Name(
ExprName {
@ -742,31 +400,13 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 7,
column: 10,
},
end_location: Some(
Location {
row: 7,
column: 56,
},
),
range: 213..259,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 7,
column: 10,
},
end_location: Some(
Location {
row: 7,
column: 56,
},
),
range: 213..259,
custom: (),
node: Constant(
ExprConstant {
@ -778,44 +418,17 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 7,
column: 10,
},
end_location: Some(
Location {
row: 7,
column: 56,
},
),
range: 213..259,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 7,
column: 20,
},
end_location: Some(
Location {
row: 7,
column: 27,
},
),
range: 223..230,
custom: (),
node: Call(
ExprCall {
func: Located {
location: Location {
row: 7,
column: 20,
},
end_location: Some(
Location {
row: 7,
column: 24,
},
),
range: 223..227,
custom: (),
node: Name(
ExprName {
@ -826,16 +439,7 @@ expression: parse_ast
},
args: [
Located {
location: Location {
row: 7,
column: 25,
},
end_location: Some(
Location {
row: 7,
column: 26,
},
),
range: 228..229,
custom: (),
node: Name(
ExprName {
@ -855,16 +459,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 7,
column: 10,
},
end_location: Some(
Location {
row: 7,
column: 56,
},
),
range: 213..259,
custom: (),
node: Constant(
ExprConstant {
@ -876,44 +471,17 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 7,
column: 10,
},
end_location: Some(
Location {
row: 7,
column: 56,
},
),
range: 213..259,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 7,
column: 42,
},
end_location: Some(
Location {
row: 7,
column: 54,
},
),
range: 245..257,
custom: (),
node: Attribute(
ExprAttribute {
value: Located {
location: Location {
row: 7,
column: 42,
},
end_location: Some(
Location {
row: 7,
column: 43,
},
),
range: 245..246,
custom: (),
node: Name(
ExprName {

View file

@ -4,16 +4,7 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 2,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 48,
},
),
range: 1..49,
custom: (),
node: FunctionDef(
StmtFunctionDef {
@ -23,45 +14,18 @@ expression: parse_ast
args: [],
vararg: Some(
Located {
location: Location {
row: 2,
column: 19,
},
end_location: Some(
Location {
row: 2,
column: 28,
},
),
range: 20..29,
custom: (),
node: ArgData {
arg: "args",
annotation: Some(
Located {
location: Location {
row: 2,
column: 25,
},
end_location: Some(
Location {
row: 2,
column: 28,
},
),
range: 26..29,
custom: (),
node: Starred(
ExprStarred {
value: Located {
location: Location {
row: 2,
column: 26,
},
end_location: Some(
Location {
row: 2,
column: 28,
},
),
range: 27..29,
custom: (),
node: Name(
ExprName {
@ -86,30 +50,12 @@ expression: parse_ast
},
body: [
Located {
location: Location {
row: 2,
column: 45,
},
end_location: Some(
Location {
row: 2,
column: 48,
},
),
range: 46..49,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 2,
column: 45,
},
end_location: Some(
Location {
row: 2,
column: 48,
},
),
range: 46..49,
custom: (),
node: Constant(
ExprConstant {
@ -125,30 +71,12 @@ expression: parse_ast
decorator_list: [],
returns: Some(
Located {
location: Location {
row: 2,
column: 33,
},
end_location: Some(
Location {
row: 2,
column: 43,
},
),
range: 34..44,
custom: (),
node: Subscript(
ExprSubscript {
value: Located {
location: Location {
row: 2,
column: 33,
},
end_location: Some(
Location {
row: 2,
column: 38,
},
),
range: 34..39,
custom: (),
node: Name(
ExprName {
@ -158,30 +86,12 @@ expression: parse_ast
),
},
slice: Located {
location: Location {
row: 2,
column: 39,
},
end_location: Some(
Location {
row: 2,
column: 42,
},
),
range: 40..43,
custom: (),
node: Starred(
ExprStarred {
value: Located {
location: Location {
row: 2,
column: 40,
},
end_location: Some(
Location {
row: 2,
column: 42,
},
),
range: 41..43,
custom: (),
node: Name(
ExprName {

File diff suppressed because it is too large Load diff

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 0..15,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 0..15,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 0..9,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 0..9,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 21,
},
),
range: 0..21,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 21,
},
),
range: 0..21,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 45,
},
),
range: 0..45,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 45,
},
),
range: 0..45,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 0..12,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 0..12,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 738,
},
),
range: 0..738,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 738,
},
),
range: 0..738,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 0..12,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 0..12,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 0..13,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 0..13,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 0..15,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 0..15,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: Constant(
ExprConstant {
@ -54,30 +27,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Name(
ExprName {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: Constant(
ExprConstant {
@ -54,30 +27,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 0..8,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 5,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 5..6,
custom: (),
node: Name(
ExprName {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 4,
},
),
range: 0..9,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 4,
},
),
range: 0..9,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 4,
},
),
range: 0..9,
custom: (),
node: Constant(
ExprConstant {
@ -54,30 +27,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 4,
},
),
range: 0..9,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 2,
column: 1,
},
end_location: Some(
Location {
row: 2,
column: 2,
},
),
range: 6..7,
custom: (),
node: Name(
ExprName {

View file

@ -4,16 +4,7 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 0..10,
custom: (),
node: Constant(
ExprConstant {
@ -25,16 +16,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 0..10,
custom: (),
node: Constant(
ExprConstant {
@ -46,30 +28,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 10,
},
),
range: 0..10,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 3..7,
custom: (),
node: Name(
ExprName {

View file

@ -4,16 +4,7 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: Constant(
ExprConstant {
@ -25,16 +16,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: Constant(
ExprConstant {
@ -46,16 +28,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: Constant(
ExprConstant {
@ -67,30 +40,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 7..11,
custom: (),
node: Name(
ExprName {
@ -105,16 +60,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: Constant(
ExprConstant {
@ -126,16 +72,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: Constant(
ExprConstant {
@ -147,16 +84,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: Constant(
ExprConstant {
@ -168,30 +96,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 38,
},
),
range: 0..38,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 29,
},
end_location: Some(
Location {
row: 1,
column: 35,
},
),
range: 29..35,
custom: (),
node: Name(
ExprName {

View file

@ -4,16 +4,7 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: Constant(
ExprConstant {
@ -25,16 +16,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: Constant(
ExprConstant {
@ -46,30 +28,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 7,
},
),
range: 3..7,
custom: (),
node: Name(
ExprName {
@ -81,31 +45,13 @@ expression: parse_ast
conversion: 0,
format_spec: Some(
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 14,
},
),
range: 0..14,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 6,
},
),
range: 0..11,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 6,
},
),
range: 0..11,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 6,
},
),
range: 0..11,
custom: (),
node: Constant(
ExprConstant {
@ -54,30 +27,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 2,
column: 6,
},
),
range: 0..11,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 2,
column: 1,
},
end_location: Some(
Location {
row: 2,
column: 2,
},
),
range: 6..7,
custom: (),
node: Name(
ExprName {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 0..9,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 9,
},
),
range: 0..9,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 17,
},
),
range: 0..17,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,45 +4,18 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 0..22,
custom: (),
node: Expr(
StmtExpr {
value: Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 0..22,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 0..22,
custom: (),
node: Constant(
ExprConstant {
@ -54,30 +27,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 22,
},
),
range: 9..22,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 17,
},
end_location: Some(
Location {
row: 1,
column: 20,
},
),
range: 17..20,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 0..18,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 4,
},
),
range: 3..4,
custom: (),
node: Name(
ExprName {
@ -42,30 +24,12 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 0..18,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 7,
},
end_location: Some(
Location {
row: 1,
column: 8,
},
),
range: 7..8,
custom: (),
node: Name(
ExprName {
@ -80,16 +44,7 @@ expression: parse_ast
),
},
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 18,
},
),
range: 0..18,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,44 +4,17 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 13,
},
),
range: 0..13,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 3..11,
custom: (),
node: Compare(
ExprCompare {
left: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 5,
},
),
range: 3..5,
custom: (),
node: Constant(
ExprConstant {
@ -57,16 +30,7 @@ expression: parse_ast
],
comparators: [
Located {
location: Location {
row: 1,
column: 9,
},
end_location: Some(
Location {
row: 1,
column: 11,
},
),
range: 9..11,
custom: (),
node: Constant(
ExprConstant {

View file

@ -4,30 +4,12 @@ expression: parse_ast
---
[
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 0..15,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 3,
},
end_location: Some(
Location {
row: 1,
column: 6,
},
),
range: 3..6,
custom: (),
node: Name(
ExprName {
@ -39,45 +21,18 @@ expression: parse_ast
conversion: 0,
format_spec: Some(
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 0..15,
custom: (),
node: JoinedStr(
ExprJoinedStr {
values: [
Located {
location: Location {
row: 1,
column: 0,
},
end_location: Some(
Location {
row: 1,
column: 15,
},
),
range: 0..15,
custom: (),
node: FormattedValue(
ExprFormattedValue {
value: Located {
location: Location {
row: 1,
column: 8,
},
end_location: Some(
Location {
row: 1,
column: 12,
},
),
range: 8..12,
custom: (),
node: Name(
ExprName {

Some files were not shown because too many files have changed in this diff Show more