summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/parser.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-03 20:45:25 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-05-03 20:45:25 +0000
commit0c07125397428a0c1ca9a4a4d0176f45d8be0979 (patch)
tree1b390027a563b47a26341b439288b81473c6cdcf /lib/puppet/parser/parser.rb
parent8d7ec14836809f1433e645c3069691d2f6c70e52 (diff)
downloadpuppet-0c07125397428a0c1ca9a4a4d0176f45d8be0979.tar.gz
puppet-0c07125397428a0c1ca9a4a4d0176f45d8be0979.tar.xz
puppet-0c07125397428a0c1ca9a4a4d0176f45d8be0979.zip
Fixing #615 (subclasses with similar names) by getting rid of the class "type" and "fqname", and instead using "classname" everywhere. You should no longer see unqualified class/definition names anywhere. Also, rewriting how snippet tests work, to avoid creating all of the files, since the point was the parsing tests, not functional tests.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2458 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/parser/parser.rb')
-rw-r--r--lib/puppet/parser/parser.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/puppet/parser/parser.rb b/lib/puppet/parser/parser.rb
index eb296de31..ee8470a26 100644
--- a/lib/puppet/parser/parser.rb
+++ b/lib/puppet/parser/parser.rb
@@ -29,7 +29,7 @@ module Puppet
class Parser < Racc::Parser
-module_eval <<'..end grammar.ra modeval..id2ea020a302', 'grammar.ra', 606
+module_eval <<'..end grammar.ra modeval..id70ce3bc052', 'grammar.ra', 606
require 'puppet/parser/functions'
attr_reader :file, :interp
@@ -173,7 +173,7 @@ def initvars
end
# The fully qualifed name, with the full namespace.
-def fqname(name)
+def classname(name)
[@lexer.namespace, name].join("::").sub(/^::/, '')
end
@@ -254,7 +254,7 @@ end
# $Id$
-..end grammar.ra modeval..id2ea020a302
+..end grammar.ra modeval..id70ce3bc052
##### racc 1.4.5 generates ###
@@ -829,7 +829,7 @@ Racc_token_to_s_table = [
'variable',
'quotedtext',
'resourceref',
-'fqname',
+'classname',
'resourceinstances',
'endsemi',
'params',
@@ -873,7 +873,7 @@ Racc_token_to_s_table = [
'arguments',
'argument',
'nameordefault',
-'fqnameordefault']
+'classnameordefault']
Racc_debug_parser = false
@@ -1570,7 +1570,7 @@ module_eval <<'.,.,', 'grammar.ra', 465
module_eval <<'.,.,', 'grammar.ra', 475
def _reduce_122( val, _values, result )
- interp.newdefine fqname(val[1]), :arguments => val[2], :code => val[4]
+ interp.newdefine classname(val[1]), :arguments => val[2], :code => val[4]
@lexer.indefine = false
result = nil
@@ -1581,7 +1581,7 @@ module_eval <<'.,.,', 'grammar.ra', 475
module_eval <<'.,.,', 'grammar.ra', 479
def _reduce_123( val, _values, result )
- interp.newdefine fqname(val[1]), :arguments => val[2]
+ interp.newdefine classname(val[1]), :arguments => val[2]
@lexer.indefine = false
result = nil
result
@@ -1592,7 +1592,7 @@ module_eval <<'.,.,', 'grammar.ra', 487
def _reduce_124( val, _values, result )
# Our class gets defined in the parent namespace, not our own.
@lexer.namepop
- interp.newclass fqname(val[1]), :code => val[4], :parent => val[2]
+ interp.newclass classname(val[1]), :code => val[4], :parent => val[2]
result = nil
result
end
@@ -1602,7 +1602,7 @@ module_eval <<'.,.,', 'grammar.ra', 492
def _reduce_125( val, _values, result )
# Our class gets defined in the parent namespace, not our own.
@lexer.namepop
- interp.newclass fqname(val[1]), :parent => val[2]
+ interp.newclass classname(val[1]), :parent => val[2]
result = nil
result
end