tmp...
This commit is contained in:
@@ -74,7 +74,7 @@ public class Parser
|
||||
}
|
||||
}
|
||||
|
||||
modifier_done:
|
||||
modifier_done:
|
||||
|
||||
if (TryExpectKeyword(Keyword.Func))
|
||||
{
|
||||
@@ -524,6 +524,13 @@ public class Parser
|
||||
return new NodeTypeAnonymousStruct(TokensFrom(startIndex), fields);
|
||||
}
|
||||
|
||||
if (TryExpectSymbol(Symbol.OpenSquare))
|
||||
{
|
||||
ExpectSymbol(Symbol.CloseSquare);
|
||||
var elementType = ParseType();
|
||||
return new NodeTypeArray(TokensFrom(startIndex), elementType);
|
||||
}
|
||||
|
||||
if (TryExpectIdent(out var ident))
|
||||
{
|
||||
switch (ident.Ident)
|
||||
@@ -1035,6 +1042,11 @@ public class NodeTypeAnonymousStruct(List<Token> tokens, List<NodeTypeAnonymousS
|
||||
}
|
||||
}
|
||||
|
||||
public class NodeTypeArray(List<Token> tokens, NodeType elementType) : NodeType(tokens)
|
||||
{
|
||||
public NodeType ElementType { get; } = elementType;
|
||||
}
|
||||
|
||||
public class NodeTypePointer(List<Token> tokens, NodeType to) : NodeType(tokens)
|
||||
{
|
||||
public NodeType To { get; } = to;
|
||||
|
||||
Reference in New Issue
Block a user