mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-23 13:06:07 +00:00
Fix ast types' _fields and use 0-based column
This commit is contained in:
parent
952d70b9d1
commit
fa41a1e2f6
56 changed files with 480 additions and 480 deletions
|
@ -35,13 +35,13 @@ pub fn parse_program(source: &str, source_path: &str) -> Result<ast::Suite, Pars
|
|||
/// assert_eq!(
|
||||
/// expr,
|
||||
/// ast::Expr {
|
||||
/// location: ast::Location::new(1, 3),
|
||||
/// end_location: Some(ast::Location::new(1, 6)),
|
||||
/// location: ast::Location::new(1, 2),
|
||||
/// end_location: Some(ast::Location::new(1, 5)),
|
||||
/// custom: (),
|
||||
/// node: ast::ExprKind::BinOp {
|
||||
/// left: Box::new(ast::Expr {
|
||||
/// location: ast::Location::new(1, 1),
|
||||
/// end_location: Some(ast::Location::new(1, 2)),
|
||||
/// location: ast::Location::new(1, 0),
|
||||
/// end_location: Some(ast::Location::new(1, 1)),
|
||||
/// custom: (),
|
||||
/// node: ast::ExprKind::Constant {
|
||||
/// value: ast::Constant::Int(1.into()),
|
||||
|
@ -50,8 +50,8 @@ pub fn parse_program(source: &str, source_path: &str) -> Result<ast::Suite, Pars
|
|||
/// }),
|
||||
/// op: ast::Operator::Add,
|
||||
/// right: Box::new(ast::Expr {
|
||||
/// location: ast::Location::new(1, 5),
|
||||
/// end_location: Some(ast::Location::new(1, 6)),
|
||||
/// location: ast::Location::new(1, 4),
|
||||
/// end_location: Some(ast::Location::new(1, 5)),
|
||||
/// custom: (),
|
||||
/// node: ast::ExprKind::Constant {
|
||||
/// value: ast::Constant::Int(2.into()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue