class Sass::Engine
def tree(arr, i = 0)
def tree(arr, i = 0) return [], i if arr[i].nil? base = arr[i].tabs nodes = [] while (line = arr[i]) && line.tabs >= base if line.tabs > base if line.tabs > base + 1 raise SyntaxError.new("The line was indented #{line.tabs - base} levels deeper than the previous line.", line.index) end nodes.last.children, i = tree(arr, i) else nodes << line i += 1 end end return nodes, i end