17 lines
608 B
C#
17 lines
608 B
C#
using Nub.Lang.Frontend.Lexing;
|
|
using Nub.Lang.Frontend.Typing;
|
|
|
|
namespace Nub.Lang.Frontend.Parsing;
|
|
|
|
public class StructField(string name, NubType type, Optional<ExpressionNode> value)
|
|
{
|
|
public string Name { get; } = name;
|
|
public NubType Type { get; } = type;
|
|
public Optional<ExpressionNode> Value { get; } = value;
|
|
}
|
|
|
|
public class StructDefinitionNode(IReadOnlyList<Token> tokens, Optional<string> documentation, string name, List<StructField> fields) : DefinitionNode(tokens, documentation)
|
|
{
|
|
public string Name { get; } = name;
|
|
public List<StructField> Fields { get; } = fields;
|
|
} |