You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
348 B

#!/usr/bin/env ruby -w
require_relative "lox/error"
require_relative "lox/expr"
require_relative "lox/scanner"
require_relative "lox/token"
module Lox
class Runner
def initialize(scanner: Scanner.new)
@scanner = scanner
end
def run(src)
@scanner.scan(src).each do |token|
puts token
end
end
end
end