tamer: asg::air: {=>diagnostic_}todo!
I forgot about my `diagnostic_todo!` macro! The purpose was to help guide development by obviating what comes next in test failures. DEV-13708
parent
56d92fe22b
commit
473991abaf
|
@ -38,7 +38,9 @@
|
|||
use self::expr::AirExprAggregateReachable;
|
||||
|
||||
use super::{graph::object::Pkg, Asg, AsgError, ObjectIndex};
|
||||
use crate::{parse::prelude::*, sym::SymbolId};
|
||||
use crate::{
|
||||
diagnose::Annotate, diagnostic_todo, parse::prelude::*, sym::SymbolId,
|
||||
};
|
||||
use std::fmt::{Debug, Display};
|
||||
|
||||
#[macro_use]
|
||||
|
@ -197,8 +199,11 @@ impl ParseState for AirAggregate {
|
|||
Self::delegate_tpl(asg, oi_pkg, stored_expr, tplst, ttok)
|
||||
}
|
||||
|
||||
(PkgTpl(..), AirPkg(PkgStart(..))) => {
|
||||
todo!("templates cannot contain packages")
|
||||
(PkgTpl(..), tok @ AirPkg(PkgStart(..))) => {
|
||||
diagnostic_todo!(
|
||||
vec![tok.note("for this token")],
|
||||
"templates cannot contain packages"
|
||||
)
|
||||
}
|
||||
|
||||
(Empty, AirPkg(PkgEnd(span))) => {
|
||||
|
|
|
@ -31,6 +31,8 @@ use super::{
|
|||
AirExprAggregate,
|
||||
};
|
||||
use crate::{
|
||||
diagnose::Annotate,
|
||||
diagnostic_todo,
|
||||
fmt::{DisplayWrapper, TtQuote},
|
||||
parse::prelude::*,
|
||||
span::Span,
|
||||
|
@ -183,7 +185,10 @@ impl ParseState for AirTplAggregate {
|
|||
.incomplete()
|
||||
}
|
||||
|
||||
(Toplevel(..), AirTpl(TplStart(_span))) => todo!("nested tpl open"),
|
||||
(Toplevel(..), AirTpl(TplStart(span))) => diagnostic_todo!(
|
||||
vec![span.note("for this template")],
|
||||
"nested tpl open"
|
||||
),
|
||||
|
||||
(Toplevel(oi_pkg, tpl, expr), AirBind(BindIdent(id))) => asg
|
||||
.lookup_or_missing(id)
|
||||
|
@ -201,11 +206,17 @@ impl ParseState for AirTplAggregate {
|
|||
Toplevel(..),
|
||||
tok @ AirTpl(TplMetaStart(..) | TplMetaEnd(..) | TplApply(..)),
|
||||
) => {
|
||||
todo!("Toplevel meta {tok:?}")
|
||||
diagnostic_todo!(
|
||||
vec![tok.note("for this token")],
|
||||
"Toplevel meta"
|
||||
)
|
||||
}
|
||||
|
||||
(Toplevel(..), tok @ AirTpl(TplLexeme(..))) => {
|
||||
todo!("err: Toplevel lexeme {tok:?} (must be within metavar)")
|
||||
diagnostic_todo!(
|
||||
vec![tok.note("for this token")],
|
||||
"err: Toplevel lexeme {tok:?} (must be within metavar)"
|
||||
)
|
||||
}
|
||||
|
||||
(Toplevel(oi_pkg, tpl, _expr_done), AirTpl(TplEnd(span))) => {
|
||||
|
@ -255,8 +266,11 @@ impl ParseState for AirTplAggregate {
|
|||
Self::delegate_expr(asg, oi_pkg, tpl, expr, etok)
|
||||
}
|
||||
|
||||
(TplExpr(..), AirTpl(TplStart(_))) => {
|
||||
todo!("nested template (template-generated template)")
|
||||
(TplExpr(..), AirTpl(TplStart(span))) => {
|
||||
diagnostic_todo!(
|
||||
vec![span.note("for this token")],
|
||||
"nested template (template-generated template)"
|
||||
)
|
||||
}
|
||||
|
||||
(
|
||||
|
@ -266,7 +280,8 @@ impl ParseState for AirTplAggregate {
|
|||
| TplApply(..),
|
||||
),
|
||||
) => {
|
||||
todo!(
|
||||
diagnostic_todo!(
|
||||
vec![tok.note("for this token")],
|
||||
"metasyntactic token in non-tpl-toplevel context: {tok:?}"
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue