sass-site/source/documentation/Sass/Tree/Visitors/Perform.html
2018-10-22 14:13:05 -07:00

665 lines
50 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: Sass::Tree::Visitors::Perform
&mdash; Documentation by YARD 0.9.12
</title>
<link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../../../../assets/css/docs.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
relpath = '../../../';
framesUrl = "../../../frames.html#!Sass/Tree/Visitors/Perform.html";
</script>
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
</head>
<body>
<div id="header">
<div id="menu">
<a href="../../../_index.html">Index (P)</a> &raquo;
<span class='title'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Tree.html" title="Sass::Tree (module)">Tree</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Visitors.html" title="Sass::Tree::Visitors (module)">Visitors</a></span></span>
&raquo;
<span class="title">Perform</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../../../class_list.html">
Class List
</a>
<a class="full_list_link" id="method_list_link"
href="../../../method_list.html">
Method List
</a>
<a class="full_list_link" id="file_list_link"
href="../../../file_list.html">
File List
</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: Sass::Tree::Visitors::Perform
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName"><span class='object_link'><a href="Base.html" title="Sass::Tree::Visitors::Base (class)">Base</a></span></span>
<ul class="fullTree">
<li>Object</li>
<li class="next"><span class='object_link'><a href="Base.html" title="Sass::Tree::Visitors::Base (class)">Base</a></span></li>
<li class="next">Sass::Tree::Visitors::Perform</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">.ruby-sass/lib/sass/tree/visitors/perform.rb</dd>
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>A visitor for converting a dynamic Sass tree into a static Sass tree.</p>
</div>
</div>
<div class="tags">
</div>
<h2>Constant Summary</h2>
<dl class="constants">
<dt id="function_name_deprecation-classvariable" class="">@@function_name_deprecation =
</dt>
<dd><pre class="code"><span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Deprecation.html" title="Sass::Deprecation (class)">Deprecation</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../Deprecation.html#initialize-instance_method" title="Sass::Deprecation#initialize (method)">new</a></span></span></pre></dd>
</dl>
<h2>
Class Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#perform_arguments-class_method" title="perform_arguments (class method)">.<strong>perform_arguments</strong>(callable, args, splat, environment) &#x21d2; Object </a>
</span>
<span class="private note title">private</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#perform_splat-class_method" title="perform_splat (class method)">.<strong>perform_splat</strong>(splat, performed_keywords, kwarg_splat, environment) &#x21d2; Sass::Script::Value::ArgList </a>
</span>
<span class="private note title">private</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#visit-class_method" title="visit (class method)">.<strong>visit</strong>(root, environment = nil) &#x21d2; Tree::Node </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The resulting tree of static nodes.</p>
</div></span>
</li>
</ul>
<div id="class_method_details" class="method_details_list">
<h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="perform_arguments-class_method">
.<strong>perform_arguments</strong>(callable, args, splat, environment) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p class="note private">
<strong>This method is part of a private API.</strong>
You should avoid using this method if possible, as it may be removed or be changed in the future.
</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/visitors/perform.rb', line 16</span>
<span class='kw'>def</span> <span class='id identifier rubyid_perform_arguments'>perform_arguments</span><span class='lparen'>(</span><span class='id identifier rubyid_callable'>callable</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_splat'>splat</span><span class='comma'>,</span> <span class='id identifier rubyid_environment'>environment</span><span class='rparen'>)</span>
<span class='id identifier rubyid_desc'>desc</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='period'>.</span><span class='id identifier rubyid_capitalize'>capitalize</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
<span class='id identifier rubyid_downcase_desc'>downcase_desc</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
<span class='comment'># All keywords are contained in splat.keywords for consistency,
</span> <span class='comment'># even if there were no splats passed in.
</span> <span class='id identifier rubyid_old_keywords_accessed'>old_keywords_accessed</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_keywords_accessed'>keywords_accessed</span>
<span class='id identifier rubyid_keywords'>keywords</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_keywords'>keywords</span>
<span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_keywords_accessed'>keywords_accessed</span> <span class='op'>=</span> <span class='id identifier rubyid_old_keywords_accessed'>old_keywords_accessed</span>
<span class='kw'>begin</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_keywords'>keywords</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
<span class='id identifier rubyid_unknown_args'>unknown_args</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Util.html" title="Sass::Util (module)">Util</a></span></span><span class='period'>.</span><span class='id identifier rubyid_array_minus'><span class='object_link'><a href="../../Util.html#array_minus-instance_method" title="Sass::Util#array_minus (method)">array_minus</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_keywords'>keywords</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span>
<span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_var'>var</span><span class='op'>|</span> <span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_underscored_name'>underscored_name</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_unknown_args'>unknown_args</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_underscored_name'>underscored_name</span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Argument $</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_downcase_desc'>downcase_desc</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cannot be used as a named argument.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>elsif</span> <span class='id identifier rubyid_unknown_args'>unknown_args</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span>
<span class='id identifier rubyid_description'>description</span> <span class='op'>=</span> <span class='id identifier rubyid_unknown_args'>unknown_args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>&gt;</span> <span class='int'>1</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>the following arguments:</span><span class='tstring_end'>&#39;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>an argument named</span><span class='tstring_end'>&#39;</span></span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_desc'>desc</span><span class='embexpr_end'>}</span><span class='tstring_content'> doesn&#39;t have </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_description'>description</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_unknown_args'>unknown_args</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_name'>name</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>$</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>, </span><span class='tstring_end'>&#39;</span></span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>rescue</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_keyword_exception'>keyword_exception</span>
<span class='kw'>end</span>
<span class='comment'># If there&#39;s no splat, raise the keyword exception immediately. The actual
</span> <span class='comment'># raising happens in the ensure clause at the end of this function.
</span> <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_keyword_exception'>keyword_exception</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_splat_sep'>splat_sep</span> <span class='op'>=</span> <span class='symbol'>:comma</span>
<span class='kw'>if</span> <span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_args'>args</span> <span class='op'>+=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
<span class='id identifier rubyid_splat_sep'>splat_sep</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_separator'>separator</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_extra_args_because_of_splat'>extra_args_because_of_splat</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>-</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&lt;=</span> <span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
<span class='id identifier rubyid_takes'>takes</span> <span class='op'>=</span> <span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
<span class='id identifier rubyid_passed'>passed</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
<span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_desc'>desc</span><span class='embexpr_end'>}</span><span class='tstring_content'> takes </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_takes'>takes</span><span class='embexpr_end'>}</span><span class='tstring_content'> argument</span><span class='embexpr_beg'>#{</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>s</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_takes'>takes</span> <span class='op'>==</span> <span class='int'>1</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>but </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_passed'>passed</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_passed'>passed</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>was</span><span class='tstring_end'>&#39;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>were</span><span class='tstring_end'>&#39;</span></span><span class='embexpr_end'>}</span><span class='tstring_content'> passed.</span><span class='tstring_end'>&quot;</span></span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_extra_args_because_of_splat'>extra_args_because_of_splat</span>
<span class='comment'># TODO: when the deprecation period is over, make this an error.
</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Util.html" title="Sass::Util (module)">Util</a></span></span><span class='period'>.</span><span class='id identifier rubyid_sass_warn'><span class='object_link'><a href="../../Util.html#sass_warn-instance_method" title="Sass::Util#sass_warn (method)">sass_warn</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>WARNING: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='id identifier rubyid_environment'>environment</span><span class='period'>.</span><span class='id identifier rubyid_stack'>stack</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^</span><span class='regexp_end'>/m</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span> <span class='op'>*</span> <span class='int'>8</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>This will be an error in future versions of Sass.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_env'>env</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Environment.html" title="Sass::Environment (class)">Environment</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../BaseEnvironment.html#initialize-instance_method" title="Sass::BaseEnvironment#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_environment'>environment</span><span class='rparen'>)</span>
<span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_zip'>zip</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>...</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='comma'>,</span> <span class='id identifier rubyid_default'>default</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
<span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_keywords'>keywords</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_desc'>desc</span><span class='embexpr_end'>}</span><span class='tstring_content'> was passed argument $</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>both by position and by name.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_value'>value</span> <span class='op'>||=</span> <span class='id identifier rubyid_keywords'>keywords</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
<span class='id identifier rubyid_value'>value</span> <span class='op'>||=</span> <span class='id identifier rubyid_default'>default</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_default'>default</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_desc'>desc</span><span class='embexpr_end'>}</span><span class='tstring_content'> is missing argument </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_value'>value</span>
<span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_set_local_var'>set_local_var</span><span class='lparen'>(</span><span class='id identifier rubyid_var'>var</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_rest'>rest</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span><span class='lbracket'>[</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_arg_list'>arg_list</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value/ArgList.html" title="Sass::Script::Value::ArgList (class)">ArgList</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../Script/Value/ArgList.html#initialize-instance_method" title="Sass::Script::Value::ArgList#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_rest'>rest</span><span class='comma'>,</span> <span class='id identifier rubyid_keywords'>keywords</span><span class='comma'>,</span> <span class='id identifier rubyid_splat_sep'>splat_sep</span><span class='rparen'>)</span>
<span class='id identifier rubyid_arg_list'>arg_list</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span>
<span class='id identifier rubyid_env'>env</span><span class='period'>.</span><span class='id identifier rubyid_set_local_var'>set_local_var</span><span class='lparen'>(</span><span class='id identifier rubyid_callable'>callable</span><span class='period'>.</span><span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_arg_list'>arg_list</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='kw'>yield</span> <span class='id identifier rubyid_env'>env</span>
<span class='kw'>rescue</span> <span class='const'>StandardError</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>ensure</span>
<span class='comment'># If there&#39;s a keyword exception, we don&#39;t want to throw it immediately,
</span> <span class='comment'># because the invalid keywords may be part of a glob argument that should be
</span> <span class='comment'># passed on to another function. So we only raise it if we reach the end of
</span> <span class='comment'># this function *and* the keywords attached to the argument list glob object
</span> <span class='comment'># haven&#39;t been accessed.
</span> <span class='comment'>#
</span> <span class='comment'># The keyword exception takes precedence over any Sass errors, but not over
</span> <span class='comment'># non-Sass exceptions.
</span> <span class='kw'>if</span> <span class='id identifier rubyid_keyword_exception'>keyword_exception</span> <span class='op'>&amp;&amp;</span>
<span class='op'>!</span><span class='lparen'>(</span><span class='id identifier rubyid_arg_list'>arg_list</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_arg_list'>arg_list</span><span class='period'>.</span><span class='id identifier rubyid_keywords_accessed'>keywords_accessed</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
<span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_keyword_exception'>keyword_exception</span>
<span class='kw'>elsif</span> <span class='id identifier rubyid_e'>e</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="perform_splat-class_method">
.<strong>perform_splat</strong>(splat, performed_keywords, kwarg_splat, environment) &#x21d2; <tt><span class='object_link'><a href="../../Script/Value/ArgList.html" title="Sass::Script::Value::ArgList (class)">Sass::Script::Value::ArgList</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p class="note private">
<strong>This method is part of a private API.</strong>
You should avoid using this method if possible, as it may be removed or be changed in the future.
</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../../Script/Value/ArgList.html" title="Sass::Script::Value::ArgList (class)">Sass::Script::Value::ArgList</a></span></tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/visitors/perform.rb', line 108</span>
<span class='kw'>def</span> <span class='id identifier rubyid_perform_splat'>perform_splat</span><span class='lparen'>(</span><span class='id identifier rubyid_splat'>splat</span><span class='comma'>,</span> <span class='id identifier rubyid_performed_keywords'>performed_keywords</span><span class='comma'>,</span> <span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span><span class='comma'>,</span> <span class='id identifier rubyid_environment'>environment</span><span class='rparen'>)</span>
<span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span> <span class='id identifier rubyid_separator'>separator</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='symbol'>:comma</span>
<span class='kw'>if</span> <span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_splat'>splat</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='id identifier rubyid_environment'>environment</span><span class='rparen'>)</span>
<span class='id identifier rubyid_separator'>separator</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_separator'>separator</span> <span class='op'>||</span> <span class='id identifier rubyid_separator'>separator</span>
<span class='kw'>if</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value/ArgList.html" title="Sass::Script::Value::ArgList (class)">ArgList</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
<span class='id identifier rubyid_kwargs'>kwargs</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_keywords'>keywords</span>
<span class='kw'>elsif</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value/Map.html" title="Sass::Script::Value::Map (class)">Map</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_kwargs'>kwargs</span> <span class='op'>=</span> <span class='id identifier rubyid_arg_hash'>arg_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_splat'>splat</span><span class='rparen'>)</span>
<span class='kw'>else</span>
<span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_kwargs'>kwargs</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Util.html" title="Sass::Util (module)">Util</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Util/NormalizedMap.html" title="Sass::Util::NormalizedMap (class)">NormalizedMap</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../Util/NormalizedMap.html#initialize-instance_method" title="Sass::Util::NormalizedMap#initialize (method)">new</a></span></span>
<span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_performed_keywords'>performed_keywords</span><span class='rparen'>)</span>
<span class='kw'>if</span> <span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span>
<span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span> <span class='op'>=</span> <span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span><span class='period'>.</span><span class='id identifier rubyid_perform'>perform</span><span class='lparen'>(</span><span class='id identifier rubyid_environment'>environment</span><span class='rparen'>)</span>
<span class='kw'>unless</span> <span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value/Map.html" title="Sass::Script::Value::Map (class)">Map</a></span></span><span class='rparen'>)</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../SyntaxError.html" title="Sass::SyntaxError (class)">SyntaxError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../SyntaxError.html#initialize-instance_method" title="Sass::SyntaxError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Variable keyword arguments must be a map </span><span class='tstring_end'>&quot;</span></span> <span class='op'>+</span>
<span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>(was </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>).</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_update'>update</span><span class='lparen'>(</span><span class='id identifier rubyid_arg_hash'>arg_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='const'><span class='object_link'><a href="../../../Sass.html" title="Sass (module)">Sass</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script.html" title="Sass::Script (module)">Script</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value.html" title="Sass::Script::Value (module)">Value</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Script/Value/ArgList.html" title="Sass::Script::Value::ArgList (class)">ArgList</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../../Script/Value/ArgList.html#initialize-instance_method" title="Sass::Script::Value::ArgList#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span> <span class='id identifier rubyid_separator'>separator</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="visit-class_method">
.<strong>visit</strong>(root, environment = nil) &#x21d2; <tt><span class='object_link'><a href="../Node.html" title="Sass::Tree::Node (class)">Tree::Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns The resulting tree of static nodes.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>root</span>
<span class='type'>(<tt><span class='object_link'><a href="../Node.html" title="Sass::Tree::Node (class)">Tree::Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The root node of the tree to visit.</p>
</div>
</li>
<li>
<span class='name'>environment</span>
<span class='type'>(<tt><span class='object_link'><a href="../../Environment.html" title="Sass::Environment (class)">Sass::Environment</a></span></tt>)</span>
<em class="default">(defaults to: <tt>nil</tt>)</em>
&mdash;
<div class='inline'>
<p>The lexical environment.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../Node.html" title="Sass::Tree::Node (class)">Tree::Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The resulting tree of static nodes.</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
9
10
11</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/tree/visitors/perform.rb', line 9</span>
<span class='kw'>def</span> <span class='id identifier rubyid_visit'>visit</span><span class='lparen'>(</span><span class='id identifier rubyid_root'><span class='object_link'><a href="../../../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='comma'>,</span> <span class='id identifier rubyid_environment'>environment</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
<span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_environment'>environment</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:visit</span><span class='comma'>,</span> <span class='id identifier rubyid_root'><span class='object_link'><a href="../../../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Oct 22 13:21:00 2018 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.12 (ruby-2.5.3).
</div>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-535380-14', 'sass-lang.com');
ga('send', 'pageview');
</script>
</body>
</html>