Update SlipCompiler.py
This commit is contained in:
parent
bc67e40434
commit
f3681a56d1
@ -44,12 +44,12 @@ lit_type = ""
|
|||||||
for word in source_code:
|
for word in source_code:
|
||||||
print(f"\nIn: \"{word}\"")
|
print(f"\nIn: \"{word}\"")
|
||||||
# Handle literal types
|
# Handle literal types
|
||||||
if code_type == "lit_type":
|
if code_type == "type":
|
||||||
print("Consuming literal type...")
|
print("Consuming literal type...")
|
||||||
print("Expecting next input to be a literal value.")
|
print("Expecting next input to be a literal value.")
|
||||||
|
|
||||||
# Consume a literal of this word's type next
|
# Consume a literal of this word's type next
|
||||||
code_type = "literal"
|
code_type = "value"
|
||||||
lit_type = word
|
lit_type = word
|
||||||
|
|
||||||
# Push the type opcode onto the instruction stack
|
# Push the type opcode onto the instruction stack
|
||||||