ref
This commit is contained in:
@@ -716,6 +716,12 @@ public sealed class Parser
|
||||
}
|
||||
}
|
||||
|
||||
if (TryExpectSymbol(Symbol.Ampersand))
|
||||
{
|
||||
var baseType = ParseType();
|
||||
return new RefTypeSyntax(GetTokens(startIndex), baseType);
|
||||
}
|
||||
|
||||
if (TryExpectSymbol(Symbol.Caret))
|
||||
{
|
||||
var baseType = ParseType();
|
||||
|
||||
@@ -150,4 +150,6 @@ public record ConstArrayTypeSyntax(List<Token> Tokens, TypeSyntax BaseType, ulon
|
||||
|
||||
public record CustomTypeSyntax(List<Token> Tokens, IdentifierToken? ModuleToken, IdentifierToken NameToken) : TypeSyntax(Tokens);
|
||||
|
||||
public record RefTypeSyntax(List<Token> Tokens, TypeSyntax BaseType) : TypeSyntax(Tokens);
|
||||
|
||||
#endregion
|
||||
Reference in New Issue
Block a user