enum Crystal::Token::Kind

Defined in:

compiler/crystal/syntax/token.cr

Enum 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

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

def assignment_operator? #

[View source]
def char? #

Returns true if this enum value equals CHAR


[View source]
def class_var? #

Returns true if this enum value equals CLASS_VAR


[View source]
def comment? #

Returns true if this enum value equals COMMENT


[View source]
def const? #

Returns true if this enum value equals CONST


[View source]
def delimiter_end? #

Returns true if this enum value equals DELIMITER_END


[View source]
def delimiter_start? #

Returns true if this enum value equals DELIMITER_START


[View source]
def eof? #

Returns true if this enum value equals EOF


[View source]
def global? #

Returns true if this enum value equals GLOBAL


[View source]
def global_match_data_index? #

Returns true if this enum value equals GLOBAL_MATCH_DATA_INDEX


[View source]
def ident? #

Returns true if this enum value equals IDENT


[View source]
def instance_var? #

Returns true if this enum value equals INSTANCE_VAR


[View source]
def interpolation_start? #

Returns true if this enum value equals INTERPOLATION_START


[View source]
def macro_control_start? #

Returns true if this enum value equals MACRO_CONTROL_START


[View source]
def macro_end? #

Returns true if this enum value equals MACRO_END


[View source]
def macro_expression_start? #

Returns true if this enum value equals MACRO_EXPRESSION_START


[View source]
def macro_literal? #

Returns true if this enum value equals MACRO_LITERAL


[View source]
def macro_var? #

Returns true if this enum value equals MACRO_VAR


[View source]
def magic? #

[View source]
def magic_dir? #

Returns true if this enum value equals MAGIC_DIR


[View source]
def magic_end_line? #

Returns true if this enum value equals MAGIC_END_LINE


[View source]
def magic_file? #

Returns true if this enum value equals MAGIC_FILE


[View source]
def magic_line? #

Returns true if this enum value equals MAGIC_LINE


[View source]
def newline? #

Returns true if this enum value equals NEWLINE


[View source]
def number? #

Returns true if this enum value equals NUMBER


[View source]
def op_amp? #

Returns true if this enum value equals OP_AMP


[View source]
def op_amp_amp? #

Returns true if this enum value equals OP_AMP_AMP


[View source]
def op_amp_amp_eq? #

Returns true if this enum value equals OP_AMP_AMP_EQ


[View source]
def op_amp_eq? #

Returns true if this enum value equals OP_AMP_EQ


[View source]
def op_amp_minus? #

Returns true if this enum value equals OP_AMP_MINUS


[View source]
def op_amp_minus_eq? #

Returns true if this enum value equals OP_AMP_MINUS_EQ


[View source]
def op_amp_plus? #

Returns true if this enum value equals OP_AMP_PLUS


[View source]
def op_amp_plus_eq? #

Returns true if this enum value equals OP_AMP_PLUS_EQ


[View source]
def op_amp_star? #

Returns true if this enum value equals OP_AMP_STAR


[View source]
def op_amp_star_eq? #

Returns true if this enum value equals OP_AMP_STAR_EQ


[View source]
def op_amp_star_star? #

Returns true if this enum value equals OP_AMP_STAR_STAR


[View source]
def op_at_lsquare? #

Returns true if this enum value equals OP_AT_LSQUARE


[View source]
def op_bang? #

Returns true if this enum value equals OP_BANG


[View source]
def op_bang_eq? #

Returns true if this enum value equals OP_BANG_EQ


[View source]
def op_bang_tilde? #

Returns true if this enum value equals OP_BANG_TILDE


[View source]
def op_bar? #

Returns true if this enum value equals OP_BAR


[View source]
def op_bar_bar? #

Returns true if this enum value equals OP_BAR_BAR


[View source]
def op_bar_bar_eq? #

Returns true if this enum value equals OP_BAR_BAR_EQ


[View source]
def op_bar_eq? #

Returns true if this enum value equals OP_BAR_EQ


[View source]
def op_caret? #

Returns true if this enum value equals OP_CARET


[View source]
def op_caret_eq? #

Returns true if this enum value equals OP_CARET_EQ


[View source]
def op_colon? #

Returns true if this enum value equals OP_COLON


[View source]
def op_colon_colon? #

Returns true if this enum value equals OP_COLON_COLON


[View source]
def op_comma? #

Returns true if this enum value equals OP_COMMA


[View source]
def op_dollar_question? #

Returns true if this enum value equals OP_DOLLAR_QUESTION


[View source]
def op_dollar_tilde? #

Returns true if this enum value equals OP_DOLLAR_TILDE


[View source]
def op_eq? #

Returns true if this enum value equals OP_EQ


[View source]
def op_eq_eq? #

Returns true if this enum value equals OP_EQ_EQ


[View source]
def op_eq_eq_eq? #

Returns true if this enum value equals OP_EQ_EQ_EQ


[View source]
def op_eq_gt? #

Returns true if this enum value equals OP_EQ_GT


[View source]
def op_eq_tilde? #

