From 1874968f2c85143e913757c7aacee0756aef0d76 Mon Sep 17 00:00:00 2001 From: Glyphack Date: Mon, 25 Sep 2023 20:42:37 +0200 Subject: [PATCH 1/6] Better token printing --- enderpy/src/main.rs | 4 +++- parser/src/token.rs | 24 +++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/enderpy/src/main.rs b/enderpy/src/main.rs index 61753399..77688697 100644 --- a/enderpy/src/main.rs +++ b/enderpy/src/main.rs @@ -64,7 +64,9 @@ fn tokenize(file: &PathBuf) -> Result<()> { break; } } - println!("{:#?}", tokens); + for token in tokens { + println!("{}", token); + } Ok(()) } diff --git a/parser/src/token.rs b/parser/src/token.rs index f32b9f9d..986ffd38 100644 --- a/parser/src/token.rs +++ b/parser/src/token.rs @@ -1,3 +1,5 @@ +use std::fmt::Display; + #[derive(Debug, Clone)] pub struct Token { pub kind: Kind, @@ -7,6 +9,26 @@ pub struct Token { pub end: usize, } +impl Display for Token { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let kind = self.kind.to_str(); + let value = format!("({:?})", self.value); + let start = self.start.to_string(); + let end = self.end.to_string(); + let mut s = format!("{},{}-{}:{} ", start, end, start, end); + s.push_str(&kind); + + let mut padding = 50 - s.len(); + while padding > 0 { + s.push(' '); + padding -= 1; + } + + s.push_str(&value); + write!(f, "{}", s) + } +} + // https://docs.python.org/3/reference/lexical_analysis.html #[derive(Debug, PartialEq, Clone, Copy)] pub enum Kind { @@ -214,7 +236,7 @@ impl Kind { Kind::BitNot => "~", Kind::Less => "<", Kind::Greater => ">", - Kind::NewLine => "\n", + Kind::NewLine => "NewLine", Kind::Identifier => "Identifier", Kind::False => "False", Kind::None => "None", From 127567a9e05174c5079cbd0f61a13dcb1d27833e Mon Sep 17 00:00:00 2001 From: Glyphack Date: Mon, 25 Sep 2023 20:42:51 +0200 Subject: [PATCH 2/6] remove print --- parser/src/lexer/lexer.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/parser/src/lexer/lexer.rs b/parser/src/lexer/lexer.rs index 7cdacf82..167147aa 100644 --- a/parser/src/lexer/lexer.rs +++ b/parser/src/lexer/lexer.rs @@ -779,7 +779,6 @@ impl Lexer { return None } } - println!("spaces_count: {}", spaces_count); if let Some(top) = self.indent_stack.last() { match spaces_count.cmp(top) { Ordering::Less => Some(Kind::Dedent), From 1b904ab038f013042fbe9dcd40a60cd268fc6fd1 Mon Sep 17 00:00:00 2001 From: Glyphack Date: Mon, 25 Sep 2023 20:46:45 +0200 Subject: [PATCH 3/6] Fix parsing blocks with leading new lines --- parser/src/parser/parser.rs | 16 ++++++------ ...er__parser__parser__tests__comment-12.snap | 26 ++++++++++++++++--- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/parser/src/parser/parser.rs b/parser/src/parser/parser.rs index 4a218ddd..e427f758 100644 --- a/parser/src/parser/parser.rs +++ b/parser/src/parser/parser.rs @@ -150,6 +150,7 @@ impl Parser { let found = self.cur_token.kind; self.bump_any(); let range = self.finish_node(node); + panic!("Error: {:?}", diagnostics::ExpectToken(kind.to_str(), found.to_str(), range)); return Err(diagnostics::ExpectToken(kind.to_str(), found.to_str(), range).into()); } self.advance(); @@ -1002,6 +1003,7 @@ impl Parser { // https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-suite fn parse_suite(&mut self) -> Result> { if self.eat(Kind::NewLine) { + self.consume_whitespace_and_newline(); self.expect(Kind::Indent)?; let mut stmts = vec![]; while !self.eat(Kind::Dedent) && !self.at(Kind::Eof) { @@ -1675,16 +1677,13 @@ impl Parser { } - fn consume_whitespace_and_newline(&mut self) { + fn consume_whitespace_and_newline(&mut self) -> bool { + let mut consumed= false; while matches!(self.cur_kind(), Kind::WhiteSpace | Kind::NewLine) { self.bump(self.cur_kind()); + consumed = true; } - } - - fn consume_whitespace(&mut self) { - while matches!(self.cur_kind(), Kind::WhiteSpace) { - self.bump(self.cur_kind()); - } + return consumed; } // https://docs.python.org/3/reference/expressions.html#expression-lists @@ -1944,7 +1943,7 @@ impl Parser { let atom_or_primary = if is_atom(&self.cur_kind()) { self.parse_atom()? } else { - unimplemented!("parse_primary: {:?}", self.cur_kind()) + return Err(self.unepxted_token(node, self.cur_kind()).err().unwrap()); }; let primary = if self.at(Kind::Dot) { // TODO: does not handle cases like a.b[0].c @@ -1953,6 +1952,7 @@ impl Parser { // https://docs.python.org/3/reference/expressions.html#slicings self.parse_subscript(node, atom_or_primary) } else if self.eat(Kind::LeftParen) { + // parse call // https://docs.python.org/3/reference/expressions.html#calls let mut positional_args = vec![]; let mut keyword_args = vec![]; diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comment-12.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comment-12.snap index a2679fa2..ae20cbfd 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comment-12.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comment-12.snap @@ -8,12 +8,32 @@ Module { end: 12, }, body: [ - Pass( - Pass { + IfStatement( + If { node: Node { - start: 8, + start: 3, end: 12, }, + test: Name( + Name { + node: Node { + start: 3, + end: 4, + }, + id: "a", + }, + ), + body: [ + Pass( + Pass { + node: Node { + start: 8, + end: 12, + }, + }, + ), + ], + orelse: [], }, ), ], From d03bda3f5ba78c968ad4489e65fd8fc0853778f7 Mon Sep 17 00:00:00 2001 From: Glyphack Date: Mon, 25 Sep 2023 21:37:07 +0200 Subject: [PATCH 4/6] Parse primary improvements --- parser/src/parser/parser.rs | 50 +- ...rser__parser__parser__tests__complete.snap | 673 ++++++++++++++++++ 2 files changed, 715 insertions(+), 8 deletions(-) create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__complete.snap diff --git a/parser/src/parser/parser.rs b/parser/src/parser/parser.rs index e427f758..5133f397 100644 --- a/parser/src/parser/parser.rs +++ b/parser/src/parser/parser.rs @@ -1007,8 +1007,9 @@ impl Parser { self.expect(Kind::Indent)?; let mut stmts = vec![]; while !self.eat(Kind::Dedent) && !self.at(Kind::Eof) { - self.bump(Kind::Comment); - self.consume_whitespace_and_newline(); + if self.eat(Kind::Comment) || self.consume_whitespace_and_newline() { + continue; + } let stmt = self.parse_statement()?; stmts.extend(stmt); self.bump(Kind::NewLine); @@ -1026,8 +1027,6 @@ impl Parser { if is_at_compound_statement(self.cur_token()) { let comp_stmt = self.parse_compount_statement()?; Ok(vec![comp_stmt]) - } else if matches!(self.cur_kind(), Kind::NewLine | Kind::Comment | Kind::Eof) { - return Ok(vec![]); } else { self.parse_statement_list() } @@ -1940,15 +1939,18 @@ impl Parser { // https://docs.python.org/3/reference/expressions.html#primaries fn parse_primary(&mut self) -> Result { let node = self.start_node(); - let atom_or_primary = if is_atom(&self.cur_kind()) { + let mut atom_or_primary = if is_atom(&self.cur_kind()) { self.parse_atom()? } else { return Err(self.unepxted_token(node, self.cur_kind()).err().unwrap()); }; - let primary = if self.at(Kind::Dot) { + + if self.at(Kind::Dot) { // TODO: does not handle cases like a.b[0].c - self.parse_atribute_ref(node, atom_or_primary) - } else if self.at(Kind::LeftBrace) { + atom_or_primary = self.parse_atribute_ref(node, atom_or_primary)? + } + + let mut primary = if self.at(Kind::LeftBrace) { // https://docs.python.org/3/reference/expressions.html#slicings self.parse_subscript(node, atom_or_primary) } else if self.eat(Kind::LeftParen) { @@ -2027,6 +2029,8 @@ impl Parser { Ok(atom_or_primary) }; + println!("primary {:?}", primary); + primary } @@ -3558,6 +3562,36 @@ class a: pass", } } + #[test] + fn test_complete() { + let test_case = "def _handle_ticker_index(symbol): + ticker_index = symbols_data.get_ticker_index(symbol) + + if ticker_index is None: + market_symbol = get_symbol_info(symbol) + if market_symbol is not None: + symbols_data.append_symbol_to_file(market_symbol) + ticker_index = market_symbol.index + return ticker_index + + +def _extract_ticker_client_types_data(ticker_index: str) -> List: + url = TSE_CLIENT_TYPE_DATA_URL.format(ticker_index) + with requests_retry_session() as session: + response = session.get(url, timeout=5) + data = response.text.split(';') + return data"; + let mut parser = Parser::new(test_case.to_string()); + let program = parser.parse(); + + insta::with_settings!({ + description => test_case.to_string(), // the template source code + omit_expression => true // do not include the default expression + }, { + assert_debug_snapshot!(program); + }); + } + #[test] fn test_match_statement() { for test_case in &[ diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__complete.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__complete.snap new file mode 100644 index 00000000..f120c23d --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__complete.snap @@ -0,0 +1,673 @@ +--- +source: parser/src/parser/parser.rs +description: "def _handle_ticker_index(symbol):\n ticker_index = symbols_data.get_ticker_index(symbol)\n\n if ticker_index is None:\n market_symbol = get_symbol_info(symbol)\n if market_symbol is not None:\n symbols_data.append_symbol_to_file(market_symbol)\n ticker_index = market_symbol.index\n return ticker_index\n\n\ndef _extract_ticker_client_types_data(ticker_index: str) -> List:\n url = TSE_CLIENT_TYPE_DATA_URL.format(ticker_index)\n with requests_retry_session() as session:\n response = session.get(url, timeout=5)\n data = response.text.split(';')\n return data" +--- +Module { + node: Node { + start: 0, + end: 608, + }, + body: [ + FunctionDef( + FunctionDef { + node: Node { + start: 0, + end: 608, + }, + name: "_handle_ticker_index", + args: Arguments { + node: Node { + start: 25, + end: 31, + }, + posonlyargs: [], + args: [ + Arg { + node: Node { + start: 25, + end: 31, + }, + arg: "symbol", + annotation: None, + }, + ], + vararg: None, + kwonlyargs: [], + kw_defaults: [], + kwarg: None, + defaults: [], + }, + body: [ + AssignStatement( + Assign { + node: Node { + start: 38, + end: 90, + }, + targets: [ + Name( + Name { + node: Node { + start: 38, + end: 50, + }, + id: "ticker_index", + }, + ), + ], + value: Call( + Call { + node: Node { + start: 53, + end: 90, + }, + func: Attribute( + Attribute { + node: Node { + start: 53, + end: 82, + }, + value: Name( + Name { + node: Node { + start: 53, + end: 65, + }, + id: "symbols_data", + }, + ), + attr: "get_ticker_index", + }, + ), + args: [ + Name( + Name { + node: Node { + start: 83, + end: 89, + }, + id: "symbol", + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + }, + ), + IfStatement( + If { + node: Node { + start: 99, + end: 342, + }, + test: Compare( + Compare { + node: Node { + start: 99, + end: 119, + }, + left: Name( + Name { + node: Node { + start: 99, + end: 111, + }, + id: "ticker_index", + }, + ), + ops: [ + Is, + ], + comparators: [ + Constant( + Constant { + node: Node { + start: 115, + end: 119, + }, + value: None, + }, + ), + ], + }, + ), + body: [ + AssignStatement( + Assign { + node: Node { + start: 129, + end: 168, + }, + targets: [ + Name( + Name { + node: Node { + start: 129, + end: 142, + }, + id: "market_symbol", + }, + ), + ], + value: Call( + Call { + node: Node { + start: 145, + end: 168, + }, + func: Name( + Name { + node: Node { + start: 145, + end: 160, + }, + id: "get_symbol_info", + }, + ), + args: [ + Name( + Name { + node: Node { + start: 161, + end: 167, + }, + id: "symbol", + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + }, + ), + IfStatement( + If { + node: Node { + start: 180, + end: 320, + }, + test: Compare( + Compare { + node: Node { + start: 180, + end: 205, + }, + left: Name( + Name { + node: Node { + start: 180, + end: 193, + }, + id: "market_symbol", + }, + ), + ops: [ + IsNot, + ], + comparators: [ + Constant( + Constant { + node: Node { + start: 201, + end: 205, + }, + value: None, + }, + ), + ], + }, + ), + body: [ + ExpressionStatement( + Call( + Call { + node: Node { + start: 219, + end: 268, + }, + func: Attribute( + Attribute { + node: Node { + start: 219, + end: 253, + }, + value: Name( + Name { + node: Node { + start: 219, + end: 231, + }, + id: "symbols_data", + }, + ), + attr: "append_symbol_to_file", + }, + ), + args: [ + Name( + Name { + node: Node { + start: 254, + end: 267, + }, + id: "market_symbol", + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ), + AssignStatement( + Assign { + node: Node { + start: 281, + end: 315, + }, + targets: [ + Name( + Name { + node: Node { + start: 281, + end: 293, + }, + id: "ticker_index", + }, + ), + ], + value: Attribute( + Attribute { + node: Node { + start: 296, + end: 315, + }, + value: Name( + Name { + node: Node { + start: 296, + end: 309, + }, + id: "market_symbol", + }, + ), + attr: "index", + }, + ), + }, + ), + ], + orelse: [], + }, + ), + Return( + Return { + node: Node { + start: 320, + end: 339, + }, + value: Some( + Name( + Name { + node: Node { + start: 327, + end: 339, + }, + id: "ticker_index", + }, + ), + ), + }, + ), + ], + orelse: [], + }, + ), + FunctionDef( + FunctionDef { + node: Node { + start: 342, + end: 608, + }, + name: "_extract_ticker_client_types_data", + args: Arguments { + node: Node { + start: 380, + end: 397, + }, + posonlyargs: [], + args: [ + Arg { + node: Node { + start: 380, + end: 397, + }, + arg: "ticker_index", + annotation: Some( + Name( + Name { + node: Node { + start: 394, + end: 397, + }, + id: "str", + }, + ), + ), + }, + ], + vararg: None, + kwonlyargs: [], + kw_defaults: [], + kwarg: None, + defaults: [], + }, + body: [ + AssignStatement( + Assign { + node: Node { + start: 412, + end: 463, + }, + targets: [ + Name( + Name { + node: Node { + start: 412, + end: 415, + }, + id: "url", + }, + ), + ], + value: Call( + Call { + node: Node { + start: 418, + end: 463, + }, + func: Attribute( + Attribute { + node: Node { + start: 418, + end: 449, + }, + value: Name( + Name { + node: Node { + start: 418, + end: 442, + }, + id: "TSE_CLIENT_TYPE_DATA_URL", + }, + ), + attr: "format", + }, + ), + args: [ + Name( + Name { + node: Node { + start: 450, + end: 462, + }, + id: "ticker_index", + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + }, + ), + WithStatement( + With { + node: Node { + start: 468, + end: 561, + }, + items: [ + WithItem { + node: Node { + start: 473, + end: 508, + }, + context_expr: Call( + Call { + node: Node { + start: 473, + end: 497, + }, + func: Name( + Name { + node: Node { + start: 473, + end: 495, + }, + id: "requests_retry_session", + }, + ), + args: [], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + optional_vars: Some( + Name( + Name { + node: Node { + start: 501, + end: 508, + }, + id: "session", + }, + ), + ), + }, + ], + body: [ + AssignStatement( + Assign { + node: Node { + start: 518, + end: 556, + }, + targets: [ + Name( + Name { + node: Node { + start: 518, + end: 526, + }, + id: "response", + }, + ), + ], + value: Call( + Call { + node: Node { + start: 529, + end: 556, + }, + func: Attribute( + Attribute { + node: Node { + start: 529, + end: 540, + }, + value: Name( + Name { + node: Node { + start: 529, + end: 536, + }, + id: "session", + }, + ), + attr: "get", + }, + ), + args: [ + Name( + Name { + node: Node { + start: 541, + end: 544, + }, + id: "url", + }, + ), + ], + keywords: [ + Keyword { + node: Node { + start: 546, + end: 555, + }, + arg: Some( + "timeout", + ), + value: Constant( + Constant { + node: Node { + start: 554, + end: 555, + }, + value: Int( + "5", + ), + }, + ), + }, + ], + starargs: None, + kwargs: None, + }, + ), + }, + ), + ], + }, + ), + AssignStatement( + Assign { + node: Node { + start: 561, + end: 592, + }, + targets: [ + Name( + Name { + node: Node { + start: 561, + end: 565, + }, + id: "data", + }, + ), + ], + value: Call( + Call { + node: Node { + start: 568, + end: 592, + }, + func: Attribute( + Attribute { + node: Node { + start: 568, + end: 587, + }, + value: Attribute( + Attribute { + node: Node { + start: 568, + end: 581, + }, + value: Name( + Name { + node: Node { + start: 568, + end: 576, + }, + id: "response", + }, + ), + attr: "text", + }, + ), + attr: "split", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 588, + end: 591, + }, + value: Str( + ";", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + }, + ), + Return( + Return { + node: Node { + start: 597, + end: 608, + }, + value: Some( + Name( + Name { + node: Node { + start: 604, + end: 608, + }, + id: "data", + }, + ), + ), + }, + ), + ], + decorator_list: [], + returns: Some( + Name( + Name { + node: Node { + start: 402, + end: 406, + }, + id: "List", + }, + ), + ), + type_comment: None, + }, + ), + ], + decorator_list: [], + returns: None, + type_comment: None, + }, + ), + ], +} From 98ca01d669aa6ff16c4b0cba954ff9f308e76a60 Mon Sep 17 00:00:00 2001 From: Glyphack Date: Mon, 25 Sep 2023 22:39:02 +0200 Subject: [PATCH 5/6] Parse list comprehension --- parser/src/parser/parser.rs | 47 ++++- ...r__tests__comprehension_expressions-2.snap | 69 +++++++ ...r__tests__comprehension_expressions-3.snap | 78 ++++++++ ...r__tests__comprehension_expressions-4.snap | 85 +++++++++ ...ser__tests__comprehension_expressions.snap | 59 ++++++ ...parser__parser__parser__tests__list-7.snap | 173 ++++++++++++++++++ 6 files changed, 508 insertions(+), 3 deletions(-) create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-2.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-3.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-4.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-7.snap diff --git a/parser/src/parser/parser.rs b/parser/src/parser/parser.rs index 5133f397..98120cb0 100644 --- a/parser/src/parser/parser.rs +++ b/parser/src/parser/parser.rs @@ -1430,7 +1430,23 @@ impl Parser { fn parse_list(&mut self) -> Result { let node = self.start_node(); self.bump(Kind::LeftBrace); - let elements = self.parse_starred_list(Kind::RightBrace)?; + let started_with_star = self.at(Kind::Mul); + let first_elm = self.parse_star_named_expression()?; + if !started_with_star && self.at(Kind::For) { + if self.at(Kind::For) || self.at(Kind::Async) && matches!(self.peek_kind(), Ok(Kind::For)) { + let generators = self.parse_comp_for()?; + self.expect(Kind::RightBrace)?; + return Ok(Expression::ListComp(Box::new(ListComp { + node: self.finish_node(node), + element: Box::new(first_elm), + generators, + }))); + } + } + self.bump(Kind::Comma); + let rest = self.parse_starred_list(Kind::RightBrace)?; + let elements = vec![first_elm]; + let elements = elements.into_iter().chain(rest).collect(); self.expect(Kind::RightBrace)?; Ok(Expression::List(Box::new(List { node: self.finish_node(node), @@ -1692,6 +1708,9 @@ impl Parser { fn parse_starred_list(&mut self, termination_kind: Kind) -> Result> { let mut expressions = vec![]; while !self.at(Kind::Eof) && !self.at(termination_kind) { + if self.eat(Kind::Comment) || self.consume_whitespace_and_newline() { + continue; + } let expr = self.parse_starred_item()?; if !self.at(Kind::Eof) && !self.at(termination_kind) { self.expect(Kind::Comma)?; @@ -2029,8 +2048,6 @@ impl Parser { Ok(atom_or_primary) }; - println!("primary {:?}", primary); - primary } @@ -2952,6 +2969,10 @@ mod tests { "[a, ]", "[a, b, c,]", + "month_names = ['Januari', 'Februari', 'Maart', # These are the + 'April', 'Mei', 'Juni', # Dutch names + 'Juli', 'Augustus', 'September', # for the months + 'Oktober', 'November', 'December'] # of the year" ] { let mut parser = Parser::new(test_case.to_string()); let program = parser.parse(); @@ -3562,6 +3583,26 @@ class a: pass", } } + #[test] + fn test_comprehension_expressions() { + for test_case in &[ + "[a for a in b]", + "[a for a in b if c]", + "[a for a in b if c if d]", + "[a for a in b for c in d]", + ] { + let mut parser = Parser::new(test_case.to_string()); + let program = parser.parse(); + + insta::with_settings!({ + description => test_case.to_string(), // the template source code + omit_expression => true // do not include the default expression + }, { + assert_debug_snapshot!(program); + }); + } + } + #[test] fn test_complete() { let test_case = "def _handle_ticker_index(symbol): diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-2.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-2.snap new file mode 100644 index 00000000..83b0f677 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-2.snap @@ -0,0 +1,69 @@ +--- +source: parser/src/parser/parser.rs +description: "[a for a in b if c]" +--- +Module { + node: Node { + start: 0, + end: 19, + }, + body: [ + ExpressionStatement( + ListComp( + ListComp { + node: Node { + start: 0, + end: 19, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 18, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Name( + Name { + node: Node { + start: 12, + end: 13, + }, + id: "b", + }, + ), + ifs: [ + Name( + Name { + node: Node { + start: 17, + end: 18, + }, + id: "c", + }, + ), + ], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-3.snap new file mode 100644 index 00000000..fa82d658 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-3.snap @@ -0,0 +1,78 @@ +--- +source: parser/src/parser/parser.rs +description: "[a for a in b if c if d]" +--- +Module { + node: Node { + start: 0, + end: 24, + }, + body: [ + ExpressionStatement( + ListComp( + ListComp { + node: Node { + start: 0, + end: 24, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 23, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Name( + Name { + node: Node { + start: 12, + end: 13, + }, + id: "b", + }, + ), + ifs: [ + Name( + Name { + node: Node { + start: 17, + end: 18, + }, + id: "c", + }, + ), + Name( + Name { + node: Node { + start: 22, + end: 23, + }, + id: "d", + }, + ), + ], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-4.snap new file mode 100644 index 00000000..3a20a8da --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-4.snap @@ -0,0 +1,85 @@ +--- +source: parser/src/parser/parser.rs +description: "[a for a in b for c in d]" +--- +Module { + node: Node { + start: 0, + end: 25, + }, + body: [ + ExpressionStatement( + ListComp( + ListComp { + node: Node { + start: 0, + end: 25, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 13, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Name( + Name { + node: Node { + start: 12, + end: 13, + }, + id: "b", + }, + ), + ifs: [], + is_async: false, + }, + Comprehension { + node: Node { + start: 14, + end: 24, + }, + target: Name( + Name { + node: Node { + start: 18, + end: 19, + }, + id: "c", + }, + ), + iter: Name( + Name { + node: Node { + start: 23, + end: 24, + }, + id: "d", + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions.snap new file mode 100644 index 00000000..e1994a72 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions.snap @@ -0,0 +1,59 @@ +--- +source: parser/src/parser/parser.rs +description: "[a for a in b]" +--- +Module { + node: Node { + start: 0, + end: 14, + }, + body: [ + ExpressionStatement( + ListComp( + ListComp { + node: Node { + start: 0, + end: 14, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 13, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Name( + Name { + node: Node { + start: 12, + end: 13, + }, + id: "b", + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-7.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-7.snap new file mode 100644 index 00000000..a64be057 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-7.snap @@ -0,0 +1,173 @@ +--- +source: parser/src/parser/parser.rs +description: "month_names = ['Januari', 'Februari', 'Maart', # These are the\n 'April', 'Mei', 'Juni', # Dutch names\n 'Juli', 'Augustus', 'September', # for the months\n 'Oktober', 'November', 'December'] # of the year" +--- +Module { + node: Node { + start: 0, + end: 268, + }, + body: [ + AssignStatement( + Assign { + node: Node { + start: 0, + end: 252, + }, + targets: [ + Name( + Name { + node: Node { + start: 0, + end: 11, + }, + id: "month_names", + }, + ), + ], + value: List( + List { + node: Node { + start: 14, + end: 252, + }, + elements: [ + Constant( + Constant { + node: Node { + start: 15, + end: 24, + }, + value: Str( + "Januari", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 26, + end: 36, + }, + value: Str( + "Februari", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 38, + end: 45, + }, + value: Str( + "Maart", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 83, + end: 90, + }, + value: Str( + "April", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 94, + end: 99, + }, + value: Str( + "Mei", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 106, + end: 112, + }, + value: Str( + "Juni", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 149, + end: 155, + }, + value: Str( + "Juli", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 160, + end: 170, + }, + value: Str( + "Augustus", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 172, + end: 183, + }, + value: Str( + "September", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 218, + end: 227, + }, + value: Str( + "Oktober", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 229, + end: 239, + }, + value: Str( + "November", + ), + }, + ), + Constant( + Constant { + node: Node { + start: 241, + end: 251, + }, + value: Str( + "December", + ), + }, + ), + ], + }, + ), + }, + ), + ], +} From 0f805bec6399b303ca1f0eb9fabbfda749f35549 Mon Sep 17 00:00:00 2001 From: Glyphack Date: Tue, 26 Sep 2023 22:47:27 +0200 Subject: [PATCH 6/6] Add dict and set comprehensions and use glob for tests --- parser/Cargo.toml | 2 +- parser/src/parser/parser.rs | 321 +++++++----------- ...arser__parser__parser__tests__comment.snap | 2 +- ...rser__parser__parser__tests__complete.snap | 9 +- ...parser__parser__parser__tests__dict-2.snap | 62 ---- ...parser__parser__parser__tests__dict-3.snap | 62 ---- ...parser__parser__parser__tests__dict-4.snap | 80 ----- ...parser__parser__parser__tests__dict-5.snap | 44 --- ...parser__parser__parser__tests__dict-6.snap | 62 ---- ...parser__tests__generator_expression-2.snap | 69 ---- ...parser__tests__generator_expression-3.snap | 78 ----- ...parser__tests__generator_expression-4.snap | 85 ----- ...parser__tests__generator_expression-5.snap | 107 ------ ...__parser__tests__generator_expression.snap | 59 ---- ...parser__parser__parser__tests__list-2.snap | 51 --- ...parser__parser__parser__tests__list-3.snap | 51 --- ...parser__parser__parser__tests__list-4.snap | 51 --- ...parser__parser__parser__tests__list-5.snap | 33 -- ...n_parser__parser__parser__tests__list.snap | 51 --- ...__parser__tests__one_liners@dict.py-2.snap | 73 ++++ ...__parser__tests__one_liners@dict.py-3.snap | 73 ++++ ...__parser__tests__one_liners@dict.py-4.snap | 91 +++++ ..._parser__tests__one_liners@dict.py-5.snap} | 35 +- ..._parser__tests__one_liners@dict.py-6.snap} | 1 + ...__parser__tests__one_liners@dict.py-7.snap | 85 +++++ ...__parser__tests__one_liners@dict.py-8.snap | 85 +++++ ...r__parser__tests__one_liners@dict.py.snap} | 1 + ...ne_liners@generator_expressions.py-2.snap} | 1 + ...ne_liners@generator_expressions.py-3.snap} | 1 + ...ne_liners@generator_expressions.py-4.snap} | 1 + ...ne_liners@generator_expressions.py-5.snap} | 1 + ...one_liners@generator_expressions.py-6.snap | 204 +++++++++++ ..._one_liners@generator_expressions.py.snap} | 1 + ...arser__tests__one_liners@lists.py-10.snap} | 1 + ...arser__tests__one_liners@lists.py-11.snap} | 5 +- ...parser__tests__one_liners@lists.py-2.snap} | 36 +- ...parser__tests__one_liners@lists.py-3.snap} | 41 ++- ...parser__tests__one_liners@lists.py-4.snap} | 49 ++- ..._parser__tests__one_liners@lists.py-5.snap | 44 +++ ...parser__tests__one_liners@lists.py-6.snap} | 1 + ...parser__tests__one_liners@lists.py-7.snap} | 45 +-- ...parser__tests__one_liners@lists.py-8.snap} | 1 + ...parser__tests__one_liners@lists.py-9.snap} | 1 + ...r__parser__tests__one_liners@lists.py.snap | 52 +++ ..._parser__tests__one_liners@sets.py-10.snap | 84 +++++ ...parser__tests__one_liners@sets.py-11.snap} | 138 ++++---- ..._parser__tests__one_liners@sets.py-12.snap | 134 ++++++++ ..._parser__tests__one_liners@sets.py-13.snap | 134 ++++++++ ..._parser__tests__one_liners@sets.py-14.snap | 153 +++++++++ ..._parser__tests__one_liners@sets.py-2.snap} | 3 +- ..._parser__tests__one_liners@sets.py-3.snap} | 15 +- ..._parser__tests__one_liners@sets.py-4.snap} | 11 +- ..._parser__tests__one_liners@sets.py-5.snap} | 7 +- ..._parser__tests__one_liners@sets.py-6.snap} | 1 + ...__parser__tests__one_liners@sets.py-7.snap | 84 +++++ ...__parser__tests__one_liners@sets.py-8.snap | 84 +++++ ...__parser__tests__one_liners@sets.py-9.snap | 84 +++++ ...r__parser__tests__one_liners@sets.py.snap} | 1 + ..._parser__parser__parser__tests__set-2.snap | 51 --- ..._parser__parser__parser__tests__set-3.snap | 51 --- ..._parser__parser__parser__tests__set-4.snap | 51 --- ...arser__parser__tests__attribute_ref-2.snap | 41 --- ...arser__parser__tests__attribute_ref-3.snap | 32 -- ...arser__parser__tests__attribute_ref-4.snap | 50 --- ..._parser__parser__tests__attribute_ref.snap | 32 -- ...rser__parser__tests__await_expression.snap | 31 -- ...__parser__parser__tests__binary_op-10.snap | 41 --- ...__parser__parser__tests__binary_op-11.snap | 41 --- ...__parser__parser__tests__binary_op-12.snap | 41 --- ...__parser__parser__tests__binary_op-13.snap | 41 --- ...r__parser__parser__tests__binary_op-2.snap | 41 --- ...r__parser__parser__tests__binary_op-3.snap | 41 --- ...r__parser__parser__tests__binary_op-4.snap | 41 --- ...r__parser__parser__tests__binary_op-5.snap | 41 --- ...r__parser__parser__tests__binary_op-6.snap | 41 --- ...r__parser__parser__tests__binary_op-7.snap | 41 --- ...r__parser__parser__tests__binary_op-8.snap | 41 --- ...r__parser__parser__tests__binary_op-9.snap | 41 --- ...ser__parser__parser__tests__binary_op.snap | 41 --- ..._parser__tests__class_def_statement-2.snap | 34 -- ..._parser__tests__class_def_statement-3.snap | 53 --- ..._parser__tests__class_def_statement-4.snap | 78 ----- ..._parser__tests__class_def_statement-5.snap | 62 ---- ..._parser__tests__class_def_statement-6.snap | 44 --- ...r__parser__tests__class_def_statement.snap | 34 -- ..._parser__parser__tests__comparison-10.snap | 45 --- ..._parser__parser__tests__comparison-11.snap | 55 --- ...__parser__parser__tests__comparison-2.snap | 45 --- ...__parser__parser__tests__comparison-3.snap | 45 --- ...__parser__parser__tests__comparison-4.snap | 45 --- ...__parser__parser__tests__comparison-5.snap | 45 --- ...__parser__parser__tests__comparison-6.snap | 45 --- ...__parser__parser__tests__comparison-7.snap | 45 --- ...__parser__parser__tests__comparison-8.snap | 45 --- ...__parser__parser__tests__comparison-9.snap | 45 --- ...er__parser__parser__tests__comparison.snap | 45 --- ...parser__tests__conditional_expression.snap | 75 ---- ...parser__parser__parser__tests__dict-2.snap | 62 ---- ...parser__parser__parser__tests__dict-3.snap | 62 ---- ...parser__parser__parser__tests__dict-4.snap | 80 ----- ...parser__parser__parser__tests__dict-5.snap | 44 --- .../parser__parser__parser__tests__dict.snap | 62 ---- ...arser__parser__tests__for_statement-2.snap | 49 --- ...arser__parser__tests__for_statement-3.snap | 126 ------- ..._parser__parser__tests__for_statement.snap | 49 --- ...ser__parser__parser__tests__fstring-2.snap | 44 --- ...ser__parser__parser__tests__fstring-3.snap | 64 ---- ...ser__parser__parser__tests__fstring-4.snap | 84 ----- ...arser__parser__parser__tests__fstring.snap | 35 -- ...__parser__tests__func_def_statement-2.snap | 47 --- ...__parser__tests__func_def_statement-3.snap | 72 ---- ...__parser__tests__func_def_statement-4.snap | 74 ---- ...__parser__tests__func_def_statement-5.snap | 72 ---- ...__parser__tests__func_def_statement-6.snap | 57 ---- ...__parser__tests__func_def_statement-7.snap | 167 --------- ...__parser__tests__func_def_statement-8.snap | 57 ---- ...er__parser__tests__func_def_statement.snap | 47 --- .../parser__parser__parser__tests__if-2.snap | 40 --- .../parser__parser__parser__tests__if-3.snap | 112 ------ .../parser__parser__parser__tests__if-4.snap | 48 --- .../parser__parser__parser__tests__if-5.snap | 62 ---- .../parser__parser__parser__tests__if-6.snap | 113 ------ .../parser__parser__parser__tests__if-7.snap | 122 ------- .../parser__parser__parser__tests__if.snap | 40 --- ...rser__parser__parser__tests__lambda-2.snap | 53 --- ...rser__parser__parser__tests__lambda-3.snap | 61 ---- ...rser__parser__parser__tests__lambda-4.snap | 69 ---- ...rser__parser__parser__tests__lambda-5.snap | 62 ---- ...rser__parser__parser__tests__lambda-6.snap | 73 ---- ...rser__parser__parser__tests__lambda-7.snap | 82 ----- ...rser__parser__parser__tests__lambda-8.snap | 65 ---- ...rser__parser__parser__tests__lambda-9.snap | 75 ---- ...parser__parser__parser__tests__lambda.snap | 44 --- ...parser__parser__parser__tests__list-2.snap | 51 --- ...parser__parser__parser__tests__list-3.snap | 51 --- ...parser__parser__parser__tests__list-4.snap | 51 --- ...parser__parser__parser__tests__list-5.snap | 33 -- .../parser__parser__parser__tests__list.snap | 51 --- ...ser__parser__tests__match_statement-2.snap | 90 ----- ...ser__parser__tests__match_statement-3.snap | 76 ----- ...ser__parser__tests__match_statement-4.snap | 245 ------------- ...ser__parser__tests__match_statement-5.snap | 103 ------ ...ser__parser__tests__match_statement-6.snap | 178 ---------- ...ser__parser__tests__match_statement-7.snap | 206 ----------- ...ser__parser__tests__match_statement-8.snap | 88 ----- ...arser__parser__tests__match_statement.snap | 67 ---- ...rser__parser__tests__named_expression.snap | 40 --- ...r__parser__tests__parse_assert_stmt-2.snap | 40 --- ...r__parser__tests__parse_assert_stmt-3.snap | 44 --- ...ser__parser__tests__parse_assert_stmt.snap | 30 -- ...r__parser__tests__parse_assignment-10.snap | 42 --- ...r__parser__tests__parse_assignment-11.snap | 42 --- ...r__parser__tests__parse_assignment-12.snap | 42 --- ...r__parser__tests__parse_assignment-13.snap | 63 ---- ...r__parser__tests__parse_assignment-14.snap | 63 ---- ...r__parser__tests__parse_assignment-15.snap | 51 --- ...r__parser__tests__parse_assignment-16.snap | 110 ------ ...r__parser__tests__parse_assignment-17.snap | 41 --- ...r__parser__tests__parse_assignment-18.snap | 41 --- ...r__parser__tests__parse_assignment-19.snap | 41 --- ...er__parser__tests__parse_assignment-2.snap | 40 --- ...r__parser__tests__parse_assignment-20.snap | 41 --- ...r__parser__tests__parse_assignment-21.snap | 41 --- ...r__parser__tests__parse_assignment-22.snap | 41 --- ...r__parser__tests__parse_assignment-23.snap | 41 --- ...r__parser__tests__parse_assignment-24.snap | 41 --- ...r__parser__tests__parse_assignment-25.snap | 41 --- ...r__parser__tests__parse_assignment-26.snap | 41 --- ...r__parser__tests__parse_assignment-27.snap | 41 --- ...r__parser__tests__parse_assignment-28.snap | 41 --- ...r__parser__tests__parse_assignment-29.snap | 52 --- ...er__parser__tests__parse_assignment-3.snap | 42 --- ...r__parser__tests__parse_assignment-30.snap | 73 ---- ...r__parser__tests__parse_assignment-31.snap | 73 ---- ...r__parser__tests__parse_assignment-32.snap | 50 --- ...er__parser__tests__parse_assignment-4.snap | 42 --- ...er__parser__tests__parse_assignment-5.snap | 43 --- ...er__parser__tests__parse_assignment-6.snap | 44 --- ...er__parser__tests__parse_assignment-7.snap | 44 --- ...er__parser__tests__parse_assignment-8.snap | 44 --- ...er__parser__tests__parse_assignment-9.snap | 42 --- ...rser__parser__tests__parse_assignment.snap | 42 --- ...arser__parser__tests__parse_bool_op-2.snap | 43 --- ..._parser__parser__tests__parse_bool_op.snap | 43 --- ...parser__tests__parse_break_continue-2.snap | 20 -- ...__parser__tests__parse_break_continue.snap | 20 -- ...__parser__parser__tests__parse_call-2.snap | 45 --- ...__parser__parser__tests__parse_call-3.snap | 54 --- ...__parser__parser__tests__parse_call-4.snap | 54 --- ...__parser__parser__tests__parse_call-5.snap | 82 ----- ...__parser__parser__tests__parse_call-6.snap | 99 ------ ...__parser__parser__tests__parse_call-7.snap | 115 ------- ...__parser__parser__tests__parse_call-8.snap | 45 --- ...er__parser__parser__tests__parse_call.snap | 35 -- ...rser__parser__tests__parse_del_stmt-2.snap | 40 --- ...rser__parser__tests__parse_del_stmt-3.snap | 40 --- ...parser__parser__tests__parse_del_stmt.snap | 31 -- ...rser__tests__parse_import_statement-2.snap | 32 -- ...rser__tests__parse_import_statement-3.snap | 30 -- ...rser__tests__parse_import_statement-4.snap | 32 -- ...rser__tests__parse_import_statement-5.snap | 30 -- ...rser__tests__parse_import_statement-6.snap | 32 -- ...rser__tests__parse_import_statement-7.snap | 34 -- ...rser__tests__parse_import_statement-8.snap | 32 -- ...rser__tests__parse_import_statement-9.snap | 34 -- ...parser__tests__parse_import_statement.snap | 30 -- ...rser__parser__tests__parse_unary_op-2.snap | 32 -- ...rser__parser__tests__parse_unary_op-3.snap | 32 -- ...rser__parser__tests__parse_unary_op-4.snap | 32 -- ...parser__parser__tests__parse_unary_op.snap | 32 -- ...arser__tests__parse_yield_statement-2.snap | 33 -- ..._parser__tests__parse_yield_statement.snap | 23 -- ...r__parser__parser__tests__pass_stmt-2.snap | 20 -- ...r__parser__parser__tests__pass_stmt-3.snap | 20 -- ...ser__parser__parser__tests__pass_stmt.snap | 20 -- ...ser__parser__tests__raise_statement-2.snap | 32 -- ...ser__parser__tests__raise_statement-3.snap | 42 --- ...arser__parser__tests__raise_statement.snap | 22 -- .../parser__parser__parser__tests__set-2.snap | 51 --- .../parser__parser__parser__tests__set-3.snap | 51 --- .../parser__parser__parser__tests__set-4.snap | 51 --- .../parser__parser__parser__tests__set-5.snap | 33 -- ...arser__parser__parser__tests__starred.snap | 31 -- ...tests__string_literal_concatnation-10.snap | 57 ---- ...tests__string_literal_concatnation-11.snap | 57 ---- ...tests__string_literal_concatnation-12.snap | 57 ---- ..._tests__string_literal_concatnation-2.snap | 28 -- ..._tests__string_literal_concatnation-3.snap | 25 -- ..._tests__string_literal_concatnation-4.snap | 25 -- ..._tests__string_literal_concatnation-5.snap | 11 - ..._tests__string_literal_concatnation-6.snap | 25 -- ..._tests__string_literal_concatnation-7.snap | 46 --- ..._tests__string_literal_concatnation-8.snap | 25 -- ..._tests__string_literal_concatnation-9.snap | 46 --- ...r__tests__string_literal_concatnation.snap | 25 -- ...r__parser__parser__tests__subscript-2.snap | 62 ---- ...r__parser__parser__tests__subscript-3.snap | 72 ---- ...r__parser__parser__tests__subscript-4.snap | 68 ---- ...r__parser__parser__tests__subscript-5.snap | 90 ----- ...r__parser__parser__tests__subscript-6.snap | 42 --- ...r__parser__parser__tests__subscript-7.snap | 100 ------ ...r__parser__parser__tests__subscript-8.snap | 52 --- ...ser__parser__parser__tests__subscript.snap | 40 --- ...arser__parser__tests__try_statement-2.snap | 62 ---- ...arser__parser__tests__try_statement-3.snap | 64 ---- ...arser__parser__tests__try_statement-4.snap | 73 ---- ...arser__parser__tests__try_statement-5.snap | 82 ----- ...arser__parser__tests__try_statement-6.snap | 64 ---- ..._parser__parser__tests__try_statement.snap | 52 --- ...arser__parser__parser__tests__tuple-2.snap | 51 --- ...arser__parser__parser__tests__tuple-3.snap | 51 --- ...arser__parser__parser__tests__tuple-4.snap | 51 --- ...arser__parser__parser__tests__tuple-5.snap | 23 -- ...arser__parser__parser__tests__tuple-6.snap | 51 --- .../parser__parser__parser__tests__tuple.snap | 51 --- ...ser__parser__tests__while_statement-2.snap | 40 --- ...ser__parser__tests__while_statement-3.snap | 93 ----- ...arser__parser__tests__while_statement.snap | 40 --- ...rser__parser__tests__with_statement-2.snap | 58 ---- ...rser__parser__tests__with_statement-3.snap | 84 ----- ...rser__parser__tests__with_statement-4.snap | 84 ----- ...parser__parser__tests__with_statement.snap | 48 --- ...er__parser__tests__yield_expression-2.snap | 33 -- ...er__parser__tests__yield_expression-3.snap | 31 -- ...rser__parser__tests__yield_expression.snap | 23 -- parser/test_data/inputs/functions.py | 17 + parser/test_data/inputs/one_liners/dict.py | 21 ++ .../one_liners/generator_expressions.py | 11 + parser/test_data/inputs/one_liners/lists.py | 30 ++ parser/test_data/inputs/one_liners/sets.py | 37 ++ 270 files changed, 1926 insertions(+), 12314 deletions(-) delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-2.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-3.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-4.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-5.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-6.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-2.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-3.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-4.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-5.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-2.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-3.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-4.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-5.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-2.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-3.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-4.snap rename parser/src/parser/snapshots/{parser__parser__parser__tests__parse_yield_statement-4.snap => enderpy_python_parser__parser__parser__tests__one_liners@dict.py-5.snap} (60%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__dict-6.snap => enderpy_python_parser__parser__parser__tests__one_liners@dict.py-6.snap} (97%) create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-7.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-8.snap rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__dict.snap => enderpy_python_parser__parser__parser__tests__one_liners@dict.py.snap} (97%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__generator_expression-2.snap => enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-2.snap} (96%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__generator_expression-3.snap => enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-3.snap} (97%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__generator_expression-4.snap => enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-4.snap} (97%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__generator_expression-5.snap => enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-5.snap} (98%) create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-6.snap rename parser/src/parser/snapshots/{parser__parser__parser__tests__generator_expression.snap => enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py.snap} (96%) rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__comprehension_expressions-3.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-10.snap} (97%) rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__comprehension_expressions-4.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-11.snap} (96%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__parse_yield_statement-3.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-2.snap} (54%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__parse_bool_op-3.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-3.snap} (60%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__parse_bool_op-4.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-4.snap} (53%) create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-5.snap rename parser/src/parser/snapshots/{parser__parser__parser__tests__list-6.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-6.snap} (96%) rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__list-7.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-7.snap} (82%) rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__comprehension_expressions.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-8.snap} (97%) rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__comprehension_expressions-2.snap => enderpy_python_parser__parser__parser__tests__one_liners@lists.py-9.snap} (97%) create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-10.snap rename parser/src/parser/snapshots/{parser__parser__parser__tests__for_statement-4.snap => enderpy_python_parser__parser__parser__tests__one_liners@sets.py-11.snap} (57%) create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-12.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-13.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-14.snap rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__set.snap => enderpy_python_parser__parser__parser__tests__one_liners@sets.py-2.snap} (94%) rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__list-6.snap => enderpy_python_parser__parser__parser__tests__one_liners@sets.py-3.snap} (80%) rename parser/src/parser/snapshots/{parser__parser__parser__tests__set-6.snap => enderpy_python_parser__parser__parser__tests__one_liners@sets.py-4.snap} (84%) rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__set-5.snap => enderpy_python_parser__parser__parser__tests__one_liners@sets.py-5.snap} (84%) rename parser/src/parser/snapshots/{enderpy_python_parser__parser__parser__tests__set-6.snap => enderpy_python_parser__parser__parser__tests__one_liners@sets.py-6.snap} (96%) create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-7.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-8.snap create mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-9.snap rename parser/src/parser/snapshots/{parser__parser__parser__tests__set.snap => enderpy_python_parser__parser__parser__tests__one_liners@sets.py.snap} (96%) delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-2.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-3.snap delete mode 100644 parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__await_expression.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-10.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-11.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-12.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-13.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-9.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__binary_op.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-10.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-11.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison-9.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__comparison.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__conditional_expression.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__dict-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__dict-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__dict-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__dict-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__dict.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__for_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__fstring-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__fstring-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__fstring-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__fstring.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__if-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__if-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__if-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__if-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__if-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__if-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__if.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda-9.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__lambda.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__list-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__list-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__list-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__list-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__list.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__match_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__named_expression.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-10.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-11.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-12.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-13.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-14.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-15.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-16.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-17.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-18.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-19.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-20.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-21.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-22.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-23.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-24.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-25.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-26.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-27.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-28.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-29.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-30.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-31.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-32.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-9.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_break_continue-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_break_continue.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_call.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-9.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__set-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__set-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__set-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__set-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__starred.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-10.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-11.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-12.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-9.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__subscript-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__subscript-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__subscript-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__subscript-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__subscript-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__subscript-7.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__subscript-8.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__subscript.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__try_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__tuple-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__tuple-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__tuple-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__tuple-5.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__tuple-6.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__tuple.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__while_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__while_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__while_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-4.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__with_statement.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression-2.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression-3.snap delete mode 100644 parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression.snap create mode 100644 parser/test_data/inputs/functions.py create mode 100644 parser/test_data/inputs/one_liners/dict.py create mode 100644 parser/test_data/inputs/one_liners/generator_expressions.py create mode 100644 parser/test_data/inputs/one_liners/lists.py create mode 100644 parser/test_data/inputs/one_liners/sets.py diff --git a/parser/Cargo.toml b/parser/Cargo.toml index ff0f46a9..87ea8497 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -20,4 +20,4 @@ miette = "5.6.0" thiserror = "1.0.40" [dev-dependencies] -insta = { version = "1.28.0", features = ["yaml"] } +insta = { version = "1.28.0", features = ["yaml", "glob"] } diff --git a/parser/src/parser/parser.rs b/parser/src/parser/parser.rs index 98120cb0..27ea8429 100644 --- a/parser/src/parser/parser.rs +++ b/parser/src/parser/parser.rs @@ -150,20 +150,23 @@ impl Parser { let found = self.cur_token.kind; self.bump_any(); let range = self.finish_node(node); - panic!("Error: {:?}", diagnostics::ExpectToken(kind.to_str(), found.to_str(), range)); + panic!( + "Error: {:?}", + diagnostics::ExpectToken(kind.to_str(), found.to_str(), range) + ); return Err(diagnostics::ExpectToken(kind.to_str(), found.to_str(), range).into()); } self.advance(); Ok(()) } - fn unepxted_token(&mut self,node: Node, kind: Kind)-> Result <()>{ + fn unepxted_token(&mut self, node: Node, kind: Kind) -> Result<()> { self.bump_any(); let range = self.finish_node(node); let line_number = self.get_line_number_of_character_position(range.start); Err(diagnostics::UnexpectedToken(line_number, kind.to_str(), range).into()) } - + fn get_line_number_of_character_position(&self, pos: usize) -> u32 { let mut line_number = 1; for (i, c) in self.source.chars().enumerate() { @@ -242,14 +245,14 @@ impl Parser { fn parse_if_statement(&mut self) -> Result { self.bump(Kind::If); let node = self.start_node(); - let test = Box::new(self.parse_assignment_expression()?); + let test = Box::new(self.parse_named_expression()?); self.expect(Kind::Colon)?; let body = self.parse_suite()?; let mut orelse: Option = None; while self.at(Kind::Elif) { let elif_node = self.start_node(); self.bump(Kind::Elif); - let elif_test = Box::new(self.parse_assignment_expression()?); + let elif_test = Box::new(self.parse_named_expression()?); self.expect(Kind::Colon)?; let body = self.parse_suite()?; let if_value = If { @@ -297,7 +300,7 @@ impl Parser { fn parse_while_statement(&mut self) -> Result { let node = self.start_node(); self.bump(Kind::While); - let test = Box::new(self.parse_assignment_expression()?); + let test = Box::new(self.parse_named_expression()?); self.expect(Kind::Colon)?; let body = self.parse_suite()?; let orelse = if self.at(Kind::Else) { @@ -599,7 +602,7 @@ impl Parser { if self.at(Kind::Mul) { self.parse_or_expr() } else { - self.parse_assignment_expression() + self.parse_named_expression() } } @@ -654,7 +657,7 @@ impl Parser { fn parse_guard(&mut self) -> Result { self.expect(Kind::If)?; - self.parse_assignment_expression() + self.parse_named_expression() } // https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-patterns @@ -1398,7 +1401,7 @@ impl Parser { } // https://docs.python.org/3/reference/expressions.html#assignment-expressions - fn parse_assignment_expression(&mut self) -> Result { + fn parse_named_expression(&mut self) -> Result { let node = self.start_node(); if self.at(Kind::Identifier) && matches!(self.peek_kind()?, Kind::Walrus) { let identifier = self.cur_token().value.to_string(); @@ -1433,7 +1436,9 @@ impl Parser { let started_with_star = self.at(Kind::Mul); let first_elm = self.parse_star_named_expression()?; if !started_with_star && self.at(Kind::For) { - if self.at(Kind::For) || self.at(Kind::Async) && matches!(self.peek_kind(), Ok(Kind::For)) { + if self.at(Kind::For) + || self.at(Kind::Async) && matches!(self.peek_kind(), Ok(Kind::For)) + { let generators = self.parse_comp_for()?; self.expect(Kind::RightBrace)?; return Ok(Expression::ListComp(Box::new(ListComp { @@ -1445,7 +1450,7 @@ impl Parser { } self.bump(Kind::Comma); let rest = self.parse_starred_list(Kind::RightBrace)?; - let elements = vec![first_elm]; + let elements = vec![first_elm]; let elements = elements.into_iter().chain(rest).collect(); self.expect(Kind::RightBrace)?; Ok(Expression::List(Box::new(List { @@ -1475,7 +1480,7 @@ impl Parser { // or an assignment expression let first_expr = if self.at(Kind::Identifier) && matches!(self.peek_kind(), Ok(Kind::Walrus)) { - self.parse_assignment_expression()? + self.parse_named_expression()? } else if self.eat(Kind::Mul) { let expr = self.parse_or_expr()?; Expression::Starred(Box::new(Starred { @@ -1652,16 +1657,44 @@ impl Parser { fn parse_dict_or_set(&mut self) -> Result { let node = self.start_node(); self.bump(Kind::LeftBracket); - if matches!(self.peek_kind(), Ok(Kind::Comma)) { - self.parse_set(node) + if self.eat(Kind::RightBracket) { + return Ok(Expression::Dict(Box::new(Dict { + node: self.finish_node(node), + keys: vec![], + values: vec![], + }))); + } + let first_key_or_element = self.parse_star_named_expression()?; + if matches!( + self.cur_kind(), + Kind::Comma | Kind::RightBracket | Kind::Async | Kind::For | Kind::Walrus + ) { + self.parse_set(node, first_key_or_element) } else { - self.parse_dict(node) + self.parse_dict(node, first_key_or_element) } } // https://docs.python.org/3/reference/expressions.html#set-displays - fn parse_set(&mut self, node: Node) -> Result { - let elements = self.parse_starred_list(Kind::RightBracket)?; + fn parse_set(&mut self, node: Node, first_elm: Expression) -> Result { + if !matches!(first_elm, Expression::Starred(_)) && self.at(Kind::For) { + if self.at(Kind::For) + || self.at(Kind::Async) && matches!(self.peek_kind(), Ok(Kind::For)) + { + let generators = self.parse_comp_for()?; + self.consume_whitespace_and_newline(); + self.expect(Kind::RightBracket)?; + return Ok(Expression::SetComp(Box::new(SetComp { + node: self.finish_node(node), + element: Box::new(first_elm), + generators, + }))); + } + } + self.bump(Kind::Comma); + let rest = self.parse_starred_list(Kind::RightBracket)?; + let mut elements = vec![first_elm]; + elements.extend(rest); self.expect(Kind::RightBracket)?; Ok(Expression::Set(Box::new(Set { node: self.finish_node(node), @@ -1670,30 +1703,48 @@ impl Parser { } // https://docs.python.org/3/reference/expressions.html#dictionary-displays - fn parse_dict(&mut self, node: Node) -> Result { - let mut keys = vec![]; - let mut values = vec![]; - while !self.eat(Kind::RightBracket) { - let key = self.parse_expression_2()?; - self.expect(Kind::Colon)?; - let value = self.parse_expression_2()?; - keys.push(key); - values.push(value); + fn parse_dict(&mut self, node: Node, first_key: Expression) -> Result { + self.expect(Kind::Colon)?; + let first_val = self.parse_expression_2()?; + if self.at(Kind::For) || self.at(Kind::Async) && matches!(self.peek_kind(), Ok(Kind::For)) { + let generators = self.parse_comp_for()?; + self.expect(Kind::RightBracket)?; + return Ok(Expression::DictComp(Box::new(DictComp { + node: self.finish_node(node), + key: Box::new(first_key), + value: Box::new(first_val), + generators, + }))); + } else { + // we already consumed the first pair + // so if there are more pairs we need to consume the comma if !self.at(Kind::RightBracket) { self.expect(Kind::Comma)?; self.consume_whitespace_and_newline(); } + let mut keys = vec![first_key]; + let mut values = vec![first_val]; + while !self.eat(Kind::RightBracket) { + let key = self.parse_expression_2()?; + self.expect(Kind::Colon)?; + let value = self.parse_expression_2()?; + keys.push(key); + values.push(value); + if !self.at(Kind::RightBracket) { + self.expect(Kind::Comma)?; + self.consume_whitespace_and_newline(); + } + } + Ok(Expression::Dict(Box::new(Dict { + node: self.finish_node(node), + keys, + values, + }))) } - Ok(Expression::Dict(Box::new(Dict { - node: self.finish_node(node), - keys, - values, - }))) } - fn consume_whitespace_and_newline(&mut self) -> bool { - let mut consumed= false; + let mut consumed = false; while matches!(self.cur_kind(), Kind::WhiteSpace | Kind::NewLine) { self.bump(self.cur_kind()); consumed = true; @@ -1728,14 +1779,16 @@ impl Parser { let expr = self.parse_or_expr()?; node = self.finish_node(node); if !is_iterable(&expr) { - return Err(diagnostics::UnexpectedToken(0, starred_value_kind.to_str(), node).into()); + return Err( + diagnostics::UnexpectedToken(0, starred_value_kind.to_str(), node).into(), + ); } return Ok(Expression::Starred(Box::new(Starred { node: self.finish_node(node), value: Box::new(expr), }))); } - self.parse_assignment_expression() + self.parse_named_expression() } // https://docs.python.org/3/reference/expressions.html#conditional-expressions @@ -2025,7 +2078,7 @@ impl Parser { ) .into()); } - let arg = self.parse_assignment_expression()?; + let arg = self.parse_named_expression()?; positional_args.push(arg); } if !self.eat(Kind::Comma) { @@ -2103,7 +2156,7 @@ impl Parser { ) .into()); } - let arg = self.parse_assignment_expression()?; + let arg = self.parse_named_expression()?; positional_args.push(arg); } if !self.eat(Kind::Comma) { @@ -2717,8 +2770,10 @@ impl Parser { #[cfg(test)] mod tests { + use std::fs; + use super::*; - use insta::assert_debug_snapshot; + use insta::{assert_debug_snapshot, glob}; #[test] fn test_parse_assignment() { @@ -2955,37 +3010,6 @@ mod tests { } } - #[test] - fn test_list() { - for test_case in &[ - "[a, b, c]", - "[a, - b, c]", - "[a - , b, c]", - "[a, - b, - c]", - "[a, - ]", - "[a, b, c,]", - "month_names = ['Januari', 'Februari', 'Maart', # These are the - 'April', 'Mei', 'Juni', # Dutch names - 'Juli', 'Augustus', 'September', # for the months - 'Oktober', 'November', 'December'] # of the year" - ] { - let mut parser = Parser::new(test_case.to_string()); - let program = parser.parse(); - - insta::with_settings!({ - description => test_case.to_string(), // the template source code - omit_expression => true // do not include the default expression - }, { - assert_debug_snapshot!(program); - }); - } - } - #[test] fn test_tuple() { for test_case in &[ @@ -3013,60 +3037,6 @@ mod tests { } } - #[test] - fn test_dict() { - // do the same here - for test_case in &[ - "{a: b, c: d}", - "{a: b, - c: d}", - "{a: b - , c: d}", - "{a: b, - c: d, - e: f}", - "{a: b, - }", - "{a: b, c: d,}", - ] { - let mut parser = Parser::new(test_case.to_string()); - let program = parser.parse(); - - insta::with_settings!({ - description => test_case.to_string(), // the template source code - omit_expression => true // do not include the default expression - }, { - assert_debug_snapshot!(program); - }); - } - } - #[test] - fn test_set() { - for test_case in &[ - "{a, b, c}", - "{a, - b, c}", - "{a - , b, c}", - "{a, - b, - c}", - "{a, - }", - "{a, b, c,}", - ] { - let mut parser = Parser::new(test_case.to_string()); - let program = parser.parse(); - - insta::with_settings!({ - description => test_case.to_string(), // the template source code - omit_expression => true // do not include the default expression - }, { - assert_debug_snapshot!(program); - }); - } - } - #[test] fn test_yield_expression() { for test_case in &["yield", "yield a", "yield from a"] { @@ -3202,27 +3172,6 @@ mod tests { } } - #[test] - fn test_generator_expression() { - for test_case in &[ - "(a for a in b)", - "(a for a in b if c)", - "(a for a in b if c if d)", - "(a for a in b for c in d)", - "(ord(c) for line in file for c in line)", - ] { - let mut parser = Parser::new(test_case.to_string()); - let program = parser.parse(); - - insta::with_settings!({ - description => test_case.to_string(), // the template source code - omit_expression => true // do not include the default expression - }, { - assert_debug_snapshot!(program); - }); - } - } - #[test] fn test_conditional_expression() { { @@ -3583,56 +3532,6 @@ class a: pass", } } - #[test] - fn test_comprehension_expressions() { - for test_case in &[ - "[a for a in b]", - "[a for a in b if c]", - "[a for a in b if c if d]", - "[a for a in b for c in d]", - ] { - let mut parser = Parser::new(test_case.to_string()); - let program = parser.parse(); - - insta::with_settings!({ - description => test_case.to_string(), // the template source code - omit_expression => true // do not include the default expression - }, { - assert_debug_snapshot!(program); - }); - } - } - - #[test] - fn test_complete() { - let test_case = "def _handle_ticker_index(symbol): - ticker_index = symbols_data.get_ticker_index(symbol) - - if ticker_index is None: - market_symbol = get_symbol_info(symbol) - if market_symbol is not None: - symbols_data.append_symbol_to_file(market_symbol) - ticker_index = market_symbol.index - return ticker_index - - -def _extract_ticker_client_types_data(ticker_index: str) -> List: - url = TSE_CLIENT_TYPE_DATA_URL.format(ticker_index) - with requests_retry_session() as session: - response = session.get(url, timeout=5) - data = response.text.split(';') - return data"; - let mut parser = Parser::new(test_case.to_string()); - let program = parser.parse(); - - insta::with_settings!({ - description => test_case.to_string(), // the template source code - omit_expression => true // do not include the default expression - }, { - assert_debug_snapshot!(program); - }); - } - #[test] fn test_match_statement() { for test_case in &[ @@ -3694,4 +3593,38 @@ def _extract_ticker_client_types_data(ticker_index: str) -> List: }); } } + + #[test] + fn test_complete() { + glob!("../../test_data", "inputs/*.py", |path| { + let test_case = fs::read_to_string(path).unwrap(); + let mut parser = Parser::new(test_case.clone()); + let program = parser.parse(); + + insta::with_settings!({ + description => test_case, // the template source code + omit_expression => true // do not include the default expression + }, { + assert_debug_snapshot!(program); + }); + }); + } + + #[test] + fn test_one_liners() { + glob!("../../test_data", "inputs/one_liners/*.py", |path| { + let input = fs::read_to_string(path).unwrap(); + for test_case in input.split("\n\n") { + let mut parser = Parser::new(test_case.to_string()); + let program = parser.parse(); + + insta::with_settings!({ + description => test_case, // the template source code + omit_expression => true // do not include the default expression + }, { + assert_debug_snapshot!(program); + }); + } + }); + } } diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comment.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comment.snap index fef5218a..584f7fa2 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comment.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comment.snap @@ -1,6 +1,6 @@ --- source: parser/src/parser/parser.rs -expression: program +description: "# a" --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__complete.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__complete.snap index f120c23d..90715736 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__complete.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__complete.snap @@ -1,18 +1,19 @@ --- source: parser/src/parser/parser.rs -description: "def _handle_ticker_index(symbol):\n ticker_index = symbols_data.get_ticker_index(symbol)\n\n if ticker_index is None:\n market_symbol = get_symbol_info(symbol)\n if market_symbol is not None:\n symbols_data.append_symbol_to_file(market_symbol)\n ticker_index = market_symbol.index\n return ticker_index\n\n\ndef _extract_ticker_client_types_data(ticker_index: str) -> List:\n url = TSE_CLIENT_TYPE_DATA_URL.format(ticker_index)\n with requests_retry_session() as session:\n response = session.get(url, timeout=5)\n data = response.text.split(';')\n return data" +description: "def _handle_ticker_index(symbol):\n ticker_index = symbols_data.get_ticker_index(symbol)\n\n if ticker_index is None:\n market_symbol = get_symbol_info(symbol)\n if market_symbol is not None:\n symbols_data.append_symbol_to_file(market_symbol)\n ticker_index = market_symbol.index\n return ticker_index\n\n\ndef _extract_ticker_client_types_data(ticker_index: str) -> List:\n url = TSE_CLIENT_TYPE_DATA_URL.format(ticker_index)\n with requests_retry_session() as session:\n response = session.get(url, timeout=5)\n data = response.text.split(';')\n return data\n" +input_file: parser/test_data/inputs/functions.py --- Module { node: Node { start: 0, - end: 608, + end: 609, }, body: [ FunctionDef( FunctionDef { node: Node { start: 0, - end: 608, + end: 609, }, name: "_handle_ticker_index", args: Arguments { @@ -333,7 +334,7 @@ Module { FunctionDef { node: Node { start: 342, - end: 608, + end: 609, }, name: "_extract_ticker_client_types_data", args: Arguments { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-2.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-2.snap deleted file mode 100644 index c2088dd8..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-2.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b,\n c: d}" ---- -Module { - node: Node { - start: 0, - end: 24, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 24, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 22, - end: 23, - }, - id: "d", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-3.snap deleted file mode 100644 index 8c195943..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-3.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b\n , c: d}" ---- -Module { - node: Node { - start: 0, - end: 25, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 25, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 20, - end: 21, - }, - id: "c", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 23, - end: 24, - }, - id: "d", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-4.snap deleted file mode 100644 index 1273ab09..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-4.snap +++ /dev/null @@ -1,80 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b,\n c: d,\n e: f}" ---- -Module { - node: Node { - start: 0, - end: 46, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 46, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - Name( - Name { - node: Node { - start: 41, - end: 42, - }, - id: "e", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 22, - end: 23, - }, - id: "d", - }, - ), - Name( - Name { - node: Node { - start: 44, - end: 45, - }, - id: "f", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-5.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-5.snap deleted file mode 100644 index 7985a95d..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-5.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b,\n }" ---- -Module { - node: Node { - start: 0, - end: 20, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 20, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-6.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-6.snap deleted file mode 100644 index db3cb31b..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict-6.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b, c: d,}" ---- -Module { - node: Node { - start: 0, - end: 13, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 13, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "c", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "d", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-2.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-2.snap deleted file mode 100644 index b8375e29..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-2.snap +++ /dev/null @@ -1,69 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: (a for a in b if c) ---- -Module { - node: Node { - start: 0, - end: 19, - }, - body: [ - ExpressionStatement( - Generator( - Generator { - node: Node { - start: 0, - end: 19, - }, - element: Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - generators: [ - Comprehension { - node: Node { - start: 3, - end: 18, - }, - target: Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "a", - }, - ), - iter: Name( - Name { - node: Node { - start: 12, - end: 13, - }, - id: "b", - }, - ), - ifs: [ - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "c", - }, - ), - ], - is_async: false, - }, - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-3.snap deleted file mode 100644 index d719166e..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-3.snap +++ /dev/null @@ -1,78 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: (a for a in b if c if d) ---- -Module { - node: Node { - start: 0, - end: 24, - }, - body: [ - ExpressionStatement( - Generator( - Generator { - node: Node { - start: 0, - end: 24, - }, - element: Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - generators: [ - Comprehension { - node: Node { - start: 3, - end: 23, - }, - target: Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "a", - }, - ), - iter: Name( - Name { - node: Node { - start: 12, - end: 13, - }, - id: "b", - }, - ), - ifs: [ - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "c", - }, - ), - Name( - Name { - node: Node { - start: 22, - end: 23, - }, - id: "d", - }, - ), - ], - is_async: false, - }, - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-4.snap deleted file mode 100644 index 527bce43..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-4.snap +++ /dev/null @@ -1,85 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: (a for a in b for c in d) ---- -Module { - node: Node { - start: 0, - end: 25, - }, - body: [ - ExpressionStatement( - Generator( - Generator { - node: Node { - start: 0, - end: 25, - }, - element: Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - generators: [ - Comprehension { - node: Node { - start: 3, - end: 13, - }, - target: Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "a", - }, - ), - iter: Name( - Name { - node: Node { - start: 12, - end: 13, - }, - id: "b", - }, - ), - ifs: [], - is_async: false, - }, - Comprehension { - node: Node { - start: 14, - end: 24, - }, - target: Name( - Name { - node: Node { - start: 18, - end: 19, - }, - id: "c", - }, - ), - iter: Name( - Name { - node: Node { - start: 23, - end: 24, - }, - id: "d", - }, - ), - ifs: [], - is_async: false, - }, - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-5.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-5.snap deleted file mode 100644 index db9b0cbc..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression-5.snap +++ /dev/null @@ -1,107 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: (ord(c) for line in file for c in line) ---- -Module { - node: Node { - start: 0, - end: 39, - }, - body: [ - ExpressionStatement( - Generator( - Generator { - node: Node { - start: 0, - end: 39, - }, - element: Call( - Call { - node: Node { - start: 1, - end: 7, - }, - func: Name( - Name { - node: Node { - start: 1, - end: 4, - }, - id: "ord", - }, - ), - args: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "c", - }, - ), - ], - keywords: [], - starargs: None, - kwargs: None, - }, - ), - generators: [ - Comprehension { - node: Node { - start: 8, - end: 24, - }, - target: Name( - Name { - node: Node { - start: 12, - end: 16, - }, - id: "line", - }, - ), - iter: Name( - Name { - node: Node { - start: 20, - end: 24, - }, - id: "file", - }, - ), - ifs: [], - is_async: false, - }, - Comprehension { - node: Node { - start: 25, - end: 38, - }, - target: Name( - Name { - node: Node { - start: 29, - end: 30, - }, - id: "c", - }, - ), - iter: Name( - Name { - node: Node { - start: 34, - end: 38, - }, - id: "line", - }, - ), - ifs: [], - is_async: false, - }, - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression.snap deleted file mode 100644 index 42d54829..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__generator_expression.snap +++ /dev/null @@ -1,59 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: (a for a in b) ---- -Module { - node: Node { - start: 0, - end: 14, - }, - body: [ - ExpressionStatement( - Generator( - Generator { - node: Node { - start: 0, - end: 14, - }, - element: Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - generators: [ - Comprehension { - node: Node { - start: 3, - end: 13, - }, - target: Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "a", - }, - ), - iter: Name( - Name { - node: Node { - start: 12, - end: 13, - }, - id: "b", - }, - ), - ifs: [], - is_async: false, - }, - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-2.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-2.snap deleted file mode 100644 index 12a879f3..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-2.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a,\n b, c]" ---- -Module { - node: Node { - start: 0, - end: 21, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 21, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-3.snap deleted file mode 100644 index 78ef8c2b..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-3.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a\n , b, c]" ---- -Module { - node: Node { - start: 0, - end: 22, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 22, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 20, - end: 21, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-4.snap deleted file mode 100644 index 0cbcce8a..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-4.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a,\n b,\n c]" ---- -Module { - node: Node { - start: 0, - end: 37, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 37, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 35, - end: 36, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-5.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-5.snap deleted file mode 100644 index 39aa0ae1..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-5.snap +++ /dev/null @@ -1,33 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a,\n ]" ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 17, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list.snap deleted file mode 100644 index 0b876026..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a, b, c]" ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 9, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-2.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-2.snap new file mode 100644 index 00000000..93b436f8 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-2.snap @@ -0,0 +1,73 @@ +--- +source: parser/src/parser/parser.rs +description: "{a: b,\nc: d}," +input_file: parser/test_data/inputs/one_liners/dict.py +--- +Module { + node: Node { + start: 0, + end: 13, + }, + body: [ + ExpressionStatement( + Tuple( + Tuple { + node: Node { + start: 0, + end: 13, + }, + elements: [ + Dict( + Dict { + node: Node { + start: 0, + end: 12, + }, + keys: [ + Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "c", + }, + ), + ], + values: [ + Name( + Name { + node: Node { + start: 4, + end: 5, + }, + id: "b", + }, + ), + Name( + Name { + node: Node { + start: 10, + end: 11, + }, + id: "d", + }, + ), + ], + }, + ), + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-3.snap new file mode 100644 index 00000000..3e1635c4 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-3.snap @@ -0,0 +1,73 @@ +--- +source: parser/src/parser/parser.rs +description: "{a: b\n, c: d}," +input_file: parser/test_data/inputs/one_liners/dict.py +--- +Module { + node: Node { + start: 0, + end: 14, + }, + body: [ + ExpressionStatement( + Tuple( + Tuple { + node: Node { + start: 0, + end: 14, + }, + elements: [ + Dict( + Dict { + node: Node { + start: 0, + end: 13, + }, + keys: [ + Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + Name( + Name { + node: Node { + start: 8, + end: 9, + }, + id: "c", + }, + ), + ], + values: [ + Name( + Name { + node: Node { + start: 4, + end: 5, + }, + id: "b", + }, + ), + Name( + Name { + node: Node { + start: 11, + end: 12, + }, + id: "d", + }, + ), + ], + }, + ), + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-4.snap new file mode 100644 index 00000000..81267725 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-4.snap @@ -0,0 +1,91 @@ +--- +source: parser/src/parser/parser.rs +description: "{a: b,\nc: d,\n e: f}," +input_file: parser/test_data/inputs/one_liners/dict.py +--- +Module { + node: Node { + start: 0, + end: 23, + }, + body: [ + ExpressionStatement( + Tuple( + Tuple { + node: Node { + start: 0, + end: 23, + }, + elements: [ + Dict( + Dict { + node: Node { + start: 0, + end: 22, + }, + keys: [ + Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "c", + }, + ), + Name( + Name { + node: Node { + start: 17, + end: 18, + }, + id: "e", + }, + ), + ], + values: [ + Name( + Name { + node: Node { + start: 4, + end: 5, + }, + id: "b", + }, + ), + Name( + Name { + node: Node { + start: 10, + end: 11, + }, + id: "d", + }, + ), + Name( + Name { + node: Node { + start: 20, + end: 21, + }, + id: "f", + }, + ), + ], + }, + ), + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-5.snap similarity index 60% rename from parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-4.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-5.snap index d78f0030..39fc29ef 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-4.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-5.snap @@ -1,42 +1,45 @@ --- source: parser/src/parser/parser.rs -description: "yield a, b, " +description: "{a: b,\n}," +input_file: parser/test_data/inputs/one_liners/dict.py --- Module { node: Node { start: 0, - end: 11, + end: 9, }, body: [ ExpressionStatement( - Yield( - Yield { + Tuple( + Tuple { node: Node { start: 0, - end: 11, + end: 9, }, - value: Some( - Tuple( - Tuple { + elements: [ + Dict( + Dict { node: Node { - start: 6, - end: 11, + start: 0, + end: 8, }, - elements: [ + keys: [ Name( Name { node: Node { - start: 6, - end: 7, + start: 1, + end: 2, }, id: "a", }, ), + ], + values: [ Name( Name { node: Node { - start: 9, - end: 10, + start: 4, + end: 5, }, id: "b", }, @@ -44,7 +47,7 @@ Module { ], }, ), - ), + ], }, ), ), diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-6.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-6.snap similarity index 97% rename from parser/src/parser/snapshots/parser__parser__parser__tests__dict-6.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-6.snap index db3cb31b..d622ef3e 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-6.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-6.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: "{a: b, c: d,}" +input_file: parser/test_data/inputs/one_liners/dict.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-7.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-7.snap new file mode 100644 index 00000000..0a17e266 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-7.snap @@ -0,0 +1,85 @@ +--- +source: parser/src/parser/parser.rs +description: "{1: \"name\" for name in get_names()}" +input_file: parser/test_data/inputs/one_liners/dict.py +--- +Module { + node: Node { + start: 0, + end: 35, + }, + body: [ + ExpressionStatement( + DictComp( + DictComp { + node: Node { + start: 0, + end: 35, + }, + key: Constant( + Constant { + node: Node { + start: 1, + end: 2, + }, + value: Int( + "1", + ), + }, + ), + value: Constant( + Constant { + node: Node { + start: 4, + end: 10, + }, + value: Str( + "name", + ), + }, + ), + generators: [ + Comprehension { + node: Node { + start: 11, + end: 34, + }, + target: Name( + Name { + node: Node { + start: 15, + end: 19, + }, + id: "name", + }, + ), + iter: Call( + Call { + node: Node { + start: 23, + end: 34, + }, + func: Name( + Name { + node: Node { + start: 23, + end: 32, + }, + id: "get_names", + }, + ), + args: [], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-8.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-8.snap new file mode 100644 index 00000000..6af46f8d --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py-8.snap @@ -0,0 +1,85 @@ +--- +source: parser/src/parser/parser.rs +description: "{1: \"name\" for name in get_names()\n}\n" +input_file: parser/test_data/inputs/one_liners/dict.py +--- +Module { + node: Node { + start: 0, + end: 37, + }, + body: [ + ExpressionStatement( + DictComp( + DictComp { + node: Node { + start: 0, + end: 36, + }, + key: Constant( + Constant { + node: Node { + start: 1, + end: 2, + }, + value: Int( + "1", + ), + }, + ), + value: Constant( + Constant { + node: Node { + start: 4, + end: 10, + }, + value: Str( + "name", + ), + }, + ), + generators: [ + Comprehension { + node: Node { + start: 11, + end: 34, + }, + target: Name( + Name { + node: Node { + start: 15, + end: 19, + }, + id: "name", + }, + ), + iter: Call( + Call { + node: Node { + start: 23, + end: 34, + }, + func: Name( + Name { + node: Node { + start: 23, + end: 32, + }, + id: "get_names", + }, + ), + args: [], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py.snap similarity index 97% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py.snap index 57974b49..263a19ce 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__dict.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@dict.py.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: "{a: b, c: d}" +input_file: parser/test_data/inputs/one_liners/dict.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-2.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-2.snap similarity index 96% rename from parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-2.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-2.snap index b8375e29..0ed8e06d 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-2.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-2.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: (a for a in b if c) +input_file: parser/test_data/inputs/one_liners/generator_expressions.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-3.snap similarity index 97% rename from parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-3.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-3.snap index d719166e..00588146 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-3.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-3.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: (a for a in b if c if d) +input_file: parser/test_data/inputs/one_liners/generator_expressions.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-4.snap similarity index 97% rename from parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-4.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-4.snap index 527bce43..22971e04 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-4.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-4.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: (a for a in b for c in d) +input_file: parser/test_data/inputs/one_liners/generator_expressions.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-5.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-5.snap similarity index 98% rename from parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-5.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-5.snap index db9b0cbc..60b13057 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression-5.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-5.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: (ord(c) for line in file for c in line) +input_file: parser/test_data/inputs/one_liners/generator_expressions.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-6.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-6.snap new file mode 100644 index 00000000..048774d6 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py-6.snap @@ -0,0 +1,204 @@ +--- +source: parser/src/parser/parser.rs +description: "(x*y for x in range(10) for y in range(10) if x*y > 10)\n" +input_file: parser/test_data/inputs/one_liners/generator_expressions.py +--- +Module { + node: Node { + start: 0, + end: 56, + }, + body: [ + ExpressionStatement( + Generator( + Generator { + node: Node { + start: 0, + end: 55, + }, + element: BinOp( + BinOp { + node: Node { + start: 1, + end: 4, + }, + op: Mult, + left: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "x", + }, + ), + right: Name( + Name { + node: Node { + start: 3, + end: 4, + }, + id: "y", + }, + ), + }, + ), + generators: [ + Comprehension { + node: Node { + start: 5, + end: 23, + }, + target: Name( + Name { + node: Node { + start: 9, + end: 10, + }, + id: "x", + }, + ), + iter: Call( + Call { + node: Node { + start: 14, + end: 23, + }, + func: Name( + Name { + node: Node { + start: 14, + end: 19, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 20, + end: 22, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + Comprehension { + node: Node { + start: 24, + end: 54, + }, + target: Name( + Name { + node: Node { + start: 28, + end: 29, + }, + id: "y", + }, + ), + iter: Call( + Call { + node: Node { + start: 33, + end: 42, + }, + func: Name( + Name { + node: Node { + start: 33, + end: 38, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 39, + end: 41, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [ + Compare( + Compare { + node: Node { + start: 46, + end: 54, + }, + left: BinOp( + BinOp { + node: Node { + start: 46, + end: 49, + }, + op: Mult, + left: Name( + Name { + node: Node { + start: 46, + end: 47, + }, + id: "x", + }, + ), + right: Name( + Name { + node: Node { + start: 48, + end: 49, + }, + id: "y", + }, + ), + }, + ), + ops: [ + Gt, + ], + comparators: [ + Constant( + Constant { + node: Node { + start: 52, + end: 54, + }, + value: Int( + "10", + ), + }, + ), + ], + }, + ), + ], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py.snap similarity index 96% rename from parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py.snap index 42d54829..7cad2cbe 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__generator_expression.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@generator_expressions.py.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: (a for a in b) +input_file: parser/test_data/inputs/one_liners/generator_expressions.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-10.snap similarity index 97% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-3.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-10.snap index fa82d658..fa30520c 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-3.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-10.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: "[a for a in b if c if d]" +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-11.snap similarity index 96% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-4.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-11.snap index 3a20a8da..54507533 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-4.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-11.snap @@ -1,11 +1,12 @@ --- source: parser/src/parser/parser.rs -description: "[a for a in b for c in d]" +description: "[a for a in b for c in d]\n" +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { start: 0, - end: 25, + end: 26, }, body: [ ExpressionStatement( diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-2.snap similarity index 54% rename from parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-3.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-2.snap index 4054102e..c2634013 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-3.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-2.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs -description: "yield a, b" +description: "[a,\nb, c]," +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { @@ -9,25 +10,25 @@ Module { }, body: [ ExpressionStatement( - Yield( - Yield { + Tuple( + Tuple { node: Node { start: 0, end: 10, }, - value: Some( - Tuple( - Tuple { + elements: [ + List( + List { node: Node { - start: 6, - end: 10, + start: 0, + end: 9, }, elements: [ Name( Name { node: Node { - start: 6, - end: 7, + start: 1, + end: 2, }, id: "a", }, @@ -35,16 +36,25 @@ Module { Name( Name { node: Node { - start: 9, - end: 10, + start: 4, + end: 5, }, id: "b", }, ), + Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "c", + }, + ), ], }, ), - ), + ], }, ), ), diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-3.snap similarity index 60% rename from parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-3.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-3.snap index e4712015..7e8887c9 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-3.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-3.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs -description: a or b or c +description: "[a\n, b, c]," +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { @@ -9,31 +10,29 @@ Module { }, body: [ ExpressionStatement( - BoolOp( - BoolOperation { + Tuple( + Tuple { node: Node { start: 0, end: 11, }, - op: Or, - values: [ - Name( - Name { + elements: [ + List( + List { node: Node { start: 0, - end: 1, + end: 10, }, - id: "a", - }, - ), - BoolOp( - BoolOperation { - node: Node { - start: 5, - end: 11, - }, - op: Or, - values: [ + elements: [ + Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), Name( Name { node: Node { @@ -46,8 +45,8 @@ Module { Name( Name { node: Node { - start: 10, - end: 11, + start: 8, + end: 9, }, id: "c", }, diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-4.snap similarity index 53% rename from parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-4.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-4.snap index 633354fc..90d20781 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-4.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-4.snap @@ -1,35 +1,34 @@ --- source: parser/src/parser/parser.rs -description: a and b or c +description: "[a,\nb,\n c]," +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { start: 0, - end: 12, + end: 14, }, body: [ ExpressionStatement( - BoolOp( - BoolOperation { + Tuple( + Tuple { node: Node { start: 0, - end: 12, + end: 14, }, - op: Or, - values: [ - BoolOp( - BoolOperation { + elements: [ + List( + List { node: Node { start: 0, - end: 7, + end: 13, }, - op: And, - values: [ + elements: [ Name( Name { node: Node { - start: 0, - end: 1, + start: 1, + end: 2, }, id: "a", }, @@ -37,24 +36,24 @@ Module { Name( Name { node: Node { - start: 6, - end: 7, + start: 4, + end: 5, }, id: "b", }, ), + Name( + Name { + node: Node { + start: 11, + end: 12, + }, + id: "c", + }, + ), ], }, ), - Name( - Name { - node: Node { - start: 11, - end: 12, - }, - id: "c", - }, - ), ], }, ), diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-5.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-5.snap new file mode 100644 index 00000000..7af977f9 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-5.snap @@ -0,0 +1,44 @@ +--- +source: parser/src/parser/parser.rs +description: "[a,\n]," +input_file: parser/test_data/inputs/one_liners/lists.py +--- +Module { + node: Node { + start: 0, + end: 6, + }, + body: [ + ExpressionStatement( + Tuple( + Tuple { + node: Node { + start: 0, + end: 6, + }, + elements: [ + List( + List { + node: Node { + start: 0, + end: 5, + }, + elements: [ + Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + ], + }, + ), + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__list-6.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-6.snap similarity index 96% rename from parser/src/parser/snapshots/parser__parser__parser__tests__list-6.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-6.snap index d3e27626..7a1fcc69 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__list-6.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-6.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: "[a, b, c,]" +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-7.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-7.snap similarity index 82% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-7.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-7.snap index a64be057..be4502ac 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-7.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-7.snap @@ -1,18 +1,19 @@ --- source: parser/src/parser/parser.rs -description: "month_names = ['Januari', 'Februari', 'Maart', # These are the\n 'April', 'Mei', 'Juni', # Dutch names\n 'Juli', 'Augustus', 'September', # for the months\n 'Oktober', 'November', 'December'] # of the year" +description: "month_names = ['Januari', 'Februari', 'Maart', # These are the\n 'April', 'Mei', 'Juni', # Dutch names\n 'Juli', 'Augustus', 'September', # for the months\n 'Oktober', 'November', 'December'] # of the year," +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { start: 0, - end: 268, + end: 233, }, body: [ AssignStatement( Assign { node: Node { start: 0, - end: 252, + end: 216, }, targets: [ Name( @@ -29,7 +30,7 @@ Module { List { node: Node { start: 14, - end: 252, + end: 216, }, elements: [ Constant( @@ -68,8 +69,8 @@ Module { Constant( Constant { node: Node { - start: 83, - end: 90, + start: 71, + end: 78, }, value: Str( "April", @@ -79,8 +80,8 @@ Module { Constant( Constant { node: Node { - start: 94, - end: 99, + start: 82, + end: 87, }, value: Str( "Mei", @@ -90,8 +91,8 @@ Module { Constant( Constant { node: Node { - start: 106, - end: 112, + start: 94, + end: 100, }, value: Str( "Juni", @@ -101,8 +102,8 @@ Module { Constant( Constant { node: Node { - start: 149, - end: 155, + start: 125, + end: 131, }, value: Str( "Juli", @@ -112,8 +113,8 @@ Module { Constant( Constant { node: Node { - start: 160, - end: 170, + start: 136, + end: 146, }, value: Str( "Augustus", @@ -123,8 +124,8 @@ Module { Constant( Constant { node: Node { - start: 172, - end: 183, + start: 148, + end: 159, }, value: Str( "September", @@ -134,8 +135,8 @@ Module { Constant( Constant { node: Node { - start: 218, - end: 227, + start: 182, + end: 191, }, value: Str( "Oktober", @@ -145,8 +146,8 @@ Module { Constant( Constant { node: Node { - start: 229, - end: 239, + start: 193, + end: 203, }, value: Str( "November", @@ -156,8 +157,8 @@ Module { Constant( Constant { node: Node { - start: 241, - end: 251, + start: 205, + end: 215, }, value: Str( "December", diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-8.snap similarity index 97% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-8.snap index e1994a72..23eb9518 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-8.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: "[a for a in b]" +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-2.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-9.snap similarity index 97% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-2.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-9.snap index 83b0f677..71d2c616 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__comprehension_expressions-2.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py-9.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: "[a for a in b if c]" +input_file: parser/test_data/inputs/one_liners/lists.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py.snap new file mode 100644 index 00000000..f327309e --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@lists.py.snap @@ -0,0 +1,52 @@ +--- +source: parser/src/parser/parser.rs +description: "\n[a, b, c]" +input_file: parser/test_data/inputs/one_liners/lists.py +--- +Module { + node: Node { + start: 0, + end: 10, + }, + body: [ + ExpressionStatement( + List( + List { + node: Node { + start: 1, + end: 10, + }, + elements: [ + Name( + Name { + node: Node { + start: 2, + end: 3, + }, + id: "a", + }, + ), + Name( + Name { + node: Node { + start: 5, + end: 6, + }, + id: "b", + }, + ), + Name( + Name { + node: Node { + start: 8, + end: 9, + }, + id: "c", + }, + ), + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-10.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-10.snap new file mode 100644 index 00000000..b8dcb864 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-10.snap @@ -0,0 +1,84 @@ +--- +source: parser/src/parser/parser.rs +description: "{a for a in range(10)}" +input_file: parser/test_data/inputs/one_liners/sets.py +--- +Module { + node: Node { + start: 0, + end: 22, + }, + body: [ + ExpressionStatement( + SetComp( + SetComp { + node: Node { + start: 0, + end: 22, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 21, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Call( + Call { + node: Node { + start: 12, + end: 21, + }, + func: Name( + Name { + node: Node { + start: 12, + end: 17, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 18, + end: 20, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-11.snap similarity index 57% rename from parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-4.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-11.snap index ce74a13c..98b3d628 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-4.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-11.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs -description: "for a in range(10), range(10):\n a = 1\n" +description: "{a for a in range(10) for b in range(10)}" +input_file: parser/test_data/inputs/one_liners/sets.py --- Module { node: Node { @@ -8,39 +9,48 @@ Module { end: 41, }, body: [ - ForStatement( - For { - node: Node { - start: 0, - end: 41, - }, - target: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "a", + ExpressionStatement( + SetComp( + SetComp { + node: Node { + start: 0, + end: 41, }, - ), - iter: Tuple( - Tuple { - node: Node { - start: 0, - end: 29, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", }, - elements: [ - Call( + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 21, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Call( Call { node: Node { - start: 9, - end: 18, + start: 12, + end: 21, }, func: Name( Name { node: Node { - start: 9, - end: 14, + start: 12, + end: 17, }, id: "range", }, @@ -49,8 +59,8 @@ Module { Constant( Constant { node: Node { - start: 15, - end: 17, + start: 18, + end: 20, }, value: Int( "10", @@ -63,17 +73,34 @@ Module { kwargs: None, }, ), - Call( + ifs: [], + is_async: false, + }, + Comprehension { + node: Node { + start: 22, + end: 40, + }, + target: Name( + Name { + node: Node { + start: 26, + end: 27, + }, + id: "b", + }, + ), + iter: Call( Call { node: Node { - start: 20, - end: 29, + start: 31, + end: 40, }, func: Name( Name { node: Node { - start: 20, - end: 25, + start: 31, + end: 36, }, id: "range", }, @@ -82,8 +109,8 @@ Module { Constant( Constant { node: Node { - start: 26, - end: 28, + start: 37, + end: 39, }, value: Int( "10", @@ -96,43 +123,12 @@ Module { kwargs: None, }, ), - ], - }, - ), - body: [ - AssignStatement( - Assign { - node: Node { - start: 35, - end: 40, - }, - targets: [ - Name( - Name { - node: Node { - start: 35, - end: 36, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 39, - end: 40, - }, - value: Int( - "1", - ), - }, - ), + ifs: [], + is_async: false, }, - ), - ], - orelse: [], - }, + ], + }, + ), ), ], } diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-12.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-12.snap new file mode 100644 index 00000000..2ed3a73d --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-12.snap @@ -0,0 +1,134 @@ +--- +source: parser/src/parser/parser.rs +description: "{a for a in range(10) for b in range(10)\n}" +input_file: parser/test_data/inputs/one_liners/sets.py +--- +Module { + node: Node { + start: 0, + end: 42, + }, + body: [ + ExpressionStatement( + SetComp( + SetComp { + node: Node { + start: 0, + end: 42, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 21, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Call( + Call { + node: Node { + start: 12, + end: 21, + }, + func: Name( + Name { + node: Node { + start: 12, + end: 17, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 18, + end: 20, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + Comprehension { + node: Node { + start: 22, + end: 40, + }, + target: Name( + Name { + node: Node { + start: 26, + end: 27, + }, + id: "b", + }, + ), + iter: Call( + Call { + node: Node { + start: 31, + end: 40, + }, + func: Name( + Name { + node: Node { + start: 31, + end: 36, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 37, + end: 39, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-13.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-13.snap new file mode 100644 index 00000000..7e5ff0fb --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-13.snap @@ -0,0 +1,134 @@ +--- +source: parser/src/parser/parser.rs +description: "{a for a in range(11) for b in range(10)\n}" +input_file: parser/test_data/inputs/one_liners/sets.py +--- +Module { + node: Node { + start: 0, + end: 42, + }, + body: [ + ExpressionStatement( + SetComp( + SetComp { + node: Node { + start: 0, + end: 42, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 21, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Call( + Call { + node: Node { + start: 12, + end: 21, + }, + func: Name( + Name { + node: Node { + start: 12, + end: 17, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 18, + end: 20, + }, + value: Int( + "11", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + Comprehension { + node: Node { + start: 22, + end: 40, + }, + target: Name( + Name { + node: Node { + start: 26, + end: 27, + }, + id: "b", + }, + ), + iter: Call( + Call { + node: Node { + start: 31, + end: 40, + }, + func: Name( + Name { + node: Node { + start: 31, + end: 36, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 37, + end: 39, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-14.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-14.snap new file mode 100644 index 00000000..d2ad0531 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-14.snap @@ -0,0 +1,153 @@ +--- +source: parser/src/parser/parser.rs +description: "{\n (a,b) for a in range(11) for b in range(10)\n}\n" +input_file: parser/test_data/inputs/one_liners/sets.py +--- +Module { + node: Node { + start: 0, + end: 52, + }, + body: [ + ExpressionStatement( + SetComp( + SetComp { + node: Node { + start: 0, + end: 51, + }, + element: Tuple( + Tuple { + node: Node { + start: 6, + end: 10, + }, + elements: [ + Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + Name( + Name { + node: Node { + start: 9, + end: 10, + }, + id: "b", + }, + ), + ], + }, + ), + generators: [ + Comprehension { + node: Node { + start: 12, + end: 30, + }, + target: Name( + Name { + node: Node { + start: 16, + end: 17, + }, + id: "a", + }, + ), + iter: Call( + Call { + node: Node { + start: 21, + end: 30, + }, + func: Name( + Name { + node: Node { + start: 21, + end: 26, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 27, + end: 29, + }, + value: Int( + "11", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + Comprehension { + node: Node { + start: 31, + end: 49, + }, + target: Name( + Name { + node: Node { + start: 35, + end: 36, + }, + id: "b", + }, + ), + iter: Call( + Call { + node: Node { + start: 40, + end: 49, + }, + func: Name( + Name { + node: Node { + start: 40, + end: 45, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 46, + end: 48, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-2.snap similarity index 94% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-2.snap index 11f1faca..58be00fb 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-2.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs -description: "{a, b, c}" +description: "{a,\nb, c}" +input_file: parser/test_data/inputs/one_liners/sets.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-6.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-3.snap similarity index 80% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-6.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-3.snap index d3e27626..bef1fbcd 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__list-6.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-3.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs -description: "[a, b, c,]" +description: "{a\n, b, c}" +input_file: parser/test_data/inputs/one_liners/sets.py --- Module { node: Node { @@ -9,8 +10,8 @@ Module { }, body: [ ExpressionStatement( - List( - List { + Set( + Set { node: Node { start: 0, end: 10, @@ -28,8 +29,8 @@ Module { Name( Name { node: Node { - start: 4, - end: 5, + start: 5, + end: 6, }, id: "b", }, @@ -37,8 +38,8 @@ Module { Name( Name { node: Node { - start: 7, - end: 8, + start: 8, + end: 9, }, id: "c", }, diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__set-6.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-4.snap similarity index 84% rename from parser/src/parser/snapshots/parser__parser__parser__tests__set-6.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-4.snap index 20564048..9a42d905 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__set-6.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-4.snap @@ -1,11 +1,12 @@ --- source: parser/src/parser/parser.rs -description: "{a, b, c,}" +description: "{a,\nb,\n c}" +input_file: parser/test_data/inputs/one_liners/sets.py --- Module { node: Node { start: 0, - end: 10, + end: 13, }, body: [ ExpressionStatement( @@ -13,7 +14,7 @@ Module { Set { node: Node { start: 0, - end: 10, + end: 13, }, elements: [ Name( @@ -37,8 +38,8 @@ Module { Name( Name { node: Node { - start: 7, - end: 8, + start: 11, + end: 12, }, id: "c", }, diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-5.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-5.snap similarity index 84% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-5.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-5.snap index 455666ff..59e545ca 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-5.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-5.snap @@ -1,11 +1,12 @@ --- source: parser/src/parser/parser.rs -description: "{a,\n }" +description: "{a,\n}" +input_file: parser/test_data/inputs/one_liners/sets.py --- Module { node: Node { start: 0, - end: 17, + end: 5, }, body: [ ExpressionStatement( @@ -13,7 +14,7 @@ Module { Set { node: Node { start: 0, - end: 17, + end: 5, }, elements: [ Name( diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-6.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-6.snap similarity index 96% rename from parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-6.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-6.snap index 20564048..a920ba56 100644 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-6.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-6.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: "{a, b, c,}" +input_file: parser/test_data/inputs/one_liners/sets.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-7.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-7.snap new file mode 100644 index 00000000..b8dcb864 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-7.snap @@ -0,0 +1,84 @@ +--- +source: parser/src/parser/parser.rs +description: "{a for a in range(10)}" +input_file: parser/test_data/inputs/one_liners/sets.py +--- +Module { + node: Node { + start: 0, + end: 22, + }, + body: [ + ExpressionStatement( + SetComp( + SetComp { + node: Node { + start: 0, + end: 22, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 21, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Call( + Call { + node: Node { + start: 12, + end: 21, + }, + func: Name( + Name { + node: Node { + start: 12, + end: 17, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 18, + end: 20, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-8.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-8.snap new file mode 100644 index 00000000..0bb9133d --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-8.snap @@ -0,0 +1,84 @@ +--- +source: parser/src/parser/parser.rs +description: "{a for a in range(10)\n}" +input_file: parser/test_data/inputs/one_liners/sets.py +--- +Module { + node: Node { + start: 0, + end: 23, + }, + body: [ + ExpressionStatement( + SetComp( + SetComp { + node: Node { + start: 0, + end: 23, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 21, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Call( + Call { + node: Node { + start: 12, + end: 21, + }, + func: Name( + Name { + node: Node { + start: 12, + end: 17, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 18, + end: 20, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-9.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-9.snap new file mode 100644 index 00000000..b8dcb864 --- /dev/null +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py-9.snap @@ -0,0 +1,84 @@ +--- +source: parser/src/parser/parser.rs +description: "{a for a in range(10)}" +input_file: parser/test_data/inputs/one_liners/sets.py +--- +Module { + node: Node { + start: 0, + end: 22, + }, + body: [ + ExpressionStatement( + SetComp( + SetComp { + node: Node { + start: 0, + end: 22, + }, + element: Name( + Name { + node: Node { + start: 1, + end: 2, + }, + id: "a", + }, + ), + generators: [ + Comprehension { + node: Node { + start: 3, + end: 21, + }, + target: Name( + Name { + node: Node { + start: 7, + end: 8, + }, + id: "a", + }, + ), + iter: Call( + Call { + node: Node { + start: 12, + end: 21, + }, + func: Name( + Name { + node: Node { + start: 12, + end: 17, + }, + id: "range", + }, + ), + args: [ + Constant( + Constant { + node: Node { + start: 18, + end: 20, + }, + value: Int( + "10", + ), + }, + ), + ], + keywords: [], + starargs: None, + kwargs: None, + }, + ), + ifs: [], + is_async: false, + }, + ], + }, + ), + ), + ], +} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__set.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py.snap similarity index 96% rename from parser/src/parser/snapshots/parser__parser__parser__tests__set.snap rename to parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py.snap index 11f1faca..1928df11 100644 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__set.snap +++ b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__one_liners@sets.py.snap @@ -1,6 +1,7 @@ --- source: parser/src/parser/parser.rs description: "{a, b, c}" +input_file: parser/test_data/inputs/one_liners/sets.py --- Module { node: Node { diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-2.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-2.snap deleted file mode 100644 index d6d06986..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-2.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a,\n b, c}" ---- -Module { - node: Node { - start: 0, - end: 21, - }, - body: [ - ExpressionStatement( - Set( - Set { - node: Node { - start: 0, - end: 21, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-3.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-3.snap deleted file mode 100644 index b2911a4f..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-3.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a\n , b, c}" ---- -Module { - node: Node { - start: 0, - end: 22, - }, - body: [ - ExpressionStatement( - Set( - Set { - node: Node { - start: 0, - end: 22, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 20, - end: 21, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-4.snap b/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-4.snap deleted file mode 100644 index 171bf7fa..00000000 --- a/parser/src/parser/snapshots/enderpy_python_parser__parser__parser__tests__set-4.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a,\n b,\n c}" ---- -Module { - node: Node { - start: 0, - end: 37, - }, - body: [ - ExpressionStatement( - Set( - Set { - node: Node { - start: 0, - end: 37, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 35, - end: 36, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-2.snap deleted file mode 100644 index aa38bb3d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-2.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a.b.c ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - Attribute( - Attribute { - node: Node { - start: 0, - end: 5, - }, - value: Attribute( - Attribute { - node: Node { - start: 0, - end: 3, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - attr: "b", - }, - ), - attr: "c", - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-3.snap deleted file mode 100644 index 4c447731..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-3.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a.b_c ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - Attribute( - Attribute { - node: Node { - start: 0, - end: 5, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - attr: "b_c", - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-4.snap deleted file mode 100644 index d5820c7d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref-4.snap +++ /dev/null @@ -1,50 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a.b.c.d ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - ExpressionStatement( - Attribute( - Attribute { - node: Node { - start: 0, - end: 7, - }, - value: Attribute( - Attribute { - node: Node { - start: 0, - end: 5, - }, - value: Attribute( - Attribute { - node: Node { - start: 0, - end: 3, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - attr: "b", - }, - ), - attr: "c", - }, - ), - attr: "d", - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref.snap deleted file mode 100644 index 5311d506..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__attribute_ref.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a.b ---- -Module { - node: Node { - start: 0, - end: 3, - }, - body: [ - ExpressionStatement( - Attribute( - Attribute { - node: Node { - start: 0, - end: 3, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - attr: "b", - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__await_expression.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__await_expression.snap deleted file mode 100644 index 995db5b6..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__await_expression.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: await a ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - ExpressionStatement( - Await( - Await { - node: Node { - start: 0, - end: 7, - }, - value: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-10.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-10.snap deleted file mode 100644 index a5fda538..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-10.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a & b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: BitAnd, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-11.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-11.snap deleted file mode 100644 index 6a85ffb7..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-11.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a ^ b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: BitXor, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-12.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-12.snap deleted file mode 100644 index 24b97acd..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-12.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a | b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: BitOr, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-13.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-13.snap deleted file mode 100644 index bf60e5ec..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-13.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a @ b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: MatMult, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-2.snap deleted file mode 100644 index 07b94728..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-2.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a - b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: Sub, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-3.snap deleted file mode 100644 index ba1ab5cd..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-3.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a * b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: Mult, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-4.snap deleted file mode 100644 index 8c0835af..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-4.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a / b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: Div, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-5.snap deleted file mode 100644 index 1c96661f..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-5.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a // b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 6, - }, - op: FloorDiv, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-6.snap deleted file mode 100644 index 84b0d2bf..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-6.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a % b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: Mod, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-7.snap deleted file mode 100644 index ee27545d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-7.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a ** b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 6, - }, - op: Pow, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-8.snap deleted file mode 100644 index 458e6531..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-8.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a << b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 6, - }, - op: LShift, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-9.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-9.snap deleted file mode 100644 index d6be34eb..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op-9.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a >> b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 6, - }, - op: RShift, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op.snap deleted file mode 100644 index 38156bc6..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__binary_op.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a + b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - BinOp( - BinOp { - node: Node { - start: 0, - end: 5, - }, - op: Add, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - right: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-2.snap deleted file mode 100644 index 72d44892..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-2.snap +++ /dev/null @@ -1,34 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "class a():\n pass" ---- -Module { - node: Node { - start: 0, - end: 19, - }, - body: [ - ClassDef( - ClassDef { - node: Node { - start: 0, - end: 19, - }, - name: "a", - bases: [], - keywords: [], - body: [ - Pass( - Pass { - node: Node { - start: 15, - end: 19, - }, - }, - ), - ], - decorator_list: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-3.snap deleted file mode 100644 index 41de1574..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-3.snap +++ /dev/null @@ -1,53 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "class a(b, c): pass" ---- -Module { - node: Node { - start: 0, - end: 19, - }, - body: [ - ClassDef( - ClassDef { - node: Node { - start: 0, - end: 19, - }, - name: "a", - bases: [ - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 11, - end: 12, - }, - id: "c", - }, - ), - ], - keywords: [], - body: [ - Pass( - Pass { - node: Node { - start: 15, - end: 19, - }, - }, - ), - ], - decorator_list: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-4.snap deleted file mode 100644 index e29eb852..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-4.snap +++ /dev/null @@ -1,78 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "class a(b, *c, **d): pass" ---- -Module { - node: Node { - start: 0, - end: 25, - }, - body: [ - ClassDef( - ClassDef { - node: Node { - start: 0, - end: 25, - }, - name: "a", - bases: [ - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "b", - }, - ), - Starred( - Starred { - node: Node { - start: 11, - end: 12, - }, - value: Name( - Name { - node: Node { - start: 12, - end: 13, - }, - id: "c", - }, - ), - }, - ), - ], - keywords: [ - Keyword { - node: Node { - start: 15, - end: 17, - }, - arg: None, - value: Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "d", - }, - ), - }, - ], - body: [ - Pass( - Pass { - node: Node { - start: 21, - end: 25, - }, - }, - ), - ], - decorator_list: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-5.snap deleted file mode 100644 index ab9e3b78..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-5.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "class a(b,\n c,\n d): pass" ---- -Module { - node: Node { - start: 0, - end: 54, - }, - body: [ - ClassDef( - ClassDef { - node: Node { - start: 0, - end: 54, - }, - name: "a", - bases: [ - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 27, - end: 28, - }, - id: "c", - }, - ), - Name( - Name { - node: Node { - start: 46, - end: 47, - }, - id: "d", - }, - ), - ], - keywords: [], - body: [ - Pass( - Pass { - node: Node { - start: 50, - end: 54, - }, - }, - ), - ], - decorator_list: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-6.snap deleted file mode 100644 index 8aae0057..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement-6.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "@decor\nclass a: pass" ---- -Module { - node: Node { - start: 0, - end: 20, - }, - body: [ - ClassDef( - ClassDef { - node: Node { - start: 7, - end: 20, - }, - name: "a", - bases: [], - keywords: [], - body: [ - Pass( - Pass { - node: Node { - start: 16, - end: 20, - }, - }, - ), - ], - decorator_list: [ - Name( - Name { - node: Node { - start: 1, - end: 6, - }, - id: "decor", - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement.snap deleted file mode 100644 index 00c4a7cb..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__class_def_statement.snap +++ /dev/null @@ -1,34 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "class a: pass" ---- -Module { - node: Node { - start: 0, - end: 13, - }, - body: [ - ClassDef( - ClassDef { - node: Node { - start: 0, - end: 13, - }, - name: "a", - bases: [], - keywords: [], - body: [ - Pass( - Pass { - node: Node { - start: 9, - end: 13, - }, - }, - ), - ], - decorator_list: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-10.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-10.snap deleted file mode 100644 index c65672de..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-10.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a not in b ---- -Module { - node: Node { - start: 0, - end: 10, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 10, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - NotIn, - ], - comparators: [ - Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-11.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-11.snap deleted file mode 100644 index 23360964..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-11.snap +++ /dev/null @@ -1,55 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a < b < c ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 9, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - Lt, - Lt, - ], - comparators: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-2.snap deleted file mode 100644 index 4a4f1dbc..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-2.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a != b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 6, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - NotEq, - ], - comparators: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-3.snap deleted file mode 100644 index 0f5060d4..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-3.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a > b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 5, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - Gt, - ], - comparators: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-4.snap deleted file mode 100644 index bfc057bf..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-4.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a < b ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 5, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - Lt, - ], - comparators: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-5.snap deleted file mode 100644 index 8877db21..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-5.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a >= b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 6, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - GtE, - ], - comparators: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-6.snap deleted file mode 100644 index a905a457..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-6.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a <= b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 6, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - LtE, - ], - comparators: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-7.snap deleted file mode 100644 index b8b3fff8..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-7.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a is b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 6, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - Is, - ], - comparators: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-8.snap deleted file mode 100644 index ff1b8ee8..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-8.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a is not b ---- -Module { - node: Node { - start: 0, - end: 10, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 10, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - IsNot, - ], - comparators: [ - Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-9.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-9.snap deleted file mode 100644 index cae71096..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison-9.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a in b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 6, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - In, - ], - comparators: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__comparison.snap deleted file mode 100644 index b04edfba..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__comparison.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a == b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - Compare( - Compare { - node: Node { - start: 0, - end: 6, - }, - left: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ops: [ - Eq, - ], - comparators: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__conditional_expression.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__conditional_expression.snap deleted file mode 100644 index 691ea8fa..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__conditional_expression.snap +++ /dev/null @@ -1,75 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a if b else c if d else e ---- -Module { - node: Node { - start: 0, - end: 25, - }, - body: [ - ExpressionStatement( - IfExp( - IfExp { - node: Node { - start: 25, - end: 0, - }, - test: Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - body: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - orelse: IfExp( - IfExp { - node: Node { - start: 25, - end: 0, - }, - test: Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "d", - }, - ), - body: Name( - Name { - node: Node { - start: 12, - end: 13, - }, - id: "c", - }, - ), - orelse: Name( - Name { - node: Node { - start: 24, - end: 25, - }, - id: "e", - }, - ), - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__dict-2.snap deleted file mode 100644 index c2088dd8..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-2.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b,\n c: d}" ---- -Module { - node: Node { - start: 0, - end: 24, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 24, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 22, - end: 23, - }, - id: "d", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__dict-3.snap deleted file mode 100644 index 8c195943..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-3.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b\n , c: d}" ---- -Module { - node: Node { - start: 0, - end: 25, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 25, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 20, - end: 21, - }, - id: "c", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 23, - end: 24, - }, - id: "d", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__dict-4.snap deleted file mode 100644 index 1273ab09..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-4.snap +++ /dev/null @@ -1,80 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b,\n c: d,\n e: f}" ---- -Module { - node: Node { - start: 0, - end: 46, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 46, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - Name( - Name { - node: Node { - start: 41, - end: 42, - }, - id: "e", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 22, - end: 23, - }, - id: "d", - }, - ), - Name( - Name { - node: Node { - start: 44, - end: 45, - }, - id: "f", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__dict-5.snap deleted file mode 100644 index 7985a95d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__dict-5.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b,\n }" ---- -Module { - node: Node { - start: 0, - end: 20, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 20, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__dict.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__dict.snap deleted file mode 100644 index 57974b49..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__dict.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a: b, c: d}" ---- -Module { - node: Node { - start: 0, - end: 12, - }, - body: [ - ExpressionStatement( - Dict( - Dict { - node: Node { - start: 0, - end: 12, - }, - keys: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "c", - }, - ), - ], - values: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "d", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-2.snap deleted file mode 100644 index aa888acc..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-2.snap +++ /dev/null @@ -1,49 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "for a in b:\n pass" ---- -Module { - node: Node { - start: 0, - end: 20, - }, - body: [ - ForStatement( - For { - node: Node { - start: 0, - end: 20, - }, - target: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "a", - }, - ), - iter: Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "b", - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 16, - end: 20, - }, - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-3.snap deleted file mode 100644 index e7084f8c..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement-3.snap +++ /dev/null @@ -1,126 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "for a in range(10):\n a = 1\nelse:\n b = 1" ---- -Module { - node: Node { - start: 0, - end: 45, - }, - body: [ - ForStatement( - For { - node: Node { - start: 0, - end: 45, - }, - target: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "a", - }, - ), - iter: Call( - Call { - node: Node { - start: 9, - end: 18, - }, - func: Name( - Name { - node: Node { - start: 9, - end: 14, - }, - id: "range", - }, - ), - args: [ - Constant( - Constant { - node: Node { - start: 15, - end: 17, - }, - value: Int( - "10", - ), - }, - ), - ], - keywords: [], - starargs: None, - kwargs: None, - }, - ), - body: [ - AssignStatement( - Assign { - node: Node { - start: 24, - end: 29, - }, - targets: [ - Name( - Name { - node: Node { - start: 24, - end: 25, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 28, - end: 29, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], - orelse: [ - AssignStatement( - Assign { - node: Node { - start: 40, - end: 45, - }, - targets: [ - Name( - Name { - node: Node { - start: 40, - end: 41, - }, - id: "b", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 44, - end: 45, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement.snap deleted file mode 100644 index 2f4049db..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__for_statement.snap +++ /dev/null @@ -1,49 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "for a in b: pass" ---- -Module { - node: Node { - start: 0, - end: 16, - }, - body: [ - ForStatement( - For { - node: Node { - start: 0, - end: 16, - }, - target: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "a", - }, - ), - iter: Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "b", - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 12, - end: 16, - }, - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-2.snap deleted file mode 100644 index ca598ca2..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-2.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "f'hello_{a}'" ---- -Module { - node: Node { - start: 0, - end: 12, - }, - body: [ - ExpressionStatement( - JoinedStr( - JoinedStr { - node: Node { - start: 0, - end: 12, - }, - values: [ - Constant( - Constant { - node: Node { - start: 8, - end: 0, - }, - value: Str( - "hello_", - ), - }, - ), - Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "a", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-3.snap deleted file mode 100644 index 7ef0a7c0..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-3.snap +++ /dev/null @@ -1,64 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "f'hello_{a} {b}'" ---- -Module { - node: Node { - start: 0, - end: 16, - }, - body: [ - ExpressionStatement( - JoinedStr( - JoinedStr { - node: Node { - start: 0, - end: 16, - }, - values: [ - Constant( - Constant { - node: Node { - start: 8, - end: 0, - }, - value: Str( - "hello_", - ), - }, - ), - Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "a", - }, - ), - Constant( - Constant { - node: Node { - start: 12, - end: 0, - }, - value: Str( - " ", - ), - }, - ), - Name( - Name { - node: Node { - start: 13, - end: 14, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-4.snap deleted file mode 100644 index c8b77088..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__fstring-4.snap +++ /dev/null @@ -1,84 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "f'hello_{a} {b} {c}'" ---- -Module { - node: Node { - start: 0, - end: 20, - }, - body: [ - ExpressionStatement( - JoinedStr( - JoinedStr { - node: Node { - start: 0, - end: 20, - }, - values: [ - Constant( - Constant { - node: Node { - start: 8, - end: 0, - }, - value: Str( - "hello_", - ), - }, - ), - Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "a", - }, - ), - Constant( - Constant { - node: Node { - start: 12, - end: 0, - }, - value: Str( - " ", - ), - }, - ), - Name( - Name { - node: Node { - start: 13, - end: 14, - }, - id: "b", - }, - ), - Constant( - Constant { - node: Node { - start: 16, - end: 0, - }, - value: Str( - " ", - ), - }, - ), - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__fstring.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__fstring.snap deleted file mode 100644 index fd5623e1..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__fstring.snap +++ /dev/null @@ -1,35 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "f'a'" ---- -Module { - node: Node { - start: 0, - end: 4, - }, - body: [ - ExpressionStatement( - JoinedStr( - JoinedStr { - node: Node { - start: 0, - end: 4, - }, - values: [ - Constant( - Constant { - node: Node { - start: 3, - end: 0, - }, - value: Str( - "a", - ), - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-2.snap deleted file mode 100644 index 67945772..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-2.snap +++ /dev/null @@ -1,47 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "def a():\n pass" ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - FunctionDef( - FunctionDef { - node: Node { - start: 0, - end: 17, - }, - name: "a", - args: Arguments { - node: Node { - start: 6, - end: 6, - }, - posonlyargs: [], - args: [], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: [ - Pass( - Pass { - node: Node { - start: 13, - end: 17, - }, - }, - ), - ], - decorator_list: [], - returns: None, - type_comment: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-3.snap deleted file mode 100644 index 23dcab4d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-3.snap +++ /dev/null @@ -1,72 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "def a(a, b, c): pass" ---- -Module { - node: Node { - start: 0, - end: 20, - }, - body: [ - FunctionDef( - FunctionDef { - node: Node { - start: 0, - end: 20, - }, - name: "a", - args: Arguments { - node: Node { - start: 6, - end: 13, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 6, - end: 7, - }, - arg: "a", - annotation: None, - }, - Arg { - node: Node { - start: 9, - end: 10, - }, - arg: "b", - annotation: None, - }, - Arg { - node: Node { - start: 12, - end: 13, - }, - arg: "c", - annotation: None, - }, - ], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: [ - Pass( - Pass { - node: Node { - start: 16, - end: 20, - }, - }, - ), - ], - decorator_list: [], - returns: None, - type_comment: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-4.snap deleted file mode 100644 index 64b30eca..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-4.snap +++ /dev/null @@ -1,74 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "def a(a, *b, **c): pass" ---- -Module { - node: Node { - start: 0, - end: 23, - }, - body: [ - FunctionDef( - FunctionDef { - node: Node { - start: 0, - end: 23, - }, - name: "a", - args: Arguments { - node: Node { - start: 6, - end: 16, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 6, - end: 7, - }, - arg: "a", - annotation: None, - }, - ], - vararg: Some( - Arg { - node: Node { - start: 10, - end: 11, - }, - arg: "b", - annotation: None, - }, - ), - kwonlyargs: [], - kw_defaults: [], - kwarg: Some( - Arg { - node: Node { - start: 15, - end: 16, - }, - arg: "c", - annotation: None, - }, - ), - defaults: [], - }, - body: [ - Pass( - Pass { - node: Node { - start: 19, - end: 23, - }, - }, - ), - ], - decorator_list: [], - returns: None, - type_comment: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-5.snap deleted file mode 100644 index fa36ce82..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-5.snap +++ /dev/null @@ -1,72 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "def a(a,\n b,\n c): pass" ---- -Module { - node: Node { - start: 0, - end: 52, - }, - body: [ - FunctionDef( - FunctionDef { - node: Node { - start: 0, - end: 52, - }, - name: "a", - args: Arguments { - node: Node { - start: 6, - end: 45, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 6, - end: 7, - }, - arg: "a", - annotation: None, - }, - Arg { - node: Node { - start: 25, - end: 26, - }, - arg: "b", - annotation: None, - }, - Arg { - node: Node { - start: 44, - end: 45, - }, - arg: "c", - annotation: None, - }, - ], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: [ - Pass( - Pass { - node: Node { - start: 48, - end: 52, - }, - }, - ), - ], - decorator_list: [], - returns: None, - type_comment: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-6.snap deleted file mode 100644 index 21c6d8e4..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-6.snap +++ /dev/null @@ -1,57 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "@decor\ndef a(): pass" ---- -Module { - node: Node { - start: 0, - end: 20, - }, - body: [ - FunctionDef( - FunctionDef { - node: Node { - start: 7, - end: 20, - }, - name: "a", - args: Arguments { - node: Node { - start: 13, - end: 13, - }, - posonlyargs: [], - args: [], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: [ - Pass( - Pass { - node: Node { - start: 16, - end: 20, - }, - }, - ), - ], - decorator_list: [ - Name( - Name { - node: Node { - start: 1, - end: 6, - }, - id: "decor", - }, - ), - ], - returns: None, - type_comment: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-7.snap deleted file mode 100644 index b98b780a..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-7.snap +++ /dev/null @@ -1,167 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "@decor\ndef f(a: 'annotation', b=1, c=2, *d, e, f=3, **g): pass" ---- -Module { - node: Node { - start: 0, - end: 62, - }, - body: [ - FunctionDef( - FunctionDef { - node: Node { - start: 7, - end: 62, - }, - name: "f", - args: Arguments { - node: Node { - start: 13, - end: 55, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 13, - end: 28, - }, - arg: "a", - annotation: Some( - Constant( - Constant { - node: Node { - start: 16, - end: 28, - }, - value: Str( - "annotation", - ), - }, - ), - ), - }, - Arg { - node: Node { - start: 30, - end: 33, - }, - arg: "b", - annotation: None, - }, - Arg { - node: Node { - start: 35, - end: 38, - }, - arg: "c", - annotation: None, - }, - ], - vararg: Some( - Arg { - node: Node { - start: 41, - end: 42, - }, - arg: "d", - annotation: None, - }, - ), - kwonlyargs: [ - Arg { - node: Node { - start: 44, - end: 45, - }, - arg: "e", - annotation: None, - }, - Arg { - node: Node { - start: 47, - end: 50, - }, - arg: "f", - annotation: None, - }, - ], - kw_defaults: [ - None, - Some( - Constant( - Constant { - node: Node { - start: 49, - end: 50, - }, - value: Int( - "3", - ), - }, - ), - ), - ], - kwarg: Some( - Arg { - node: Node { - start: 54, - end: 55, - }, - arg: "g", - annotation: None, - }, - ), - defaults: [ - Constant( - Constant { - node: Node { - start: 32, - end: 33, - }, - value: Int( - "1", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 37, - end: 38, - }, - value: Int( - "2", - ), - }, - ), - ], - }, - body: [ - Pass( - Pass { - node: Node { - start: 58, - end: 62, - }, - }, - ), - ], - decorator_list: [ - Name( - Name { - node: Node { - start: 1, - end: 6, - }, - id: "decor", - }, - ), - ], - returns: None, - type_comment: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-8.snap deleted file mode 100644 index fa1d03ef..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement-8.snap +++ /dev/null @@ -1,57 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "def func() -> None: pass" ---- -Module { - node: Node { - start: 0, - end: 24, - }, - body: [ - FunctionDef( - FunctionDef { - node: Node { - start: 0, - end: 24, - }, - name: "func", - args: Arguments { - node: Node { - start: 9, - end: 9, - }, - posonlyargs: [], - args: [], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: [ - Pass( - Pass { - node: Node { - start: 20, - end: 24, - }, - }, - ), - ], - decorator_list: [], - returns: Some( - Constant( - Constant { - node: Node { - start: 14, - end: 18, - }, - value: None, - }, - ), - ), - type_comment: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement.snap deleted file mode 100644 index 9d796ffc..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__func_def_statement.snap +++ /dev/null @@ -1,47 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "def a(): pass" ---- -Module { - node: Node { - start: 0, - end: 13, - }, - body: [ - FunctionDef( - FunctionDef { - node: Node { - start: 0, - end: 13, - }, - name: "a", - args: Arguments { - node: Node { - start: 6, - end: 6, - }, - posonlyargs: [], - args: [], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: [ - Pass( - Pass { - node: Node { - start: 9, - end: 13, - }, - }, - ), - ], - decorator_list: [], - returns: None, - type_comment: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__if-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__if-2.snap deleted file mode 100644 index ddbdddcc..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__if-2.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "if a:\n pass" ---- -Module { - node: Node { - start: 0, - end: 14, - }, - body: [ - IfStatement( - If { - node: Node { - start: 3, - end: 14, - }, - test: Name( - Name { - node: Node { - start: 3, - end: 4, - }, - id: "a", - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 10, - end: 14, - }, - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__if-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__if-3.snap deleted file mode 100644 index 62a44af7..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__if-3.snap +++ /dev/null @@ -1,112 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "if a:\n a = 1\nif a:\n b = 1\n\n" ---- -Module { - node: Node { - start: 0, - end: 41, - }, - body: [ - IfStatement( - If { - node: Node { - start: 3, - end: 20, - }, - test: Name( - Name { - node: Node { - start: 3, - end: 4, - }, - id: "a", - }, - ), - body: [ - AssignStatement( - Assign { - node: Node { - start: 14, - end: 19, - }, - targets: [ - Name( - Name { - node: Node { - start: 14, - end: 15, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 18, - end: 19, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], - orelse: [], - }, - ), - IfStatement( - If { - node: Node { - start: 23, - end: 40, - }, - test: Name( - Name { - node: Node { - start: 23, - end: 24, - }, - id: "a", - }, - ), - body: [ - AssignStatement( - Assign { - node: Node { - start: 34, - end: 39, - }, - targets: [ - Name( - Name { - node: Node { - start: 34, - end: 35, - }, - id: "b", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 38, - end: 39, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__if-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__if-4.snap deleted file mode 100644 index da3ff5dc..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__if-4.snap +++ /dev/null @@ -1,48 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "if a:\n pass;pass" ---- -Module { - node: Node { - start: 0, - end: 19, - }, - body: [ - IfStatement( - If { - node: Node { - start: 3, - end: 19, - }, - test: Name( - Name { - node: Node { - start: 3, - end: 4, - }, - id: "a", - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 10, - end: 14, - }, - }, - ), - Pass( - Pass { - node: Node { - start: 15, - end: 19, - }, - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__if-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__if-5.snap deleted file mode 100644 index cd459865..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__if-5.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "if a is b:\n pass" ---- -Module { - node: Node { - start: 0, - end: 27, - }, - body: [ - IfStatement( - If { - node: Node { - start: 3, - end: 27, - }, - test: Compare( - Compare { - node: Node { - start: 3, - end: 9, - }, - left: Name( - Name { - node: Node { - start: 3, - end: 4, - }, - id: "a", - }, - ), - ops: [ - Is, - ], - comparators: [ - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "b", - }, - ), - ], - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 23, - end: 27, - }, - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__if-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__if-6.snap deleted file mode 100644 index be81ea3e..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__if-6.snap +++ /dev/null @@ -1,113 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "if a is b:\n pass\nelif a is c:\n pass" ---- -Module { - node: Node { - start: 0, - end: 65, - }, - body: [ - IfStatement( - If { - node: Node { - start: 3, - end: 65, - }, - test: Compare( - Compare { - node: Node { - start: 3, - end: 9, - }, - left: Name( - Name { - node: Node { - start: 3, - end: 4, - }, - id: "a", - }, - ), - ops: [ - Is, - ], - comparators: [ - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "b", - }, - ), - ], - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 27, - end: 31, - }, - }, - ), - ], - orelse: [ - IfStatement( - If { - node: Node { - start: 32, - end: 65, - }, - test: Compare( - Compare { - node: Node { - start: 37, - end: 43, - }, - left: Name( - Name { - node: Node { - start: 37, - end: 38, - }, - id: "a", - }, - ), - ops: [ - Is, - ], - comparators: [ - Name( - Name { - node: Node { - start: 42, - end: 43, - }, - id: "c", - }, - ), - ], - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 61, - end: 65, - }, - }, - ), - ], - orelse: [], - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__if-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__if-7.snap deleted file mode 100644 index db37ea88..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__if-7.snap +++ /dev/null @@ -1,122 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "if a is b:\n pass\nelif a is c:\n pass\nelse:\n pass\n" ---- -Module { - node: Node { - start: 0, - end: 93, - }, - body: [ - IfStatement( - If { - node: Node { - start: 3, - end: 93, - }, - test: Compare( - Compare { - node: Node { - start: 3, - end: 9, - }, - left: Name( - Name { - node: Node { - start: 3, - end: 4, - }, - id: "a", - }, - ), - ops: [ - Is, - ], - comparators: [ - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "b", - }, - ), - ], - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 27, - end: 31, - }, - }, - ), - ], - orelse: [ - IfStatement( - If { - node: Node { - start: 32, - end: 66, - }, - test: Compare( - Compare { - node: Node { - start: 37, - end: 43, - }, - left: Name( - Name { - node: Node { - start: 37, - end: 38, - }, - id: "a", - }, - ), - ops: [ - Is, - ], - comparators: [ - Name( - Name { - node: Node { - start: 42, - end: 43, - }, - id: "c", - }, - ), - ], - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 61, - end: 65, - }, - }, - ), - ], - orelse: [ - Pass( - Pass { - node: Node { - start: 88, - end: 92, - }, - }, - ), - ], - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__if.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__if.snap deleted file mode 100644 index 186f280d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__if.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "if a: pass" ---- -Module { - node: Node { - start: 0, - end: 10, - }, - body: [ - IfStatement( - If { - node: Node { - start: 3, - end: 10, - }, - test: Name( - Name { - node: Node { - start: 3, - end: 4, - }, - id: "a", - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 6, - end: 10, - }, - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-2.snap deleted file mode 100644 index fbd5e034..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-2.snap +++ /dev/null @@ -1,53 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda a: a" ---- -Module { - node: Node { - start: 0, - end: 11, - }, - body: [ - ExpressionStatement( - Lambda( - Lambda { - node: Node { - start: 0, - end: 11, - }, - args: Arguments { - node: Node { - start: 7, - end: 8, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 7, - end: 8, - }, - arg: "a", - annotation: None, - }, - ], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-3.snap deleted file mode 100644 index db0ba84c..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-3.snap +++ /dev/null @@ -1,61 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda a, b: a" ---- -Module { - node: Node { - start: 0, - end: 14, - }, - body: [ - ExpressionStatement( - Lambda( - Lambda { - node: Node { - start: 0, - end: 14, - }, - args: Arguments { - node: Node { - start: 7, - end: 11, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 7, - end: 8, - }, - arg: "a", - annotation: None, - }, - Arg { - node: Node { - start: 10, - end: 11, - }, - arg: "b", - annotation: None, - }, - ], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: Name( - Name { - node: Node { - start: 13, - end: 14, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-4.snap deleted file mode 100644 index 65b5b84a..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-4.snap +++ /dev/null @@ -1,69 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda a, b, c: a" ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - ExpressionStatement( - Lambda( - Lambda { - node: Node { - start: 0, - end: 17, - }, - args: Arguments { - node: Node { - start: 7, - end: 14, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 7, - end: 8, - }, - arg: "a", - annotation: None, - }, - Arg { - node: Node { - start: 10, - end: 11, - }, - arg: "b", - annotation: None, - }, - Arg { - node: Node { - start: 13, - end: 14, - }, - arg: "c", - annotation: None, - }, - ], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-5.snap deleted file mode 100644 index fe2ffc23..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-5.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda a, *b: a" ---- -Module { - node: Node { - start: 0, - end: 15, - }, - body: [ - ExpressionStatement( - Lambda( - Lambda { - node: Node { - start: 0, - end: 15, - }, - args: Arguments { - node: Node { - start: 7, - end: 12, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 7, - end: 8, - }, - arg: "a", - annotation: None, - }, - ], - vararg: Some( - Arg { - node: Node { - start: 11, - end: 12, - }, - arg: "b", - annotation: None, - }, - ), - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: Name( - Name { - node: Node { - start: 14, - end: 15, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-6.snap deleted file mode 100644 index 5b56b91b..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-6.snap +++ /dev/null @@ -1,73 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda a, *b, c: a" ---- -Module { - node: Node { - start: 0, - end: 18, - }, - body: [ - ExpressionStatement( - Lambda( - Lambda { - node: Node { - start: 0, - end: 18, - }, - args: Arguments { - node: Node { - start: 7, - end: 15, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 7, - end: 8, - }, - arg: "a", - annotation: None, - }, - ], - vararg: Some( - Arg { - node: Node { - start: 11, - end: 12, - }, - arg: "b", - annotation: None, - }, - ), - kwonlyargs: [ - Arg { - node: Node { - start: 14, - end: 15, - }, - arg: "c", - annotation: None, - }, - ], - kw_defaults: [ - None, - ], - kwarg: None, - defaults: [], - }, - body: Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-7.snap deleted file mode 100644 index 4bbdaabd..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-7.snap +++ /dev/null @@ -1,82 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda a, *b, c, **d: a" ---- -Module { - node: Node { - start: 0, - end: 23, - }, - body: [ - ExpressionStatement( - Lambda( - Lambda { - node: Node { - start: 0, - end: 23, - }, - args: Arguments { - node: Node { - start: 7, - end: 20, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 7, - end: 8, - }, - arg: "a", - annotation: None, - }, - ], - vararg: Some( - Arg { - node: Node { - start: 11, - end: 12, - }, - arg: "b", - annotation: None, - }, - ), - kwonlyargs: [ - Arg { - node: Node { - start: 14, - end: 15, - }, - arg: "c", - annotation: None, - }, - ], - kw_defaults: [ - None, - ], - kwarg: Some( - Arg { - node: Node { - start: 19, - end: 20, - }, - arg: "d", - annotation: None, - }, - ), - defaults: [], - }, - body: Name( - Name { - node: Node { - start: 22, - end: 23, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-8.snap deleted file mode 100644 index 4a3775d3..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-8.snap +++ /dev/null @@ -1,65 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda a=1 : a" ---- -Module { - node: Node { - start: 0, - end: 14, - }, - body: [ - ExpressionStatement( - Lambda( - Lambda { - node: Node { - start: 0, - end: 14, - }, - args: Arguments { - node: Node { - start: 7, - end: 10, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 7, - end: 10, - }, - arg: "a", - annotation: None, - }, - ], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [ - Constant( - Constant { - node: Node { - start: 9, - end: 10, - }, - value: Int( - "1", - ), - }, - ), - ], - }, - body: Name( - Name { - node: Node { - start: 13, - end: 14, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-9.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-9.snap deleted file mode 100644 index aeb0f1ba..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda-9.snap +++ /dev/null @@ -1,75 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda a=1 : a," ---- -Module { - node: Node { - start: 0, - end: 15, - }, - body: [ - ExpressionStatement( - Tuple( - Tuple { - node: Node { - start: 0, - end: 15, - }, - elements: [ - Lambda( - Lambda { - node: Node { - start: 0, - end: 14, - }, - args: Arguments { - node: Node { - start: 7, - end: 10, - }, - posonlyargs: [], - args: [ - Arg { - node: Node { - start: 7, - end: 10, - }, - arg: "a", - annotation: None, - }, - ], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [ - Constant( - Constant { - node: Node { - start: 9, - end: 10, - }, - value: Int( - "1", - ), - }, - ), - ], - }, - body: Name( - Name { - node: Node { - start: 13, - end: 14, - }, - id: "a", - }, - ), - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__lambda.snap deleted file mode 100644 index c24e51ed..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__lambda.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "lambda: a" ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - ExpressionStatement( - Lambda( - Lambda { - node: Node { - start: 0, - end: 9, - }, - args: Arguments { - node: Node { - start: 6, - end: 6, - }, - posonlyargs: [], - args: [], - vararg: None, - kwonlyargs: [], - kw_defaults: [], - kwarg: None, - defaults: [], - }, - body: Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__list-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__list-2.snap deleted file mode 100644 index 12a879f3..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__list-2.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a,\n b, c]" ---- -Module { - node: Node { - start: 0, - end: 21, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 21, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__list-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__list-3.snap deleted file mode 100644 index 78ef8c2b..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__list-3.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a\n , b, c]" ---- -Module { - node: Node { - start: 0, - end: 22, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 22, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 20, - end: 21, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__list-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__list-4.snap deleted file mode 100644 index 0cbcce8a..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__list-4.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a,\n b,\n c]" ---- -Module { - node: Node { - start: 0, - end: 37, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 37, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 35, - end: 36, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__list-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__list-5.snap deleted file mode 100644 index 39aa0ae1..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__list-5.snap +++ /dev/null @@ -1,33 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a,\n ]" ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 17, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__list.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__list.snap deleted file mode 100644 index 0b876026..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__list.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "[a, b, c]" ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - ExpressionStatement( - List( - List { - node: Node { - start: 0, - end: 9, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-2.snap deleted file mode 100644 index 854051c5..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-2.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "match a:\n case 1 | 2:\n pass" ---- -Module { - node: Node { - start: 0, - end: 37, - }, - body: [ - Match( - Match { - node: Node { - start: 0, - end: 37, - }, - subject: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - cases: [ - MatchCase { - node: Node { - start: 13, - end: 37, - }, - pattern: MatchOr( - [ - MatchValue( - MatchValue { - node: Node { - start: 18, - end: 19, - }, - value: Constant( - Constant { - node: Node { - start: 18, - end: 19, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - MatchValue( - MatchValue { - node: Node { - start: 22, - end: 23, - }, - value: Constant( - Constant { - node: Node { - start: 22, - end: 23, - }, - value: Int( - "2", - ), - }, - ), - }, - ), - ], - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 33, - end: 37, - }, - }, - ), - ], - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-3.snap deleted file mode 100644 index b7432db6..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-3.snap +++ /dev/null @@ -1,76 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "match a.b:\n case 1:\n pass" ---- -Module { - node: Node { - start: 0, - end: 35, - }, - body: [ - Match( - Match { - node: Node { - start: 0, - end: 35, - }, - subject: Attribute( - Attribute { - node: Node { - start: 6, - end: 9, - }, - value: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - attr: "b", - }, - ), - cases: [ - MatchCase { - node: Node { - start: 15, - end: 35, - }, - pattern: MatchValue( - MatchValue { - node: Node { - start: 20, - end: 21, - }, - value: Constant( - Constant { - node: Node { - start: 20, - end: 21, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 31, - end: 35, - }, - }, - ), - ], - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-4.snap deleted file mode 100644 index 71212c4b..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-4.snap +++ /dev/null @@ -1,245 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "match a:\n case None:\n pass\n case True:\n pass\n case False:\n pass\n case -1:\n pass\n case 1.0:\n pass\n case _:\n pass\n" ---- -Module { - node: Node { - start: 0, - end: 172, - }, - body: [ - Match( - Match { - node: Node { - start: 0, - end: 172, - }, - subject: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - cases: [ - MatchCase { - node: Node { - start: 13, - end: 41, - }, - pattern: MatchValue( - MatchValue { - node: Node { - start: 18, - end: 22, - }, - value: Constant( - Constant { - node: Node { - start: 18, - end: 22, - }, - value: None, - }, - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 32, - end: 36, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 41, - end: 69, - }, - pattern: MatchValue( - MatchValue { - node: Node { - start: 46, - end: 50, - }, - value: Constant( - Constant { - node: Node { - start: 46, - end: 50, - }, - value: Bool( - true, - ), - }, - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 60, - end: 64, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 69, - end: 98, - }, - pattern: MatchValue( - MatchValue { - node: Node { - start: 74, - end: 79, - }, - value: Constant( - Constant { - node: Node { - start: 74, - end: 79, - }, - value: Bool( - false, - ), - }, - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 89, - end: 93, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 98, - end: 124, - }, - pattern: MatchValue( - MatchValue { - node: Node { - start: 103, - end: 105, - }, - value: UnaryOp( - UnaryOperation { - node: Node { - start: 103, - end: 105, - }, - op: USub, - operand: Constant( - Constant { - node: Node { - start: 104, - end: 105, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 115, - end: 119, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 124, - end: 151, - }, - pattern: MatchValue( - MatchValue { - node: Node { - start: 129, - end: 132, - }, - value: Constant( - Constant { - node: Node { - start: 129, - end: 132, - }, - value: Float( - "1.0", - ), - }, - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 142, - end: 146, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 151, - end: 172, - }, - pattern: MatchAs( - MatchAs { - node: Node { - start: 156, - end: 157, - }, - name: None, - pattern: None, - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 167, - end: 171, - }, - }, - ), - ], - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-5.snap deleted file mode 100644 index 87595871..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-5.snap +++ /dev/null @@ -1,103 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "match a:\n case a.b:\n pass\n case a:\n pass\n" ---- -Module { - node: Node { - start: 0, - end: 61, - }, - body: [ - Match( - Match { - node: Node { - start: 0, - end: 61, - }, - subject: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - cases: [ - MatchCase { - node: Node { - start: 13, - end: 40, - }, - pattern: MatchValue( - MatchValue { - node: Node { - start: 18, - end: 21, - }, - value: Attribute( - Attribute { - node: Node { - start: 18, - end: 21, - }, - value: Name( - Name { - node: Node { - start: 18, - end: 17, - }, - id: "a", - }, - ), - attr: "b", - }, - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 31, - end: 35, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 40, - end: 61, - }, - pattern: MatchAs( - MatchAs { - node: Node { - start: 45, - end: 46, - }, - name: Some( - "a", - ), - pattern: None, - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 56, - end: 60, - }, - }, - ), - ], - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-6.snap deleted file mode 100644 index 9f32f3ef..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-6.snap +++ /dev/null @@ -1,178 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "match a:\n case (a, b):\n pass\n case {1: _, 2: _}:\n pass\n case {**rest}:\n pass\n" ---- -Module { - node: Node { - start: 0, - end: 107, - }, - body: [ - Match( - Match { - node: Node { - start: 0, - end: 107, - }, - subject: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - cases: [ - MatchCase { - node: Node { - start: 13, - end: 43, - }, - pattern: MatchSequence( - [ - MatchAs( - MatchAs { - node: Node { - start: 19, - end: 20, - }, - name: Some( - "a", - ), - pattern: None, - }, - ), - MatchAs( - MatchAs { - node: Node { - start: 22, - end: 23, - }, - name: Some( - "b", - ), - pattern: None, - }, - ), - ], - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 34, - end: 38, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 43, - end: 79, - }, - pattern: MatchMapping( - MatchMapping { - node: Node { - start: 48, - end: 60, - }, - keys: [ - Constant( - Constant { - node: Node { - start: 49, - end: 50, - }, - value: Int( - "1", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 55, - end: 56, - }, - value: Int( - "2", - ), - }, - ), - ], - patterns: [ - MatchAs( - MatchAs { - node: Node { - start: 52, - end: 53, - }, - name: None, - pattern: None, - }, - ), - MatchAs( - MatchAs { - node: Node { - start: 58, - end: 59, - }, - name: None, - pattern: None, - }, - ), - ], - rest: None, - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 70, - end: 74, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 79, - end: 107, - }, - pattern: MatchMapping( - MatchMapping { - node: Node { - start: 84, - end: 92, - }, - keys: [], - patterns: [], - rest: Some( - "rest", - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 102, - end: 106, - }, - }, - ), - ], - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-7.snap deleted file mode 100644 index eea1068c..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-7.snap +++ /dev/null @@ -1,206 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "match x:\n case Point2D(0, 0):\n pass\n case Point3D(x=0, y=0, z=0):\n pass\n" ---- -Module { - node: Node { - start: 0, - end: 92, - }, - body: [ - Match( - Match { - node: Node { - start: 0, - end: 92, - }, - subject: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "x", - }, - ), - cases: [ - MatchCase { - node: Node { - start: 13, - end: 50, - }, - pattern: MatchClass( - MatchClass { - node: Node { - start: 25, - end: 31, - }, - cls: Name( - Name { - node: Node { - start: 18, - end: 17, - }, - id: "Point2D", - }, - ), - patterns: [ - MatchValue( - MatchValue { - node: Node { - start: 26, - end: 27, - }, - value: Constant( - Constant { - node: Node { - start: 26, - end: 27, - }, - value: Int( - "0", - ), - }, - ), - }, - ), - MatchValue( - MatchValue { - node: Node { - start: 29, - end: 30, - }, - value: Constant( - Constant { - node: Node { - start: 29, - end: 30, - }, - value: Int( - "0", - ), - }, - ), - }, - ), - ], - kwd_attrs: [], - kwd_patterns: [], - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 41, - end: 45, - }, - }, - ), - ], - }, - MatchCase { - node: Node { - start: 50, - end: 92, - }, - pattern: MatchClass( - MatchClass { - node: Node { - start: 62, - end: 77, - }, - cls: Name( - Name { - node: Node { - start: 55, - end: 54, - }, - id: "Point3D", - }, - ), - patterns: [], - kwd_attrs: [ - "x", - "y", - "z", - ], - kwd_patterns: [ - MatchValue( - MatchValue { - node: Node { - start: 65, - end: 66, - }, - value: Constant( - Constant { - node: Node { - start: 65, - end: 66, - }, - value: Int( - "0", - ), - }, - ), - }, - ), - MatchValue( - MatchValue { - node: Node { - start: 70, - end: 71, - }, - value: Constant( - Constant { - node: Node { - start: 70, - end: 71, - }, - value: Int( - "0", - ), - }, - ), - }, - ), - MatchValue( - MatchValue { - node: Node { - start: 75, - end: 76, - }, - value: Constant( - Constant { - node: Node { - start: 75, - end: 76, - }, - value: Int( - "0", - ), - }, - ), - }, - ), - ], - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 87, - end: 91, - }, - }, - ), - ], - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-8.snap deleted file mode 100644 index bfce172e..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement-8.snap +++ /dev/null @@ -1,88 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "match x:\n case [a, b, c]:\n pass" ---- -Module { - node: Node { - start: 0, - end: 41, - }, - body: [ - Match( - Match { - node: Node { - start: 0, - end: 41, - }, - subject: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "x", - }, - ), - cases: [ - MatchCase { - node: Node { - start: 13, - end: 41, - }, - pattern: MatchSequence( - [ - MatchAs( - MatchAs { - node: Node { - start: 19, - end: 20, - }, - name: Some( - "a", - ), - pattern: None, - }, - ), - MatchAs( - MatchAs { - node: Node { - start: 22, - end: 23, - }, - name: Some( - "b", - ), - pattern: None, - }, - ), - MatchAs( - MatchAs { - node: Node { - start: 25, - end: 26, - }, - name: Some( - "c", - ), - pattern: None, - }, - ), - ], - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 37, - end: 41, - }, - }, - ), - ], - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement.snap deleted file mode 100644 index 46f86183..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__match_statement.snap +++ /dev/null @@ -1,67 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "match a:\n case 1:\n pass" ---- -Module { - node: Node { - start: 0, - end: 33, - }, - body: [ - Match( - Match { - node: Node { - start: 0, - end: 33, - }, - subject: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - cases: [ - MatchCase { - node: Node { - start: 13, - end: 33, - }, - pattern: MatchValue( - MatchValue { - node: Node { - start: 18, - end: 19, - }, - value: Constant( - Constant { - node: Node { - start: 18, - end: 19, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - guard: None, - body: [ - Pass( - Pass { - node: Node { - start: 29, - end: 33, - }, - }, - ), - ], - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__named_expression.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__named_expression.snap deleted file mode 100644 index 1a38cde5..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__named_expression.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "(a := b)" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - ExpressionStatement( - NamedExpr( - NamedExpression { - node: Node { - start: 1, - end: 7, - }, - target: Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - value: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt-2.snap deleted file mode 100644 index 737a547a..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt-2.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "assert a, b" ---- -Module { - node: Node { - start: 0, - end: 11, - }, - body: [ - Assert( - Assert { - node: Node { - start: 0, - end: 11, - }, - test: Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "a", - }, - ), - msg: Some( - Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "b", - }, - ), - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt-3.snap deleted file mode 100644 index 0bef9aec..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt-3.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "assert True, 'fancy message'" ---- -Module { - node: Node { - start: 0, - end: 28, - }, - body: [ - Assert( - Assert { - node: Node { - start: 0, - end: 28, - }, - test: Constant( - Constant { - node: Node { - start: 7, - end: 11, - }, - value: Bool( - true, - ), - }, - ), - msg: Some( - Constant( - Constant { - node: Node { - start: 13, - end: 28, - }, - value: Str( - "fancy message", - ), - }, - ), - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt.snap deleted file mode 100644 index 65dcc720..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assert_stmt.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: assert a ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - Assert( - Assert { - node: Node { - start: 0, - end: 8, - }, - test: Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "a", - }, - ), - msg: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-10.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-10.snap deleted file mode 100644 index 9a840e67..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-10.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = '''a'''" ---- -Module { - node: Node { - start: 0, - end: 11, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 11, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 11, - }, - value: Str( - "a", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-11.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-11.snap deleted file mode 100644 index cedaaa6d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-11.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = \"\"\"a\"\"\"" ---- -Module { - node: Node { - start: 0, - end: 11, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 11, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 11, - }, - value: Str( - "a", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-12.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-12.snap deleted file mode 100644 index 1e1a4d8f..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-12.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = 'a'" ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 7, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 7, - }, - value: Str( - "a", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-13.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-13.snap deleted file mode 100644 index 7fc7b784..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-13.snap +++ /dev/null @@ -1,63 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = 1, 2" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 8, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Tuple( - Tuple { - node: Node { - start: 4, - end: 8, - }, - elements: [ - Constant( - Constant { - node: Node { - start: 4, - end: 5, - }, - value: Int( - "1", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 7, - end: 8, - }, - value: Int( - "2", - ), - }, - ), - ], - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-14.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-14.snap deleted file mode 100644 index 15be8471..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-14.snap +++ /dev/null @@ -1,63 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = 1, 2, " ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 9, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Tuple( - Tuple { - node: Node { - start: 4, - end: 9, - }, - elements: [ - Constant( - Constant { - node: Node { - start: 4, - end: 5, - }, - value: Int( - "1", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 7, - end: 8, - }, - value: Int( - "2", - ), - }, - ), - ], - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-15.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-15.snap deleted file mode 100644 index f4d87f20..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-15.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a = b = 1 ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 9, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 8, - end: 9, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-16.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-16.snap deleted file mode 100644 index 393b5b3c..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-16.snap +++ /dev/null @@ -1,110 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a,b = c,d = 1,2" ---- -Module { - node: Node { - start: 0, - end: 15, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 15, - }, - targets: [ - Tuple( - Tuple { - node: Node { - start: 0, - end: 3, - }, - elements: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - ], - }, - ), - Tuple( - Tuple { - node: Node { - start: 6, - end: 9, - }, - elements: [ - Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "c", - }, - ), - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "d", - }, - ), - ], - }, - ), - ], - value: Tuple( - Tuple { - node: Node { - start: 12, - end: 15, - }, - elements: [ - Constant( - Constant { - node: Node { - start: 12, - end: 13, - }, - value: Int( - "1", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 14, - end: 15, - }, - value: Int( - "2", - ), - }, - ), - ], - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-17.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-17.snap deleted file mode 100644 index aa7d9899..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-17.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a += 1 ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 6, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: Add, - value: Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-18.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-18.snap deleted file mode 100644 index 17535566..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-18.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a -= 1 ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 6, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: Sub, - value: Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-19.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-19.snap deleted file mode 100644 index 97bacb69..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-19.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a *= 1 ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 6, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: Mult, - value: Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-2.snap deleted file mode 100644 index e25e4e2f..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-2.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a = None ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 8, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 8, - }, - value: None, - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-20.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-20.snap deleted file mode 100644 index 8aa18c7c..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-20.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a /= 1 ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 6, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: Div, - value: Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-21.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-21.snap deleted file mode 100644 index e302f890..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-21.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a //= 1 ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 7, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: FloorDiv, - value: Constant( - Constant { - node: Node { - start: 6, - end: 7, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-22.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-22.snap deleted file mode 100644 index bbcef891..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-22.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a %= 1 ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 6, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: Mod, - value: Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-23.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-23.snap deleted file mode 100644 index 3ca6485b..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-23.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a **= 1 ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 7, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: Pow, - value: Constant( - Constant { - node: Node { - start: 6, - end: 7, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-24.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-24.snap deleted file mode 100644 index 1b31bcfe..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-24.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a <<= 1 ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 7, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: LShift, - value: Constant( - Constant { - node: Node { - start: 6, - end: 7, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-25.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-25.snap deleted file mode 100644 index 72378cbd..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-25.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a >>= 1 ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 7, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: RShift, - value: Constant( - Constant { - node: Node { - start: 6, - end: 7, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-26.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-26.snap deleted file mode 100644 index dca19e65..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-26.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a &= 1 ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 6, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: BitAnd, - value: Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-27.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-27.snap deleted file mode 100644 index dee7a827..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-27.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a ^= 1 ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 6, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: BitXor, - value: Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-28.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-28.snap deleted file mode 100644 index 929dd99f..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-28.snap +++ /dev/null @@ -1,41 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a |= 1 ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AugAssignStatement( - AugAssign { - node: Node { - start: 0, - end: 6, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - op: BitOr, - value: Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-29.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-29.snap deleted file mode 100644 index fdae4049..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-29.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a: int = 1" ---- -Module { - node: Node { - start: 0, - end: 10, - }, - body: [ - AnnAssignStatement( - AnnAssign { - node: Node { - start: 0, - end: 10, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - annotation: Name( - Name { - node: Node { - start: 3, - end: 6, - }, - id: "int", - }, - ), - value: Some( - Constant( - Constant { - node: Node { - start: 9, - end: 10, - }, - value: Int( - "1", - ), - }, - ), - ), - simple: true, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-3.snap deleted file mode 100644 index 8bae0e89..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-3.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a = True ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 8, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 8, - }, - value: Bool( - true, - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-30.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-30.snap deleted file mode 100644 index 326d3530..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-30.snap +++ /dev/null @@ -1,73 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a: int = 1, 2" ---- -Module { - node: Node { - start: 0, - end: 13, - }, - body: [ - AnnAssignStatement( - AnnAssign { - node: Node { - start: 0, - end: 13, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - annotation: Name( - Name { - node: Node { - start: 3, - end: 6, - }, - id: "int", - }, - ), - value: Some( - Tuple( - Tuple { - node: Node { - start: 9, - end: 13, - }, - elements: [ - Constant( - Constant { - node: Node { - start: 9, - end: 10, - }, - value: Int( - "1", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 12, - end: 13, - }, - value: Int( - "2", - ), - }, - ), - ], - }, - ), - ), - simple: true, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-31.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-31.snap deleted file mode 100644 index 643b6988..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-31.snap +++ /dev/null @@ -1,73 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a: int = 1, 2, " ---- -Module { - node: Node { - start: 0, - end: 14, - }, - body: [ - AnnAssignStatement( - AnnAssign { - node: Node { - start: 0, - end: 14, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - annotation: Name( - Name { - node: Node { - start: 3, - end: 6, - }, - id: "int", - }, - ), - value: Some( - Tuple( - Tuple { - node: Node { - start: 9, - end: 14, - }, - elements: [ - Constant( - Constant { - node: Node { - start: 9, - end: 10, - }, - value: Int( - "1", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 12, - end: 13, - }, - value: Int( - "2", - ), - }, - ), - ], - }, - ), - ), - simple: true, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-32.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-32.snap deleted file mode 100644 index 6c7900e3..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-32.snap +++ /dev/null @@ -1,50 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a: int = b" ---- -Module { - node: Node { - start: 0, - end: 10, - }, - body: [ - AnnAssignStatement( - AnnAssign { - node: Node { - start: 0, - end: 10, - }, - target: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - annotation: Name( - Name { - node: Node { - start: 3, - end: 6, - }, - id: "int", - }, - ), - value: Some( - Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "b", - }, - ), - ), - simple: true, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-4.snap deleted file mode 100644 index 973ac057..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-4.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a = False ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 9, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 9, - }, - value: Bool( - false, - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-5.snap deleted file mode 100644 index d35902d5..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-5.snap +++ /dev/null @@ -1,43 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a = 1j ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 6, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 6, - }, - value: Complex { - real: "0", - imaginary: "1j", - }, - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-6.snap deleted file mode 100644 index 452f1cff..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-6.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = b'1'" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 8, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 8, - }, - value: Bytes( - [ - 49, - ], - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-7.snap deleted file mode 100644 index 8d4be771..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-7.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = rb'1'" ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 9, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 9, - }, - value: Bytes( - [ - 49, - ], - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-8.snap deleted file mode 100644 index e5c5ab13..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-8.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = br'1'" ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 9, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 9, - }, - value: Bytes( - [ - 49, - ], - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-9.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-9.snap deleted file mode 100644 index d4953afb..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment-9.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a = \"a\"" ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 7, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 7, - }, - value: Str( - "a", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment.snap deleted file mode 100644 index 89ac5a15..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_assignment.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a = 1 ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - AssignStatement( - Assign { - node: Node { - start: 0, - end: 5, - }, - targets: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 4, - end: 5, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-2.snap deleted file mode 100644 index a0d94b6a..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op-2.snap +++ /dev/null @@ -1,43 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a and b ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - ExpressionStatement( - BoolOp( - BoolOperation { - node: Node { - start: 0, - end: 7, - }, - op: And, - values: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op.snap deleted file mode 100644 index facbd4d7..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_bool_op.snap +++ /dev/null @@ -1,43 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a or b ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - BoolOp( - BoolOperation { - node: Node { - start: 0, - end: 6, - }, - op: Or, - values: [ - Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "b", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_break_continue-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_break_continue-2.snap deleted file mode 100644 index 226c8a67..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_break_continue-2.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: continue ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - Continue( - Continue { - node: Node { - start: 0, - end: 8, - }, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_break_continue.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_break_continue.snap deleted file mode 100644 index c1edd024..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_break_continue.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: break ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - Break( - Break { - node: Node { - start: 0, - end: 5, - }, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-2.snap deleted file mode 100644 index 15099e51..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-2.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a(b) ---- -Module { - node: Node { - start: 0, - end: 4, - }, - body: [ - ExpressionStatement( - Call( - Call { - node: Node { - start: 0, - end: 4, - }, - func: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - args: [ - Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - ], - keywords: [], - starargs: None, - kwargs: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-3.snap deleted file mode 100644 index 2c2e50ea..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-3.snap +++ /dev/null @@ -1,54 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a(b, c)" ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - ExpressionStatement( - Call( - Call { - node: Node { - start: 0, - end: 7, - }, - func: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - args: [ - Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "c", - }, - ), - ], - keywords: [], - starargs: None, - kwargs: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-4.snap deleted file mode 100644 index a8a9004d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-4.snap +++ /dev/null @@ -1,54 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: func(b=c) ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - ExpressionStatement( - Call( - Call { - node: Node { - start: 0, - end: 9, - }, - func: Name( - Name { - node: Node { - start: 0, - end: 4, - }, - id: "func", - }, - ), - args: [], - keywords: [ - Keyword { - node: Node { - start: 5, - end: 8, - }, - arg: Some( - "b", - ), - value: Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "c", - }, - ), - }, - ], - starargs: None, - kwargs: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-5.snap deleted file mode 100644 index be0c6d79..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-5.snap +++ /dev/null @@ -1,82 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "func(a, b=c, d=e)" ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - ExpressionStatement( - Call( - Call { - node: Node { - start: 0, - end: 17, - }, - func: Name( - Name { - node: Node { - start: 0, - end: 4, - }, - id: "func", - }, - ), - args: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "a", - }, - ), - ], - keywords: [ - Keyword { - node: Node { - start: 8, - end: 11, - }, - arg: Some( - "b", - ), - value: Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "c", - }, - ), - }, - Keyword { - node: Node { - start: 13, - end: 16, - }, - arg: Some( - "d", - ), - value: Name( - Name { - node: Node { - start: 15, - end: 16, - }, - id: "e", - }, - ), - }, - ], - starargs: None, - kwargs: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-6.snap deleted file mode 100644 index 35c142e8..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-6.snap +++ /dev/null @@ -1,99 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "func(a, b=c, d=e, *f)" ---- -Module { - node: Node { - start: 0, - end: 21, - }, - body: [ - ExpressionStatement( - Call( - Call { - node: Node { - start: 0, - end: 21, - }, - func: Name( - Name { - node: Node { - start: 0, - end: 4, - }, - id: "func", - }, - ), - args: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "a", - }, - ), - Starred( - Starred { - node: Node { - start: 18, - end: 19, - }, - value: Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "f", - }, - ), - }, - ), - ], - keywords: [ - Keyword { - node: Node { - start: 8, - end: 11, - }, - arg: Some( - "b", - ), - value: Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "c", - }, - ), - }, - Keyword { - node: Node { - start: 13, - end: 16, - }, - arg: Some( - "d", - ), - value: Name( - Name { - node: Node { - start: 15, - end: 16, - }, - id: "e", - }, - ), - }, - ], - starargs: None, - kwargs: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-7.snap deleted file mode 100644 index 3d96315f..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-7.snap +++ /dev/null @@ -1,115 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "func(a, b=c, d=e, *f, **g)" ---- -Module { - node: Node { - start: 0, - end: 26, - }, - body: [ - ExpressionStatement( - Call( - Call { - node: Node { - start: 0, - end: 26, - }, - func: Name( - Name { - node: Node { - start: 0, - end: 4, - }, - id: "func", - }, - ), - args: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "a", - }, - ), - Starred( - Starred { - node: Node { - start: 18, - end: 19, - }, - value: Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "f", - }, - ), - }, - ), - ], - keywords: [ - Keyword { - node: Node { - start: 8, - end: 11, - }, - arg: Some( - "b", - ), - value: Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "c", - }, - ), - }, - Keyword { - node: Node { - start: 13, - end: 16, - }, - arg: Some( - "d", - ), - value: Name( - Name { - node: Node { - start: 15, - end: 16, - }, - id: "e", - }, - ), - }, - Keyword { - node: Node { - start: 22, - end: 24, - }, - arg: None, - value: Name( - Name { - node: Node { - start: 24, - end: 25, - }, - id: "g", - }, - ), - }, - ], - starargs: None, - kwargs: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-8.snap deleted file mode 100644 index 996a23aa..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call-8.snap +++ /dev/null @@ -1,45 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "func(a,)" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - ExpressionStatement( - Call( - Call { - node: Node { - start: 0, - end: 8, - }, - func: Name( - Name { - node: Node { - start: 0, - end: 4, - }, - id: "func", - }, - ), - args: [ - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "a", - }, - ), - ], - keywords: [], - starargs: None, - kwargs: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call.snap deleted file mode 100644 index 4fb2a5ea..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_call.snap +++ /dev/null @@ -1,35 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: a() ---- -Module { - node: Node { - start: 0, - end: 3, - }, - body: [ - ExpressionStatement( - Call( - Call { - node: Node { - start: 0, - end: 3, - }, - func: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - args: [], - keywords: [], - starargs: None, - kwargs: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt-2.snap deleted file mode 100644 index 041a3c00..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt-2.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "del a, b" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - Delete( - Delete { - node: Node { - start: 0, - end: 8, - }, - targets: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "b", - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt-3.snap deleted file mode 100644 index 170c1665..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt-3.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "del a, b, " ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - Delete( - Delete { - node: Node { - start: 0, - end: 9, - }, - targets: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "b", - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt.snap deleted file mode 100644 index 5c1a0e30..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_del_stmt.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: del a ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - Delete( - Delete { - node: Node { - start: 0, - end: 5, - }, - targets: [ - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "a", - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-2.snap deleted file mode 100644 index 4f1b27a1..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-2.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: import a as b ---- -Module { - node: Node { - start: 0, - end: 13, - }, - body: [ - Import( - Import { - node: Node { - start: 0, - end: 13, - }, - names: [ - Alias { - node: Node { - start: 7, - end: 13, - }, - name: "a", - asname: Some( - "b", - ), - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-3.snap deleted file mode 100644 index 010c5405..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-3.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: import a.b ---- -Module { - node: Node { - start: 0, - end: 10, - }, - body: [ - Import( - Import { - node: Node { - start: 0, - end: 10, - }, - names: [ - Alias { - node: Node { - start: 7, - end: 10, - }, - name: "a.b", - asname: None, - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-4.snap deleted file mode 100644 index 095f39a4..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-4.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: import a.b as c ---- -Module { - node: Node { - start: 0, - end: 15, - }, - body: [ - Import( - Import { - node: Node { - start: 0, - end: 15, - }, - names: [ - Alias { - node: Node { - start: 7, - end: 15, - }, - name: "a.b", - asname: Some( - "c", - ), - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-5.snap deleted file mode 100644 index b34bfae2..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-5.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: import a.b.c ---- -Module { - node: Node { - start: 0, - end: 12, - }, - body: [ - Import( - Import { - node: Node { - start: 0, - end: 12, - }, - names: [ - Alias { - node: Node { - start: 7, - end: 12, - }, - name: "a.b.c", - asname: None, - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-6.snap deleted file mode 100644 index 8a02e565..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-6.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: from a import b ---- -Module { - node: Node { - start: 0, - end: 15, - }, - body: [ - ImportFrom( - ImportFrom { - node: Node { - start: 0, - end: 15, - }, - module: "a", - names: [ - Alias { - node: Node { - start: 14, - end: 15, - }, - name: "b", - asname: None, - }, - ], - level: 0, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-7.snap deleted file mode 100644 index 917f6112..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-7.snap +++ /dev/null @@ -1,34 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: from a import b as c ---- -Module { - node: Node { - start: 0, - end: 20, - }, - body: [ - ImportFrom( - ImportFrom { - node: Node { - start: 0, - end: 20, - }, - module: "a", - names: [ - Alias { - node: Node { - start: 14, - end: 20, - }, - name: "b", - asname: Some( - "c", - ), - }, - ], - level: 0, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-8.snap deleted file mode 100644 index 66fd30ce..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-8.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: from a.b import c ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - ImportFrom( - ImportFrom { - node: Node { - start: 0, - end: 17, - }, - module: "a.b", - names: [ - Alias { - node: Node { - start: 16, - end: 17, - }, - name: "c", - asname: None, - }, - ], - level: 0, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-9.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-9.snap deleted file mode 100644 index a2ba1b38..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement-9.snap +++ /dev/null @@ -1,34 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: from a.b import c as d ---- -Module { - node: Node { - start: 0, - end: 22, - }, - body: [ - ImportFrom( - ImportFrom { - node: Node { - start: 0, - end: 22, - }, - module: "a.b", - names: [ - Alias { - node: Node { - start: 16, - end: 22, - }, - name: "c", - asname: Some( - "d", - ), - }, - ], - level: 0, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement.snap deleted file mode 100644 index 618f68b4..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_import_statement.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: import a ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - Import( - Import { - node: Node { - start: 0, - end: 8, - }, - names: [ - Alias { - node: Node { - start: 7, - end: 8, - }, - name: "a", - asname: None, - }, - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-2.snap deleted file mode 100644 index b22094b0..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-2.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: + a ---- -Module { - node: Node { - start: 0, - end: 3, - }, - body: [ - ExpressionStatement( - UnaryOp( - UnaryOperation { - node: Node { - start: 0, - end: 3, - }, - op: UAdd, - operand: Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-3.snap deleted file mode 100644 index 25a998b9..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-3.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: ~ a ---- -Module { - node: Node { - start: 0, - end: 3, - }, - body: [ - ExpressionStatement( - UnaryOp( - UnaryOperation { - node: Node { - start: 0, - end: 3, - }, - op: Invert, - operand: Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-4.snap deleted file mode 100644 index 54e7e4cd..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op-4.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "-a" ---- -Module { - node: Node { - start: 0, - end: 2, - }, - body: [ - ExpressionStatement( - UnaryOp( - UnaryOperation { - node: Node { - start: 0, - end: 2, - }, - op: USub, - operand: Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op.snap deleted file mode 100644 index bcc7175b..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_unary_op.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: not a ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - UnaryOp( - UnaryOperation { - node: Node { - start: 0, - end: 5, - }, - op: Not, - operand: Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-2.snap deleted file mode 100644 index 93116500..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement-2.snap +++ /dev/null @@ -1,33 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: yield a ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - ExpressionStatement( - Yield( - Yield { - node: Node { - start: 0, - end: 7, - }, - value: Some( - Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement.snap deleted file mode 100644 index e5006586..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__parse_yield_statement.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: yield ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - Yield( - Yield { - node: Node { - start: 0, - end: 5, - }, - value: None, - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt-2.snap deleted file mode 100644 index cee0e8d1..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt-2.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "pass " ---- -Module { - node: Node { - start: 0, - end: 4, - }, - body: [ - Pass( - Pass { - node: Node { - start: 0, - end: 4, - }, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt-3.snap deleted file mode 100644 index 224d16ed..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt-3.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "pass\n" ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - Pass( - Pass { - node: Node { - start: 0, - end: 4, - }, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt.snap deleted file mode 100644 index 8bd239b3..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__pass_stmt.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: pass ---- -Module { - node: Node { - start: 0, - end: 4, - }, - body: [ - Pass( - Pass { - node: Node { - start: 0, - end: 4, - }, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement-2.snap deleted file mode 100644 index cd63812d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement-2.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: raise a ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - Raise( - Raise { - node: Node { - start: 0, - end: 7, - }, - exc: Some( - Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - ), - cause: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement-3.snap deleted file mode 100644 index e7d12733..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement-3.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: raise a from c ---- -Module { - node: Node { - start: 0, - end: 14, - }, - body: [ - Raise( - Raise { - node: Node { - start: 0, - end: 14, - }, - exc: Some( - Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - ), - cause: Some( - Name( - Name { - node: Node { - start: 13, - end: 14, - }, - id: "c", - }, - ), - ), - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement.snap deleted file mode 100644 index 0f9d8437..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__raise_statement.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: raise ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - Raise( - Raise { - node: Node { - start: 0, - end: 5, - }, - exc: None, - cause: None, - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__set-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__set-2.snap deleted file mode 100644 index d6d06986..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__set-2.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a,\n b, c}" ---- -Module { - node: Node { - start: 0, - end: 21, - }, - body: [ - ExpressionStatement( - Set( - Set { - node: Node { - start: 0, - end: 21, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__set-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__set-3.snap deleted file mode 100644 index b2911a4f..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__set-3.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a\n , b, c}" ---- -Module { - node: Node { - start: 0, - end: 22, - }, - body: [ - ExpressionStatement( - Set( - Set { - node: Node { - start: 0, - end: 22, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 20, - end: 21, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__set-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__set-4.snap deleted file mode 100644 index 171bf7fa..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__set-4.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a,\n b,\n c}" ---- -Module { - node: Node { - start: 0, - end: 37, - }, - body: [ - ExpressionStatement( - Set( - Set { - node: Node { - start: 0, - end: 37, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 35, - end: 36, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__set-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__set-5.snap deleted file mode 100644 index 455666ff..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__set-5.snap +++ /dev/null @@ -1,33 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "{a,\n }" ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - ExpressionStatement( - Set( - Set { - node: Node { - start: 0, - end: 17, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__starred.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__starred.snap deleted file mode 100644 index 7ef46167..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__starred.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: (*a) ---- -Module { - node: Node { - start: 0, - end: 4, - }, - body: [ - ExpressionStatement( - Starred( - Starred { - node: Node { - start: 0, - end: 3, - }, - value: Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-10.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-10.snap deleted file mode 100644 index d4e030de..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-10.snap +++ /dev/null @@ -1,57 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "f'a' 'b' 'c'" ---- -Module { - node: Node { - start: 0, - end: 12, - }, - body: [ - ExpressionStatement( - JoinedStr( - JoinedStr { - node: Node { - start: 0, - end: 12, - }, - values: [ - Constant( - Constant { - node: Node { - start: 3, - end: 0, - }, - value: Str( - "a", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 0, - end: 8, - }, - value: Str( - "b", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 0, - end: 12, - }, - value: Str( - "c", - ), - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-11.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-11.snap deleted file mode 100644 index 65ee01a8..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-11.snap +++ /dev/null @@ -1,57 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "'d' f'a' 'b'" ---- -Module { - node: Node { - start: 0, - end: 12, - }, - body: [ - ExpressionStatement( - JoinedStr( - JoinedStr { - node: Node { - start: 0, - end: 12, - }, - values: [ - Constant( - Constant { - node: Node { - start: 0, - end: 3, - }, - value: Str( - "d", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 7, - end: 0, - }, - value: Str( - "a", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 0, - end: 12, - }, - value: Str( - "b", - ), - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-12.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-12.snap deleted file mode 100644 index fcf735f6..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-12.snap +++ /dev/null @@ -1,57 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "f'a_{1}' 'b' " ---- -Module { - node: Node { - start: 0, - end: 12, - }, - body: [ - ExpressionStatement( - JoinedStr( - JoinedStr { - node: Node { - start: 0, - end: 12, - }, - values: [ - Constant( - Constant { - node: Node { - start: 4, - end: 0, - }, - value: Str( - "a_", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 5, - end: 6, - }, - value: Int( - "1", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 0, - end: 12, - }, - value: Str( - "b", - ), - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-2.snap deleted file mode 100644 index 74dc274b..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-2.snap +++ /dev/null @@ -1,28 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "b'a' b'b'" ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - ExpressionStatement( - Constant( - Constant { - node: Node { - start: 0, - end: 9, - }, - value: Bytes( - [ - 97, - 98, - ], - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-3.snap deleted file mode 100644 index e9ac7dff..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-3.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "'a' 'b'" ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - ExpressionStatement( - Constant( - Constant { - node: Node { - start: 0, - end: 9, - }, - value: Str( - "ab", - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-4.snap deleted file mode 100644 index e467bfe6..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-4.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "r'a' 'b'" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - ExpressionStatement( - Constant( - Constant { - node: Node { - start: 0, - end: 8, - }, - value: Str( - "ab", - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-5.snap deleted file mode 100644 index 90dcb8ac..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-5.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "b'a' 'b'" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-6.snap deleted file mode 100644 index 80b4fe3f..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-6.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "('a'\n 'b')" ---- -Module { - node: Node { - start: 0, - end: 21, - }, - body: [ - ExpressionStatement( - Constant( - Constant { - node: Node { - start: 1, - end: 20, - }, - value: Str( - "ab", - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-7.snap deleted file mode 100644 index 6267b7cc..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-7.snap +++ /dev/null @@ -1,46 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "('a'\n 'b', 'c')" ---- -Module { - node: Node { - start: 0, - end: 26, - }, - body: [ - ExpressionStatement( - Tuple( - Tuple { - node: Node { - start: 0, - end: 25, - }, - elements: [ - Constant( - Constant { - node: Node { - start: 1, - end: 20, - }, - value: Str( - "ab", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 22, - end: 25, - }, - value: Str( - "c", - ), - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-8.snap deleted file mode 100644 index fe60658d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-8.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "('a'\n 'b'\n'c')" ---- -Module { - node: Node { - start: 0, - end: 29, - }, - body: [ - ExpressionStatement( - Constant( - Constant { - node: Node { - start: 1, - end: 28, - }, - value: Str( - "abc", - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-9.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-9.snap deleted file mode 100644 index 13960f97..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation-9.snap +++ /dev/null @@ -1,46 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "f'a' 'c'" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - ExpressionStatement( - JoinedStr( - JoinedStr { - node: Node { - start: 0, - end: 8, - }, - values: [ - Constant( - Constant { - node: Node { - start: 3, - end: 0, - }, - value: Str( - "a", - ), - }, - ), - Constant( - Constant { - node: Node { - start: 0, - end: 8, - }, - value: Str( - "c", - ), - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation.snap deleted file mode 100644 index 48c5f3d5..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__string_literal_concatnation.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "'a' 'b'" ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - ExpressionStatement( - Constant( - Constant { - node: Node { - start: 0, - end: 7, - }, - value: Str( - "ab", - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-2.snap deleted file mode 100644 index fd3912db..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-2.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a[b:c]" ---- -Module { - node: Node { - start: 0, - end: 6, - }, - body: [ - ExpressionStatement( - Subscript( - Subscript { - node: Node { - start: 0, - end: 6, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - slice: Slice( - Slice { - node: Node { - start: 3, - end: 5, - }, - lower: Some( - Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - ), - upper: Some( - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "c", - }, - ), - ), - step: None, - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-3.snap deleted file mode 100644 index 597f42e9..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-3.snap +++ /dev/null @@ -1,72 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a[b:c:d]" ---- -Module { - node: Node { - start: 0, - end: 8, - }, - body: [ - ExpressionStatement( - Subscript( - Subscript { - node: Node { - start: 0, - end: 8, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - slice: Slice( - Slice { - node: Node { - start: 3, - end: 7, - }, - lower: Some( - Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - ), - upper: Some( - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "c", - }, - ), - ), - step: Some( - Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "d", - }, - ), - ), - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-4.snap deleted file mode 100644 index 6b01f002..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-4.snap +++ /dev/null @@ -1,68 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a[b, c, d]" ---- -Module { - node: Node { - start: 0, - end: 10, - }, - body: [ - ExpressionStatement( - Subscript( - Subscript { - node: Node { - start: 0, - end: 10, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - slice: Tuple( - Tuple { - node: Node { - start: 2, - end: 10, - }, - elements: [ - Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "c", - }, - ), - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "d", - }, - ), - ], - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-5.snap deleted file mode 100644 index e5234856..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-5.snap +++ /dev/null @@ -1,90 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a[b, c: d, e]" ---- -Module { - node: Node { - start: 0, - end: 13, - }, - body: [ - ExpressionStatement( - Subscript( - Subscript { - node: Node { - start: 0, - end: 13, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - slice: Tuple( - Tuple { - node: Node { - start: 2, - end: 13, - }, - elements: [ - Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - Slice( - Slice { - node: Node { - start: 6, - end: 9, - }, - lower: Some( - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "c", - }, - ), - ), - upper: Some( - Name( - Name { - node: Node { - start: 8, - end: 9, - }, - id: "d", - }, - ), - ), - step: None, - }, - ), - Name( - Name { - node: Node { - start: 11, - end: 12, - }, - id: "e", - }, - ), - ], - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-6.snap deleted file mode 100644 index 95b293c5..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-6.snap +++ /dev/null @@ -1,42 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a[::]" ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - Subscript( - Subscript { - node: Node { - start: 0, - end: 5, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - slice: Slice( - Slice { - node: Node { - start: 2, - end: 4, - }, - lower: None, - upper: None, - step: None, - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-7.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-7.snap deleted file mode 100644 index 6bd58196..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-7.snap +++ /dev/null @@ -1,100 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a[b, c:d:e, f]" ---- -Module { - node: Node { - start: 0, - end: 14, - }, - body: [ - ExpressionStatement( - Subscript( - Subscript { - node: Node { - start: 0, - end: 14, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - slice: Tuple( - Tuple { - node: Node { - start: 2, - end: 14, - }, - elements: [ - Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - Slice( - Slice { - node: Node { - start: 6, - end: 10, - }, - lower: Some( - Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "c", - }, - ), - ), - upper: Some( - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "d", - }, - ), - ), - step: Some( - Name( - Name { - node: Node { - start: 9, - end: 10, - }, - id: "e", - }, - ), - ), - }, - ), - Name( - Name { - node: Node { - start: 12, - end: 13, - }, - id: "f", - }, - ), - ], - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-8.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-8.snap deleted file mode 100644 index d38e28ea..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript-8.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a[::d,]" ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - ExpressionStatement( - Subscript( - Subscript { - node: Node { - start: 0, - end: 7, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - slice: Slice( - Slice { - node: Node { - start: 2, - end: 5, - }, - lower: None, - upper: Some( - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "d", - }, - ), - ), - step: None, - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__subscript.snap deleted file mode 100644 index 71825eab..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__subscript.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "a[b]" ---- -Module { - node: Node { - start: 0, - end: 4, - }, - body: [ - ExpressionStatement( - Subscript( - Subscript { - node: Node { - start: 0, - end: 4, - }, - value: Name( - Name { - node: Node { - start: 0, - end: 1, - }, - id: "a", - }, - ), - slice: Name( - Name { - node: Node { - start: 2, - end: 3, - }, - id: "b", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-2.snap deleted file mode 100644 index 4e008558..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-2.snap +++ /dev/null @@ -1,62 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "try:\n pass\nexcept Exception:\n pass" ---- -Module { - node: Node { - start: 0, - end: 64, - }, - body: [ - TryStatement( - Try { - node: Node { - start: 0, - end: 64, - }, - body: [ - Pass( - Pass { - node: Node { - start: 21, - end: 25, - }, - }, - ), - ], - handlers: [ - ExceptHandler { - node: Node { - start: 26, - end: 64, - }, - typ: Some( - Name( - Name { - node: Node { - start: 33, - end: 42, - }, - id: "Exception", - }, - ), - ), - name: None, - body: [ - Pass( - Pass { - node: Node { - start: 60, - end: 64, - }, - }, - ), - ], - }, - ], - orelse: [], - finalbody: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-3.snap deleted file mode 100644 index 9d9da75e..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-3.snap +++ /dev/null @@ -1,64 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "try:\n pass\nexcept Exception as e:\n pass" ---- -Module { - node: Node { - start: 0, - end: 69, - }, - body: [ - TryStatement( - Try { - node: Node { - start: 0, - end: 69, - }, - body: [ - Pass( - Pass { - node: Node { - start: 21, - end: 25, - }, - }, - ), - ], - handlers: [ - ExceptHandler { - node: Node { - start: 26, - end: 69, - }, - typ: Some( - Name( - Name { - node: Node { - start: 33, - end: 42, - }, - id: "Exception", - }, - ), - ), - name: Some( - "e", - ), - body: [ - Pass( - Pass { - node: Node { - start: 65, - end: 69, - }, - }, - ), - ], - }, - ], - orelse: [], - finalbody: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-4.snap deleted file mode 100644 index 4b6577a6..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-4.snap +++ /dev/null @@ -1,73 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "try:\n pass\nexcept Exception as e:\n pass\nelse:\n pass" ---- -Module { - node: Node { - start: 0, - end: 96, - }, - body: [ - TryStatement( - Try { - node: Node { - start: 0, - end: 96, - }, - body: [ - Pass( - Pass { - node: Node { - start: 21, - end: 25, - }, - }, - ), - ], - handlers: [ - ExceptHandler { - node: Node { - start: 26, - end: 70, - }, - typ: Some( - Name( - Name { - node: Node { - start: 33, - end: 42, - }, - id: "Exception", - }, - ), - ), - name: Some( - "e", - ), - body: [ - Pass( - Pass { - node: Node { - start: 65, - end: 69, - }, - }, - ), - ], - }, - ], - orelse: [ - Pass( - Pass { - node: Node { - start: 92, - end: 96, - }, - }, - ), - ], - finalbody: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-5.snap deleted file mode 100644 index bcba8eff..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-5.snap +++ /dev/null @@ -1,82 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "try:\n pass\nexcept Exception as e:\n pass\nelse:\n pass\nfinally:\n pass" ---- -Module { - node: Node { - start: 0, - end: 126, - }, - body: [ - TryStatement( - Try { - node: Node { - start: 0, - end: 126, - }, - body: [ - Pass( - Pass { - node: Node { - start: 21, - end: 25, - }, - }, - ), - ], - handlers: [ - ExceptHandler { - node: Node { - start: 26, - end: 70, - }, - typ: Some( - Name( - Name { - node: Node { - start: 33, - end: 42, - }, - id: "Exception", - }, - ), - ), - name: Some( - "e", - ), - body: [ - Pass( - Pass { - node: Node { - start: 65, - end: 69, - }, - }, - ), - ], - }, - ], - orelse: [ - Pass( - Pass { - node: Node { - start: 92, - end: 96, - }, - }, - ), - ], - finalbody: [ - Pass( - Pass { - node: Node { - start: 122, - end: 126, - }, - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-6.snap deleted file mode 100644 index 6916f93f..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement-6.snap +++ /dev/null @@ -1,64 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "try:\n pass\nexcept *Exception as e:\n pass\n" ---- -Module { - node: Node { - start: 0, - end: 47, - }, - body: [ - TryStarStatement( - TryStar { - node: Node { - start: 0, - end: 47, - }, - body: [ - Pass( - Pass { - node: Node { - start: 9, - end: 13, - }, - }, - ), - ], - handlers: [ - ExceptHandler { - node: Node { - start: 14, - end: 47, - }, - typ: Some( - Name( - Name { - node: Node { - start: 22, - end: 31, - }, - id: "Exception", - }, - ), - ), - name: Some( - "e", - ), - body: [ - Pass( - Pass { - node: Node { - start: 42, - end: 46, - }, - }, - ), - ], - }, - ], - orelse: [], - finalbody: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement.snap deleted file mode 100644 index f8a17d8a..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__try_statement.snap +++ /dev/null @@ -1,52 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "try:\n pass\nexcept:\n pass" ---- -Module { - node: Node { - start: 0, - end: 30, - }, - body: [ - TryStatement( - Try { - node: Node { - start: 0, - end: 30, - }, - body: [ - Pass( - Pass { - node: Node { - start: 9, - end: 13, - }, - }, - ), - ], - handlers: [ - ExceptHandler { - node: Node { - start: 14, - end: 30, - }, - typ: None, - name: None, - body: [ - Pass( - Pass { - node: Node { - start: 26, - end: 30, - }, - }, - ), - ], - }, - ], - orelse: [], - finalbody: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-2.snap deleted file mode 100644 index a041e53a..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-2.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "(a,\n b, c)" ---- -Module { - node: Node { - start: 0, - end: 21, - }, - body: [ - ExpressionStatement( - Tuple( - Tuple { - node: Node { - start: 0, - end: 20, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-3.snap deleted file mode 100644 index 3a3d93bb..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-3.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "(a\n , b, c)" ---- -Module { - node: Node { - start: 0, - end: 22, - }, - body: [ - ExpressionStatement( - Tuple( - Tuple { - node: Node { - start: 0, - end: 21, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 20, - end: 21, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-4.snap deleted file mode 100644 index 913facc6..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-4.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "(a,\n b,\n c)" ---- -Module { - node: Node { - start: 0, - end: 37, - }, - body: [ - ExpressionStatement( - Tuple( - Tuple { - node: Node { - start: 0, - end: 36, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 16, - end: 17, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 35, - end: 36, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-5.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-5.snap deleted file mode 100644 index 657cabbf..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-5.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "(a,\n)" ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-6.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-6.snap deleted file mode 100644 index cdd04c88..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple-6.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "(a, b, c,)" ---- -Module { - node: Node { - start: 0, - end: 10, - }, - body: [ - ExpressionStatement( - Tuple( - Tuple { - node: Node { - start: 0, - end: 9, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__tuple.snap deleted file mode 100644 index 20dfed35..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__tuple.snap +++ /dev/null @@ -1,51 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "(a, b, c)" ---- -Module { - node: Node { - start: 0, - end: 9, - }, - body: [ - ExpressionStatement( - Tuple( - Tuple { - node: Node { - start: 0, - end: 8, - }, - elements: [ - Name( - Name { - node: Node { - start: 1, - end: 2, - }, - id: "a", - }, - ), - Name( - Name { - node: Node { - start: 4, - end: 5, - }, - id: "b", - }, - ), - Name( - Name { - node: Node { - start: 7, - end: 8, - }, - id: "c", - }, - ), - ], - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement-2.snap deleted file mode 100644 index 82124e7d..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement-2.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "while a:\n pass" ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - WhileStatement( - While { - node: Node { - start: 0, - end: 17, - }, - test: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 13, - end: 17, - }, - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement-3.snap deleted file mode 100644 index c844fa58..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement-3.snap +++ /dev/null @@ -1,93 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "while a:\n a = 1\nelse:\n b = 1\n" ---- -Module { - node: Node { - start: 0, - end: 43, - }, - body: [ - WhileStatement( - While { - node: Node { - start: 0, - end: 43, - }, - test: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - body: [ - AssignStatement( - Assign { - node: Node { - start: 17, - end: 22, - }, - targets: [ - Name( - Name { - node: Node { - start: 17, - end: 18, - }, - id: "a", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 21, - end: 22, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], - orelse: [ - AssignStatement( - Assign { - node: Node { - start: 37, - end: 42, - }, - targets: [ - Name( - Name { - node: Node { - start: 37, - end: 38, - }, - id: "b", - }, - ), - ], - value: Constant( - Constant { - node: Node { - start: 41, - end: 42, - }, - value: Int( - "1", - ), - }, - ), - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement.snap deleted file mode 100644 index cbbfc2ea..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__while_statement.snap +++ /dev/null @@ -1,40 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "while a: pass" ---- -Module { - node: Node { - start: 0, - end: 13, - }, - body: [ - WhileStatement( - While { - node: Node { - start: 0, - end: 13, - }, - test: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - body: [ - Pass( - Pass { - node: Node { - start: 9, - end: 13, - }, - }, - ), - ], - orelse: [], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-2.snap deleted file mode 100644 index 27665dd5..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-2.snap +++ /dev/null @@ -1,58 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "with a as b: pass" ---- -Module { - node: Node { - start: 0, - end: 17, - }, - body: [ - WithStatement( - With { - node: Node { - start: 0, - end: 17, - }, - items: [ - WithItem { - node: Node { - start: 5, - end: 11, - }, - context_expr: Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "a", - }, - ), - optional_vars: Some( - Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "b", - }, - ), - ), - }, - ], - body: [ - Pass( - Pass { - node: Node { - start: 13, - end: 17, - }, - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-3.snap deleted file mode 100644 index 5cf6d65e..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-3.snap +++ /dev/null @@ -1,84 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "with a as b, c as d: pass" ---- -Module { - node: Node { - start: 0, - end: 25, - }, - body: [ - WithStatement( - With { - node: Node { - start: 0, - end: 25, - }, - items: [ - WithItem { - node: Node { - start: 5, - end: 11, - }, - context_expr: Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "a", - }, - ), - optional_vars: Some( - Name( - Name { - node: Node { - start: 10, - end: 11, - }, - id: "b", - }, - ), - ), - }, - WithItem { - node: Node { - start: 13, - end: 19, - }, - context_expr: Name( - Name { - node: Node { - start: 13, - end: 14, - }, - id: "c", - }, - ), - optional_vars: Some( - Name( - Name { - node: Node { - start: 18, - end: 19, - }, - id: "d", - }, - ), - ), - }, - ], - body: [ - Pass( - Pass { - node: Node { - start: 21, - end: 25, - }, - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-4.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-4.snap deleted file mode 100644 index 37d9a181..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement-4.snap +++ /dev/null @@ -1,84 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "with (a as b, c as d): pass" ---- -Module { - node: Node { - start: 0, - end: 27, - }, - body: [ - WithStatement( - With { - node: Node { - start: 0, - end: 27, - }, - items: [ - WithItem { - node: Node { - start: 6, - end: 12, - }, - context_expr: Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - optional_vars: Some( - Name( - Name { - node: Node { - start: 11, - end: 12, - }, - id: "b", - }, - ), - ), - }, - WithItem { - node: Node { - start: 14, - end: 20, - }, - context_expr: Name( - Name { - node: Node { - start: 14, - end: 15, - }, - id: "c", - }, - ), - optional_vars: Some( - Name( - Name { - node: Node { - start: 19, - end: 20, - }, - id: "d", - }, - ), - ), - }, - ], - body: [ - Pass( - Pass { - node: Node { - start: 23, - end: 27, - }, - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement.snap deleted file mode 100644 index 75491ea2..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__with_statement.snap +++ /dev/null @@ -1,48 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: "with a: pass" ---- -Module { - node: Node { - start: 0, - end: 12, - }, - body: [ - WithStatement( - With { - node: Node { - start: 0, - end: 12, - }, - items: [ - WithItem { - node: Node { - start: 5, - end: 6, - }, - context_expr: Name( - Name { - node: Node { - start: 5, - end: 6, - }, - id: "a", - }, - ), - optional_vars: None, - }, - ], - body: [ - Pass( - Pass { - node: Node { - start: 8, - end: 12, - }, - }, - ), - ], - }, - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression-2.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression-2.snap deleted file mode 100644 index 93116500..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression-2.snap +++ /dev/null @@ -1,33 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: yield a ---- -Module { - node: Node { - start: 0, - end: 7, - }, - body: [ - ExpressionStatement( - Yield( - Yield { - node: Node { - start: 0, - end: 7, - }, - value: Some( - Name( - Name { - node: Node { - start: 6, - end: 7, - }, - id: "a", - }, - ), - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression-3.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression-3.snap deleted file mode 100644 index 5b150981..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression-3.snap +++ /dev/null @@ -1,31 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: yield from a ---- -Module { - node: Node { - start: 0, - end: 12, - }, - body: [ - ExpressionStatement( - YieldFrom( - YieldFrom { - node: Node { - start: 0, - end: 12, - }, - value: Name( - Name { - node: Node { - start: 11, - end: 12, - }, - id: "a", - }, - ), - }, - ), - ), - ], -} diff --git a/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression.snap b/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression.snap deleted file mode 100644 index e5006586..00000000 --- a/parser/src/parser/snapshots/parser__parser__parser__tests__yield_expression.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: parser/src/parser/parser.rs -description: yield ---- -Module { - node: Node { - start: 0, - end: 5, - }, - body: [ - ExpressionStatement( - Yield( - Yield { - node: Node { - start: 0, - end: 5, - }, - value: None, - }, - ), - ), - ], -} diff --git a/parser/test_data/inputs/functions.py b/parser/test_data/inputs/functions.py new file mode 100644 index 00000000..487b19a6 --- /dev/null +++ b/parser/test_data/inputs/functions.py @@ -0,0 +1,17 @@ +def _handle_ticker_index(symbol): + ticker_index = symbols_data.get_ticker_index(symbol) + + if ticker_index is None: + market_symbol = get_symbol_info(symbol) + if market_symbol is not None: + symbols_data.append_symbol_to_file(market_symbol) + ticker_index = market_symbol.index + return ticker_index + + +def _extract_ticker_client_types_data(ticker_index: str) -> List: + url = TSE_CLIENT_TYPE_DATA_URL.format(ticker_index) + with requests_retry_session() as session: + response = session.get(url, timeout=5) + data = response.text.split(';') + return data diff --git a/parser/test_data/inputs/one_liners/dict.py b/parser/test_data/inputs/one_liners/dict.py new file mode 100644 index 00000000..d4c3d54b --- /dev/null +++ b/parser/test_data/inputs/one_liners/dict.py @@ -0,0 +1,21 @@ +{a: b, c: d} + +{a: b, +c: d}, + +{a: b +, c: d}, + +{a: b, +c: d, + e: f}, + +{a: b, +}, + +{a: b, c: d,} + +{1: "name" for name in get_names()} + +{1: "name" for name in get_names() +} diff --git a/parser/test_data/inputs/one_liners/generator_expressions.py b/parser/test_data/inputs/one_liners/generator_expressions.py new file mode 100644 index 00000000..c97767c0 --- /dev/null +++ b/parser/test_data/inputs/one_liners/generator_expressions.py @@ -0,0 +1,11 @@ +(a for a in b) + +(a for a in b if c) + +(a for a in b if c if d) + +(a for a in b for c in d) + +(ord(c) for line in file for c in line) + +(x*y for x in range(10) for y in range(10) if x*y > 10) diff --git a/parser/test_data/inputs/one_liners/lists.py b/parser/test_data/inputs/one_liners/lists.py new file mode 100644 index 00000000..aed575db --- /dev/null +++ b/parser/test_data/inputs/one_liners/lists.py @@ -0,0 +1,30 @@ + +[a, b, c] + +[a, +b, c], + +[a +, b, c], + +[a, +b, + c], + +[a, +], + +[a, b, c,] + +month_names = ['Januari', 'Februari', 'Maart', # These are the + 'April', 'Mei', 'Juni', # Dutch names + 'Juli', 'Augustus', 'September', # for the months + 'Oktober', 'November', 'December'] # of the year, + +[a for a in b] + +[a for a in b if c] + +[a for a in b if c if d] + +[a for a in b for c in d] diff --git a/parser/test_data/inputs/one_liners/sets.py b/parser/test_data/inputs/one_liners/sets.py new file mode 100644 index 00000000..6171cb04 --- /dev/null +++ b/parser/test_data/inputs/one_liners/sets.py @@ -0,0 +1,37 @@ +{a, b, c} + +{a, +b, c} + +{a +, b, c} + +{a, +b, + c} + +{a, +} + +{a, b, c,} + +{a for a in range(10)} + +{a for a in range(10) +} + +{a for a in range(10)} + +{a for a in range(10)} + +{a for a in range(10) for b in range(10)} + +{a for a in range(10) for b in range(10) +} + +{a for a in range(11) for b in range(10) +} + +{ + (a,b) for a in range(11) for b in range(10) +}