Changeset - 258c94538281
[Not reviewed]
0 2 0
MH - 4 years ago 2021-03-05 10:02:21
contact@maxhenger.nl
start on type checking
2 files changed with 19 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/protocol/parser/mod.rs
Show inline comments
 
mod depth_visitor;
 
mod symbol_table;
 
mod type_table;
 
mod type_resolver;
 
mod visitor;
 

	
 
use depth_visitor::*;
 
@@ -12,7 +13,6 @@ use crate::protocol::ast::*;
 
use crate::protocol::inputsource::*;
 
use crate::protocol::lexer::*;
 

	
 

	
 
use std::collections::HashMap;
 
use crate::protocol::parser::visitor::Ctx;
 
use crate::protocol::ast_printer::ASTWriter;
src/protocol/parser/type_resolver.rs
Show inline comments
 
use super::visitor::{Visitor2, VisitorResult};
 

	
 
/// This particular visitor will recurse depth-first into the AST and ensures
 
/// that all expressions have the appropriate types. At the moment this implies:
 
///
 
///     - Type checking arguments to unary and binary operators.
 
///     - Type checking assignment, indexing, slicing and select expressions.
 
///     - Checking arguments to functions and component instantiations.
 
///
 
/// This will be achieved by slowly descending into the AST. At any given
 
/// expression we may depend on
 
pub(crate) struct TypeResolvingVisitor {
 

	
 
}
 

	
 
impl Visitor2 for TypeResolvingVisitor {
 

	
 
}
 
\ No newline at end of file
0 comments (0 inline, 0 general)