class SBAN::Lexer

Defined in:

sban/lexer.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

to_sban(io : IO)
to_sban(encoder : SBAN::Encoder)
to_sban : Bytes
to_sban

Class methods inherited from class Object

from_sban(string_or_io) from_sban

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]