public void Render(JassElseClauseSyntax elseClause) { WriteLine(JassKeyword.Else); Indent(); Render(elseClause.Body); Outdent(); }
public LuaElseClauseSyntax Transpile(JassElseClauseSyntax elseClause) { var luaElseClause = new LuaElseClauseSyntax(); luaElseClause.Body.Statements.AddRange(Transpile(elseClause.Body)); return(luaElseClause); }
private bool TryAdaptElseClause(JassMapScriptAdapterContext context, JassElseClauseSyntax?elseClause, [NotNullWhen(true)] out JassElseClauseSyntax?adaptedElseClause) { if (elseClause is not null && TryAdaptStatementList(context, elseClause.Body, out var adaptedBody)) { adaptedElseClause = new JassElseClauseSyntax(adaptedBody); return(true); } adaptedElseClause = null; return(false); }
public ElseClauseSyntax Transpile(JassElseClauseSyntax elseClause) { return(SyntaxFactory.ElseClause(SyntaxFactory.Block(Transpile(elseClause.Body)))); }
public static JassIfStatementSyntax IfStatement(IExpressionSyntax condition, JassStatementListSyntax body, IEnumerable <JassElseIfClauseSyntax> elseIfClauses, JassElseClauseSyntax elseClause) { return(new JassIfStatementSyntax( condition, body, elseIfClauses.ToImmutableArray(), elseClause)); }
public static JassIfStatementSyntax IfStatement(IExpressionSyntax condition, JassStatementListSyntax body, JassElseClauseSyntax elseClause) { return(new JassIfStatementSyntax( condition, body, ImmutableArray.Create <JassElseIfClauseSyntax>(), elseClause)); }