class Savi::Parser::Builder::State

Overview

This State is used mainly for keeping track of line numbers and ranges, so that we can better populate a Source::Pos with all the info it needs.

Defined in:

savi/parser/builder/state.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(source : Source) #

[View source]

Instance Method Detail

def pos(token : Pegmatite::Token) : Source::Pos #

[View source]
def pos_single_with_offset(token : Pegmatite::Token, offset : Int32) : Source::Pos #

[View source]
def slice(token : Pegmatite::Token) #

[View source]
def slice(range : Range) #

[View source]
def slice_with_escapes(token : Pegmatite::Token) #

[View source]
def source : Savi::Source #

[View source]