Class: Whitespace::Parser
- Inherits:
-
Object
- Object
- Whitespace::Parser
- Defined in:
- lib/whitespace/parser.rb
Constant Summary collapse
- SPACE =
" "
- TAB =
"\t"
- LF =
"\n"
Instance Attribute Summary collapse
-
#console ⇒ Object
readonly
Returns the value of attribute console.
-
#vm ⇒ Object
readonly
Returns the value of attribute vm.
Instance Method Summary collapse
-
#initialize(vm, console) ⇒ Parser
constructor
A new instance of Parser.
- #parse(src) ⇒ Object
Constructor Details
#initialize(vm, console) ⇒ Parser
Returns a new instance of Parser.
5 6 7 8 |
# File 'lib/whitespace/parser.rb', line 5 def initialize(vm, console) @vm = vm @console = console end |
Instance Attribute Details
#console ⇒ Object (readonly)
Returns the value of attribute console.
3 4 5 |
# File 'lib/whitespace/parser.rb', line 3 def console @console end |
#vm ⇒ Object (readonly)
Returns the value of attribute vm.
3 4 5 |
# File 'lib/whitespace/parser.rb', line 3 def vm @vm end |
Instance Method Details
#parse(src) ⇒ Object
10 11 12 13 |
# File 'lib/whitespace/parser.rb', line 10 def parse(src) parse_init(src) parse_start end |