enum
Crystal::Token::Kind
Defined in:
compiler/crystal/syntax/token.crEnum Members
-
EOF =
0 -
SPACE =
1 -
NEWLINE =
2 -
IDENT =
3 -
CONST =
4 -
INSTANCE_VAR =
5 -
CLASS_VAR =
6 -
CHAR =
7 -
STRING =
8 -
SYMBOL =
9 -
NUMBER =
10 -
UNDERSCORE =
11 -
COMMENT =
12 -
DELIMITER_START =
13 -
DELIMITER_END =
14 -
STRING_ARRAY_START =
15 -
INTERPOLATION_START =
16 -
SYMBOL_ARRAY_START =
17 -
STRING_ARRAY_END =
18 -
GLOBAL =
19 -
GLOBAL_MATCH_DATA_INDEX =
20 -
MAGIC_DIR =
21 -
MAGIC_END_LINE =
22 -
MAGIC_FILE =
23 -
MAGIC_LINE =
24 -
MACRO_LITERAL =
25 -
MACRO_EXPRESSION_START =
26 -
MACRO_CONTROL_START =
27 -
MACRO_VAR =
28 -
MACRO_END =
29 -
OP_BANG =
30 -
OP_BANG_EQ =
31 -
OP_BANG_TILDE =
32 -
OP_DOLLAR_QUESTION =
33 -
OP_DOLLAR_TILDE =
34 -
OP_PERCENT =
35 -
OP_PERCENT_EQ =
36 -
OP_PERCENT_RCURLY =
37 -
OP_AMP =
38 -
OP_AMP_AMP =
39 -
OP_AMP_AMP_EQ =
40 -
OP_AMP_STAR =
41 -
OP_AMP_STAR_STAR =
42 -
OP_AMP_STAR_EQ =
43 -
OP_AMP_PLUS =
44 -
OP_AMP_PLUS_EQ =
45 -
OP_AMP_MINUS =
46 -
OP_AMP_MINUS_EQ =
47 -
OP_AMP_EQ =
48 -
OP_LPAREN =
49 -
OP_RPAREN =
50 -
OP_STAR =
51 -
OP_STAR_STAR =
52 -
OP_STAR_STAR_EQ =
53 -
OP_STAR_EQ =
54 -
OP_PLUS =
55 -
OP_PLUS_EQ =
56 -
OP_COMMA =
57 -
OP_MINUS =
58 -
OP_MINUS_EQ =
59 -
OP_MINUS_GT =
60 -
OP_PERIOD =
61 -
OP_PERIOD_PERIOD =
62 -
OP_PERIOD_PERIOD_PERIOD =
63 -
OP_SLASH =
64 -
OP_SLASH_SLASH =
65 -
OP_SLASH_SLASH_EQ =
66 -
OP_SLASH_EQ =
67 -
OP_COLON =
68 -
OP_COLON_COLON =
69 -
OP_SEMICOLON =
70 -
OP_LT =
71 -
OP_LT_LT =
72 -
OP_LT_LT_EQ =
73 -
OP_LT_EQ =
74 -
OP_LT_EQ_GT =
75 -
OP_EQ =
76 -
OP_EQ_EQ =
77 -
OP_EQ_EQ_EQ =
78 -
OP_EQ_GT =
79 -
OP_EQ_TILDE =
80 -
OP_GT =
81 -
OP_GT_EQ =
82 -
OP_GT_GT =
83 -
OP_GT_GT_EQ =
84 -
OP_QUESTION =
85 -
OP_AT_LSQUARE =
86 -
OP_LSQUARE =
87 -
OP_LSQUARE_RSQUARE =
88 -
OP_LSQUARE_RSQUARE_EQ =
89 -
OP_LSQUARE_RSQUARE_QUESTION =
90 -
OP_RSQUARE =
91 -
OP_CARET =
92 -
OP_CARET_EQ =
93 -
OP_GRAVE =
94 -
OP_LCURLY =
95 -
OP_LCURLY_PERCENT =
96 -
OP_LCURLY_LCURLY =
97 -
OP_BAR =
98 -
OP_BAR_EQ =
99 -
OP_BAR_BAR =
100 -
OP_BAR_BAR_EQ =
101 -
OP_RCURLY =
102 -
OP_TILDE =
103
Instance Method Summary
- #assignment_operator?
-
#char?
Returns
trueif this enum value equalsCHAR -
#class_var?
Returns
trueif this enum value equalsCLASS_VAR -
#comment?
Returns
trueif this enum value equalsCOMMENT -
#const?
Returns
trueif this enum value equalsCONST -
#delimiter_end?
Returns
trueif this enum value equalsDELIMITER_END -
#delimiter_start?
Returns
trueif this enum value equalsDELIMITER_START -
#eof?
Returns
trueif this enum value equalsEOF -
#global?
Returns
trueif this enum value equalsGLOBAL -
#global_match_data_index?
Returns
trueif this enum value equalsGLOBAL_MATCH_DATA_INDEX -
#ident?
Returns
trueif this enum value equalsIDENT -
#instance_var?
Returns
trueif this enum value equalsINSTANCE_VAR -
#interpolation_start?
Returns
trueif this enum value equalsINTERPOLATION_START -
#macro_control_start?
Returns
trueif this enum value equalsMACRO_CONTROL_START -
#macro_end?
Returns
trueif this enum value equalsMACRO_END -
#macro_expression_start?
Returns
trueif this enum value equalsMACRO_EXPRESSION_START -
#macro_literal?
Returns
trueif this enum value equalsMACRO_LITERAL -
#macro_var?
Returns
trueif this enum value equalsMACRO_VAR - #magic?
-
#magic_dir?
Returns
trueif this enum value equalsMAGIC_DIR -
#magic_end_line?
Returns
trueif this enum value equalsMAGIC_END_LINE -
#magic_file?
Returns
trueif this enum value equalsMAGIC_FILE -
#magic_line?
Returns
trueif this enum value equalsMAGIC_LINE -
#newline?
Returns
trueif this enum value equalsNEWLINE -
#number?
Returns
trueif this enum value equalsNUMBER -
#op_amp?
Returns
trueif this enum value equalsOP_AMP -
#op_amp_amp?
Returns
trueif this enum value equalsOP_AMP_AMP -
#op_amp_amp_eq?
Returns
trueif this enum value equalsOP_AMP_AMP_EQ -
#op_amp_eq?
Returns
trueif this enum value equalsOP_AMP_EQ -
#op_amp_minus?
Returns
trueif this enum value equalsOP_AMP_MINUS -
#op_amp_minus_eq?
Returns
trueif this enum value equalsOP_AMP_MINUS_EQ -
#op_amp_plus?
Returns
trueif this enum value equalsOP_AMP_PLUS -
#op_amp_plus_eq?
Returns
trueif this enum value equalsOP_AMP_PLUS_EQ -
#op_amp_star?
Returns
trueif this enum value equalsOP_AMP_STAR -
#op_amp_star_eq?
Returns
trueif this enum value equalsOP_AMP_STAR_EQ -
#op_amp_star_star?
Returns
trueif this enum value equalsOP_AMP_STAR_STAR -
#op_at_lsquare?
Returns
trueif this enum value equalsOP_AT_LSQUARE -
#op_bang?
Returns
trueif this enum value equalsOP_BANG -
#op_bang_eq?
Returns
trueif this enum value equalsOP_BANG_EQ -
#op_bang_tilde?
Returns
trueif this enum value equalsOP_BANG_TILDE -
#op_bar?
Returns
trueif this enum value equalsOP_BAR -
#op_bar_bar?
Returns
trueif this enum value equalsOP_BAR_BAR -
#op_bar_bar_eq?
Returns
trueif this enum value equalsOP_BAR_BAR_EQ -
#op_bar_eq?
Returns
trueif this enum value equalsOP_BAR_EQ -
#op_caret?
Returns
trueif this enum value equalsOP_CARET -
#op_caret_eq?
Returns
trueif this enum value equalsOP_CARET_EQ -
#op_colon?
Returns
trueif this enum value equalsOP_COLON -
#op_colon_colon?
Returns
trueif this enum value equalsOP_COLON_COLON -
#op_comma?
Returns
trueif this enum value equalsOP_COMMA -
#op_dollar_question?
Returns
trueif this enum value equalsOP_DOLLAR_QUESTION -
#op_dollar_tilde?
Returns
trueif this enum value equalsOP_DOLLAR_TILDE -
#op_eq?
Returns
trueif this enum value equalsOP_EQ -
#op_eq_eq?
Returns
trueif this enum value equalsOP_EQ_EQ -
#op_eq_eq_eq?
Returns
trueif this enum value equalsOP_EQ_EQ_EQ -
#op_eq_gt?
Returns
trueif this enum value equalsOP_EQ_GT -
#op_eq_tilde?
Returns
trueif this enum value equalsOP_EQ_TILDE -
#op_grave?
Returns
trueif this enum value equalsOP_GRAVE -
#op_gt?
Returns
trueif this enum value equalsOP_GT -
#op_gt_eq?
Returns
trueif this enum value equalsOP_GT_EQ -
#op_gt_gt?
Returns
trueif this enum value equalsOP_GT_GT -
#op_gt_gt_eq?
Returns
trueif this enum value equalsOP_GT_GT_EQ -
#op_lcurly?
Returns
trueif this enum value equalsOP_LCURLY -
#op_lcurly_lcurly?
Returns
trueif this enum value equalsOP_LCURLY_LCURLY -
#op_lcurly_percent?
Returns
trueif this enum value equalsOP_LCURLY_PERCENT -
#op_lparen?
Returns
trueif this enum value equalsOP_LPAREN -
#op_lsquare?
Returns
trueif this enum value equalsOP_LSQUARE -
#op_lsquare_rsquare?
Returns
trueif this enum value equalsOP_LSQUARE_RSQUARE -
#op_lsquare_rsquare_eq?
Returns
trueif this enum value equalsOP_LSQUARE_RSQUARE_EQ -
#op_lsquare_rsquare_question?
Returns
trueif this enum value equalsOP_LSQUARE_RSQUARE_QUESTION -
#op_lt?
Returns
trueif this enum value equalsOP_LT -
#op_lt_eq?
Returns
trueif this enum value equalsOP_LT_EQ -
#op_lt_eq_gt?
Returns
trueif this enum value equalsOP_LT_EQ_GT -
#op_lt_lt?
Returns
trueif this enum value equalsOP_LT_LT -
#op_lt_lt_eq?
Returns
trueif this enum value equalsOP_LT_LT_EQ -
#op_minus?
Returns
trueif this enum value equalsOP_MINUS -
#op_minus_eq?
Returns
trueif this enum value equalsOP_MINUS_EQ -
#op_minus_gt?
Returns
trueif this enum value equalsOP_MINUS_GT -
#op_percent?
Returns
trueif this enum value equalsOP_PERCENT -
#op_percent_eq?
Returns
trueif this enum value equalsOP_PERCENT_EQ -
#op_percent_rcurly?
Returns
trueif this enum value equalsOP_PERCENT_RCURLY -
#op_period?
Returns
trueif this enum value equalsOP_PERIOD -
#op_period_period?
Returns
trueif this enum value equalsOP_PERIOD_PERIOD -
#op_period_period_period?
Returns
trueif this enum value equalsOP_PERIOD_PERIOD_PERIOD -
#op_plus?
Returns
trueif this enum value equalsOP_PLUS -
#op_plus_eq?
Returns
trueif this enum value equalsOP_PLUS_EQ -
#op_question?
Returns
trueif this enum value equalsOP_QUESTION -
#op_rcurly?
Returns
trueif this enum value equalsOP_RCURLY -
#op_rparen?
Returns
trueif this enum value equalsOP_RPAREN -
#op_rsquare?
Returns
trueif this enum value equalsOP_RSQUARE -
#op_semicolon?
Returns
trueif this enum value equalsOP_SEMICOLON -
#op_slash?
Returns
trueif this enum value equalsOP_SLASH -
#op_slash_eq?
Returns
trueif this enum value equalsOP_SLASH_EQ -
#op_slash_slash?
Returns
trueif this enum value equalsOP_SLASH_SLASH -
#op_slash_slash_eq?
Returns
trueif this enum value equalsOP_SLASH_SLASH_EQ -
#op_star?
Returns
trueif this enum value equalsOP_STAR -
#op_star_eq?
Returns
trueif this enum value equalsOP_STAR_EQ -
#op_star_star?
Returns
trueif this enum value equalsOP_STAR_STAR -
#op_star_star_eq?
Returns
trueif this enum value equalsOP_STAR_STAR_EQ -
#op_tilde?
Returns
trueif this enum value equalsOP_TILDE - #operator?
-
#space?
Returns
trueif this enum value equalsSPACE -
#string?
Returns
trueif this enum value equalsSTRING -
#string_array_end?
Returns
trueif this enum value equalsSTRING_ARRAY_END -
#string_array_start?
Returns
trueif this enum value equalsSTRING_ARRAY_START -
#symbol?
Returns
trueif this enum value equalsSYMBOL -
#symbol_array_start?
Returns
trueif this enum value equalsSYMBOL_ARRAY_START - #to_s : String
-
#unary_operator?
Returns true if the operator can be used in prefix notation.
-
#underscore?
Returns
trueif this enum value equalsUNDERSCORE
Instance methods inherited from struct Enum
&(other : self) : self
&,
+(other : Int) : self
+,
-(other : Int) : self
-,
<=>(other : self)
<=>,
==(other : self)==(other) ==, ^(other : self) : self ^, |(other : self) : self |, ~ : self ~, clone clone, each(& : self -> ) each, hash(hasher) hash, includes?(other : self) : Bool includes?, inspect(io : IO) : Nil inspect, to_f32 : Float32 to_f32, to_f32! : Float32 to_f32!, to_f64 : Float64 to_f64, to_f64! : Float64 to_f64!, to_i : Int32 to_i, to_i128 : Int128 to_i128, to_i128! : Int128 to_i128!, to_i16 : Int16 to_i16, to_i16! : Int16 to_i16!, to_i32 : Int32 to_i32, to_i32! : Int32 to_i32!, to_i64 : Int64 to_i64, to_i64! : Int64 to_i64!, to_i8 : Int8 to_i8, to_i8! : Int8 to_i8!, to_json(json : JSON::Builder) : Nil to_json, to_s(io : IO) : Nil
to_s : String to_s, to_u128 : UInt128 to_u128, to_u128! : UInt128 to_u128!, to_u16 : UInt16 to_u16, to_u16! : UInt16 to_u16!, to_u32 : UInt32 to_u32, to_u32! : UInt32 to_u32!, to_u64 : UInt64 to_u64, to_u64! : UInt64 to_u64!, to_u8 : UInt8 to_u8, to_u8! : UInt8 to_u8!, to_yaml(yaml : YAML::Nodes::Builder) to_yaml, value : Int value
Constructor methods inherited from struct Enum
from_value(value : Int) : self
from_value,
new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)new(value : self)
new(pull : JSON::PullParser) : self new, parse(string : String) : self parse
Class methods inherited from struct Enum
each(& : self -> )
each,
from_value?(value : Int) : self | Nil
from_value?,
names : Array(String)
names,
parse?(string : String) : self | Nil
parse?,
valid?(value : self) : Bool
valid?,
values : Array(self)
values
Macros inherited from struct Enum
[](*values)
[],
flags(*values)
flags
Instance methods inherited from module Comparable(Enum)
<(other : T) : Bool
<,
<=(other : T)
<=,
<=>(other : T)
<=>,
==(other : T)
==,
>(other : T) : Bool
>,
>=(other : T)
>=,
clamp(min, max)clamp(range : Range) clamp
Instance methods inherited from struct Value
==(other : Log::Metadata::Value)==(other : JSON::Any)
==(other : YAML::Any)
==(other) ==, dup dup
Instance methods inherited from class Object
! : Bool
!,
!=(other)
!=,
!~(other)
!~,
==(other)
==,
===(other : JSON::Any)===(other : YAML::Any)
===(other) ===, =~(other) =~, as(type : Class) as, as?(type : Class) as?, class class, dup dup, hash(hasher)
hash hash, in?(collection : Object) : Bool
in?(*values : Object) : Bool in?, inspect(io : IO) : Nil
inspect : String inspect, is_a?(type : Class) : Bool is_a?, itself itself, nil? : Bool nil?, not_nil!(message)
not_nil! not_nil!, pretty_inspect(width = 79, newline = "\n", indent = 0) : String pretty_inspect, pretty_print(pp : PrettyPrint) : Nil pretty_print, responds_to?(name : Symbol) : Bool responds_to?, tap(&) tap, to_json(io : IO) : Nil
to_json : String to_json, to_pretty_json(indent : String = " ") : String
to_pretty_json(io : IO, indent : String = " ") : Nil to_pretty_json, to_s(io : IO) : Nil
to_s : String to_s, to_yaml(io : IO) : Nil
to_yaml : String to_yaml, try(&) try, unsafe_as(type : T.class) forall T unsafe_as
Class methods inherited from class Object
from_json(string_or_io : String | IO, root : String)from_json(string_or_io : String | IO) from_json, from_yaml(string_or_io : String | IO) from_yaml
Macros inherited from class Object
class_getter(*names, &block)
class_getter,
class_getter!(*names)
class_getter!,
class_getter?(*names, &block)
class_getter?,
class_property(*names, &block)
class_property,
class_property!(*names)
class_property!,
class_property?(*names, &block)
class_property?,
class_setter(*names)
class_setter,
def_clone
def_clone,
def_equals(*fields)
def_equals,
def_equals_and_hash(*fields)
def_equals_and_hash,
def_hash(*fields)
def_hash,
delegate(*methods, to object)
delegate,
forward_missing_to(delegate)
forward_missing_to,
getter(*names, &block)
getter,
getter!(*names)
getter!,
getter?(*names, &block)
getter?,
property(*names, &block)
property,
property!(*names)
property!,
property?(*names, &block)
property?,
setter(*names)
setter
Instance Method Detail
Returns true if this enum value equals OP_LSQUARE_RSQUARE_QUESTION
non-flag enums are special since the IO overload relies on the
String-returning overload instead of the other way round
Returns true if the operator can be used in prefix notation.
Related: ToSVisitor::UNARY_OPERATORS