mirror of
https://github.com/irmen/prog8.git
synced 2024-12-02 07:49:27 +00:00
23 lines
637 B
Python
23 lines
637 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 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
|