/** * Block representation for proof structure. */ import { Expression } from './expression.js'; /** * Represents a block in the proof tree. */ export class Block { constructor( public readonly lineNum: number, public readonly blockType: string, public readonly args: Expression[] = [], public children: Block[] = [] ) {} /** * String representation of the block. */ toString(): string { const argsStr = this.args.length > 0 ? ` ${this.args.map(a => a.toString()).join(' ')}` : ''; return `${this.blockType}${argsStr}`; } }