Class: Brandish::Processors::All::Verify

Inherits:
Brandish::Processor::Base show all
Defined in:
lib/brandish/processors/all/verify.rb

Overview

This does nothing to the tree. This just "verifies" that there are no remaining blocks or commands in the node tree, as they shouldn't be. This is highly recommended, as most Output processors are unable to handle the remaining blocks or commands.

This processor takes no options.

Instance Attribute Summary

Attributes inherited from Brandish::Processor::Base

#context

Instance Method Summary collapse

Methods inherited from Brandish::Processor::Base

#accept, #call, #initialize, #postprocess, #process_root, #process_text, register, #setup

Constructor Details

This class inherits a constructor from Brandish::Processor::Base

Instance Method Details

#process_block(node) ⇒ Object

Processes a block. This always fails by design.

Parameters:

Raises:

  • BuildError



20
21
22
# File 'lib/brandish/processors/all/verify.rb', line 20

def process_block(node)
  fail VerificationBuildError.new(error_message(node), node.location)
end

#process_command(node) ⇒ Object

Processes a command. This always fails by design.

Parameters:

Raises:

  • BuildError



28
29
30
# File 'lib/brandish/processors/all/verify.rb', line 28

def process_command(node)
  fail VerificationBuildError.new(error_message(node), node.location)
end