♻️ (macros): Adapta main y test a Tokio

`#[pagetop::main]` y `#[pagetop::test]` expanden ahora a
`#[tokio::main]` y `#[tokio::test]`, eliminando la dependencia de
Actix-web.
This commit is contained in:
Manuel Cillero 2026-05-31 23:43:10 +02:00
parent c1afe0e70c
commit 7d43742a11
5 changed files with 12 additions and 13 deletions

View file

@ -4,7 +4,7 @@ use proc_macro2::TokenStream;
use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt};
use quote::ToTokens;
use syn::{
braced, bracketed,
Error, Expr, Ident, Lit, LitBool, LitInt, LitStr, Local, Pat, Stmt, braced, bracketed,
ext::IdentExt,
parenthesized,
parse::{Lookahead1, Parse, ParseStream},
@ -14,7 +14,6 @@ use syn::{
At, Brace, Bracket, Colon, Comma, Dot, Else, Eq, FatArrow, For, If, In, Let, Match, Minus,
Paren, Pound, Question, Semi, Slash, While,
},
Error, Expr, Ident, Lit, LitBool, LitInt, LitStr, Local, Pat, Stmt,
};
#[derive(Debug, Clone)]
@ -1079,7 +1078,7 @@ impl<E: ToTokens> ToTokens for MatchArm<E> {
pub trait DiagnosticParse: Sized {
fn diagnostic_parse(input: ParseStream, diagnostics: &mut Vec<Diagnostic>)
-> syn::Result<Self>;
-> syn::Result<Self>;
}
impl<T: DiagnosticParse> DiagnosticParse for Box<T> {

View file

@ -1,6 +1,6 @@
use proc_macro2::{Ident, Span, TokenStream};
use quote::{quote, ToTokens};
use syn::{parse_quote, token::Brace, Expr, Local};
use quote::{ToTokens, quote};
use syn::{Expr, Local, parse_quote, token::Brace};
use crate::maud::{ast::*, escape};