Method: Puppet::Parser::Lexer#munge_token
- Defined in:
- lib/vendor/puppet/parser/lexer.rb
#munge_token(token, value) ⇒ Object
Make any necessary changes to the token and/or value.
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
# File 'lib/vendor/puppet/parser/lexer.rb', line 418 def munge_token(token, value) @line += 1 if token.incr_line skip if token.skip_text return if token.skip and not token.accumulate? token, value = token.convert(self, value) if token.respond_to?(:convert) return unless token if token.accumulate? comment = @commentstack.pop comment[0] << value + "\n" @commentstack.push(comment) end return if token.skip return token, { :value => value, :line => @line } end |