public ExpressionContext(Parse.Expression expression, Type.BaseType type, Characteristic characteristics, Action<MethodContext> emitGet) { Expression = expression; Type = type; Characteristics = characteristics; EmitGet = emitGet; }
internal Var(Lexeme name, Parse.Expression expr) { if (!(name.ToString().All(c => char.IsLetterOrDigit(c) || c == '_'))) { throw new Exception("Variable {name.ToString()} has an invalid name"); } this.name = name; this.exprInitializer = expr; this.isInitalizedVar = true; }
internal If(Parse.Expression condition, Stmt thenBranch, Stmt elseBranch) { this.condition = condition; this.thenBranch = thenBranch; this.elseBranch = elseBranch; }
internal Expression(Parse.Expression expression) { this.expression = expression; }
internal Return(Lexeme keyword, Parse.Expression expression) { this.keyword = keyword; this.expr = expression; }
internal While(Parse.Expression condition, Stmt whileBlock) { this.condition = condition; this.whileBlock = whileBlock; }
internal Print(Parse.Expression expr) { this.expr = expr; }