Skip to content

Commit

Permalink
Document CodePath struct
Browse files Browse the repository at this point in the history
  • Loading branch information
ReubenJ committed Jul 8, 2024
1 parent eabdda8 commit 28667c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/interpreter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 28667c0

Please sign in to comment.