Kuba Ober d6d83d54a2 Fix annotations and constants: Factor out type definitions, and add definitions of annotations and constants.
The TypeDefinition is no longer overloaded for Annotation and Constant nodes, and the generator is happy again.
2019-08-29 13:36:58 -04:00

20 lines
467 B
C#

namespace CapnpC.Model
{
class Annotation : IDefinition
{
public ulong Id { get; }
public TypeTag Tag { get => TypeTag.Annotation; }
public IHasNestedDefinitions DeclaringElement { get; }
public Type Type { get; set; }
public Annotation(ulong id, IHasNestedDefinitions parent)
{
Id = id;
DeclaringElement = parent;
parent.NestedDefinitions.Add(this);
}
}
}