.\"
.\" UCSD p-System cross compiler
.\" Copyright (C) 2011, 2012 Peter Miller
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or (at
.\" you option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
.\" General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License along
.\" with this program. If not, see
Up, Prev | Next |
Test Case | Implementation |
---|---|
program example; var x: integer; begin x := 1; end. |
expression * symbol_global::name_expression_factory() const { return new expression_ldo(get_address()); } |
expression * symbol_global::name_expression_factory() const { return new expression_ldo(get_address()); } | |
expression * expression_ldo::assignment_factory(expression *rhs) { return new expression_sro(address, rhs); } | |
void expression_sro::generate_code() const { rhs->generate_code(); gen_emit_byte(SRO); gen_emit_big(address); } |