diff options
Diffstat (limited to 'lib/puppet/parser')
-rw-r--r-- | lib/puppet/parser/compile.rb | 4 | ||||
-rw-r--r-- | lib/puppet/parser/interpreter.rb | 7 |
2 files changed, 2 insertions, 9 deletions
diff --git a/lib/puppet/parser/compile.rb b/lib/puppet/parser/compile.rb index 6aeebeaae..992b165e5 100644 --- a/lib/puppet/parser/compile.rb +++ b/lib/puppet/parser/compile.rb @@ -16,8 +16,6 @@ class Puppet::Parser::Compile include Puppet::Util::Errors attr_reader :topscope, :parser, :node, :facts, :collections, :configuration - attr_writer :ast_nodes - # Add a collection to the global list. def add_collection(coll) @collections << coll @@ -25,7 +23,7 @@ class Puppet::Parser::Compile # Do we use nodes found in the code, vs. the external node sources? def ast_nodes? - defined?(@ast_nodes) and @ast_nodes + parser.nodes.length > 0 end # Store the fact that we've evaluated a class, and store a reference to diff --git a/lib/puppet/parser/interpreter.rb b/lib/puppet/parser/interpreter.rb index 0b8c035ba..8c727118c 100644 --- a/lib/puppet/parser/interpreter.rb +++ b/lib/puppet/parser/interpreter.rb @@ -26,7 +26,7 @@ class Puppet::Parser::Interpreter # evaluate our whole tree def compile(node) raise Puppet::ParseError, "Could not parse configuration; cannot compile" unless env_parser = parser(node.environment) - return Puppet::Parser::Compile.new(node, env_parser, :ast_nodes => usenodes?).compile + return Puppet::Parser::Compile.new(node, env_parser).compile end # create our interpreter @@ -53,11 +53,6 @@ class Puppet::Parser::Interpreter @parsers = {} end - # Should we parse ast nodes? - def usenodes? - defined?(@usenodes) and @usenodes - end - private # Create a new parser object and pre-parse the configuration. |