From 4871c909cd28c82b64d0b62d8a27e62737d8733d Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Fri, 29 Jan 2010 18:11:10 -0800 Subject: Adding support for class parameters This is functional syntactically but not yet through the whole system, because of the changes made to how resource types are managed. See the next commit for that fix. Signed-off-by: Luke Kanies --- lib/puppet/parser/grammar.ra | 5 +---- lib/puppet/parser/parser.rb | 9 +++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/puppet/parser/grammar.ra b/lib/puppet/parser/grammar.ra index b65e3d2da..91c77c7d6 100644 --- a/lib/puppet/parser/grammar.ra +++ b/lib/puppet/parser/grammar.ra @@ -664,7 +664,7 @@ hostclass: CLASS classname argumentlist classparent LBRACE statements RBRACE { @lexer.commentpop # Our class gets defined in the parent namespace, not our own. @lexer.namepop - newclass classname(val[1]), :arguments => val[2], :code => val[5], :parent => val[3], :line => val[0][:line] + newclass classname(val[1]), :arguments => val[2], :parent => val[3], :code => val[5], :line => val[0][:line] result = nil } | CLASS classname argumentlist classparent LBRACE RBRACE { @lexer.commentpop @@ -846,9 +846,6 @@ module Puppet class AlreadyImportedError < ImportError; end end -Puppet[:typecheck] = true -Puppet[:paramcheck] = true - ---- inner ---- # It got too annoying having code in a file that needs to be compiled. diff --git a/lib/puppet/parser/parser.rb b/lib/puppet/parser/parser.rb index 4f3c31cc1..3ecded798 100644 --- a/lib/puppet/parser/parser.rb +++ b/lib/puppet/parser/parser.rb @@ -18,9 +18,6 @@ module Puppet class AlreadyImportedError < ImportError; end end -Puppet[:typecheck] = true -Puppet[:paramcheck] = true - module Puppet @@ -28,7 +25,7 @@ module Puppet class Parser < Racc::Parser -module_eval <<'..end grammar.ra modeval..id224179bc1a', 'grammar.ra', 853 +module_eval <<'..end grammar.ra modeval..idfda8a9bd6f', 'grammar.ra', 850 # It got too annoying having code in a file that needs to be compiled. require 'puppet/parser/parser_support' @@ -40,7 +37,7 @@ require 'puppet/parser/parser_support' # $Id$ -..end grammar.ra modeval..id224179bc1a +..end grammar.ra modeval..idfda8a9bd6f ##### racc 1.4.5 generates ### @@ -2077,7 +2074,7 @@ module_eval <<'.,.,', 'grammar.ra', 669 @lexer.commentpop # Our class gets defined in the parent namespace, not our own. @lexer.namepop - newclass classname(val[1]), :arguments => val[2], :code => val[5], :parent => val[3], :line => val[0][:line] + newclass classname(val[1]), :arguments => val[2], :parent => val[3], :code => val[5], :line => val[0][:line] result = nil result end -- cgit