diff options
author | Paul Berry <paul@puppetlabs.com> | 2010-09-07 18:01:42 -0700 |
---|---|---|
committer | Paul Berry <paul@puppetlabs.com> | 2010-09-07 18:01:42 -0700 |
commit | ce9bf1edcaac4901de6e0a7da413d1742d216eb0 (patch) | |
tree | e0ec052bf1d6b33ec3d8a90970ba10206c06d53c /lib/puppet/parser/ast | |
parent | 25048ecc40db746f7e88bb6c5e1fc4f2c0150a4f (diff) | |
download | puppet-ce9bf1edcaac4901de6e0a7da413d1742d216eb0.tar.gz puppet-ce9bf1edcaac4901de6e0a7da413d1742d216eb0.tar.xz puppet-ce9bf1edcaac4901de6e0a7da413d1742d216eb0.zip |
Modified the error message that is generated when a class, definition,
or node occurs in a conditional construct so that it contains the
proper line number.
Diffstat (limited to 'lib/puppet/parser/ast')
-rw-r--r-- | lib/puppet/parser/ast/definition.rb | 2 | ||||
-rw-r--r-- | lib/puppet/parser/ast/node.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/parser/ast/definition.rb b/lib/puppet/parser/ast/definition.rb index 09f52b519..287845ade 100644 --- a/lib/puppet/parser/ast/definition.rb +++ b/lib/puppet/parser/ast/definition.rb @@ -1,6 +1,8 @@ require 'puppet/parser/ast/top_level_construct' class Puppet::Parser::AST::Definition < Puppet::Parser::AST::TopLevelConstruct + attr_accessor :context + def initialize(name, context = {}) @name = name @context = context diff --git a/lib/puppet/parser/ast/node.rb b/lib/puppet/parser/ast/node.rb index c19a24ce0..4951a6365 100644 --- a/lib/puppet/parser/ast/node.rb +++ b/lib/puppet/parser/ast/node.rb @@ -1,7 +1,7 @@ require 'puppet/parser/ast/top_level_construct' class Puppet::Parser::AST::Node < Puppet::Parser::AST::TopLevelConstruct - attr_accessor :names + attr_accessor :names, :context def initialize(names, context = {}) raise ArgumentError, "names should be an array" unless names.is_a? Array |