public override void CodeGen(CodeBuilder builder) { if (BaseExpression != null) { BaseExpression.CodeGen(builder); builder.AppendToken("."); builder.ForceNoWhitespace(); } builder.AppendToken(Function); builder.ForceNoWhitespace(); builder.AppendToken("("); builder.ForceNoWhitespace(); builder.BeginSeparatedList(","); foreach (var argument in Arguments) { argument.CodeGen(builder); builder.EndOfSeparatedListItem(); } builder.EndOfSeparatedList(); builder.AppendToken(")"); builder.EndOfStatement(); }
private void CodeGenConstructor(CodeBuilder builder, IReadOnlyList <PropertyBuilder> constructorProperties) { builder.AppendToken("public"); builder.AppendToken(Name); builder.ForceNoWhitespace(); builder.AppendToken("("); builder.ForceNoWhitespace(); builder.BeginSeparatedList(","); foreach (var property in constructorProperties) { property.Type.CodeGen(builder); builder.AppendToken(property.GenerateParameterName()); builder.EndOfSeparatedListItem(); } builder.EndOfSeparatedList(); builder.AppendToken(")"); builder.BeginBlock(); foreach (var property in constructorProperties) { builder.AppendToken(property.Name); builder.AppendToken("="); builder.AppendToken(property.GenerateParameterName()); builder.EndOfStatement(); } builder.EndBlock(); }
public override void CodeGen(CodeBuilder builder) { builder.AppendToken("("); builder.ForceNoWhitespace(); builder.AppendToken(Operator); builder.ForceNoWhitespace(); Expression.CodeGen(builder); builder.AppendToken(")"); }
public override void CodeGen(CodeBuilder builder) { builder.AppendToken("if ("); builder.ForceNoWhitespace(); ConditionalExpression.CodeGen(builder); builder.AppendToken(")"); builder.BeginBlock(); ThenStatement.CodeGen(builder); builder.EndBlock(); if (ElseStatement != null) { builder.EndOfLine(); // Nur einfachen Zeilenumbruch erzwingen builder.AppendToken("else"); builder.BeginBlock(); ElseStatement.CodeGen(builder); builder.EndBlock(); } }
public override void CodeGen(CodeBuilder builder) { builder.AppendToken("new"); Type.CodeGen(builder); builder.ForceNoWhitespace(); builder.AppendToken("()"); }
public override void CodeGen(CodeBuilder builder) { BaseExpression.CodeGen(builder); builder.AppendToken("["); builder.ForceNoWhitespace(); ElementExpression.CodeGen(builder); builder.AppendToken("]"); }
public override void CodeGen(CodeBuilder builder) { builder.AppendToken("("); builder.ForceNoWhitespace(); Left.CodeGen(builder); builder.AppendToken(Operator); Right.CodeGen(builder); builder.AppendToken(")"); }