summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast/nodedef.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-07 05:58:00 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-07 05:58:00 +0000
commit6affe220db1248cee8489347dc7d7ac071a534e4 (patch)
treee885f7ac374336c818374556065da70036b71211 /lib/puppet/parser/ast/nodedef.rb
parent59c7b02f8fb0c5f2820577f11c9c34935ac16a0a (diff)
downloadpuppet-6affe220db1248cee8489347dc7d7ac071a534e4.tar.gz
puppet-6affe220db1248cee8489347dc7d7ac071a534e4.tar.xz
puppet-6affe220db1248cee8489347dc7d7ac071a534e4.zip
Committing both the finalization of the config code, plus all of the code necessary to get basic isomorphism from code to transportables and back. Mostly keyword and autoname stuff.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@871 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/ast/nodedef.rb')
-rw-r--r--lib/puppet/parser/ast/nodedef.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/puppet/parser/ast/nodedef.rb b/lib/puppet/parser/ast/nodedef.rb
index c0e1ee63e..da93069b2 100644
--- a/lib/puppet/parser/ast/nodedef.rb
+++ b/lib/puppet/parser/ast/nodedef.rb
@@ -3,7 +3,7 @@ class Puppet::Parser::AST
# specified node, and this parse tree is only ever looked up when
# a client connects.
class NodeDef < AST::Branch
- attr_accessor :names, :code, :parentclass
+ attr_accessor :names, :code, :parentclass, :keyword
def each
[@names,@code].each { |child| yield child }
@@ -30,9 +30,9 @@ class Puppet::Parser::AST
end
begin
- scope.setnode(name,
- Node.new(arghash)
- )
+ node = Node.new(arghash)
+ node.keyword = true
+ scope.setnode(name, node)
rescue Puppet::ParseError => except
except.line = self.line
except.file = self.file
@@ -48,6 +48,7 @@ class Puppet::Parser::AST
def initialize(hash)
@parentclass = nil
+ @keyword = "node"
super
end