class CBOR::Lexer

Defined in:

cbor/lexer.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

to_cbor(io : IO)
to_cbor(encoder : CBOR::Encoder)
to_cbor : Bytes
to_cbor

Class methods inherited from class Object

from_cbor(string_or_io) from_cbor

Constructor Detail

def self.new(slice : Bytes) #

[View source]
def self.new(io : IO) #

[View source]

Instance Method Detail

def next_pair : Tuple(Token::T, Token::T) #

Read the next pair of tokens, useful for maps. Raises an exception if there are no two pairs left.


[View source]
def next_token : Token::T | Nil #

[View source]
def to_negative_int(value : UInt8) #

Reads the UInt8 as a negative integer, returning the smallest integer capable of containing the value.


[View source]
def to_negative_int(value : UInt16) #

Reads the UInt16 as a negative integer, returning the smallest integer capable of containing the value.


[View source]
def to_negative_int(value : UInt32) #

Reads the UInt32 as a negative integer, returning the smallest integer capable of containing the value.


[View source]
def to_negative_int(value : UInt64) #

Reads the UInt64 as a negative integer, returning the smallest integer capable of containing the value.


[View source]