Created
June 3, 2015 21:44
-
-
Save chrisseaton/ee873b74cec4f92416b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'parser' | |
file = '/Users/chrisseaton/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/parser-2.2.2.5/lib/parser/lexer.rb' | |
source_buffer = Parser::Source::Buffer.new(file) | |
source_buffer.read | |
lexer = Parser::Lexer.new('0') | |
lexer.source_buffer = source_buffer | |
loop do | |
p lexer.advance | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment