Module | Sass::Script

In:

lib/sass/script/node.rb
lib/sass/script/interpolation.rb
lib/sass/script/number.rb
lib/sass/script/css_lexer.rb
lib/sass/script/operation.rb
lib/sass/script/literal.rb
lib/sass/script/functions.rb
lib/sass/script/string_interpolation.rb
lib/sass/script/bool.rb
lib/sass/script/color.rb
lib/sass/script/lexer.rb
lib/sass/script/parser.rb
lib/sass/script/css_parser.rb
lib/sass/script/variable.rb
lib/sass/script/string.rb
lib/sass/script/funcall.rb
lib/sass/script/unary_operation.rb
lib/sass/script.rb

SassScript is code that‘s embedded in Sass documents to allow for property values to be computed from variables.

This module contains code that handles the parsing and evaluation of SassScript.

### Methods

equals_warning parse var_warning

### Classes and Modules

Module Sass::Script::Functions
Class Sass::Script::Bool
Class Sass::Script::Color
Class Sass::Script::CssLexer
Class Sass::Script::CssParser
Class Sass::Script::Funcall
Class Sass::Script::Interpolation
Class Sass::Script::Lexer
Class Sass::Script::Literal
Class Sass::Script::Node
Class Sass::Script::Number
Class Sass::Script::Operation
Class Sass::Script::Parser
Class Sass::Script::String
Class Sass::Script::StringInterpolation
Class Sass::Script::UnaryOperation
Class Sass::Script::Variable

### Constants

MATCH | = | /^[!\$](#{Sass::SCSS::RX::IDENT})\s*((?:\|\|)?=|:)\s*(.+?)(!(?i:default))?$/ |  | The regular expression used to parse variables.
VALIDATE | = | /^[!\$]#{Sass::SCSS::RX::IDENT}$/ |  | The regular expression used to validate variables without matching.

### Public Class methods

equals_warning(types, name, val, guarded, line, offset, filename)

@private

[Source]

        # File lib/sass/script.rb, line 53
    53:     def self.equals_warning(types, name, val, guarded, line, offset, filename)
    54:       Haml::Util.haml_warn "DEPRECATION WARNING:\nOn line \#{line}\#{\", character \#{offset}\" if offset}\#{\" of '\#{filename}'\" if filename}\nSetting \#{types} with \#{\"||\" if guarded}= has been deprecated and will be removed in version 3.2.\nUse \"\#{name}: \#{val}\#{\" !default\" if guarded}\" instead.\n\nYou can use `sass-convert --in-place --from sass2 file.sass' to convert files automatically.\n"
    55:     end

parse(value, line, offset, options = {})

Parses a string of SassScript

@param value [String] The SassScript @param line [Fixnum] The number of the line on which the SassScript appeared.

      Used for error reporting

@param offset [Fixnum] The number of characters in on `line` that the SassScript started.

      Used for error reporting

@param options [{Symbol => Object}] An options hash;

      see {file:SASS_REFERENCE.md#sass_options the Sass options documentation}

@return [Script::Node] The root node of the parse tree

[Source]

        # File lib/sass/script.rb, line 31
    31:     def self.parse(value, line, offset, options = {})
    32:       Parser.parse(value, line, offset, options)
    33:     rescue Sass::SyntaxError => e
    34:       e.message << ": #{value.inspect}." if e.message == "SassScript error"
    35:       e.modify_backtrace(:line => line, :filename => options[:filename])
    36:       raise e
    37:     end

var_warning(varname, line, offset, filename)

@private

[Source]

        # File lib/sass/script.rb, line 40
    40:     def self.var_warning(varname, line, offset, filename)
    41:       Haml::Util.haml_warn "DEPRECATION WARNING:\nOn line \#{line}, character \#{offset}\#{\" of '\#{filename}'\" if filename}\nVariables with ! have been deprecated and will be removed in version 3.2.\nUse \\\"$\#{varname}\\\" instead.\n\nYou can use `sass-convert --in-place --from sass2 file.sass' to convert files automatically.\n"
    42:     end

[Validate]