module Lua::StackMixin::Type

Direct including types

Defined in:

lua/stack/type.cr

Instance Method Summary

Instance Method Detail

def crystal_base_type_at(pos : Int) #

[View source]
def crystal_type_at(pos : Int) #

[View source]
def crystal_type_info_at(pos : Int) #

[View source]
def type_at(pos : Int) #

Returns type at pos in the stack.

stack = Lua::Stack.new
stack << "hello"
stack.type_at(1) # => TSTRING

[View source]
def typename(pos : Int) #

Returns name of the type at pos in the stack.

stack = Lua::Stack.new
stack << "my_super_string"
stack << 42
stack.typename(1) # => "string"
stack.typename(2) # => "number"
stack.typename(3) # => "no value"

[View source]
def typename(type : TYPE) #

Returns name of the type.

stack = Lub::Stack.new
stack.typename(TYPE::TBOOLEAN) # => "boolean"

[View source]