Simplify read
This commit is contained in:
parent
9a025cb812
commit
ac6a82c446
1 changed files with 12 additions and 13 deletions
|
@ -14,7 +14,7 @@ module Mm2ep
|
|||
class ParseCli < Thor
|
||||
desc 'parse INFILE', 'Parse INFILE into tokens'
|
||||
def parse(infile)
|
||||
File.open(infile).each_line do |line|
|
||||
line = File.read(infile).gsub(/\n/,'')
|
||||
parser = Parser.new(Lexer.new)
|
||||
puts line.inspect
|
||||
token = parser.parse(line.chomp, true)
|
||||
|
@ -29,7 +29,6 @@ module Mm2ep
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Mm2ep::Depend::ParseCli.start(ARGV)
|
||||
|
|
Loading…
Reference in a new issue