The code above crashes the compiler, as with any code that has functions with it.
Error Message:
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 43, in compile
self.parser.parse()
File "C:\Users\David\Downloads\sheesh#\Compiler-Sheesh\source\SyntaxAnalyzer\Parser.py", line 119, in parse
self.semantic.analyze()
File "C:\Users\David\Downloads\sheesh#\Compiler-Sheesh\source\SemanticAnalyzer\SemanticAnalyzer.py", line 130, in analyze
self.routines[self.current_node.root]()
File "C:\Users\David\Downloads\sheesh#\Compiler-Sheesh\source\SemanticAnalyzer\SemanticAnalyzer.py", line 272, in control_flow_statement
if self.current_node.children[2].type=="Identifier" and self.current_node.children[0].value=="choose":
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AST' object has no attribute 'type'
Expected: Semantic Error Actual: No Semantic Errors
Code:
Global variable re-declared as a parameter in a function, this should also an error:
The code above crashes the compiler, as with any code that has functions with it.
Error Message: