This commit is contained in:
2018-07-24 15:12:07 +02:00
commit 1afbd21973
7 changed files with 293 additions and 0 deletions

17
main.rb Normal file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env ruby
require './rlox/prompt'
require './rlox/file'
case ARGV.length
when 0 then prompt
when 1 then
begin
file ARGV[0]
rescue Error => e
STDERR.puts e
end
else
puts "Usage: rlox [script]"
exit 64
end