Orchid-base uses task-local context.

Everything else is broken at the moment.
This commit is contained in:
2025-12-14 17:17:43 +01:00
parent 8753d4c751
commit 0b2b05d44e
22 changed files with 463 additions and 1082 deletions

View File

@@ -4,7 +4,7 @@ use std::ops::Range;
use ordered_float::NotNan;
use crate::error::{OrcErrv, mk_errv};
use crate::interner::Interner;
use crate::interner::is;
use crate::location::SrcRange;
use crate::name::Sym;
@@ -55,14 +55,9 @@ pub struct NumError {
pub kind: NumErrorKind,
}
pub async fn num_to_errv(
NumError { kind, range }: NumError,
offset: u32,
source: &Sym,
i: &Interner,
) -> OrcErrv {
pub async fn num_to_errv(NumError { kind, range }: NumError, offset: u32, source: &Sym) -> OrcErrv {
mk_errv(
i.i("Failed to parse number").await,
is("Failed to parse number").await,
match kind {
NumErrorKind::NaN => "NaN emerged during parsing",
NumErrorKind::InvalidDigit => "non-digit character encountered",