Skip to content

Commit

Permalink
Se creo un metodo que impide la ejecucion de la generarcion de codigo…
Browse files Browse the repository at this point in the history
… si fallo el analisis semantico
  • Loading branch information
pablodearmas committed Nov 18, 2020
1 parent 072a322 commit 3d72577
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/COOLCompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def main(argv):
semanticAnalizer = SemanticCOOLVisitor(typeTree)
codegenerator = CodegenVisitor(typeTree, consTble, visitor.Counter)
semanticAnalizer.visitProgram(tree)

# outFilename = os.path.splitext(argv[1])[0] + ".s"
# codegenerator.visitProgram(tree, outFilename)
if semanticAnalizer.hasNoError:
outFilename = os.path.splitext(argv[1])[0] + ".s"
codegenerator.visitProgram(tree, outFilename)
none = typeTree["Object"]


Expand Down
Loading

0 comments on commit 3d72577

Please sign in to comment.