Change SemAnalysis to happen in two steps. Each step is going to parse an AST and SymbolTableStack pairing, but they're going to do so in different ways. The first step will have immutable access to AST and SymbolTableStack. Thus, it should be able to exclusively work with references to the objects in question. The second will have mutable access to AST and SymbolTableStack. Use an Arc<RwLock<>> to ensure thread safety and atomic mutations.
Details
Change
SemAnalysis
to happen in two steps. Each step is going to parse anAST
andSymbolTableStack
pairing, but they're going to do so in different ways. The first step will have immutable access toAST
andSymbolTableStack
. Thus, it should be able to exclusively work with references to the objects in question. The second will have mutable access toAST
andSymbolTableStack
. Use anArc<RwLock<>>
to ensure thread safety and atomic mutations.Issue Type
Requirements
Notes