summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-06-04 00:33:25 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-07-05 18:47:08 +1000
commitcddc365e9bac786c7a64240073b69bc54b6d2f2e (patch)
tree3a68f908af4320e7957a2d27fd24d49565c0000f /lib/puppet/parser/ast
parentfc1f8cdbee606da0d2a1a162942295d28cdcbf64 (diff)
Switching to LoadedCode from ASTSet
I also took the opportunity to clean up and simplify the interface to the parts of the parser that interact with this. Mostly it was method renames. Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/parser/ast')
-rw-r--r--lib/puppet/parser/ast/definition.rb2
-rw-r--r--lib/puppet/parser/ast/node.rb2
-rw-r--r--lib/puppet/parser/ast/resource_reference.rb4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/parser/ast/definition.rb b/lib/puppet/parser/ast/definition.rb
index 3cd8e79c7..092afef46 100644
--- a/lib/puppet/parser/ast/definition.rb
+++ b/lib/puppet/parser/ast/definition.rb
@@ -80,7 +80,7 @@ class Puppet::Parser::AST::Definition < Puppet::Parser::AST::Branch
end
def find_parentclass
- @parser.findclass(namespace, parentclass)
+ @parser.find_hostclass(namespace, parentclass)
end
# Set our parent class, with a little check to avoid some potential
diff --git a/lib/puppet/parser/ast/node.rb b/lib/puppet/parser/ast/node.rb
index 442518f44..faa7fa19a 100644
--- a/lib/puppet/parser/ast/node.rb
+++ b/lib/puppet/parser/ast/node.rb
@@ -33,6 +33,6 @@ class Puppet::Parser::AST::Node < Puppet::Parser::AST::HostClass
# Search for the object matching our parent class.
def find_parentclass
- @parser.findnode(parentclass)
+ @parser.node(parentclass)
end
end
diff --git a/lib/puppet/parser/ast/resource_reference.rb b/lib/puppet/parser/ast/resource_reference.rb
index 5a521494f..6189ab8de 100644
--- a/lib/puppet/parser/ast/resource_reference.rb
+++ b/lib/puppet/parser/ast/resource_reference.rb
@@ -43,7 +43,7 @@ class Puppet::Parser::AST
# Look up a fully qualified class name.
def qualified_class(scope, title)
# Look up the full path to the class
- if classobj = scope.findclass(title)
+ if classobj = scope.find_hostclass(title)
title = classobj.classname
else
raise Puppet::ParseError, "Could not find class %s" % title
@@ -56,7 +56,7 @@ class Puppet::Parser::AST
# We want a lower-case type. For some reason.
objtype = @type.downcase
unless builtintype?(objtype)
- if dtype = scope.finddefine(objtype)
+ if dtype = scope.find_definition(objtype)
objtype = dtype.classname
else
raise Puppet::ParseError, "Could not find resource type %s" % objtype