From: Ian Jackson Date: Tue, 8 Jun 2021 00:14:55 +0000 (+0100) Subject: specs: template expand when loading in otter cli, debug X-Git-Tag: otter-0.7.0~37 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b8e27f2fa4978a130bf1205603a0ec897b46801a;p=otter.git specs: template expand when loading in otter cli, debug Signed-off-by: Ian Jackson --- 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 }