summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/ast.rb
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2008-10-04 16:11:03 +0200
committerJames Turnbull <james@lovedthanlost.net>2008-10-07 07:51:44 +1100
commit0c297be5dad784e305ef194cee29b11a92d31b6b (patch)
tree947b3bdb076461f53278be3a1fad39ee4fc5bed6 /lib/puppet/parser/ast.rb
parent5268487ac862eec6381d315800d6f56c51dc57b5 (diff)
downloadpuppet-0c297be5dad784e305ef194cee29b11a92d31b6b.tar.gz
puppet-0c297be5dad784e305ef194cee29b11a92d31b6b.tar.xz
puppet-0c297be5dad784e305ef194cee29b11a92d31b6b.zip
Fix #1109 - allow empty if or else branches
This changesets allow empty if or else branches: if true { } else { } It works by emitting on the parser stack an AST node that doesn't do anything (a no-op). This allows the less intrusive code as no part of the if evaluation code has been touched.
Diffstat (limited to 'lib/puppet/parser/ast.rb')
-rw-r--r--lib/puppet/parser/ast.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/puppet/parser/ast.rb b/lib/puppet/parser/ast.rb
index 5aa9f528a..ddf88521c 100644
--- a/lib/puppet/parser/ast.rb
+++ b/lib/puppet/parser/ast.rb
@@ -91,6 +91,7 @@ require 'puppet/parser/ast/ifstatement'
require 'puppet/parser/ast/leaf'
require 'puppet/parser/ast/minus'
require 'puppet/parser/ast/node'
+require 'puppet/parser/ast/nop'
require 'puppet/parser/ast/not'
require 'puppet/parser/ast/resource'
require 'puppet/parser/ast/resource_defaults'