Add a parameter list to EnumElementDecl

This models, but does not plumb through, default arguments.
This commit is contained in:
Robert Widmann
2017-08-16 15:26:29 -07:00
parent 9deabd3581
commit 03580d2fe5
42 changed files with 471 additions and 306 deletions

View File

@@ -55,7 +55,8 @@ const uint16_t VERSION_MAJOR = 0;
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t VERSION_MINOR = 404; // Last change: inheritsSuperclassInitializers
const uint16_t VERSION_MINOR = 405; // Last change: EnumElementDecl has a ParameterList
using DeclIDField = BCFixed<31>;
@@ -1083,14 +1084,18 @@ namespace decls_block {
using EnumElementLayout = BCRecordLayout<
ENUM_ELEMENT_DECL,
IdentifierIDField, // name
DeclContextIDField,// context decl
TypeIDField, // interface type
BCFixed<1>, // has argument type?
BCFixed<1>, // implicit?
BCFixed<1>, // has payload?
EnumElementRawValueKindField, // raw value kind
BCFixed<1>, // negative raw value?
BCBlob // raw value
IdentifierIDField, // raw value
BCVBR<5>, // number of parameter name components
BCArray<IdentifierIDField> // name components,
// The record is trailed by:
// - its argument parameters, if any
>;
using SubscriptLayout = BCRecordLayout<