Kuba Ober 8d9c3a8b57 Fix by renaming enumerants that happen to be keywords.
This fixes e.g. the compilation of capnp/schema.capnp.
2019-08-29 13:36:58 -04:00

15 lines
374 B
C#

namespace CapnpC.Model
{
class Enumerant
{
string _literal;
public TypeDefinition TypeDefinition { get; set; }
public string Literal {
get => _literal;
set => _literal = IdentifierRenamer.ToNonKeyword(value);
}
public ushort? Ordinal { get; set; }
public int CodeOrder { get; set; }
}
}