vendor/bundle/ruby/2.3.0/gems/sass-3.4.22/lib/sass/scss/parser.rb
# Expose for the SASS parser.
Expose for the SASS parser.
Expose for the SASS parser .
def variable
        return unless tok(/\$/)
        start_pos = source_position
        name = tok!(IDENT)
        ss; tok!(/:/); ss
        expr = sass_script(:parse)
        while tok(/!/)
          flag_name = tok!(IDENT)
          if flag_name == 'default'
            guarded ||= true
          elsif flag_name == 'global'
            global ||= true
          else
            raise Sass::SyntaxError.new("Invalid flag \"!#{flag_name}\".", :line => @line)
          end
          ss
        end
        result = Sass::Tree::VariableNode.new(name, expr, guarded, global)
        node(result, start_pos)
      end
def variable return unless tok ( / \$ / ) start_pos = source_position name = tok! ( IDENT ) ss ; tok! ( / : / ) ; ss expr = sass_script ( :parse ) while tok ( / ! / ) flag_name = tok! ( IDENT ) if flag_name == 'default' guarded ||= true elsif flag_name == 'global' global ||= true else raise Sass :: SyntaxError . new ( "Invalid flag \"!#{flag_name}\"." , :line => @line ) end ss end result = Sass :: Tree :: VariableNode . new ( name , expr , guarded , global ) node ( result , start_pos ) end
Expose for the SASS parser.
Expose for the SASS parser .