Sha256: 7b8ddc104172d3bf54d627ff936d191188aaf7b97830f0d4b1e5d4fe1ecc98d1

Contents?: true

Size: 1007 Bytes

Versions: 170

Compression:

Stored size: 1007 Bytes

Contents

require 'sass/script/css_parser'

module Sass
  module SCSS
    # This is a subclass of {Parser} which only parses plain CSS.
    # It doesn't support any Sass extensions, such as interpolation,
    # parent references, nested selectors, and so forth.
    # It does support all the same CSS hacks as the SCSS parser, though.
    class CssParser < StaticParser
      private

      def placeholder_selector; nil; end
      def parent_selector; nil; end
      def interpolation; nil; end
      def use_css_import?; true; end

      def block_child(context)
        case context
        when :ruleset
          declaration
        when :stylesheet
          directive || ruleset
        when :directive
          directive || declaration_or_ruleset
        end
      end

      def nested_properties!(node, space)
        expected('expression (e.g. 1px, bold)');
      end

      @sass_script_parser = Class.new(Sass::Script::CssParser)
      @sass_script_parser.send(:include, ScriptParser)
    end
  end
end

Version data entries

170 entries across 165 versions & 11 rubygems

Version Path
sass-3.3.0.alpha.138 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.136 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.134 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.133 lib/sass/scss/css_parser.rb
sass-3.2.8 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.129 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.128 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.127 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.132 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.121 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.120 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.107 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.103 lib/sass/scss/css_parser.rb
sass-3.2.7 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.102 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.101 lib/sass/scss/css_parser.rb
active_mailer-0.0.5 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/sass-3.2.5/lib/sass/scss/css_parser.rb
sass-3.2.6 lib/sass/scss/css_parser.rb
sass-3.3.0.alpha.93 lib/sass/scss/css_parser.rb
active_mailer-0.0.4 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/sass-3.2.5/lib/sass/scss/css_parser.rb