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 ExpressionSyntax Transpile(JassHexadecimalLiteralExpressionSyntax hexadecimalLiteralExpression) { return(SyntaxFactory.ParseExpression(hexadecimalLiteralExpression.ToString())); }
public void Render(JassHexadecimalLiteralExpressionSyntax hexadecimalLiteralExpression) { Write(hexadecimalLiteralExpression.ToString()); }
public LuaExpressionSyntax Transpile(JassHexadecimalLiteralExpressionSyntax hexadecimalLiteralExpression, out JassTypeSyntax type) { type = JassTypeSyntax.Integer; return(hexadecimalLiteralExpression.ToString()); }