mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
outdent lexing is correct now, I think
This commit is contained in:
@@ -122,6 +122,7 @@ module CoffeeScript
|
||||
@i += comment.length
|
||||
end
|
||||
|
||||
# Record tokens for indentation differing from the previous line.
|
||||
def indent_token
|
||||
return false unless indent = @chunk[INDENT, 1]
|
||||
size = indent.size
|
||||
@@ -132,8 +133,8 @@ module CoffeeScript
|
||||
@indents << @indent
|
||||
else
|
||||
tag = :OUTDENT
|
||||
@indents.pop
|
||||
@indent = @indents.first || 0
|
||||
@indents.pop while @indents.last && ((@indents.last || 0) > size)
|
||||
@indent = @indents.last || 0
|
||||
end
|
||||
@i += (size + 1)
|
||||
token(tag, size)
|
||||
|
||||
Reference in New Issue
Block a user