diff --git a/nova_cli/src/helper.rs b/nova_cli/src/helper.rs index 3c305ef79..8b98ef460 100644 --- a/nova_cli/src/helper.rs +++ b/nova_cli/src/helper.rs @@ -776,18 +776,17 @@ pub fn exit_with_parse_errors(errors: Vec, source_path: &str, sou })) .unwrap(); - eprintln!("Parse errors:"); - // SAFETY: This function never returns, so `source`'s lifetime must last for // the duration of the program. let source: &'static str = unsafe { std::mem::transmute(source) }; let named_source = miette::NamedSource::new(source_path, source); + eprintln!("SyntaxError:"); + for error in errors { let report = error.with_source_code(named_source.clone()); - eprint!("{report:?}"); + eprintln!("{report:?}"); } - eprintln!(); std::process::exit(1); } diff --git a/tests/test262_runner.rs b/tests/test262_runner.rs index c2478bb54..037b7d19c 100644 --- a/tests/test262_runner.rs +++ b/tests/test262_runner.rs @@ -338,7 +338,7 @@ impl BaseTest262Runner { } } else if let Some(negative) = negative { let expected_stderr_prefix: Cow = match negative.phase { - test_metadata::TestFailurePhase::Parse => "Parse errors:".into(), + test_metadata::TestFailurePhase::Parse => "SyntaxError:".into(), test_metadata::TestFailurePhase::Runtime => { format!("Uncaught exception: {}", negative.error_type).into() }