From b8e27f2fa4978a130bf1205603a0ec897b46801a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 8 Jun 2021 01:14:55 +0100 Subject: [PATCH] specs: template expand when loading in otter cli, debug Signed-off-by: Ian Jackson --- cli/forgame.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cli/forgame.rs b/cli/forgame.rs index 42956143..505769a8 100644 --- a/cli/forgame.rs +++ b/cli/forgame.rs @@ -55,7 +55,14 @@ mod reset_game { let spec_toml = read_spec_from_path( filename, SpecRaw::::new())?; - let spec_toml = bundles::spec_macroexpand(spec_toml, &mut |_,_|Ok(())) + let spec_toml = bundles::spec_macroexpand(spec_toml, &mut |what,data|{ + if ma.verbose >= 2 { + for (lno,l) in data.split('\n').enumerate() { + eprintln!("spec {} {} {}", what, lno+1, l); + } + } + Ok(()) + }) .context("failed to template expand game spec")?; MGI::ResetFromGameSpec { spec_toml } -- 2.30.2