From d3323331e96cbc79563febc249e106a3ae8e7647 Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Fri, 12 Jun 2009 13:40:15 +0200 Subject: Fix #2333 - Make sure lexer skip whitespace on non-token Comments and multi-line comments produces no token per-se during lexing, so the lexer loops to find another token. The issue was that we were not skipping whitespace after finding such non-token. Signed-off-by: Brice Figureau --- lib/puppet/parser/lexer.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/parser/lexer.rb b/lib/puppet/parser/lexer.rb index 8bbcb84fb..6884e687e 100644 --- a/lib/puppet/parser/lexer.rb +++ b/lib/puppet/parser/lexer.rb @@ -417,7 +417,10 @@ class Puppet::Parser::Lexer final_token, value = munge_token(matched_token, value) - next unless final_token + unless final_token + skip() + next + end if match = @@pairs[value] and final_token.name != :DQUOTE and final_token.name != :SQUOTE @expected << match -- cgit