class Llamero::Grammar::Builder::GrammarBuilder(T)

Overview

The primary builder for creating a grammar file or CLI output.

This is not meant to be used directly, but rather through the Grammar class.

Defined in:

grammars/builder/grammar_builder.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(grammar_class : T) #

Initialize with the grammar class that you want to use


[View source]

Instance Method Detail

def child_grammar_output : IO::Memory #

Collection of the IO from generating the grammar output for each child object type


[View source]
def child_grammar_output=(child_grammar_output : IO::Memory) #

Collection of the IO from generating the grammar output for each child object type


[View source]
def create_grammar_output(is_root_object : Bool = false) : IO #

Creates the output for this grammar.


[View source]
def grammar_class : T #

[View source]
def grammar_class=(grammar_class : T) #

[View source]
def grammar_output : IO::Memory #

The final grammar output


[View source]
def grammar_output=(grammar_output : IO::Memory) #

The final grammar output


[View source]
def list_of_non_primitive_instance_vars_and_types : Array(Hash(String, String)) #

A non-unique list of all non-primitive field types that are also objects from BaseGrammar


[View source]
def list_of_non_primitive_instance_vars_and_types=(list_of_non_primitive_instance_vars_and_types : Array(Hash(String, String))) #

A non-unique list of all non-primitive field types that are also objects from BaseGrammar


[View source]
def list_of_object_types_to_create_rows_for : Array(String) #

Tracks a unique list of objects to create as this grammar is created. This does not include primitives.


[View source]
def list_of_object_types_to_create_rows_for=(list_of_object_types_to_create_rows_for : Array(String)) #

Tracks a unique list of objects to create as this grammar is created. This does not include primitives.


[View source]
def list_of_primitive_instance_vars_and_types : Array(Hash(String, String)) #

A non-unqiue list of all primitive field types that need to be in the grammar output


[View source]
def list_of_primitive_instance_vars_and_types=(list_of_primitive_instance_vars_and_types : Array(Hash(String, String))) #

A non-unqiue list of all primitive field types that need to be in the grammar output


[View source]
def list_of_primitive_types_to_create_rows_for : Array(String) #

Tracks the JSON primitives that are being used in this grammar.


[View source]
def list_of_primitive_types_to_create_rows_for=(list_of_primitive_types_to_create_rows_for : Array(String)) #

Tracks the JSON primitives that are being used in this grammar.


[View source]
def rows : Array(Row) #

The completed grammar rows


[View source]
def rows=(rows : Array(Row)) #

The completed grammar rows


[View source]