summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/parser/lexer.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/puppet/parser/lexer.rb b/lib/puppet/parser/lexer.rb
index def462129..c3c53a528 100644
--- a/lib/puppet/parser/lexer.rb
+++ b/lib/puppet/parser/lexer.rb
@@ -108,6 +108,12 @@ class Puppet::Parser::Lexer
end
TOKENS = TokenList.new
+
+ TOKENS.add_token :VARIABLE, %r{(\w*::)*\w+}
+ def (TOKENS[:VARIABLE]).acceptable?(context={})
+ [:DQPRE,:DQMID].include? context[:after]
+ end
+
TOKENS.add_tokens(
'[' => :LBRACK,
']' => :RBRACK,
@@ -231,10 +237,6 @@ class Puppet::Parser::Lexer
[TOKENS[:VARIABLE],value[1..-1]]
end
- TOKENS.add_token :VARIABLE, %r{(\w*::)*\w+}
- def (TOKENS[:VARIABLE]).acceptable?(context={})
- [:DQPRE,:DQMID].include? context[:after]
- end
TOKENS.sort_tokens