Skip to content

Commit

Permalink
compiler should now be capable of parsing base arithmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
SK1Y101 committed Aug 16, 2021
1 parent b01c691 commit 9f91f10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions Verboscript/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# fetch our code

# global variables
DEBUG_PRINT_CODE = True
DEBUG_TRACE_EXECUTION = True

# Useful functions
Expand Down
7 changes: 7 additions & 0 deletions Verboscript/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,14 @@ def emitConstant(value):

# handle the safe shutdown of the compiler
def endCompiler():
# emit a return byte
emitReturn()
# if the compiler is emiting code
if DEBUG_PRINT_CODE:
# if we didn't have an error
if not parser.hadError:
# then show the chunk
disassembleChunk(compilingChunk, "Code")

# handle parentheses for groupings
def grouping():
Expand Down

0 comments on commit 9f91f10

Please sign in to comment.