prog8/il65/emit/assignment.py
2018-01-15 00:46:27 +01:00

24 lines
706 B
Python

"""
Programming Language for 6502/6510 microprocessors, codename 'Sick'
This is the code generator for assignment statements.
Written by Irmen de Jong (irmen@razorvine.net) - license: GNU GPL 3.0
"""
from typing import Callable
from ..plyparse import AstNode, Scope, VarDef, Dereference, Register, TargetRegisters,\
LiteralValue, Assignment, AugAssignment
def generate_assignment(out: Callable, stmt: Assignment) -> None:
assert stmt.right is not None
rvalue = stmt.right
if isinstance(stmt.right, LiteralValue):
rvalue = stmt.right.value
# @todo
def generate_aug_assignment(out: Callable, stmt: AugAssignment) -> None:
assert stmt.right is not None
pass # @todo