Class VariantEntry

This is a foreign class that wraps over an enum variant.

0 define doc: String

Return the docblock of this variant, or an empty string. Docblocks are only saved when a variant is parsed in manifest mode.

0 define enum_id: Integer

Return the id of the enum parent of this variant.

0 define enum_name: String

Return the name of the enum parent of this variant.

0 define is_empty: Boolean

Returns true if the variant is empty, false otherwise. Empty variants are variants that do not receive any values.

0 define is_scoped: Boolean

Returns true if the variant is scoped, false otherwise. A variant is scoped if the enum was prefixed with 'scoped' during declarations. Scoped variants must be qualified with their names to be used, whereas flat variants are directly available.

0 define name: String

Return the name of the variant provided.

0 define parameters: List[ParameterEntry]

Return the parameters of this variant, or [] if this variant does not take parameters. Since variants do not accept parameter names, the name is always "".

0 define type: TypeEntry

Return the type of the method provided.

0 define value: String

Return the backing value (if a value variant), "" otherwise.