enum Crystal::Keyword

Overview

All possible identifiers that may be considered keywords.

Defined in:

compiler/crystal/syntax/token.cr

Enum Members

ABSTRACT = 0
ALIAS = 1
ALIGNOF = 2
ANNOTATION = 3
AS = 4
AS_QUESTION = 5
ASM = 6
BEGIN = 7
BREAK = 8
CASE = 9
CLASS = 10
DEF = 11
DO = 12
ELSE = 13
ELSIF = 14
END = 15
ENSURE = 16
ENUM = 17
EXTEND = 18
FALSE = 19
FOR = 20
FUN = 21
IF = 22
IN = 23
INCLUDE = 24
INSTANCE_ALIGNOF = 25
INSTANCE_SIZEOF = 26
IS_A_QUESTION = 27
LIB = 28
MACRO = 29
MODULE = 30
NEXT = 31
NIL = 32
NIL_QUESTION = 33
OF = 34
OFFSETOF = 35
OUT = 36
POINTEROF = 37
PRIVATE = 38
PROTECTED = 39
REQUIRE = 40
RESCUE = 41
RESPONDS_TO_QUESTION = 42
RETURN = 43
SELECT = 44
SELF = 45
SIZEOF = 46
STRUCT = 47
SUPER = 48
THEN = 49
TRUE = 50
TYPE = 51
TYPEOF = 52
UNINITIALIZED = 53
UNION = 54
UNLESS = 55
UNTIL = 56
VERBATIM = 57
WHEN = 58
WHILE = 59
WITH = 60
YIELD = 61

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 abstract? #

Returns true if this enum value equals ABSTRACT


[View source]
def alias? #

Returns true if this enum value equals ALIAS


[View source]
def alignof? #

Returns true if this enum value equals ALIGNOF


[View source]
def annotation? #

Returns true if this enum value equals ANNOTATION


[View source]
def as? #

Returns true if this enum value equals AS


[View source]
def as_question? #

Returns true if this enum value equals AS_QUESTION


[View source]
def asm? #

Returns true if this enum value equals ASM


[View source]
def begin? #

Returns true if this enum value equals BEGIN


[View source]
def break? #

Returns true if this enum value equals BREAK


[View source]
def case? #

Returns true if this enum value equals CASE


[View source]
def class? #

Returns true if this enum value equals CLASS


[View source]
def def? #

Returns true if this enum value equals DEF


[View source]
def do? #

Returns true if this enum value equals DO


[View source]
def else? #

Returns true if this enum value equals ELSE


[View source]
def elsif? #

Returns true if this enum value equals ELSIF


[View source]
def end? #

Returns true if this enum value equals END


[View source]
def ensure? #

Returns true if this enum value equals ENSURE


[View source]
def enum? #

Returns true if this enum value equals ENUM


[View source]
def extend? #

Returns true if this enum value equals EXTEND


[View source]
def false? #

Returns true if this enum value equals FALSE


[View source]
def for? #

Returns true if this enum value equals FOR


[View source]
def fun? #

Returns true if this enum value equals FUN


[View source]
def if? #

Returns true if this enum value equals IF


[View source]
def in? #

Returns true if this enum value equals IN


[View source]
def include? #

Returns true if this enum value equals INCLUDE


[View source]
def instance_alignof? #

Returns true if this enum value equals INSTANCE_ALIGNOF


[View source]
def instance_sizeof? #

Returns true if this enum value equals INSTANCE_SIZEOF


[View source]
def is_a_question? #

Returns true if this enum value equals IS_A_QUESTION


[View source]
def lib? #

Returns true if this enum value equals LIB


[View source]
def macro? #

Returns true if this enum value equals MACRO


[View source]
def module? #

Returns true if this enum value equals MODULE


[View source]
def next? #

Returns true if this enum value equals NEXT


[View source]
def nil? #

Returns true if this enum value equals NIL


[View source]
def nil_question? #

Returns true if this enum value equals NIL_QUESTION


[View source]
def of? #

Returns true if this enum value equals OF


[View source]
def offsetof? #

Returns true if this enum value equals OFFSETOF


[View source]
def out? #

Returns true if this enum value equals OUT


[View source]
def pointerof? #

Returns true if this enum value equals POINTEROF


[View source]
def private? #

Returns true if this enum value equals PRIVATE


[View source]
def protected? #

Returns true if this enum value equals PROTECTED


[View source]
def require? #

Returns true if this enum value equals REQUIRE


[View source]
def rescue? #

Returns true if this enum value equals RESCUE


[View source]
def responds_to_question? #

Returns true if this enum value equals RESPONDS_TO_QUESTION


[View source]
def return? #

Returns true if this enum value equals RETURN


[View source]
def select? #

Returns true if this enum value equals SELECT


[View source]
def self? #

Returns true if this enum value equals SELF


[View source]
def sizeof? #

Returns true if this enum value equals SIZEOF


[View source]
def struct? #

Returns true if this enum value equals STRUCT


[View source]
def super? #

Returns true if this enum value equals SUPER


[View source]
def then? #

Returns true if this enum value equals THEN


[View source]
def to_s #
Description copied from struct Enum

Returns a String representation of this enum member. In the case of regular enums, this is just the name of the member. In the case of flag enums, it's the names joined by vertical bars, or "None", if the value is zero.

If an enum's value doesn't match a member's value, the raw value is returned as a string.

Color::Red.to_s                     # => "Red"
IOMode::None.to_s                   # => "None"
(IOMode::Read | IOMode::Write).to_s # => "Read | Write"

Color.new(10).to_s # => "10"

[View source]
def true? #

Returns true if this enum value equals TRUE


[View source]
def type? #

Returns true if this enum value equals TYPE


[View source]
def typeof? #

Returns true if this enum value equals TYPEOF


[View source]
def uninitialized? #

Returns true if this enum value equals UNINITIALIZED


[View source]
def union? #

Returns true if this enum value equals UNION


[View source]
def unless? #

Returns true if this enum value equals UNLESS


[View source]
def until? #

Returns true if this enum value equals UNTIL


[View source]
def verbatim? #

Returns true if this enum value equals VERBATIM


[View source]
def when? #

Returns true if this enum value equals WHEN


[View source]
def while? #

Returns true if this enum value equals WHILE


[View source]
def with? #

Returns true if this enum value equals WITH


[View source]
def yield? #

Returns true if this enum value equals YIELD


[View source]