Associate TokenizedLines with an ::indentLevel

This can be used to render the appropriate number of indent guide spans
for empty lines.
This commit is contained in:
David Graham & Nathan Sobo
2014-04-09 16:45:19 -06:00
committed by Nathan Sobo
parent d0a917ed14
commit 6997adece9
5 changed files with 70 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ idCounter = 1
module.exports =
class TokenizedLine
constructor: ({tokens, @lineEnding, @ruleStack, @startBufferColumn, @fold, tabLength}) ->
constructor: ({tokens, @lineEnding, @ruleStack, @startBufferColumn, @fold, tabLength, @indentLevel}) ->
@tokens = @breakOutAtomicTokens(tokens, tabLength)
@startBufferColumn ?= 0
@text = _.pluck(@tokens, 'value').join('')