Class: BuildTool::Cfg::StatementVisitor

Inherits:
ListVisitor show all
Defined in:
lib/build-tool/cfg/visitor.rb

Overview

Statement Visitor

Direct Known Subclasses

ConfigurationFileVisitor

Instance Attribute Summary

Attributes inherited from MJ::VisitorBase

#configuration

Instance Method Summary collapse

Methods inherited from ListVisitor

#visit, #visit_nodes

Methods inherited from MJ::VisitorBase

#initialize, #visit_Object

Constructor Details

This class inherits a constructor from MJ::VisitorBase

Instance Method Details

#visit_BuildSystemDeclarationNode(node) ⇒ Object

Raises:



79
80
81
82
83
84
85
86
87
# File 'lib/build-tool/cfg/visitor.rb', line 79

def visit_BuildSystemDeclarationNode( node )
    raise ArgumentsError if node.values.length != 2
    name  = node.values[0]
    bs = configuration.build_system_defaults( name )
    visitor = BuildSystemDeclarationNodeVisitor.new(
        configuration,
        bs )
    node.accept( visitor )
end

#visit_ConfigurationFileList(node) ⇒ Object



89
90
91
# File 'lib/build-tool/cfg/visitor.rb', line 89

def visit_ConfigurationFileList( node )
    self.visit(node)
end

#visit_DisableFeatureNode(node) ⇒ Object



102
103
104
# File 'lib/build-tool/cfg/visitor.rb', line 102

def visit_DisableFeatureNode( node )
    set_feature_status( node.value, false, node.options[:global] )
end

#visit_DisableModuleNode(node) ⇒ Object



110
111
112
# File 'lib/build-tool/cfg/visitor.rb', line 110

def visit_DisableModuleNode( node )
    set_module_status( node.value, false, node.options[:global] )
end

#visit_EnableFeatureNode(node) ⇒ Object



98
99
100
# File 'lib/build-tool/cfg/visitor.rb', line 98

def visit_EnableFeatureNode( node )
    set_feature_status( node.value, true, node.options[:global] )
end

#visit_EnableModuleNode(node) ⇒ Object



106
107
108
# File 'lib/build-tool/cfg/visitor.rb', line 106

def visit_EnableModuleNode( node )
    set_module_status( node.value, true, node.options[:global] )
end

#visit_EnvironmentDeclarationNode(node) ⇒ Object



93
94
95
96
# File 'lib/build-tool/cfg/visitor.rb', line 93

def visit_EnvironmentDeclarationNode( node )
    visitor = EnvironmentDeclarationNodeVisitor.new( configuration )
    node.accept( visitor )
end

#visit_FeatureNode(node) ⇒ Object



114
115
116
117
# File 'lib/build-tool/cfg/visitor.rb', line 114

def visit_FeatureNode( node )
    visitor = FeatureNodeVisitor.new( configuration )
    node.accept( visitor )
end

#visit_GitOptionsDeclarationNode(node) ⇒ Object



119
120
121
122
# File 'lib/build-tool/cfg/visitor.rb', line 119

def visit_GitOptionsDeclarationNode( node )
    visitor = GitOptionsDeclarationNodeVisitor.new( configuration )
    node.accept( visitor )
end

#visit_IncludeNode(node) ⇒ Object



124
125
126
127
# File 'lib/build-tool/cfg/visitor.rb', line 124

def visit_IncludeNode( node )
    visitor = IncludeNodeVisitor.new( configuration )
    node.accept( visitor )
end

#visit_ModuleDeclarationNode(node) ⇒ Object



129
130
131
132
# File 'lib/build-tool/cfg/visitor.rb', line 129

def visit_ModuleDeclarationNode( node )
    visitor = ModuleDeclarationNodeVisitor.new( configuration )
    node.accept( visitor )
end

#visit_RepositoryDeclarationNode(node) ⇒ Object



134
135
136
137
# File 'lib/build-tool/cfg/visitor.rb', line 134

def visit_RepositoryDeclarationNode( node )
    visitor = RepositoryDeclarationNodeVisitor.new( configuration )
    node.accept(visitor)
end

#visit_ServerDeclarationNode(node) ⇒ Object



139
140
141
142
# File 'lib/build-tool/cfg/visitor.rb', line 139

def visit_ServerDeclarationNode( node )
    visitor = ServerDeclarationNodeVisitor.new( configuration )
    node.accept(visitor)
end

#visit_SshKeyDeclarationNode(node) ⇒ Object



144
145
146
147
# File 'lib/build-tool/cfg/visitor.rb', line 144

def visit_SshKeyDeclarationNode( node )
    visitor = SshKeyDeclarationNodeVisitor.new( configuration )
    node.accept(visitor)
end