Class: AdLint::LexerContext
- Inherits:
-
Object
- Object
- AdLint::LexerContext
- Defined in:
- lib/adlint/lexer.rb
Overview
DESCRIPTION
Generic lexical analysis context.
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
VALUE SourceContent | StringContent – The target content of this context.
Instance Method Summary collapse
-
#initialize(cont) ⇒ LexerContext
constructor
DESCRIPTION Constructs a lexical analysis context object.
-
#location ⇒ Object
DESCRIPTION Reads the current location of the target content.
Constructor Details
#initialize(cont) ⇒ LexerContext
DESCRIPTION
Constructs a lexical analysis context object.
PARAMETER
- cont
-
SourceContent | StringContent – Target content.
205 206 207 |
# File 'lib/adlint/lexer.rb', line 205 def initialize(cont) @content = cont end |
Instance Attribute Details
#content ⇒ Object (readonly)
VALUE
SourceContent | StringContent – The target content of this context.
211 212 213 |
# File 'lib/adlint/lexer.rb', line 211 def content @content end |
Instance Method Details
#location ⇒ Object
DESCRIPTION
Reads the current location of the target content.
RETURN VALUE
Location – Current location.
218 219 220 |
# File 'lib/adlint/lexer.rb', line 218 def location @content.location end |