public static void RAW(string code) { var block = BlockContext.GetBlockOrThrow(); block.AppendStatement(new RawCodeStatement { Code = code }); }
public FluentIf(AbstractExpression condition) { var block = BlockContext.GetBlockOrThrow(); _statement = new IfStatement { Condition = block.PopExpression(condition), ThenBlock = null, ElseBlock = null }; block.AppendStatement(_statement); }
public static void LOCAL(TypeMember type, string name, out LocalVariable @ref, AbstractExpression initialValue = null) { @ref = new LocalVariable { Name = name, Type = type }; var block = BlockContext.GetBlockOrThrow(); block.AddLocal(@ref); block.AppendStatement(new VariableDeclarationStatement { Variable = @ref, InitialValue = PopExpression(initialValue) }); }
public void RETURN(AbstractExpression value) => BlockContext.Append(new ReturnStatement { Expression = BlockContext.Pop(value) });