Browse Source

zkas: Semantic analysis stub.

parazyd 4 years ago
parent
commit
fd0021106a
2 changed files with 5 additions and 0 deletions
  1. 4 0
      zkas/src/analyzer.rs
  2. 1 0
      zkas/src/main.rs

+ 4 - 0
zkas/src/analyzer.rs

@@ -200,7 +200,11 @@ impl Analyzer {
         }
         }
 
 
         self.statements = statements;
         self.statements = statements;
+    }
 
 
+    pub fn analyze_semantic(&mut self) {
+        println!("{:#?}", self.constants);
+        println!("{:#?}", self.witnesses);
         println!("{:#?}", self.statements);
         println!("{:#?}", self.statements);
     }
     }
 
 

+ 1 - 0
zkas/src/main.rs

@@ -43,6 +43,7 @@ fn main() -> Result<()> {
 
 
     let mut analyzer = Analyzer::new(filename, source.chars(), constants, witnesses, statements);
     let mut analyzer = Analyzer::new(filename, source.chars(), constants, witnesses, statements);
     analyzer.analyze_types();
     analyzer.analyze_types();
+    analyzer.analyze_semantic();
 
 
     Ok(())
     Ok(())
 }
 }