export type Expression = BinaryExpr | UnaryExpr | FuncCall | PrimaryExpr ; export class BinaryExpr { constructor ( public operator , public leftOperand , public rightOperand ) { } } export class UnaryExpr { constructor ( public operator , public operand ) { } } export class FuncCall { constructor ( public funcName , public args , public preComputeUniformName ) { } } export class Assignment { constructor ( public lhs , public expr ) { } } export type Statement = Expression | Assignment ; export class Program { constructor ( public statements ) { } } export enum PrimaryExprType { ID = "ID" , CONST = "CONST" , REG = "REG" , VALUE = "VALUE" } export class PrimaryExpr { constructor ( public value , public type ) { } }