remove read only stuff
This commit is contained in:
@@ -4,7 +4,7 @@ public abstract record DefinitionNode(string Module, string Name) : Node;
|
||||
|
||||
public record FuncParameterNode(string Name, TypeNode Type) : Node;
|
||||
|
||||
public record FuncSignatureNode(IReadOnlyList<FuncParameterNode> Parameters, TypeNode ReturnType) : Node;
|
||||
public record FuncSignatureNode(List<FuncParameterNode> Parameters, TypeNode ReturnType) : Node;
|
||||
|
||||
public record FuncNode(string Module, string Name, string? ExternSymbol, FuncSignatureNode Signature, BlockNode? Body) : DefinitionNode(Module, Name);
|
||||
|
||||
@@ -12,8 +12,8 @@ public record StructFieldNode(string Name, TypeNode Type, Optional<ExpressionNod
|
||||
|
||||
public record StructFuncNode(string Name, FuncSignatureNode Signature, BlockNode Body) : Node;
|
||||
|
||||
public record StructNode(string Module, string Name, IReadOnlyList<StructFieldNode> Fields, IReadOnlyList<StructFuncNode> Functions, IReadOnlyList<InterfaceTypeNode> InterfaceImplementations) : DefinitionNode(Module, Name);
|
||||
public record StructNode(string Module, string Name, List<StructFieldNode> Fields, List<StructFuncNode> Functions, List<InterfaceTypeNode> InterfaceImplementations) : DefinitionNode(Module, Name);
|
||||
|
||||
public record InterfaceFuncNode(string Name, FuncSignatureNode Signature) : Node;
|
||||
|
||||
public record InterfaceNode(string Module, string Name, IReadOnlyList<InterfaceFuncNode> Functions) : DefinitionNode(Module, Name);
|
||||
public record InterfaceNode(string Module, string Name, List<InterfaceFuncNode> Functions) : DefinitionNode(Module, Name);
|
||||
@@ -39,11 +39,11 @@ public record BinaryExpressionNode(TypeNode Type, ExpressionNode Left, BinaryOpe
|
||||
|
||||
public record UnaryExpressionNode(TypeNode Type, UnaryOperator Operator, ExpressionNode Operand) : RValueExpressionNode(Type);
|
||||
|
||||
public record FuncCallNode(TypeNode Type, ExpressionNode Expression, IReadOnlyList<ExpressionNode> Parameters) : RValueExpressionNode(Type);
|
||||
public record FuncCallNode(TypeNode Type, ExpressionNode Expression, List<ExpressionNode> Parameters) : RValueExpressionNode(Type);
|
||||
|
||||
public record StructFuncCallNode(TypeNode Type, string Name, StructTypeNode StructType, ExpressionNode StructExpression, IReadOnlyList<ExpressionNode> Parameters) : RValueExpressionNode(Type);
|
||||
public record StructFuncCallNode(TypeNode Type, string Name, StructTypeNode StructType, ExpressionNode StructExpression, List<ExpressionNode> Parameters) : RValueExpressionNode(Type);
|
||||
|
||||
public record InterfaceFuncCallNode(TypeNode Type, string Name, InterfaceTypeNode InterfaceType, ExpressionNode InterfaceExpression, IReadOnlyList<ExpressionNode> Parameters) : RValueExpressionNode(Type);
|
||||
public record InterfaceFuncCallNode(TypeNode Type, string Name, InterfaceTypeNode InterfaceType, ExpressionNode InterfaceExpression, List<ExpressionNode> Parameters) : RValueExpressionNode(Type);
|
||||
|
||||
public record VariableIdentifierNode(TypeNode Type, string Name) : LValueExpressionNode(Type);
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
|
||||
public abstract record Node;
|
||||
|
||||
public record BlockNode(IReadOnlyList<StatementNode> Statements) : Node;
|
||||
public record BlockNode(List<StatementNode> Statements) : Node;
|
||||
|
||||
public record TypedSyntaxTree(IReadOnlyList<DefinitionNode> Definitions);
|
||||
public record TypedSyntaxTree(List<DefinitionNode> Definitions);
|
||||
@@ -30,10 +30,10 @@ public sealed class TypeChecker
|
||||
.ToDictionary();
|
||||
}
|
||||
|
||||
public IReadOnlyList<DefinitionNode> Definitions => _definitions;
|
||||
public IReadOnlyList<Diagnostic> Diagnostics => _diagnostics;
|
||||
public IReadOnlyList<StructTypeNode> ReferencedStructTypes => _referencedStructTypes;
|
||||
public IReadOnlyList<InterfaceTypeNode> ReferencedInterfaceTypes => _referencedInterfaceTypes;
|
||||
public List<DefinitionNode> Definitions => _definitions;
|
||||
public List<Diagnostic> Diagnostics => _diagnostics;
|
||||
public List<StructTypeNode> ReferencedStructTypes => _referencedStructTypes;
|
||||
public List<InterfaceTypeNode> ReferencedInterfaceTypes => _referencedInterfaceTypes;
|
||||
|
||||
public void Check()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user