From 25bffa339c2a317165f5faeadc084b02b8be83f5 Mon Sep 17 00:00:00 2001 From: Greg Shuflin Date: Sat, 16 Oct 2021 18:05:13 -0700 Subject: [PATCH] Adjust some doc comments --- schala-lang/language/src/schala.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/schala-lang/language/src/schala.rs b/schala-lang/language/src/schala.rs index 645364d..8b3c706 100644 --- a/schala-lang/language/src/schala.rs +++ b/schala-lang/language/src/schala.rs @@ -12,15 +12,18 @@ use crate::error::SchalaError; pub type SymbolTableHandle = Rc>; /// All the state necessary to parse and execute a Schala program are stored in this struct. -/// `state` represents the execution state for the AST-walking interpreter, the other fields -/// should be self-explanatory. #[allow(dead_code)] pub struct Schala { + /// Holds a reference to the original source code, parsed into line and character source_reference: SourceReference, + /// Execution state for AST-walking interpreter state: eval::State<'static>, + /// Keeps track of symbols and scopes symbol_table: SymbolTableHandle, resolver: crate::scope_resolution::ScopeResolver<'static>, + /// Contains information for type-checking type_context: typechecking::TypeContext<'static>, + /// Schala Parser active_parser: parsing::Parser, } @@ -40,7 +43,6 @@ impl Schala { fn new_blank_env() -> Schala { let symbols = Rc::new(RefCell::new(symbol_table::SymbolTable::new())); Schala { - //TODO maybe these can be the same structure source_reference: SourceReference::new(), symbol_table: symbols.clone(), resolver: crate::scope_resolution::ScopeResolver::new(symbols.clone()),