class Ktistec::Parser

Overview

Parses an input into a syntax tree.

Defined in:

utils/parser.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(input : String) #

Creates a parser for the given input.


[View source]

Instance Method Detail

def advance(id : String | Nil = nil) #

Advances the parser to the next node.

If id is specified, raise an error if the id of the current node does not match the specified id.


[View source]
def current : Node #

Returns the current node.


[View source]
def expression(rbp = 0) #

Parses next expression.


[View source]
def statement #

Parses next statement.


[View source]
def statements #

Returns all statements.


[View source]