Package software.amazon.smithy.syntax
Enum TreeType
- java.lang.Object
-
- java.lang.Enum<TreeType>
-
- software.amazon.smithy.syntax.TreeType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TreeType>
public enum TreeType extends java.lang.Enum<TreeType>
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.
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected 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
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TreeType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
IDL
public static final TreeType IDL
-
CONTROL_SECTION
public static final TreeType CONTROL_SECTION
-
CONTROL_STATEMENT
public static final TreeType CONTROL_STATEMENT
-
METADATA_SECTION
public static final TreeType METADATA_SECTION
-
METADATA_STATEMENT
public static final TreeType METADATA_STATEMENT
-
SHAPE_SECTION
public static final TreeType SHAPE_SECTION
-
NAMESPACE_STATEMENT
public static final TreeType NAMESPACE_STATEMENT
-
USE_SECTION
public static final TreeType USE_SECTION
-
USE_STATEMENT
public static final TreeType USE_STATEMENT
-
SHAPE_STATEMENTS
public static final TreeType SHAPE_STATEMENTS
-
SHAPE_OR_APPLY_STATEMENT
public static final TreeType SHAPE_OR_APPLY_STATEMENT
-
SHAPE_STATEMENT
public static final TreeType SHAPE_STATEMENT
-
SHAPE
public static final TreeType SHAPE
-
SIMPLE_SHAPE
public static final TreeType SIMPLE_SHAPE
-
SIMPLE_TYPE_NAME
public static final TreeType SIMPLE_TYPE_NAME
-
ENUM_SHAPE
public static final TreeType ENUM_SHAPE
-
ENUM_TYPE_NAME
public static final TreeType ENUM_TYPE_NAME
-
ENUM_SHAPE_MEMBERS
public static final TreeType ENUM_SHAPE_MEMBERS
-
ENUM_SHAPE_MEMBER
public static final TreeType ENUM_SHAPE_MEMBER
-
AGGREGATE_SHAPE
public static final TreeType AGGREGATE_SHAPE
-
AGGREGATE_TYPE_NAME
public static final TreeType AGGREGATE_TYPE_NAME
-
FOR_RESOURCE
public static final TreeType FOR_RESOURCE
-
SHAPE_MEMBERS
public static final TreeType SHAPE_MEMBERS
-
SHAPE_MEMBER
public static final TreeType SHAPE_MEMBER
-
EXPLICIT_SHAPE_MEMBER
public static final TreeType EXPLICIT_SHAPE_MEMBER
-
ELIDED_SHAPE_MEMBER
public static final TreeType ELIDED_SHAPE_MEMBER
-
ENTITY_SHAPE
public static final TreeType ENTITY_SHAPE
-
ENTITY_TYPE_NAME
public static final TreeType ENTITY_TYPE_NAME
-
OPERATION_SHAPE
public static final TreeType OPERATION_SHAPE
-
OPERATION_BODY
public static final TreeType OPERATION_BODY
-
OPERATION_PROPERTY
public static final TreeType OPERATION_PROPERTY
-
OPERATION_INPUT
public static final TreeType OPERATION_INPUT
-
OPERATION_OUTPUT
public static final TreeType OPERATION_OUTPUT
-
INLINE_AGGREGATE_SHAPE
public static final TreeType INLINE_AGGREGATE_SHAPE
-
OPERATION_ERRORS
public static final TreeType OPERATION_ERRORS
-
MIXINS
public static final TreeType MIXINS
-
VALUE_ASSIGNMENT
public static final TreeType VALUE_ASSIGNMENT
-
TRAIT_STATEMENTS
public static final TreeType TRAIT_STATEMENTS
-
TRAIT
public static final TreeType TRAIT
-
TRAIT_BODY
public static final TreeType TRAIT_BODY
-
TRAIT_STRUCTURE
public static final TreeType TRAIT_STRUCTURE
-
TRAIT_NODE
public static final TreeType TRAIT_NODE
-
APPLY_STATEMENT
public static final TreeType APPLY_STATEMENT
-
APPLY_STATEMENT_SINGULAR
public static final TreeType APPLY_STATEMENT_SINGULAR
-
APPLY_STATEMENT_BLOCK
public static final TreeType APPLY_STATEMENT_BLOCK
-
NODE_VALUE
public static final TreeType NODE_VALUE
-
NODE_ARRAY
public static final TreeType NODE_ARRAY
-
NODE_OBJECT
public static final TreeType NODE_OBJECT
-
NODE_OBJECT_KVP
public static final TreeType NODE_OBJECT_KVP
-
NODE_OBJECT_KEY
public static final TreeType NODE_OBJECT_KEY
-
NODE_KEYWORD
public static final TreeType NODE_KEYWORD
-
NODE_STRING_VALUE
public static final TreeType NODE_STRING_VALUE
-
QUOTED_TEXT
public static final TreeType QUOTED_TEXT
-
TEXT_BLOCK
public static final TreeType TEXT_BLOCK
-
NUMBER
public static final TreeType NUMBER
-
SHAPE_ID
public static final TreeType SHAPE_ID
-
ROOT_SHAPE_ID
public static final TreeType ROOT_SHAPE_ID
-
ABSOLUTE_ROOT_SHAPE_ID
public static final TreeType ABSOLUTE_ROOT_SHAPE_ID
-
SHAPE_ID_MEMBER
public static final TreeType SHAPE_ID_MEMBER
-
NAMESPACE
public static final TreeType NAMESPACE
-
IDENTIFIER
public static final TreeType IDENTIFIER
-
SP
public static final TreeType SP
-
WS
public static final TreeType WS
-
COMMENT
public static final TreeType COMMENT
-
BR
public static final TreeType BR
-
COMMA
public static final TreeType COMMA
-
ERROR
public static final TreeType 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
public static final TreeType TOKEN
The innermost node of the token tree that contains an actual token returned fromIdlTokenizer
.
-
-
Method Detail
-
values
public static TreeType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TreeType c : TreeType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TreeType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- 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)
-
parseSharedStructureBodyWithinInline
protected static void parseSharedStructureBodyWithinInline(software.amazon.smithy.syntax.CapturingTokenizer tokenizer)
-
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)
-
-