remove cstring

This commit is contained in:
nub31
2025-10-24 15:27:14 +02:00
parent a5f73a84cc
commit 766ca9a6b9
7 changed files with 211 additions and 143 deletions

View File

@@ -510,14 +510,6 @@ public sealed class Parser
ExpectSymbol(Symbol.CloseParen);
return new SizeSyntax(GetTokens(startIndex), type);
}
case "interpret":
{
var type = ParseType();
ExpectSymbol(Symbol.Comma);
var expression = ParseExpression();
ExpectSymbol(Symbol.CloseParen);
return new InterpretSyntax(GetTokens(startIndex), type, expression);
}
case "cast":
{
var expression = ParseExpression();
@@ -736,8 +728,6 @@ public sealed class Parser
return new VoidTypeSyntax(GetTokens(startIndex));
case "string":
return new StringTypeSyntax(GetTokens(startIndex));
case "cstring":
return new CStringTypeSyntax(GetTokens(startIndex));
case "bool":
return new BoolTypeSyntax(GetTokens(startIndex));
default:

View File

@@ -114,8 +114,6 @@ public record DereferenceSyntax(List<Token> Tokens, ExpressionSyntax Target) : E
public record SizeSyntax(List<Token> Tokens, TypeSyntax Type) : ExpressionSyntax(Tokens);
public record InterpretSyntax(List<Token> Tokens, TypeSyntax Type, ExpressionSyntax Target) : ExpressionSyntax(Tokens);
public record CastSyntax(List<Token> Tokens, ExpressionSyntax Value) : ExpressionSyntax(Tokens);
#endregion
@@ -138,8 +136,6 @@ public record BoolTypeSyntax(List<Token> Tokens) : TypeSyntax(Tokens);
public record StringTypeSyntax(List<Token> Tokens) : TypeSyntax(Tokens);
public record CStringTypeSyntax(List<Token> Tokens) : TypeSyntax(Tokens);
public record SliceTypeSyntax(List<Token> Tokens, TypeSyntax BaseType) : TypeSyntax(Tokens);
public record ArrayTypeSyntax(List<Token> Tokens, TypeSyntax BaseType) : TypeSyntax(Tokens);