-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added type-alias * Tore out intrinsic aliasing in codegen * More C H A O S * Made intrinsic forward * Update MetadataCodegen.cs * Many tests fixed * Update BinderFacts.cs * Update TypeSymbol.cs * Correctness * Update TypeSymbol.cs * Update TypeCheckingTests.cs * Works * Cleanup * Update ExpressionCompletionProvider.cs
- Loading branch information
1 parent
faf4445
commit 3a244c5
Showing
20 changed files
with
227 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
src/Draco.Compiler/Internal/Symbols/Synthetized/MetadataBackedPrimitiveTypeSymbol.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/Draco.Compiler/Internal/Symbols/Synthetized/SynthetizedTypeAliasSymbol.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace Draco.Compiler.Internal.Symbols.Synthetized; | ||
|
||
/// <summary> | ||
/// A type-alias defined by the compiler. | ||
/// </summary> | ||
internal sealed class SynthetizedTypeAliasSymbol : TypeAliasSymbol | ||
{ | ||
public override string Name { get; } | ||
public override Symbol? ContainingSymbol => null; | ||
public override TypeSymbol Substitution { get; } | ||
|
||
public SynthetizedTypeAliasSymbol(string name, TypeSymbol substitution) | ||
{ | ||
this.Name = name; | ||
this.Substitution = substitution; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Draco.Compiler.Api.Semantics; | ||
|
||
namespace Draco.Compiler.Internal.Symbols; | ||
|
||
/// <summary> | ||
/// Alias for a type. Not a real type itself. | ||
/// </summary> | ||
internal abstract class TypeAliasSymbol : Symbol, IMemberSymbol | ||
{ | ||
public bool IsStatic => true; | ||
|
||
/// <summary> | ||
/// The type being aliased. | ||
/// </summary> | ||
public abstract TypeSymbol Substitution { get; } | ||
|
||
public override void Accept(SymbolVisitor visitor) => visitor.VisitTypeAlias(this); | ||
public override TResult Accept<TResult>(SymbolVisitor<TResult> visitor) => visitor.VisitTypeAlias(this); | ||
public override ISymbol ToApiSymbol() => new Api.Semantics.TypeAliasSymbol(this); | ||
} |
Oops, something went wrong.