chore(tvix/eval): implement Debug for compiler::scope::Scope

Change-Id: I112b0119bd0511f26bb72f7e73d867d1b7144a36
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6359
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2022-08-29 22:27:41 +03:00 committed by tazjin
parent 9420a3b53d
commit 17dfb92a9f

View file

@ -20,6 +20,7 @@ use smol_str::SmolStr;
use crate::opcode::{StackIdx, UpvalueIdx}; use crate::opcode::{StackIdx, UpvalueIdx};
/// Represents a single local already known to the compiler. /// Represents a single local already known to the compiler.
#[derive(Debug)]
pub struct Local { pub struct Local {
// Definition name, which can be different kinds of tokens (plain // Definition name, which can be different kinds of tokens (plain
// string or identifier). Nix does not allow dynamic names inside // string or identifier). Nix does not allow dynamic names inside
@ -103,7 +104,7 @@ pub struct LocalIdx(usize);
/// TODO(tazjin): `with`-stack /// TODO(tazjin): `with`-stack
/// TODO(tazjin): flag "specials" (e.g. note depth if builtins are /// TODO(tazjin): flag "specials" (e.g. note depth if builtins are
/// overridden) /// overridden)
#[derive(Default)] #[derive(Debug, Default)]
pub struct Scope { pub struct Scope {
pub locals: Vec<Local>, pub locals: Vec<Local>,
pub upvalues: Vec<Upvalue>, pub upvalues: Vec<Upvalue>,