Package com.io7m.cedarbridge.schema.parser.internal

# Class CBVariantParser

java.lang.Object
com.io7m.cedarbridge.schema.parser.internal.CBVariantParser

All Implemented Interfaces:
  `CBElementParserType<CBASTTypeVariant>`

public final class CBVariantParser extends Object implements CBElementParserType<CBASTTypeVariant>
A parser for variant declarations.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Optional<UUID>`
  `SPEC_SECTION`
  The syntax section for variants.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CBVariantParser()`
  A parser for variant declarations.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CBASTTypeVariant`
  `parse(CBParseContextType context, com.io7m.jsx.SExpressionType expression)`
  Parse an element.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### SPEC_SECTION

    public static final Optional<UUID> SPEC_SECTION
    The syntax section for variants.

- ## Constructor Details

  - ### CBVariantParser

    public CBVariantParser()
    A parser for variant declarations.

- ## Method Details

  - ### parse

    public CBASTTypeVariant parse(CBParseContextType context, com.io7m.jsx.SExpressionType expression) throws CBParseFailedException
    Description copied from interface: `CBElementParserType`
    Parse an element.
    Specified by:
      `parse` in interface `CBElementParserType<CBASTTypeVariant>`
    Parameters:
      `context` - The context
      `expression` - The expression
    Returns:
      A parsed element
    Throws:
      `CBParseFailedException` - On parse errors