brakeman 4.4.0 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of brakeman might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGES.md +17 -0
- data/bundle/load.rb +7 -8
- data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/History.rdoc +8 -0
- data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/Manifest.txt +0 -0
- data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/README.rdoc +0 -0
- data/bundle/ruby/2.5.0/gems/{ruby2ruby-2.4.1 → ruby2ruby-2.4.2}/lib/ruby2ruby.rb +34 -36
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/History.rdoc +47 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/Manifest.txt +5 -4
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/README.rdoc +0 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/compare/normalize.rb +29 -2
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/debugging.md +18 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/rp_extensions.rb +0 -7
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/rp_stringscanner.rb +0 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby20_parser.rb +6874 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby20_parser.y +284 -201
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby21_parser.rb +6952 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby21_parser.y +281 -197
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby22_parser.rb +6983 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib/ruby_parser.yy → ruby_parser-3.13.0/lib/ruby22_parser.y} +280 -306
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby23_parser.rb +6982 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby23_parser.y +282 -203
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby24_parser.rb +6982 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby24_parser.y +282 -203
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby25_parser.rb +6981 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby25_parser.y +282 -203
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby26_parser.rb +6999 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby26_parser.y +2469 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rb +116 -118
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rex +10 -8
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_lexer.rex.rb +8 -8
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0 → ruby_parser-3.13.0}/lib/ruby_parser.rb +5 -7
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby_parser.yy +2571 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/lib/ruby_parser_extras.rb +1360 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/tools/munge.rb +216 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.13.0/tools/ripper.rb +23 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +6 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +19 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +54 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +5 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby18_parser.rb +7 -6
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby18_parser.y +5 -4
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby19_parser.rb +7 -6
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby19_parser.y +5 -4
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +1412 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +179 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +323 -0
- data/bundle/ruby/2.5.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +30 -0
- data/bundle/ruby/2.5.0/gems/{ruby_parser-3.12.0/lib → ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy}/ruby_parser_extras.rb +43 -33
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/CHANGES.md +5 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/Gemfile +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/LICENSE.txt +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/README.md +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/bundle_install_all_ruby_versions.sh +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/deep.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/libyaml_checker.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/load.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/parse/date.rb +2 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/parse/hexadecimal.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/parse/sexagesimal.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/psych_handler.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/psych_resolver.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/resolver.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -0
- data/bundle/ruby/2.5.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +39 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/syck_hack.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/syck_node_monkeypatch.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/syck_resolver.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_boolean.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_date.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_float.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_integer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_nil.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/to_symbol.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/transform/transformation_map.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/lib/safe_yaml/version.rb +1 -1
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/run_specs_all_ruby_versions.sh +0 -0
- data/bundle/ruby/2.5.0/gems/{safe_yaml-1.0.4 → safe_yaml-1.0.5}/safe_yaml.gemspec +0 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/History.rdoc +8 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/Manifest.txt +0 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/README.rdoc +0 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/composite_sexp_processor.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/pt_testcase.rb +2 -2
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/sexp.rb +4 -4
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/sexp_processor.rb +1 -1
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/strict_sexp.rb +3 -3
- data/bundle/ruby/2.5.0/gems/{sexp_processor-4.11.0 → sexp_processor-4.12.0}/lib/unique.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/CHANGES +6 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/EXPRESSIONS.md +1 -1
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/Gemfile +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/LICENSE +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/README.md +1 -1
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/engine.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/engine.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/parser.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/template.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/erb/trimming.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/exceptions.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filter.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/code_merger.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/control_flow.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/dynamic_inliner.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/encoding.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/eraser.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/escapable.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/multi_flattener.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/remove_bom.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/static_analyzer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/static_merger.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/string_splitter.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/filters/validator.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generator.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/array.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/array_buffer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/erb.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/rails_output_buffer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/generators/string_buffer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/grammar.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_merger.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_remover.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/attribute_sorter.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/dispatcher.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/fast.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/filter.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/pretty.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/html/safe.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/map.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/dispatcher.rb +2 -1
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/engine_dsl.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/grammar_dsl.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/options.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/mixins/template.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/parser.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/static_analyzer.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates/rails.rb +2 -2
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/templates/tilt.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/lib/temple/utils.rb +0 -0
- data/bundle/ruby/2.5.0/gems/temple-0.8.1/lib/temple/version.rb +3 -0
- data/bundle/ruby/2.5.0/gems/{temple-0.8.0 → temple-0.8.1}/temple.gemspec +0 -0
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/CHANGELOG.md +4 -0
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/MIT-LICENSE.txt +1 -1
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/README.md +10 -10
- data/bundle/ruby/2.5.0/gems/unicode-display_width-1.5.0/data/display_width.marshal.gz +0 -0
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width/constants.rb +2 -2
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width/index.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width/no_string_ext.rb +0 -0
- data/bundle/ruby/2.5.0/gems/{unicode-display_width-1.4.1 → unicode-display_width-1.5.0}/lib/unicode/display_width/string_ext.rb +0 -0
- data/lib/brakeman/checks/base_check.rb +16 -0
- data/lib/brakeman/checks/check_content_tag.rb +12 -0
- data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -6
- data/lib/brakeman/checks/check_evaluation.rb +0 -1
- data/lib/brakeman/checks/check_execute.rb +18 -0
- data/lib/brakeman/checks/check_send.rb +0 -1
- data/lib/brakeman/checks/check_session_manipulation.rb +0 -1
- data/lib/brakeman/checks/check_sql.rb +12 -3
- data/lib/brakeman/file_parser.rb +8 -4
- data/lib/brakeman/parsers/haml_embedded.rb +44 -0
- data/lib/brakeman/parsers/slim_embedded.rb +44 -0
- data/lib/brakeman/parsers/template_parser.rb +2 -4
- data/lib/brakeman/processors/alias_processor.rb +23 -1
- data/lib/brakeman/processors/lib/call_conversion_helper.rb +4 -0
- data/lib/brakeman/processors/slim_template_processor.rb +16 -0
- data/lib/brakeman/processors/template_alias_processor.rb +2 -2
- data/lib/brakeman/scanner.rb +11 -10
- data/lib/brakeman/tracker.rb +5 -1
- data/lib/brakeman/tracker/config.rb +32 -7
- data/lib/brakeman/util.rb +17 -0
- data/lib/brakeman/version.rb +1 -1
- metadata +157 -320
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby20_parser.rb +0 -6687
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby21_parser.rb +0 -6767
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby22_parser.rb +0 -6803
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby22_parser.y +0 -2376
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby23_parser.rb +0 -6818
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby24_parser.rb +0 -6818
- data/bundle/ruby/2.5.0/gems/ruby_parser-3.12.0/lib/ruby25_parser.rb +0 -6818
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/CODE_OF_CONDUCT.md +0 -10
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/CONTRIBUTING.md +0 -148
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/MIT-LICENSE +0 -20
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/README.md +0 -227
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/REVISION +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION_DATE +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/VERSION_NAME +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/extra/sass-spec-ref.sh +0 -32
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/extra/update_watch.rb +0 -13
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/init.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass.rb +0 -109
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores.rb +0 -15
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/base.rb +0 -88
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/chain.rb +0 -34
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/filesystem.rb +0 -60
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/memory.rb +0 -46
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/cache_stores/null.rb +0 -25
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/callbacks.rb +0 -67
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/css.rb +0 -408
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/deprecation.rb +0 -55
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/engine.rb +0 -1226
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/environment.rb +0 -215
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/error.rb +0 -198
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec.rb +0 -9
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/base.rb +0 -199
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/sass_convert.rb +0 -283
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/exec/sass_scss.rb +0 -440
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/features.rb +0 -47
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers.rb +0 -23
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/base.rb +0 -182
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/deprecated_path.rb +0 -51
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/importers/filesystem.rb +0 -219
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger.rb +0 -17
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/base.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/delayed.rb +0 -50
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/logger/log_level.rb +0 -45
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/media.rb +0 -210
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin.rb +0 -134
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/compiler.rb +0 -582
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/configuration.rb +0 -134
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/generic.rb +0 -15
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/merb.rb +0 -48
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/rack.rb +0 -60
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/rails.rb +0 -47
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/plugin/staleness_checker.rb +0 -199
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/railtie.rb +0 -10
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/repl.rb +0 -57
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/root.rb +0 -7
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script.rb +0 -66
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_lexer.rb +0 -33
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_parser.rb +0 -33
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/css_variable_warning.rb +0 -52
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/functions.rb +0 -2693
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/lexer.rb +0 -464
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/parser.rb +0 -832
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree.rb +0 -16
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/funcall.rb +0 -313
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/interpolation.rb +0 -223
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/list_literal.rb +0 -104
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/literal.rb +0 -49
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/map_literal.rb +0 -64
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/node.rb +0 -127
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/operation.rb +0 -156
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/selector.rb +0 -26
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/string_interpolation.rb +0 -125
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/unary_operation.rb +0 -69
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/tree/variable.rb +0 -57
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value.rb +0 -11
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/arg_list.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/base.rb +0 -241
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/bool.rb +0 -35
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/color.rb +0 -698
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/helpers.rb +0 -272
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/list.rb +0 -113
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/map.rb +0 -70
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/null.rb +0 -44
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/number.rb +0 -563
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/script/value/string.rb +0 -138
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss.rb +0 -14
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/css_parser.rb +0 -56
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/parser.rb +0 -1254
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/rx.rb +0 -140
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/scss/static_parser.rb +0 -373
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector.rb +0 -323
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/abstract_sequence.rb +0 -111
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/comma_sequence.rb +0 -191
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/pseudo.rb +0 -266
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/sequence.rb +0 -636
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/simple.rb +0 -117
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/selector/simple_sequence.rb +0 -344
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/shared.rb +0 -76
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/map.rb +0 -213
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/position.rb +0 -39
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/source/range.rb +0 -41
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/stack.rb +0 -120
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/supports.rb +0 -225
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/at_root_node.rb +0 -83
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/charset_node.rb +0 -22
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/comment_node.rb +0 -82
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/content_node.rb +0 -9
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/css_import_node.rb +0 -68
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/debug_node.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/directive_node.rb +0 -59
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/each_node.rb +0 -24
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/error_node.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/extend_node.rb +0 -43
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/for_node.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/function_node.rb +0 -44
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/if_node.rb +0 -52
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/import_node.rb +0 -75
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/keyframe_rule_node.rb +0 -15
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/media_node.rb +0 -48
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/mixin_def_node.rb +0 -38
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/mixin_node.rb +0 -52
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/node.rb +0 -240
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/prop_node.rb +0 -170
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/return_node.rb +0 -19
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/root_node.rb +0 -44
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/rule_node.rb +0 -155
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/supports_node.rb +0 -38
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/trace_node.rb +0 -33
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/variable_node.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/base.rb +0 -72
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/check_nesting.rb +0 -173
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/convert.rb +0 -351
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/cssize.rb +0 -373
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/deep_copy.rb +0 -107
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/extend.rb +0 -70
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/perform.rb +0 -564
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/set_options.rb +0 -139
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/visitors/to_css.rb +0 -409
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/warn_node.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/tree/while_node.rb +0 -18
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util.rb +0 -1375
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/cross_platform_random.rb +0 -19
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/multibyte_string_scanner.rb +0 -155
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/normalized_map.rb +0 -129
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/ordered_hash.rb +0 -192
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/subset_map.rb +0 -109
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/util/test.rb +0 -9
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/lib/sass/version.rb +0 -124
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/rails/init.rb +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/CHANGELOG.md +0 -1
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/CONTRIBUTING.md +0 -38
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Gemfile +0 -20
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Guardfile +0 -8
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/LICENSE +0 -20
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/README.md +0 -349
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Rakefile +0 -5
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/Vagrantfile +0 -96
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen.rb +0 -54
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapter.rb +0 -327
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/bsd.rb +0 -75
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/darwin.rb +0 -48
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/linux.rb +0 -81
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/polling.rb +0 -58
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/adapters/windows.rb +0 -91
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/directory_record.rb +0 -406
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/listener.rb +0 -323
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/turnstile.rb +0 -32
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/lib/listen/version.rb +0 -3
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/listen.gemspec +0 -28
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapter_spec.rb +0 -149
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/bsd_spec.rb +0 -36
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/darwin_spec.rb +0 -37
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/linux_spec.rb +0 -47
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/polling_spec.rb +0 -68
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/adapters/windows_spec.rb +0 -30
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/directory_record_spec.rb +0 -1250
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/listener_spec.rb +0 -258
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen/turnstile_spec.rb +0 -56
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/listen_spec.rb +0 -67
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/spec_helper.rb +0 -25
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/adapter_helper.rb +0 -666
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/directory_record_helper.rb +0 -57
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/fixtures_helper.rb +0 -29
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/listeners_helper.rb +0 -179
- data/bundle/ruby/2.5.0/gems/sass-3.4.25/vendor/listen/spec/support/platform_helper.rb +0 -15
- data/bundle/ruby/2.5.0/gems/temple-0.8.0/lib/temple/version.rb +0 -3
- data/bundle/ruby/2.5.0/gems/unicode-display_width-1.4.1/data/display_width.marshal.gz +0 -0
@@ -1,16 +0,0 @@
|
|
1
|
-
# The module containing nodes in the SassScript parse tree. These nodes are
|
2
|
-
# all subclasses of {Sass::Script::Tree::Node}.
|
3
|
-
module Sass::Script::Tree
|
4
|
-
end
|
5
|
-
|
6
|
-
require 'sass/script/tree/node'
|
7
|
-
require 'sass/script/tree/variable'
|
8
|
-
require 'sass/script/tree/funcall'
|
9
|
-
require 'sass/script/tree/operation'
|
10
|
-
require 'sass/script/tree/unary_operation'
|
11
|
-
require 'sass/script/tree/interpolation'
|
12
|
-
require 'sass/script/tree/string_interpolation'
|
13
|
-
require 'sass/script/tree/literal'
|
14
|
-
require 'sass/script/tree/list_literal'
|
15
|
-
require 'sass/script/tree/map_literal'
|
16
|
-
require 'sass/script/tree/selector'
|
@@ -1,313 +0,0 @@
|
|
1
|
-
require 'sass/script/functions'
|
2
|
-
require 'sass/util'
|
3
|
-
|
4
|
-
module Sass::Script::Tree
|
5
|
-
# A SassScript parse node representing a function call.
|
6
|
-
#
|
7
|
-
# A function call either calls one of the functions in
|
8
|
-
# {Sass::Script::Functions}, or if no function with the given name exists it
|
9
|
-
# returns a string representation of the function call.
|
10
|
-
class Funcall < Node
|
11
|
-
# The name of the function.
|
12
|
-
#
|
13
|
-
# @return [String]
|
14
|
-
attr_reader :name
|
15
|
-
|
16
|
-
# The arguments to the function.
|
17
|
-
#
|
18
|
-
# @return [Array<Node>]
|
19
|
-
attr_reader :args
|
20
|
-
|
21
|
-
# The keyword arguments to the function.
|
22
|
-
#
|
23
|
-
# @return [Sass::Util::NormalizedMap<Node>]
|
24
|
-
attr_reader :keywords
|
25
|
-
|
26
|
-
# The first splat argument for this function, if one exists.
|
27
|
-
#
|
28
|
-
# This could be a list of positional arguments, a map of keyword
|
29
|
-
# arguments, or an arglist containing both.
|
30
|
-
#
|
31
|
-
# @return [Node?]
|
32
|
-
attr_accessor :splat
|
33
|
-
|
34
|
-
# The second splat argument for this function, if one exists.
|
35
|
-
#
|
36
|
-
# If this exists, it's always a map of keyword arguments, and
|
37
|
-
# \{#splat} is always either a list or an arglist.
|
38
|
-
#
|
39
|
-
# @return [Node?]
|
40
|
-
attr_accessor :kwarg_splat
|
41
|
-
|
42
|
-
# @param name [String] See \{#name}
|
43
|
-
# @param args [Array<Node>] See \{#args}
|
44
|
-
# @param keywords [Sass::Util::NormalizedMap<Node>] See \{#keywords}
|
45
|
-
# @param splat [Node] See \{#splat}
|
46
|
-
# @param kwarg_splat [Node] See \{#kwarg_splat}
|
47
|
-
def initialize(name, args, keywords, splat, kwarg_splat)
|
48
|
-
@name = name
|
49
|
-
@args = args
|
50
|
-
@keywords = keywords
|
51
|
-
@splat = splat
|
52
|
-
@kwarg_splat = kwarg_splat
|
53
|
-
super()
|
54
|
-
end
|
55
|
-
|
56
|
-
# @return [String] A string representation of the function call
|
57
|
-
def inspect
|
58
|
-
args = @args.map {|a| a.inspect}.join(', ')
|
59
|
-
keywords = Sass::Util.hash_to_a(@keywords.as_stored).
|
60
|
-
map {|k, v| "$#{k}: #{v.inspect}"}.join(', ')
|
61
|
-
# rubocop:disable RedundantSelf
|
62
|
-
if self.splat
|
63
|
-
splat = args.empty? && keywords.empty? ? "" : ", "
|
64
|
-
splat = "#{splat}#{self.splat.inspect}..."
|
65
|
-
splat = "#{splat}, #{kwarg_splat.inspect}..." if kwarg_splat
|
66
|
-
end
|
67
|
-
# rubocop:enable RedundantSelf
|
68
|
-
"#{name}(#{args}#{', ' unless args.empty? || keywords.empty?}#{keywords}#{splat})"
|
69
|
-
end
|
70
|
-
|
71
|
-
# @see Node#to_sass
|
72
|
-
def to_sass(opts = {})
|
73
|
-
arg_to_sass = lambda do |arg|
|
74
|
-
sass = arg.to_sass(opts)
|
75
|
-
sass = "(#{sass})" if arg.is_a?(Sass::Script::Tree::ListLiteral) && arg.separator == :comma
|
76
|
-
sass
|
77
|
-
end
|
78
|
-
|
79
|
-
args = @args.map(&arg_to_sass)
|
80
|
-
keywords = Sass::Util.hash_to_a(@keywords.as_stored).
|
81
|
-
map {|k, v| "$#{dasherize(k, opts)}: #{arg_to_sass[v]}"}
|
82
|
-
|
83
|
-
# rubocop:disable RedundantSelf
|
84
|
-
if self.splat
|
85
|
-
splat = "#{arg_to_sass[self.splat]}..."
|
86
|
-
kwarg_splat = "#{arg_to_sass[self.kwarg_splat]}..." if self.kwarg_splat
|
87
|
-
end
|
88
|
-
# rubocop:enable RedundantSelf
|
89
|
-
|
90
|
-
arglist = [args, splat, keywords, kwarg_splat].flatten.compact.join(', ')
|
91
|
-
"#{dasherize(name, opts)}(#{arglist})"
|
92
|
-
end
|
93
|
-
|
94
|
-
# Returns the arguments to the function.
|
95
|
-
#
|
96
|
-
# @return [Array<Node>]
|
97
|
-
# @see Node#children
|
98
|
-
def children
|
99
|
-
res = @args + @keywords.values
|
100
|
-
res << @splat if @splat
|
101
|
-
res << @kwarg_splat if @kwarg_splat
|
102
|
-
res
|
103
|
-
end
|
104
|
-
|
105
|
-
# @see Node#deep_copy
|
106
|
-
def deep_copy
|
107
|
-
node = dup
|
108
|
-
node.instance_variable_set('@args', args.map {|a| a.deep_copy})
|
109
|
-
copied_keywords = Sass::Util::NormalizedMap.new
|
110
|
-
@keywords.as_stored.each {|k, v| copied_keywords[k] = v.deep_copy}
|
111
|
-
node.instance_variable_set('@keywords', copied_keywords)
|
112
|
-
node
|
113
|
-
end
|
114
|
-
|
115
|
-
protected
|
116
|
-
|
117
|
-
# Evaluates the function call.
|
118
|
-
#
|
119
|
-
# @param environment [Sass::Environment] The environment in which to evaluate the SassScript
|
120
|
-
# @return [Sass::Script::Value] The SassScript object that is the value of the function call
|
121
|
-
# @raise [Sass::SyntaxError] if the function call raises an ArgumentError
|
122
|
-
def _perform(environment)
|
123
|
-
args = Sass::Util.enum_with_index(@args).
|
124
|
-
map {|a, i| perform_arg(a, environment, signature && signature.args[i])}
|
125
|
-
keywords = Sass::Util.map_hash(@keywords) do |k, v|
|
126
|
-
[k, perform_arg(v, environment, k.tr('-', '_'))]
|
127
|
-
end
|
128
|
-
splat = Sass::Tree::Visitors::Perform.perform_splat(
|
129
|
-
@splat, keywords, @kwarg_splat, environment)
|
130
|
-
if (fn = environment.function(@name))
|
131
|
-
css_variable_warning.warn! if css_variable_warning
|
132
|
-
return without_original(perform_sass_fn(fn, args, splat, environment))
|
133
|
-
end
|
134
|
-
|
135
|
-
args = construct_ruby_args(ruby_name, args, splat, environment)
|
136
|
-
|
137
|
-
if Sass::Script::Functions.callable?(ruby_name)
|
138
|
-
css_variable_warning.warn! if css_variable_warning
|
139
|
-
|
140
|
-
local_environment = Sass::Environment.new(environment.global_env, environment.options)
|
141
|
-
local_environment.caller = Sass::ReadOnlyEnvironment.new(environment, environment.options)
|
142
|
-
result = opts(Sass::Script::Functions::EvaluationContext.new(
|
143
|
-
local_environment).send(ruby_name, *args))
|
144
|
-
without_original(result)
|
145
|
-
else
|
146
|
-
opts(to_literal(args))
|
147
|
-
end
|
148
|
-
rescue ArgumentError => e
|
149
|
-
reformat_argument_error(e)
|
150
|
-
end
|
151
|
-
|
152
|
-
# Compass historically overrode this before it changed name to {Funcall#to_value}.
|
153
|
-
# We should get rid of it in the future.
|
154
|
-
def to_literal(args)
|
155
|
-
to_value(args)
|
156
|
-
end
|
157
|
-
|
158
|
-
# This method is factored out from `_perform` so that compass can override
|
159
|
-
# it with a cross-browser implementation for functions that require vendor prefixes
|
160
|
-
# in the generated css.
|
161
|
-
def to_value(args)
|
162
|
-
Sass::Script::Value::String.new("#{name}(#{args.join(', ')})")
|
163
|
-
end
|
164
|
-
|
165
|
-
private
|
166
|
-
|
167
|
-
def ruby_name
|
168
|
-
@ruby_name ||= @name.tr('-', '_')
|
169
|
-
end
|
170
|
-
|
171
|
-
def perform_arg(argument, environment, name)
|
172
|
-
return argument if signature && signature.delayed_args.include?(name)
|
173
|
-
argument.perform(environment)
|
174
|
-
end
|
175
|
-
|
176
|
-
def signature
|
177
|
-
@signature ||= Sass::Script::Functions.signature(name.to_sym, @args.size, @keywords.size)
|
178
|
-
end
|
179
|
-
|
180
|
-
def without_original(value)
|
181
|
-
return value unless value.is_a?(Sass::Script::Value::Number)
|
182
|
-
value = value.dup
|
183
|
-
value.original = nil
|
184
|
-
value
|
185
|
-
end
|
186
|
-
|
187
|
-
def construct_ruby_args(name, args, splat, environment)
|
188
|
-
args += splat.to_a if splat
|
189
|
-
|
190
|
-
# All keywords are contained in splat.keywords for consistency,
|
191
|
-
# even if there were no splats passed in.
|
192
|
-
old_keywords_accessed = splat.keywords_accessed
|
193
|
-
keywords = splat.keywords
|
194
|
-
splat.keywords_accessed = old_keywords_accessed
|
195
|
-
|
196
|
-
unless (signature = Sass::Script::Functions.signature(name.to_sym, args.size, keywords.size))
|
197
|
-
return args if keywords.empty?
|
198
|
-
raise Sass::SyntaxError.new("Function #{name} doesn't support keyword arguments")
|
199
|
-
end
|
200
|
-
|
201
|
-
# If the user passes more non-keyword args than the function expects,
|
202
|
-
# but it does expect keyword args, Ruby's arg handling won't raise an error.
|
203
|
-
# Since we don't want to make functions think about this,
|
204
|
-
# we'll handle it for them here.
|
205
|
-
if signature.var_kwargs && !signature.var_args && args.size > signature.args.size
|
206
|
-
raise Sass::SyntaxError.new(
|
207
|
-
"#{args[signature.args.size].inspect} is not a keyword argument for `#{name}'")
|
208
|
-
elsif keywords.empty?
|
209
|
-
return args
|
210
|
-
end
|
211
|
-
|
212
|
-
argnames = signature.args[args.size..-1] || []
|
213
|
-
deprecated_argnames = (signature.deprecated && signature.deprecated[args.size..-1]) || []
|
214
|
-
args += argnames.zip(deprecated_argnames).map do |(argname, deprecated_argname)|
|
215
|
-
if keywords.has_key?(argname)
|
216
|
-
keywords.delete(argname)
|
217
|
-
elsif deprecated_argname && keywords.has_key?(deprecated_argname)
|
218
|
-
deprecated_argname = keywords.denormalize(deprecated_argname)
|
219
|
-
Sass::Util.sass_warn("DEPRECATION WARNING: The `$#{deprecated_argname}' argument for " +
|
220
|
-
"`#{@name}()' has been renamed to `$#{argname}'.")
|
221
|
-
keywords.delete(deprecated_argname)
|
222
|
-
else
|
223
|
-
raise Sass::SyntaxError.new("Function #{name} requires an argument named $#{argname}")
|
224
|
-
end
|
225
|
-
end
|
226
|
-
|
227
|
-
if keywords.size > 0
|
228
|
-
if signature.var_kwargs
|
229
|
-
# Don't pass a NormalizedMap to a Ruby function.
|
230
|
-
args << keywords.to_hash
|
231
|
-
else
|
232
|
-
argname = keywords.keys.sort.first
|
233
|
-
if signature.args.include?(argname)
|
234
|
-
raise Sass::SyntaxError.new(
|
235
|
-
"Function #{name} was passed argument $#{argname} both by position and by name")
|
236
|
-
else
|
237
|
-
raise Sass::SyntaxError.new(
|
238
|
-
"Function #{name} doesn't have an argument named $#{argname}")
|
239
|
-
end
|
240
|
-
end
|
241
|
-
end
|
242
|
-
|
243
|
-
args
|
244
|
-
end
|
245
|
-
|
246
|
-
def perform_sass_fn(function, args, splat, environment)
|
247
|
-
Sass::Tree::Visitors::Perform.perform_arguments(function, args, splat, environment) do |env|
|
248
|
-
env.caller = Sass::Environment.new(environment)
|
249
|
-
|
250
|
-
val = catch :_sass_return do
|
251
|
-
function.tree.each {|c| Sass::Tree::Visitors::Perform.visit(c, env)}
|
252
|
-
raise Sass::SyntaxError.new("Function #{@name} finished without @return")
|
253
|
-
end
|
254
|
-
val
|
255
|
-
end
|
256
|
-
end
|
257
|
-
|
258
|
-
def reformat_argument_error(e)
|
259
|
-
message = e.message
|
260
|
-
|
261
|
-
# If this is a legitimate Ruby-raised argument error, re-raise it.
|
262
|
-
# Otherwise, it's an error in the user's stylesheet, so wrap it.
|
263
|
-
if Sass::Util.rbx?
|
264
|
-
# Rubinius has a different error report string than vanilla Ruby. It
|
265
|
-
# also doesn't put the actual method for which the argument error was
|
266
|
-
# thrown in the backtrace, nor does it include `send`, so we look for
|
267
|
-
# `_perform`.
|
268
|
-
if e.message =~ /^method '([^']+)': given (\d+), expected (\d+)/
|
269
|
-
error_name, given, expected = $1, $2, $3
|
270
|
-
raise e if error_name != ruby_name || e.backtrace[0] !~ /:in `_perform'$/
|
271
|
-
message = "wrong number of arguments (#{given} for #{expected})"
|
272
|
-
end
|
273
|
-
elsif Sass::Util.jruby?
|
274
|
-
if Sass::Util.jruby1_6?
|
275
|
-
should_maybe_raise = e.message =~ /^wrong number of arguments \((\d+) for (\d+)\)/ &&
|
276
|
-
# The one case where JRuby does include the Ruby name of the function
|
277
|
-
# is manually-thrown ArgumentErrors, which are indistinguishable from
|
278
|
-
# legitimate ArgumentErrors. We treat both of these as
|
279
|
-
# Sass::SyntaxErrors even though it can hide Ruby errors.
|
280
|
-
e.backtrace[0] !~ /:in `(block in )?#{ruby_name}'$/
|
281
|
-
else
|
282
|
-
should_maybe_raise =
|
283
|
-
e.message =~ /^wrong number of arguments calling `[^`]+` \((\d+) for (\d+)\)/
|
284
|
-
given, expected = $1, $2
|
285
|
-
end
|
286
|
-
|
287
|
-
if should_maybe_raise
|
288
|
-
# JRuby 1.7 includes __send__ before send and _perform.
|
289
|
-
trace = e.backtrace.dup
|
290
|
-
raise e if !Sass::Util.jruby1_6? && trace.shift !~ /:in `__send__'$/
|
291
|
-
|
292
|
-
# JRuby (as of 1.7.2) doesn't put the actual method
|
293
|
-
# for which the argument error was thrown in the backtrace, so we
|
294
|
-
# detect whether our send threw an argument error.
|
295
|
-
if !(trace[0] =~ /:in `send'$/ && trace[1] =~ /:in `_perform'$/)
|
296
|
-
raise e
|
297
|
-
elsif !Sass::Util.jruby1_6?
|
298
|
-
# JRuby 1.7 doesn't use standard formatting for its ArgumentErrors.
|
299
|
-
message = "wrong number of arguments (#{given} for #{expected})"
|
300
|
-
end
|
301
|
-
end
|
302
|
-
elsif (md = /^wrong number of arguments \(given (\d+), expected (\d+)\)/.match(e.message)) &&
|
303
|
-
e.backtrace[0] =~ /:in `#{ruby_name}'$/
|
304
|
-
# Handle ruby 2.3 error formatting
|
305
|
-
message = "wrong number of arguments (#{md[1]} for #{md[2]})"
|
306
|
-
elsif e.message =~ /^wrong number of arguments/ &&
|
307
|
-
e.backtrace[0] !~ /:in `(block in )?#{ruby_name}'$/
|
308
|
-
raise e
|
309
|
-
end
|
310
|
-
raise Sass::SyntaxError.new("#{message} for `#{name}'")
|
311
|
-
end
|
312
|
-
end
|
313
|
-
end
|
@@ -1,223 +0,0 @@
|
|
1
|
-
module Sass::Script::Tree
|
2
|
-
# A SassScript object representing `#{}` interpolation outside a string.
|
3
|
-
#
|
4
|
-
# @see StringInterpolation
|
5
|
-
class Interpolation < Node
|
6
|
-
# @return [Node] The SassScript before the interpolation
|
7
|
-
attr_reader :before
|
8
|
-
|
9
|
-
# @return [Node] The SassScript within the interpolation
|
10
|
-
attr_reader :mid
|
11
|
-
|
12
|
-
# @return [Node] The SassScript after the interpolation
|
13
|
-
attr_reader :after
|
14
|
-
|
15
|
-
# @return [Boolean] Whether there was whitespace between `before` and `#{`
|
16
|
-
attr_reader :whitespace_before
|
17
|
-
|
18
|
-
# @return [Boolean] Whether there was whitespace between `}` and `after`
|
19
|
-
attr_reader :whitespace_after
|
20
|
-
|
21
|
-
# @return [Boolean] Whether the original format of the interpolation was
|
22
|
-
# plain text, not an interpolation. This is used when converting back to
|
23
|
-
# SassScript.
|
24
|
-
attr_reader :originally_text
|
25
|
-
|
26
|
-
# @return [Boolean] Whether a color value passed to the interpolation should
|
27
|
-
# generate a warning.
|
28
|
-
attr_reader :warn_for_color
|
29
|
-
|
30
|
-
# The type of interpolation deprecation for this node.
|
31
|
-
#
|
32
|
-
# This can be `:none`, indicating that the node doesn't use deprecated
|
33
|
-
# interpolation; `:immediate`, indicating that a deprecation warning should
|
34
|
-
# be emitted as soon as possible; or `:potential`, indicating that a
|
35
|
-
# deprecation warning should be emitted if the resulting string is used in a
|
36
|
-
# way that would distinguish it from a list.
|
37
|
-
#
|
38
|
-
# @return [Symbol]
|
39
|
-
attr_reader :deprecation
|
40
|
-
|
41
|
-
# Interpolation in a property is of the form `before #{mid} after`.
|
42
|
-
#
|
43
|
-
# @param before [Node] See {Interpolation#before}
|
44
|
-
# @param mid [Node] See {Interpolation#mid}
|
45
|
-
# @param after [Node] See {Interpolation#after}
|
46
|
-
# @param wb [Boolean] See {Interpolation#whitespace_before}
|
47
|
-
# @param wa [Boolean] See {Interpolation#whitespace_after}
|
48
|
-
# @param originally_text [Boolean] See {Interpolation#originally_text}
|
49
|
-
# @param warn_for_color [Boolean] See {Interpolation#warn_for_color}
|
50
|
-
# @comment
|
51
|
-
# rubocop:disable ParameterLists
|
52
|
-
def initialize(before, mid, after, wb, wa, opts = {})
|
53
|
-
# rubocop:enable ParameterLists
|
54
|
-
@before = before
|
55
|
-
@mid = mid
|
56
|
-
@after = after
|
57
|
-
@whitespace_before = wb
|
58
|
-
@whitespace_after = wa
|
59
|
-
@originally_text = opts[:originally_text] || false
|
60
|
-
@warn_for_color = opts[:warn_for_color] || false
|
61
|
-
@deprecation = opts[:deprecation] || :none
|
62
|
-
end
|
63
|
-
|
64
|
-
# @return [String] A human-readable s-expression representation of the interpolation
|
65
|
-
def inspect
|
66
|
-
"(interpolation #{@before.inspect} #{@mid.inspect} #{@after.inspect})"
|
67
|
-
end
|
68
|
-
|
69
|
-
# @see Node#to_sass
|
70
|
-
def to_sass(opts = {})
|
71
|
-
return to_quoted_equivalent.to_sass if deprecation == :immediate
|
72
|
-
|
73
|
-
res = ""
|
74
|
-
res << @before.to_sass(opts) if @before
|
75
|
-
res << ' ' if @before && @whitespace_before
|
76
|
-
res << '#{' unless @originally_text
|
77
|
-
res << @mid.to_sass(opts)
|
78
|
-
res << '}' unless @originally_text
|
79
|
-
res << ' ' if @after && @whitespace_after
|
80
|
-
res << @after.to_sass(opts) if @after
|
81
|
-
res
|
82
|
-
end
|
83
|
-
|
84
|
-
# Returns an `unquote()` expression that will evaluate to the same value as
|
85
|
-
# this interpolation.
|
86
|
-
#
|
87
|
-
# @return [Sass::Script::Tree::Node]
|
88
|
-
def to_quoted_equivalent
|
89
|
-
Funcall.new(
|
90
|
-
"unquote",
|
91
|
-
[to_string_interpolation(self)],
|
92
|
-
Sass::Util::NormalizedMap.new,
|
93
|
-
nil,
|
94
|
-
nil)
|
95
|
-
end
|
96
|
-
|
97
|
-
# Returns the three components of the interpolation, `before`, `mid`, and `after`.
|
98
|
-
#
|
99
|
-
# @return [Array<Node>]
|
100
|
-
# @see #initialize
|
101
|
-
# @see Node#children
|
102
|
-
def children
|
103
|
-
[@before, @mid, @after].compact
|
104
|
-
end
|
105
|
-
|
106
|
-
# @see Node#deep_copy
|
107
|
-
def deep_copy
|
108
|
-
node = dup
|
109
|
-
node.instance_variable_set('@before', @before.deep_copy) if @before
|
110
|
-
node.instance_variable_set('@mid', @mid.deep_copy)
|
111
|
-
node.instance_variable_set('@after', @after.deep_copy) if @after
|
112
|
-
node
|
113
|
-
end
|
114
|
-
|
115
|
-
protected
|
116
|
-
|
117
|
-
# Converts a script node into a corresponding string interpolation
|
118
|
-
# expression.
|
119
|
-
#
|
120
|
-
# @param node_or_interp [Sass::Script::Tree::Node]
|
121
|
-
# @return [Sass::Script::Tree::StringInterpolation]
|
122
|
-
def to_string_interpolation(node_or_interp)
|
123
|
-
unless node_or_interp.is_a?(Interpolation)
|
124
|
-
node = node_or_interp
|
125
|
-
return string_literal(node.value.to_s) if node.is_a?(Literal)
|
126
|
-
if node.is_a?(StringInterpolation)
|
127
|
-
return concat(string_literal(node.quote), concat(node, string_literal(node.quote)))
|
128
|
-
end
|
129
|
-
return StringInterpolation.new(string_literal(""), node, string_literal(""))
|
130
|
-
end
|
131
|
-
|
132
|
-
interp = node_or_interp
|
133
|
-
after_string_or_interp =
|
134
|
-
if interp.after
|
135
|
-
to_string_interpolation(interp.after)
|
136
|
-
else
|
137
|
-
string_literal("")
|
138
|
-
end
|
139
|
-
if interp.after && interp.whitespace_after
|
140
|
-
after_string_or_interp = concat(string_literal(' '), after_string_or_interp)
|
141
|
-
end
|
142
|
-
|
143
|
-
mid_string_or_interp = to_string_interpolation(interp.mid)
|
144
|
-
|
145
|
-
before_string_or_interp =
|
146
|
-
if interp.before
|
147
|
-
to_string_interpolation(interp.before)
|
148
|
-
else
|
149
|
-
string_literal("")
|
150
|
-
end
|
151
|
-
if interp.before && interp.whitespace_before
|
152
|
-
before_string_or_interp = concat(before_string_or_interp, string_literal(' '))
|
153
|
-
end
|
154
|
-
|
155
|
-
concat(before_string_or_interp, concat(mid_string_or_interp, after_string_or_interp))
|
156
|
-
end
|
157
|
-
|
158
|
-
private
|
159
|
-
|
160
|
-
# Evaluates the interpolation.
|
161
|
-
#
|
162
|
-
# @param environment [Sass::Environment] The environment in which to evaluate the SassScript
|
163
|
-
# @return [Sass::Script::Value::String]
|
164
|
-
# The SassScript string that is the value of the interpolation
|
165
|
-
def _perform(environment)
|
166
|
-
res = ""
|
167
|
-
res << @before.perform(environment).to_s if @before
|
168
|
-
res << " " if @before && @whitespace_before
|
169
|
-
|
170
|
-
val = @mid.perform(environment)
|
171
|
-
if @warn_for_color && val.is_a?(Sass::Script::Value::Color) && val.name
|
172
|
-
alternative = Operation.new(Sass::Script::Value::String.new("", :string), @mid, :plus)
|
173
|
-
Sass::Util.sass_warn <<MESSAGE
|
174
|
-
WARNING on line #{line}, column #{source_range.start_pos.offset}#{" of #{filename}" if filename}:
|
175
|
-
You probably don't mean to use the color value `#{val}' in interpolation here.
|
176
|
-
It may end up represented as #{val.inspect}, which will likely produce invalid CSS.
|
177
|
-
Always quote color names when using them as strings (for example, "#{val}").
|
178
|
-
If you really want to use the color value here, use `#{alternative.to_sass}'.
|
179
|
-
MESSAGE
|
180
|
-
end
|
181
|
-
|
182
|
-
res << val.to_s(:quote => :none)
|
183
|
-
res << " " if @after && @whitespace_after
|
184
|
-
res << @after.perform(environment).to_s if @after
|
185
|
-
str = Sass::Script::Value::String.new(
|
186
|
-
res, :identifier,
|
187
|
-
(to_quoted_equivalent.to_sass if deprecation == :potential))
|
188
|
-
str.source_range = source_range
|
189
|
-
opts(str)
|
190
|
-
end
|
191
|
-
|
192
|
-
# Concatenates two string literals or string interpolation expressions.
|
193
|
-
#
|
194
|
-
# @param string_or_interp1 [Sass::Script::Tree::Literal|Sass::Script::Tree::StringInterpolation]
|
195
|
-
# @param string_or_interp2 [Sass::Script::Tree::Literal|Sass::Script::Tree::StringInterpolation]
|
196
|
-
# @return [Sass::Script::Tree::StringInterpolation]
|
197
|
-
def concat(string_or_interp1, string_or_interp2)
|
198
|
-
if string_or_interp1.is_a?(Literal) && string_or_interp2.is_a?(Literal)
|
199
|
-
return string_literal(string_or_interp1.value.value + string_or_interp2.value.value)
|
200
|
-
end
|
201
|
-
|
202
|
-
if string_or_interp1.is_a?(Literal)
|
203
|
-
string = string_or_interp1
|
204
|
-
interp = string_or_interp2
|
205
|
-
before = string_literal(string.value.value + interp.before.value.value)
|
206
|
-
return StringInterpolation.new(before, interp.mid, interp.after)
|
207
|
-
end
|
208
|
-
|
209
|
-
StringInterpolation.new(
|
210
|
-
string_or_interp1.before,
|
211
|
-
string_or_interp1.mid,
|
212
|
-
concat(string_or_interp1.after, string_or_interp2))
|
213
|
-
end
|
214
|
-
|
215
|
-
# Returns a string literal with the given contents.
|
216
|
-
#
|
217
|
-
# @param string [String]
|
218
|
-
# @return string [Sass::Script::Tree::Literal]
|
219
|
-
def string_literal(string)
|
220
|
-
Literal.new(Sass::Script::Value::String.new(string, :string))
|
221
|
-
end
|
222
|
-
end
|
223
|
-
end
|