MCPcopy Index your code
hub / github.com/apache/groovy / Types

Class Types

src/main/java/org/codehaus/groovy/syntax/Types.java:37–1629  ·  view source on GitHub ↗

Registry of token type constants and type hierarchy definitions for the concrete syntax tree (CST) system. Provides constants for lexical tokens (literals, keywords, operators), semantic types, type classifications, and utility methods for type checking and querying. All Token, {@link CSTNod

Source from the content-addressed store, hash-verified

35 * nodes reference types from this class to identify their syntactic and semantic meaning.
36 */
37public class Types {
38
39 //---------------------------------------------------------------------------
40 // TYPES: NOTE THAT ORDERING AND VALUES ARE IMPORTANT TO LOCAL ROUTINES!
41
42 //
43 // SPECIAL TOKENS
44
45 /** End-of-file indicator. */
46 public static final int EOF = -1; // end of file
47 /** Unknown token type. */
48 public static final int UNKNOWN = 0; // the unknown token
49
50
51 //
52 // RELEVANT WHITESPACE
53
54 /** Newline character ({@code \n}). */
55 public static final int NEWLINE = 5; // \n
56
57
58 //
59 // OPERATORS AND OTHER MARKERS
60
61 /** Left curly brace ({@code {}}). */
62 public static final int LEFT_CURLY_BRACE = 10; // {
63 /** Right curly brace ({@code }}). */
64 public static final int RIGHT_CURLY_BRACE = 20; // }
65 /** Left square bracket ({@code []}). */
66 public static final int LEFT_SQUARE_BRACKET = 30; // [
67 /** Right square bracket ({@code ]}). */
68 public static final int RIGHT_SQUARE_BRACKET = 40; // ]
69 /** Left parenthesis ({@code (}). */
70 public static final int LEFT_PARENTHESIS = 50; // (
71 /** Right parenthesis ({@code )}). */
72 public static final int RIGHT_PARENTHESIS = 60; // )
73
74 /** Dot operator ({@code .}). */
75 public static final int DOT = 70; // .
76 /** Range operator ({@code ..}). */
77 public static final int DOT_DOT = 75; // ..
78 /** Spread operator ({@code ...}). */
79 public static final int DOT_DOT_DOT = 77; // ...
80
81 /** Navigation operator ({@code ->}). */
82 public static final int NAVIGATE = 80; // ->
83
84 /** Regex find operator ({@code =~}). */
85 public static final int FIND_REGEX = 90; // =~
86 /** Regex match operator ({@code ==~}). */
87 public static final int MATCH_REGEX = 94; // ==~
88 /** Regex pattern operator ({@code ~}). */
89 public static final int REGEX_PATTERN = 97; // ~
90 /** Implies operator ({@code ==>}). */
91 public static final int IMPLIES = 99; // ==>
92
93 /** Assignment operator ({@code =}). */
94 public static final int EQUAL = 100; // =

Callers

nothing calls this directly

Calls 6

addTranslationMethod · 0.95
addKeywordMethod · 0.95
addDescriptionMethod · 0.95
getValueMethod · 0.65
getKeyMethod · 0.65
entrySetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…