Sha256: 35f82431fa5c3dcd568c4049ba922806f61bcb83673fcc050ff45c4d5d5d09a1

Contents?: true

Size: 491 Bytes

Versions: 4

Compression:

Stored size: 491 Bytes

Contents

# frozen_string_literal: true

module Phlex
	class Compiler
		module Visitors
			class Component < BaseVisitor
				visit_method def visit_def(node)
					visitor = Visitors::ComponentMethod.new(@compiler)
					visitor.visit_all(node.child_nodes)

					if visitor.optimized_something?
						@compiler.redefine(
							format(node)
						)
					end
				end

				visit_method def visit_class(node)
					nil
				end

				visit_method def visit_module(node)
					nil
				end
			end
		end
	end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phlex-0.4.0 lib/phlex/compiler/visitors/component.rb
phlex-0.3.2 lib/phlex/compiler/visitors/component.rb
phlex-0.3.1 lib/phlex/compiler/visitors/component.rb
phlex-0.3.0 lib/phlex/compiler/visitors/component.rb