class Lox::CLI
Public Instance Methods
lex()
click to toggle source
# File lib/lox/cli.rb, line 27 def lex Write.new(tokens, STDOUT).call end
read()
click to toggle source
# File lib/lox/cli.rb, line 15 def read Write.new(lines, STDOUT).call end
scan()
click to toggle source
# File lib/lox/cli.rb, line 21 def scan Write.new(characters, STDOUT).call end
Private Instance Methods
characters()
click to toggle source
# File lib/lox/cli.rb, line 37 def characters Formatter.new(scanner.each_char) end
console()
click to toggle source
# File lib/lox/cli.rb, line 45 def console Console.new(Readline) end
lexical_analyzer()
click to toggle source
# File lib/lox/cli.rb, line 53 def lexical_analyzer LexicalAnalyzer.new(scanner) end
lines()
click to toggle source
# File lib/lox/cli.rb, line 33 def lines Formatter.new(console.each_line) end
scanner()
click to toggle source
# File lib/lox/cli.rb, line 49 def scanner Scanner.new(console) end
tokens()
click to toggle source
# File lib/lox/cli.rb, line 41 def tokens Formatter.new(lexical_analyzer.each_token) end