From 28667c08f3b1cb9f7589e2138bbd6838ffa211ff Mon Sep 17 00:00:00 2001 From: Reuben Gardos Reid <5456207+ReubenJ@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:21:00 +0200 Subject: [PATCH] Document `CodePath` struct --- src/interpreter.jl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/interpreter.jl b/src/interpreter.jl index cb02c71..a72989b 100644 --- a/src/interpreter.jl +++ b/src/interpreter.jl @@ -47,6 +47,13 @@ function test_examples(tab::SymbolTable, expr::Any, examples::Vector{IOExample}) return true end +""" + CodePath + +A mutable struct used to keep track of the code path taken during execution of control statements. +The `code_path` field is a `BitVector` that stores the attempted code path. The `idx` field is +to keep track of the current index in the `code_path` field. +""" Base.@kwdef mutable struct CodePath code_path::BitVector idx::UInt8