module Eggshell::Compiler::Assembler

Public Instance Methods

add_func(name) click to toggle source

Generates a new function that statements will be inserted into.

# File lib/eggshell/compiler.rb, line 28
def add_func(name)
end
add_lines(lines) click to toggle source

Inject lines into current handler. If a line is either a block or macro, call {@see assemble()} on it.

# File lib/eggshell/compiler.rb, line 49
def add_lines(lines)
end
assemble(parse_tree) click to toggle source

Iterates over parse tree to generate compiler events.

# File lib/eggshell/compiler.rb, line 24
def assemble(parse_tree)
end
chain_append(lines) click to toggle source

Inserts lines from an equivalent

# File lib/eggshell/compiler.rb, line 53
def chain_append(lines)
end
commit_handler(name, args) click to toggle source
# File lib/eggshell/compiler.rb, line 71
def commit_handler(name, args)
        @pending_funcs[-1][1] << insert_statement(HANDLER_COMMIT, 'HANDLER_NAME' => name, 'ARGS' => args.inspect)
end
do_line(line) click to toggle source

Inserts a raw line into output.

# File lib/eggshell/compiler.rb, line 36
def do_line(line)
end
init(processor, opts = {}) click to toggle source

Sets assembler-specific options. This should initialize the main method via {@see add_func()}. @param Eggshell::Processor A reference processor instance to validate certain conditions (e.g. what to do in a block-macro-block chain).

# File lib/eggshell/compiler.rb, line 20
def init(processor, opts = {})
end
pipe_append_end() click to toggle source
# File lib/eggshell/compiler.rb, line 68
def pipe_append_end
end
pipe_append_start() click to toggle source

Inserts statements to append macro output into previous block.

# File lib/eggshell/compiler.rb, line 65
def pipe_append_start
end
pipe_inline_end() click to toggle source

Inserts statements to inject inlined macro output into previous block.

# File lib/eggshell/compiler.rb, line 61
def pipe_inline_end
end
pipe_inline_start() click to toggle source

Inserts statements to prepare for inlined macro output.

# File lib/eggshell/compiler.rb, line 57
def pipe_inline_start
end
pop_func() click to toggle source

Pops the current function off stack, sending statements to the main function.

# File lib/eggshell/compiler.rb, line 32
def pop_func
end
start_block(name, args, lines) click to toggle source

Initializes handler and lines for a block.

# File lib/eggshell/compiler.rb, line 40
def start_block(name, args, lines)
end
start_macro(name, args, lines) click to toggle source

Initializes handler and lines for a macro.

# File lib/eggshell/compiler.rb, line 44
def start_macro(name, args, lines)
end
write(stream) click to toggle source
# File lib/eggshell/compiler.rb, line 75
def write(stream)
end