remoo69 / Compiler-Sheesh

Compiler for the self-developed language Sheesh#.
MIT License
2 stars 1 forks source link

semantic analyzer does not detect type mismatch #48

Open jldav1d opened 2 weeks ago

jldav1d commented 2 weeks ago

This applies to every data type.

Expected: Semantic Error Actual: No Semantic Errors

Code:

sheesh(){
    whole a = 2#
    a = "hello"#
}

Terminal Error Message:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Python312\Lib\tkinter\__init__.py", line 1948, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "C:\Users\David\Downloads\sheesh#\Compiler-Sheesh\Sheesh# Compiler.py", line 140, in run_parser
    compiler.compile()
  File "C:\Users\David\Downloads\sheesh#\Compiler-Sheesh\source\core\compile.py", line 48, in compile
    self.codegen=CodeGeneration2(self.semantic.ast)
                                 ^^^^^^^^^^^^^^^^^
AttributeError: 'SemanticAnalyzer' object has no attribute 'ast'