Package software.amazon.smithy.syntax
Enum Class TreeType
- All Implemented Interfaces:
Serializable
,Comparable<TreeType>
,Constable
Defines the tree type.
These types typically map 1:1 to a production in the Smithy IDL grammar, except that tree types bottom-out at
IdlToken
.
For example:
- The
Identifier
production is combined into a singleIDENTIFIER
node.IdentifierStart
andIdentifierChars
are not exposed in the token tree. - The
Number
production is combined into a singleNUMBER
node. Productions likeDecimalPoint
,Exp
, etc are not exposed in the token tree. - The
QuotedText
production is combined into a singleQUOTED_TEXT
node. - The
TextBlock
production is combined into a singleTEXT_BLOCK
node.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAn ERROR tree is created when a parser error is encountered; that is, any parse tree that contains this node is an invalid model.The innermost node of the token tree that contains an actual token returned fromIdlTokenizer
. -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
operationInputOutputDefinition
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) protected static void
optionalSpaces
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) protected static void
optionalWs
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) protected static void
parseOptionalForResource
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) protected static void
parseOptionalMixins
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) protected static void
parseOptionalValueAssignment
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) protected static void
parseShapeTypeAndName
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) protected static void
parseShapeTypeAndName
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer, TreeType typeName) protected static void
parseSharedStructureBodyWithinInline
(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) static TreeType
Returns the enum constant of this class with the specified name.static TreeType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDL
-
CONTROL_SECTION
-
CONTROL_STATEMENT
-
METADATA_SECTION
-
METADATA_STATEMENT
-
SHAPE_SECTION
-
NAMESPACE_STATEMENT
-
USE_SECTION
-
USE_STATEMENT
-
SHAPE_STATEMENTS
-
SHAPE_OR_APPLY_STATEMENT
-
SHAPE_STATEMENT
-
SHAPE
-
SIMPLE_SHAPE
-
SIMPLE_TYPE_NAME
-
ENUM_SHAPE
-
ENUM_TYPE_NAME
-
ENUM_SHAPE_MEMBERS
-
ENUM_SHAPE_MEMBER
-
AGGREGATE_SHAPE
-
AGGREGATE_TYPE_NAME
-
FOR_RESOURCE
-
SHAPE_MEMBERS
-
SHAPE_MEMBER
-
EXPLICIT_SHAPE_MEMBER
-
ELIDED_SHAPE_MEMBER
-
ENTITY_SHAPE
-
ENTITY_TYPE_NAME
-
OPERATION_SHAPE
-
OPERATION_BODY
-
OPERATION_PROPERTY
-
OPERATION_INPUT
-
OPERATION_OUTPUT
-
INLINE_AGGREGATE_SHAPE
-
OPERATION_ERRORS
-
MIXINS
-
VALUE_ASSIGNMENT
-
TRAIT_STATEMENTS
-
TRAIT
-
TRAIT_BODY
-
TRAIT_STRUCTURE
-
TRAIT_NODE
-
APPLY_STATEMENT
-
APPLY_STATEMENT_SINGULAR
-
APPLY_STATEMENT_BLOCK
-
NODE_VALUE
-
NODE_ARRAY
-
NODE_OBJECT
-
NODE_OBJECT_KVP
-
NODE_OBJECT_KEY
-
NODE_KEYWORD
-
NODE_STRING_VALUE
-
QUOTED_TEXT
-
TEXT_BLOCK
-
NUMBER
-
SHAPE_ID
-
ROOT_SHAPE_ID
-
ABSOLUTE_ROOT_SHAPE_ID
-
SHAPE_ID_MEMBER
-
NAMESPACE
-
IDENTIFIER
-
SP
-
WS
-
COMMENT
-
BR
-
COMMA
-
ERROR
An ERROR tree is created when a parser error is encountered; that is, any parse tree that contains this node is an invalid model. -
TOKEN
The innermost node of the token tree that contains an actual token returned fromIdlTokenizer
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
optionalWs
protected static void optionalWs(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) -
optionalSpaces
protected static void optionalSpaces(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) -
parseShapeTypeAndName
protected static void parseShapeTypeAndName(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) -
parseShapeTypeAndName
protected static void parseShapeTypeAndName(software.amazon.smithy.syntax.CapturingTokenizer tokenizer, TreeType typeName) -
parseOptionalForResource
protected static void parseOptionalForResource(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) -
parseOptionalMixins
protected static void parseOptionalMixins(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) -
parseOptionalValueAssignment
protected static void parseOptionalValueAssignment(software.amazon.smithy.syntax.CapturingTokenizer tokenizer) -
operationInputOutputDefinition
protected static void operationInputOutputDefinition(software.amazon.smithy.syntax.CapturingTokenizer tokenizer)
-