class AdLint::Cpp::InElseDirective
Public Instance Methods
next_token()
click to toggle source
# File lib/adlint/cpp/lexer.rb, line 608 def next_token until @lexer.content.empty? if discard_heading_comments || scan_escaped_newline(@lexer.content) next end tok = tokenize_new_line(@lexer.content) || tokenize_extra_token(@lexer.content) if tok break else @lexer.content.eat! end end unless tok tok = Token.new(:NEW_LINE, "\n", @lexer.content.location) @lexer.notify_eof_newline_not_found(tok.location) end if tok.type == :NEW_LINE @lexer.transit(Initial.new(@lexer)) end tok end