File Annotation
Not logged in
423f308350 2010-11-07        kinaba: module polemy.ast;
423f308350 2010-11-07        kinaba: import polemy._common;
423f308350 2010-11-07        kinaba: /*
423f308350 2010-11-07        kinaba:  * Author:  k.inaba
423f308350 2010-11-07        kinaba:  * License: NYSL 0.9982 (http://www.kmonos.net/nysl/
423f308350 2010-11-07        kinaba:  *   Syntax tree for the polemy programming language
423f308350 2010-11-07        kinaba:  */
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: import polemy.lex : LexPosition;
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: alias Statement[] Program;
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: abstract class Statement
423f308350 2010-11-07        kinaba: {
423f308350 2010-11-07        kinaba: 	immutable LexPosition pos;
423f308350 2010-11-07        kinaba: 	mixin SimpleConstructor;
423f308350 2010-11-07        kinaba: }
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: class DeclStatement : Statement
423f308350 2010-11-07        kinaba: {
423f308350 2010-11-07        kinaba: 	string     var;
423f308350 2010-11-07        kinaba: 	Expression expr;
423f308350 2010-11-07        kinaba: 	mixin SimpleConstructor;
423f308350 2010-11-07        kinaba: 	mixin SimpleCompare; // do not take "pos" into account
423f308350 2010-11-07        kinaba: }
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: class ExprStatement : Statement
423f308350 2010-11-07        kinaba: {
423f308350 2010-11-07        kinaba: 	Expression expr;
423f308350 2010-11-07        kinaba: 	mixin SimpleConstructor;
423f308350 2010-11-07        kinaba: 	mixin SimpleCompare; // do not take "pos" into account
423f308350 2010-11-07        kinaba: }
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: abstract class Expression
423f308350 2010-11-07        kinaba: {
423f308350 2010-11-07        kinaba: 	immutable LexPosition pos;
423f308350 2010-11-07        kinaba: 	mixin SimpleConstructor;
423f308350 2010-11-07        kinaba: 	mixin SimpleCompare; // do not take "pos" into account
423f308350 2010-11-07        kinaba: }
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: class StrLiteralExpression : Expression
423f308350 2010-11-07        kinaba: {
423f308350 2010-11-07        kinaba: 	string data;
423f308350 2010-11-07        kinaba: 	mixin SimpleConstructor;
423f308350 2010-11-07        kinaba: 	mixin SimpleCompare; // do not take "pos" into account
423f308350 2010-11-07        kinaba: }
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: class IntLiteralExpression : Expression
423f308350 2010-11-07        kinaba: {
423f308350 2010-11-07        kinaba: 	BigInt data;
423f308350 2010-11-07        kinaba: 	mixin SimpleConstructor;
423f308350 2010-11-07        kinaba: 	mixin SimpleCompare; // do not take "pos" into account
423f308350 2010-11-07        kinaba: }
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: class VarExpression : Expression
423f308350 2010-11-07        kinaba: {
423f308350 2010-11-07        kinaba: 	string var;
423f308350 2010-11-07        kinaba: 	mixin SimpleConstructor;
423f308350 2010-11-07        kinaba: 	mixin SimpleCompare; // do not take "pos" into account
423f308350 2010-11-07        kinaba: }
423f308350 2010-11-07        kinaba: 
423f308350 2010-11-07        kinaba: class BinOpExpression : Expression
423f308350 2010-11-07        kinaba: {
423f308350 2010-11-07        kinaba: 	string op;
423f308350 2010-11-07        kinaba: 	Expression lhs;
423f308350 2010-11-07        kinaba: 	Expression rhs;
423f308350 2010-11-07        kinaba: 	mixin SimpleConstructor;
423f308350 2010-11-07        kinaba: 	mixin SimpleCompare; // do not take "pos" into account
423f308350 2010-11-07        kinaba: }