Sha256: ee500b2c11b66004b203f4fd3df5f3f7af0e86927e91e6fcf251fb0bd54628b5
Contents?: true
Size: 858 Bytes
Versions: 2
Compression:
Stored size: 858 Bytes
Contents
$LOAD_PATH << 'lib' require 'oniguruma' if RUBY_VERSION < '1.9.0' require 'language_sniffer' gem 'plist' require 'plist' gem 'textpow' require 'textpow' gem 'ultraviolet1x' require 'uv' file = ARGV[0] text = File.read(file) language = LanguageSniffer.detect(file).language require 'ruco/syntax_parser' require 'ruco/array_processor' t = Time.now.to_f Ruco::SyntaxParser.syntax_for_lines(text.split("\n"), [language.name.downcase, language.lexer]) Ruco::SyntaxParser.syntax_for_lines(text.split("\n"), [language.name.downcase, language.lexer]) Ruco::SyntaxParser.syntax_for_lines(text.split("\n"), [language.name.downcase, language.lexer]) Ruco::SyntaxParser.syntax_for_lines(text.split("\n"), [language.name.downcase, language.lexer]) Ruco::SyntaxParser.syntax_for_lines(text.split("\n"), [language.name.downcase, language.lexer]) puts (Time.now.to_f - t)
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruco-0.2.18 | playground/benchmark_syntax_parser.rb |
ruco-0.2.17 | playground/benchmark_syntax_parser.rb |