Struct.new(:text, :unstripped, :full, :index, :compiler, :eod)
@private
@private
# File lib/haml/parser.rb, line 86 86: def tabs 87: line = self 88: @tabs ||= compiler.instance_eval do 89: break 0 if line.text.empty? || !(whitespace = line.full[/^\s+/]) 90: 91: if @indentation.nil? 92: @indentation = whitespace 93: 94: if @indentation.include?(\s\) && @indentation.include?(\t\) 95: raise SyntaxError.new("Indentation can't use both tabs and spaces.", line.index) 96: end 97: 98: @flat_spaces = @indentation * (@template_tabs+1) if flat? 99: break 1 100: end 101: 102: tabs = whitespace.length / @indentation.length 103: break tabs if whitespace == @indentation * tabs 104: break @template_tabs + 1 if flat? && whitespace =~ /^#{@flat_spaces}/ 105: 106: raise SyntaxError.new(Inconsistent indentation: #{Haml::Shared.human_indentation whitespace, true} used for indentation,but the rest of the document was indented using #{Haml::Shared.human_indentation @indentation}..strip.gsub("\n", ' '), line.index) 107: end 108: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.