struct C0::Token

Defined in:

c0/token.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(type : TokenType, start : Int32, end __arg0 : Int32) #

[View source]

Instance Method Detail

def end : Int32 #

[View source]
def size : Int32 #

Returns the byte length of this token's data.


[View source]
def start : Int32 #

[View source]
def type : TokenType #

[View source]
def value(buf : Bytes) : Bytes #

Returns the value as a slice into the given buffer. Zero-copy.


[View source]