public ExpressionSyntax Transpile(IExpressionSyntax expression) { return(expression switch { JassCharacterLiteralExpressionSyntax characterLiteralExpression => Transpile(characterLiteralExpression), JassFourCCLiteralExpressionSyntax fourCCLiteralExpression => Transpile(fourCCLiteralExpression), JassHexadecimalLiteralExpressionSyntax hexadecimalLiteralExpression => Transpile(hexadecimalLiteralExpression), JassRealLiteralExpressionSyntax realLiteralExpression => Transpile(realLiteralExpression), JassOctalLiteralExpressionSyntax octalLiteralExpression => Transpile(octalLiteralExpression), JassDecimalLiteralExpressionSyntax decimalLiteralExpression => Transpile(decimalLiteralExpression), JassBooleanLiteralExpressionSyntax booleanLiteralExpression => Transpile(booleanLiteralExpression), JassStringLiteralExpressionSyntax stringLiteralExpression => Transpile(stringLiteralExpression), JassNullLiteralExpressionSyntax nullLiteralExpression => Transpile(nullLiteralExpression), JassFunctionReferenceExpressionSyntax functionReferenceExpression => Transpile(functionReferenceExpression), JassInvocationExpressionSyntax invocationExpression => Transpile(invocationExpression), JassArrayReferenceExpressionSyntax arrayReferenceExpression => Transpile(arrayReferenceExpression), JassVariableReferenceExpressionSyntax variableReferenceExpression => Transpile(variableReferenceExpression), JassParenthesizedExpressionSyntax parenthesizedExpression => Transpile(parenthesizedExpression), JassUnaryExpressionSyntax unaryExpression => Transpile(unaryExpression), JassBinaryExpressionSyntax binaryExpression => Transpile(binaryExpression), });
public void Render(JassFourCCLiteralExpressionSyntax fourCCLiteralExpression) { Write(fourCCLiteralExpression.ToString()); }
public ExpressionSyntax Transpile(JassFourCCLiteralExpressionSyntax fourCCLiteralExpression) { return(SyntaxFactory.ParseExpression(fourCCLiteralExpression.Value.ToString())); }
public LuaExpressionSyntax Transpile(JassFourCCLiteralExpressionSyntax fourCCLiteralExpression, out JassTypeSyntax type) { type = JassTypeSyntax.Integer; return(fourCCLiteralExpression.Value); }