Clean up cast syntax and rules
This commit is contained in:
@@ -508,7 +508,7 @@ public sealed class Parser
|
||||
{
|
||||
var type = ParseType();
|
||||
ExpectSymbol(Symbol.CloseParen);
|
||||
return new SizeBuiltinSyntax(GetTokens(startIndex), type);
|
||||
return new SizeSyntax(GetTokens(startIndex), type);
|
||||
}
|
||||
case "interpret":
|
||||
{
|
||||
@@ -516,15 +516,13 @@ public sealed class Parser
|
||||
ExpectSymbol(Symbol.Comma);
|
||||
var expression = ParseExpression();
|
||||
ExpectSymbol(Symbol.CloseParen);
|
||||
return new InterpretBuiltinSyntax(GetTokens(startIndex), type, expression);
|
||||
return new InterpretSyntax(GetTokens(startIndex), type, expression);
|
||||
}
|
||||
case "floatToInt":
|
||||
case "cast":
|
||||
{
|
||||
var type = ParseType();
|
||||
ExpectSymbol(Symbol.Comma);
|
||||
var expression = ParseExpression();
|
||||
ExpectSymbol(Symbol.CloseParen);
|
||||
return new FloatToIntBuiltinSyntax(GetTokens(startIndex), type, expression);
|
||||
return new CastSyntax(GetTokens(startIndex), expression);
|
||||
}
|
||||
default:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user