summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@reductivelabs.com>2010-01-29 18:11:10 -0800
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit4871c909cd28c82b64d0b62d8a27e62737d8733d (patch)
treecf1c3a12b2137e750ecab916c3be7bc9e49cc61d
parent4709e9bfa5d3ab654559e3bc5d3f13c3c0459577 (diff)
downloadpuppet-4871c909cd28c82b64d0b62d8a27e62737d8733d.tar.gz
puppet-4871c909cd28c82b64d0b62d8a27e62737d8733d.tar.xz
puppet-4871c909cd28c82b64d0b62d8a27e62737d8733d.zip
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 <luke@reductivelabs.com>
-rw-r--r--lib/puppet/parser/grammar.ra5
-rw-r--r--lib/puppet/parser/parser.rb9
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