Returns true if this enum value equals OP_EQ_TILDE


[View source]
def op_grave? #

Returns true if this enum value equals OP_GRAVE


[View source]
def op_gt? #

Returns true if this enum value equals OP_GT


[View source]
def op_gt_eq? #

Returns true if this enum value equals OP_GT_EQ


[View source]
def op_gt_gt? #

Returns true if this enum value equals OP_GT_GT


[View source]
def op_gt_gt_eq? #

Returns true if this enum value equals OP_GT_GT_EQ


[View source]
def op_lcurly? #

Returns true if this enum value equals OP_LCURLY


[View source]
def op_lcurly_lcurly? #

Returns true if this enum value equals OP_LCURLY_LCURLY


[View source]
def op_lcurly_percent? #

Returns true if this enum value equals OP_LCURLY_PERCENT


[View source]
def op_lparen? #

Returns true if this enum value equals OP_LPAREN


[View source]
def op_lsquare? #

Returns true if this enum value equals OP_LSQUARE


[View source]
def op_lsquare_rsquare? #

Returns true if this enum value equals OP_LSQUARE_RSQUARE


[View source]
def op_lsquare_rsquare_eq? #

Returns true if this enum value equals OP_LSQUARE_RSQUARE_EQ


[View source]
def op_lsquare_rsquare_question? #

Returns true if this enum value equals OP_LSQUARE_RSQUARE_QUESTION


[View source]
def op_lt? #

Returns true if this enum value equals OP_LT


[View source]
def op_lt_eq? #

Returns true if this enum value equals OP_LT_EQ


[View source]
def op_lt_eq_gt? #

Returns true if this enum value equals OP_LT_EQ_GT


[View source]
def op_lt_lt? #

Returns true if this enum value equals OP_LT_LT


[View source]
def op_lt_lt_eq? #

Returns true if this enum value equals OP_LT_LT_EQ


[View source]
def op_minus? #

Returns true if this enum value equals OP_MINUS


[View source]
def op_minus_eq? #

Returns true if this enum value equals OP_MINUS_EQ


[View source]
def op_minus_gt? #

Returns true if this enum value equals OP_MINUS_GT


[View source]
def op_percent? #

Returns true if this enum value equals OP_PERCENT


[View source]
def op_percent_eq? #

Returns true if this enum value equals OP_PERCENT_EQ


[View source]
def op_percent_rcurly? #

Returns true if this enum value equals OP_PERCENT_RCURLY


[View source]
def op_period? #

Returns true if this enum value equals OP_PERIOD


[View source]
def op_period_period? #

Returns true if this enum value equals OP_PERIOD_PERIOD


[View source]
def op_period_period_period? #

Returns true if this enum value equals OP_PERIOD_PERIOD_PERIOD


[View source]
def op_plus? #

Returns true if this enum value equals OP_PLUS


[View source]
def op_plus_eq? #

Returns true if this enum value equals OP_PLUS_EQ


[View source]
def op_question? #

Returns true if this enum value equals OP_QUESTION


[View source]
def op_rcurly? #

Returns true if this enum value equals OP_RCURLY


[View source]
def op_rparen? #

Returns true if this enum value equals OP_RPAREN


[View source]
def op_rsquare? #

Returns true if this enum value equals OP_RSQUARE


[View source]
def op_semicolon? #

Returns true if this enum value equals OP_SEMICOLON


[View source]
def op_slash? #

Returns true if this enum value equals OP_SLASH


[View source]
def op_slash_eq? #

Returns true if this enum value equals OP_SLASH_EQ


[View source]
def op_slash_slash? #

Returns true if this enum value equals OP_SLASH_SLASH


[View source]
def op_slash_slash_eq? #

Returns true if this enum value equals OP_SLASH_SLASH_EQ


[View source]
def op_star? #

Returns true if this enum value equals OP_STAR


[View source]
def op_star_eq? #

Returns true if this enum value equals OP_STAR_EQ


[View source]
def op_star_star? #

Returns true if this enum value equals OP_STAR_STAR


[View source]
def op_star_star_eq? #

Returns true if this enum value equals OP_STAR_STAR_EQ


[View source]
def op_tilde? #

Returns true if this enum value equals OP_TILDE


[View source]
def operator? #

[View source]
def space? #

Returns true if this enum value equals SPACE


[View source]
def string? #

Returns true if this enum value equals STRING


[View source]
def string_array_end? #

Returns true if this enum value equals STRING_ARRAY_END


[View source]
def string_array_start? #

Returns true if this enum value equals STRING_ARRAY_START


[View source]
def symbol? #

Returns true if this enum value equals SYMBOL


[View source]
def symbol_array_start? #

Returns true if this enum value equals SYMBOL_ARRAY_START


[View source]
def to_s : String #

non-flag enums are special since the IO overload relies on the String-returning overload instead of the other way round


[View source]
def unary_operator? #

Returns true if the operator can be used in prefix notation.

Related: ToSVisitor::UNARY_OPERATORS


[View source]
def underscore? #

Returns true if this enum value equals UNDERSCORE


[View source]