Class PuppetLint::Lexer::Token
In: lib/puppet-lint/lexer/token.rb
Parent: Object

Public: Stores a fragment of the manifest and the information about its location in the manifest.

Methods

inspect   new   to_manifest  

Attributes

column  [R]  Public: Returns the Integer column number of the line of the manifest text where the Token can be found.
line  [R]  Public: Returns the Integer line number of the manifest text where the Token can be found.
next_code_token  [RW]  Public: Gets/sets the next code token (skips whitespace, comments, etc) in the manifest.
next_token  [RW]  Public: Gets/sets the next token in the manifest.
prev_code_token  [RW]  Public: Gets/sets the previous code tokne (skips whitespace, comments, etc) in the manifest.
prev_token  [RW]  Public: Gets/sets the previous token in the manifest.
type  [RW]  Public: Returns the Symbol type of the Token.
value  [RW]  Public: Returns the String value of the Token.

Public Class methods

Public: Initialise a new Token object.

type - An upper case Symbol describing the type of Token. value - The String value of the Token. line - The Integer line number where the Token can be found in the

         manifest.

column - The Integer number of characters from the start of the line to

         the start of the Token.

Returns the instantiated Token.

Public Instance methods

Public: Produce a human friendly description of the Token when inspected.

Returns a String describing the Token.

Public: Produce a Puppet DSL representation of a Token.

Returns a Puppet DSL String.

[Validate]