GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Recover numeric warning errors in AST single mode (#9303) · RustPython/RustPython@36f8e89

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • crates/vm/src/vm
    • compile.rs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎crates/vm/src/vm/compile.rs‎

Copy file name to clipboardExpand all lines: crates/vm/src/vm/compile.rs
+8-1Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1983,8 +1983,15 @@ mod escape_warnings {
19831983
module.map(AsObject::as_object),
19841984
collected.warnings,
19851985
WarningEmission::Ast {
1986+
// Unlike an interactive prompt, Single compile input recovers
1987+
// after a parser warning becomes an error. Later numeric
1988+
// tokenizer warnings raised as errors still take precedence,
1989+
// including on a following logical line.
19861990
tokenizer_recovery: collected.tokenizer_recovery
1987-
&& matches!(start, CompileStart::File | CompileStart::Eval),
1991+
&& matches!(
1992+
start,
1993+
CompileStart::File | CompileStart::Eval | CompileStart::Single
1994+
),
19881995
},
19891996
)
19901997
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.