Small naming fixes
This commit is contained in:
@@ -182,7 +182,7 @@ public class StructTypeNode(string name, IReadOnlyList<TypeNode> fields, IReadOn
|
||||
public IReadOnlyList<InterfaceTypeNode> InterfaceImplementations { get; set; } = interfaceImplementations;
|
||||
|
||||
public override string ToString() => Name;
|
||||
public override bool Equals(TypeNode? other) => other is StructTypeNode custom && Name == custom.Name;
|
||||
public override bool Equals(TypeNode? other) => other is StructTypeNode structType && Name == structType.Name;
|
||||
public override int GetHashCode() => HashCode.Combine(typeof(StructTypeNode), Name);
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ public class InterfaceTypeNode(string name, IReadOnlyList<FuncTypeNode> function
|
||||
public IReadOnlyList<FuncTypeNode> Functions { get; set; } = functions;
|
||||
|
||||
public override string ToString() => Name;
|
||||
public override bool Equals(TypeNode? other) => other is InterfaceTypeNode custom && Name == custom.Name;
|
||||
public override bool Equals(TypeNode? other) => other is InterfaceTypeNode interfaceType && Name == interfaceType.Name;
|
||||
public override int GetHashCode() => HashCode.Combine(typeof(InterfaceTypeNode), Name);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public sealed class TypeChecker
|
||||
ExternFuncSyntax definition => CheckExternFuncDefinition(definition),
|
||||
InterfaceSyntax definition => CheckInterfaceDefinition(definition),
|
||||
LocalFuncSyntax definition => CheckLocalFuncDefinition(definition),
|
||||
StructSyntax definition => CheckStruct(definition),
|
||||
StructSyntax definition => CheckStructDefinition(definition),
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(node))
|
||||
};
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public sealed class TypeChecker
|
||||
return new InterfaceNode(node.Name, functions);
|
||||
}
|
||||
|
||||
private StructNode CheckStruct(StructSyntax node)
|
||||
private StructNode CheckStructDefinition(StructSyntax node)
|
||||
{
|
||||
var structFields = new List<StructFieldNode>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user