1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

first draft of parsing and printing along comments -- unfortunately, not yet working within objects and arrays

This commit is contained in:
Jeremy Ashkenas 2009-12-22 11:27:19 -05:00
parent d45643c527
commit 65809d08f6
8 changed files with 61 additions and 23 deletions

View file

@ -3,10 +3,10 @@ module CoffeeScript
# Instead of producing raw Ruby objects, the Lexer produces values of this
# class, wrapping native objects tagged with line number information.
class Value
attr_reader :line, :comment
attr_reader :value, :line
def initialize(value, line, comment=nil)
@value, @line, @comment = value, line, comment
def initialize(value, line)
@value, @line = value, line
end
def to_str