Class Puppet::Parser::Lexer::TokenList
In: lib/puppet/parser/lexer.rb
Parent: Object

Maintain a list of tokens.

Methods

[]   add_token   add_tokens   lookup   new   sort_tokens  

Attributes

regex_tokens  [R] 
string_tokens  [R] 

Public Class methods

Public Instance methods

Define more tokens.

Look up a token by its value, rather than name.

Sort our tokens by length, so we know once we match, we‘re done. This helps us avoid the O(n^2) nature of token matching.

[Validate]