Class: AdLint::TokensContent
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(tok_ary) ⇒ TokensContent
constructor
A new instance of TokensContent.
- #location ⇒ Object
- #next_token ⇒ Object
Constructor Details
#initialize(tok_ary) ⇒ TokensContent
Returns a new instance of TokensContent.
172 173 174 |
# File 'lib/adlint/lexer.rb', line 172 def initialize(tok_ary) @token_ary = tok_ary end |
Instance Method Details
#empty? ⇒ Boolean
184 185 186 |
# File 'lib/adlint/lexer.rb', line 184 def empty? @token_ary.empty? end |
#location ⇒ Object
176 177 178 179 180 181 182 |
# File 'lib/adlint/lexer.rb', line 176 def location if self.empty? nil else @token_ary.first.location end end |
#next_token ⇒ Object
188 189 190 191 192 193 194 |
# File 'lib/adlint/lexer.rb', line 188 def next_token if empty? nil else @token_ary.shift end end |