sass-site/source/documentation/Sass/Script/Parser.html

1862 lines
64 KiB
HTML
Raw Normal View History

2018-10-22 23:13:05 +02:00
<!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::Script::Parser
&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/Script/Parser.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="../Script.html" title="Sass::Script (module)">Script</a></span></span>
&raquo;
<span class="title">Parser</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::Script::Parser
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName">Object</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">Sass::Script::Parser</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/script/parser.rb</dd>
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>The parser for SassScript. It parses a string of code into a tree of
<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Tree::Node</a></span>s.</p>
</div>
</div>
<div class="tags">
</div><div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="CssParser.html" title="Sass::Script::CssParser (class)">CssParser</a></span></p>
</div>
<div id="subclasses">
<h2>Direct Known Subclasses</h2>
<p class="children"><span class='object_link'><a href="CssParser.html" title="Sass::Script::CssParser (class)">CssParser</a></span></p>
</div>
<h2>Constant Summary</h2>
<dl class="constants">
<dt id="PRECEDENCE-constant" class="">PRECEDENCE =
</dt>
<dd><pre class="code"><span class='lbracket'>[</span>
<span class='symbol'>:comma</span><span class='comma'>,</span> <span class='symbol'>:single_eq</span><span class='comma'>,</span> <span class='symbol'>:space</span><span class='comma'>,</span> <span class='symbol'>:or</span><span class='comma'>,</span> <span class='symbol'>:and</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='symbol'>:eq</span><span class='comma'>,</span> <span class='symbol'>:neq</span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='symbol'>:gt</span><span class='comma'>,</span> <span class='symbol'>:gte</span><span class='comma'>,</span> <span class='symbol'>:lt</span><span class='comma'>,</span> <span class='symbol'>:lte</span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='symbol'>:plus</span><span class='comma'>,</span> <span class='symbol'>:minus</span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='lbracket'>[</span><span class='symbol'>:times</span><span class='comma'>,</span> <span class='symbol'>:div</span><span class='comma'>,</span> <span class='symbol'>:mod</span><span class='rbracket'>]</span><span class='comma'>,</span>
<span class='rbracket'>]</span></pre></dd>
<dt id="ASSOCIATIVE-constant" class="">ASSOCIATIVE =
</dt>
<dd><pre class="code"><span class='lbracket'>[</span><span class='symbol'>:plus</span><span class='comma'>,</span> <span class='symbol'>:times</span><span class='rbracket'>]</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="#associative%3F-class_method" title="associative? (class method)">.<strong>associative?</strong>(op) &#x21d2; Boolean </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns whether or not the given operation is associative.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse-class_method" title="parse (class method)">.<strong>parse</strong>(str, line, offset, filename = nil) &#x21d2; Script::Tree::Node </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses a SassScript expression.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#precedence_of-class_method" title="precedence_of (class method)">.<strong>precedence_of</strong>(op) &#x21d2; Object </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns an integer representing the precedence of the given operator.</p>
</div></span>
</li>
</ul>
<h2>
Instance Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(str, line, offset, options = {}) &#x21d2; Parser </a>
</span>
<span class="note title constructor">constructor</span>
<span class="summary_desc"><div class='inline'>
<p>A new instance of Parser.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#line-instance_method" title="#line (instance method)">#<strong>line</strong> &#x21d2; Integer </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The line number of the parser&#39;s current position.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#offset-instance_method" title="#offset (instance method)">#<strong>offset</strong> &#x21d2; Integer </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>The column number of the parser&#39;s current position.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse-instance_method" title="#parse (instance method)">#<strong>parse</strong> &#x21d2; Script::Tree::Node </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses a SassScript expression.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse_function_definition_arglist-instance_method" title="#parse_function_definition_arglist (instance method)">#<strong>parse_function_definition_arglist</strong> &#x21d2; (Array&lt;Script::Tree::Node&gt;, Script::Tree::Node) </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses the argument list for a function definition.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse_interpolated-instance_method" title="#parse_interpolated (instance method)">#<strong>parse_interpolated</strong>(warn_for_color = false) &#x21d2; Script::Tree::Node </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses a SassScript expression within an interpolated segment (`#{}`).</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse_mixin_definition_arglist-instance_method" title="#parse_mixin_definition_arglist (instance method)">#<strong>parse_mixin_definition_arglist</strong> &#x21d2; (Array&lt;Script::Tree::Node&gt;, Script::Tree::Node) </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses the argument list for a mixin definition.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse_mixin_include_arglist-instance_method" title="#parse_mixin_include_arglist (instance method)">#<strong>parse_mixin_include_arglist</strong> &#x21d2; (Array&lt;Script::Tree::Node&gt;, {String =&gt; Script::Tree::Node}, Script::Tree::Node, Script::Tree::Node) </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses the argument list for a mixin include.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse_string-instance_method" title="#parse_string (instance method)">#<strong>parse_string</strong> &#x21d2; Script::Tree::Node </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parse a single string value, possibly containing interpolation.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parse_until-instance_method" title="#parse_until (instance method)">#<strong>parse_until</strong>(tokens) &#x21d2; Script::Tree::Node </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Parses a SassScript expression, ending it when it encounters one of the
given identifier tokens.</p>
</div></span>
</li>
</ul>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
#<strong>initialize</strong>(str, line, offset, options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Sass::Script::Parser (class)">Parser</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Parser</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>str</span>
<span class='type'>(<tt>String</tt>, <tt>StringScanner</tt>)</span>
&mdash;
<div class='inline'>
<p>The source text to parse</p>
</div>
</li>
<li>
<span class='name'>line</span>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>The line on which the SassScript appears. Used for error reporting and
sourcemap building</p>
</div>
</li>
<li>
<span class='name'>offset</span>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>The character (not byte) offset where the script starts in the line. Used
for error reporting and sourcemap building</p>
</div>
</li>
<li>
<span class='name'>options</span>
<span class='type'>(<tt>{Symbol =&gt; Object}</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
&mdash;
<div class='inline'>
<p>An options hash; see <a href="../../file.SASS_REFERENCE.html#Options" title="the Sass options documentation">the Sass options documentation</a>. This supports an additional `:allow_extra_text` option that
controls whether the parser throws an error when extra text is encountered
after the parsed construct.</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
32
33
34
35
36
37</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 32</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='comma'>,</span> <span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_offset'>offset</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
<span class='ivar'>@allow_extra_text</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:allow_extra_text</span><span class='rparen'>)</span>
<span class='ivar'>@lexer</span> <span class='op'>=</span> <span class='id identifier rubyid_lexer_class'>lexer_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='comma'>,</span> <span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_offset'>offset</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
<span class='ivar'>@stop_at</span> <span class='op'>=</span> <span class='kw'>nil</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="constructor_details" class="method_details_list">
<h2>Constructor Details</h2>
<div class="method_details first">
<h3 class="signature first" id="initialize-instance_method">
#<strong>initialize</strong>(str, line, offset, options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Sass::Script::Parser (class)">Parser</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns a new instance of Parser</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>str</span>
<span class='type'>(<tt>String</tt>, <tt>StringScanner</tt>)</span>
&mdash;
<div class='inline'>
<p>The source text to parse</p>
</div>
</li>
<li>
<span class='name'>line</span>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>The line on which the SassScript appears. Used for error reporting and
sourcemap building</p>
</div>
</li>
<li>
<span class='name'>offset</span>
<span class='type'>(<tt>Integer</tt>)</span>
&mdash;
<div class='inline'>
<p>The character (not byte) offset where the script starts in the line. Used
for error reporting and sourcemap building</p>
</div>
</li>
<li>
<span class='name'>options</span>
<span class='type'>(<tt>{Symbol =&gt; Object}</tt>)</span>
<em class="default">(defaults to: <tt>{}</tt>)</em>
&mdash;
<div class='inline'>
<p>An options hash; see <a href="../../file.SASS_REFERENCE.html#Options" title="the Sass options documentation">the Sass options documentation</a>. This supports an additional `:allow_extra_text` option that
controls whether the parser throws an error when extra text is encountered
after the parsed construct.</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
32
33
34
35
36
37</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 32</span>
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='comma'>,</span> <span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_offset'>offset</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='ivar'>@options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span>
<span class='ivar'>@allow_extra_text</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:allow_extra_text</span><span class='rparen'>)</span>
<span class='ivar'>@lexer</span> <span class='op'>=</span> <span class='id identifier rubyid_lexer_class'>lexer_class</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_str'>str</span><span class='comma'>,</span> <span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_offset'>offset</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
<span class='ivar'>@stop_at</span> <span class='op'>=</span> <span class='kw'>nil</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="class_method_details" class="method_details_list">
<h2>Class Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="associative?-class_method">
.<strong>associative?</strong>(op) &#x21d2; <tt>Boolean</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns whether or not the given operation is associative.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
257
258
259</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 257</span>
<span class='kw'>def</span> <span class='id identifier rubyid_associative?'>associative?</span><span class='lparen'>(</span><span class='id identifier rubyid_op'>op</span><span class='rparen'>)</span>
<span class='const'><span class='object_link'><a href="#ASSOCIATIVE-constant" title="Sass::Script::Parser::ASSOCIATIVE (constant)">ASSOCIATIVE</a></span></span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_op'>op</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse-class_method">
.<strong>parse</strong>(str, line, offset, filename = nil) &#x21d2; <tt><span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses a SassScript expression.</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="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The root node of the parse tree</p>
</div>
</li>
</ul>
<p class="tag_title">See Also:</p>
<ul class="see">
<li><span class='object_link'><a href="#initialize-instance_method" title="Sass::Script::Parser#initialize (method)">#initialize</a></span></li>
<li><span class='object_link'><a href="#parse-instance_method" title="Sass::Script::Parser#parse (method)">#parse</a></span></li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
227
228
229</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 227</span>
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
<span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_parse'>parse</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="precedence_of-class_method">
.<strong>precedence_of</strong>(op) &#x21d2; <tt>Object</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Returns an integer representing the precedence of the given operator. A
lower integer indicates a looser binding.</p>
</div>
</div>
<div class="tags">
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
247
248
249
250
251
252</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 247</span>
<span class='kw'>def</span> <span class='id identifier rubyid_precedence_of'>precedence_of</span><span class='lparen'>(</span><span class='id identifier rubyid_op'>op</span><span class='rparen'>)</span>
<span class='const'><span class='object_link'><a href="#PRECEDENCE-constant" title="Sass::Script::Parser::PRECEDENCE (constant)">PRECEDENCE</a></span></span><span class='period'>.</span><span class='id identifier rubyid_each_with_index'>each_with_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='comma'>,</span> <span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
<span class='kw'>return</span> <span class='id identifier rubyid_i'>i</span> <span class='kw'>if</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_op'>op</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[BUG] Unknown operator </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_op'>op</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="line-instance_method">
#<strong>line</strong> &#x21d2; <tt>Integer</tt>
</h3><div class="docstring">
<div class="discussion">
<p>The line number of the parser&#39;s current position.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Integer</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
11
12
13</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 11</span>
<span class='kw'>def</span> <span class='id identifier rubyid_line'>line</span>
<span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="offset-instance_method">
#<strong>offset</strong> &#x21d2; <tt>Integer</tt>
</h3><div class="docstring">
<div class="discussion">
<p>The column number of the parser&#39;s current position.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Integer</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
18
19
20</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 18</span>
<span class='kw'>def</span> <span class='id identifier rubyid_offset'>offset</span>
<span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_offset'>offset</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse-instance_method">
#<strong>parse</strong> &#x21d2; <tt><span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses a SassScript expression.</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="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The root node of the parse tree</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the expression isn&#39;t valid SassScript</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
67
68
69
70
71
72
73
74
75
76</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 67</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse'>parse</span>
<span class='id identifier rubyid_expr'>expr</span> <span class='op'>=</span> <span class='id identifier rubyid_assert_expr'>assert_expr</span> <span class='symbol'>:expr</span>
<span class='id identifier rubyid_assert_done'>assert_done</span>
<span class='id identifier rubyid_expr'>expr</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_expr'>expr</span>
<span class='id identifier rubyid_expr'>expr</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_e'>e</span>
<span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_modify_backtrace'>modify_backtrace</span> <span class='symbol'>:line</span> <span class='op'>=&gt;</span> <span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='symbol'>:filename</span> <span class='op'>=&gt;</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:filename</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse_function_definition_arglist-instance_method">
#<strong>parse_function_definition_arglist</strong> &#x21d2; <tt>(Array&lt;<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>&gt;, <span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>)</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses the argument list for a function definition.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>(Array&lt;<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>&gt;, <span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>)</tt>)</span>
&mdash;
<div class='inline'>
<p>The root nodes of the arguments, and the splat argument.</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the argument list isn&#39;t valid SassScript</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 174</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_function_definition_arglist'>parse_function_definition_arglist</span>
<span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_splat'>splat</span> <span class='op'>=</span> <span class='id identifier rubyid_defn_arglist!'>defn_arglist!</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
<span class='id identifier rubyid_assert_done'>assert_done</span>
<span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_k'>k</span>
<span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_v'>v</span>
<span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>end</span>
<span class='kw'>return</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_splat'>splat</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_e'>e</span>
<span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_modify_backtrace'>modify_backtrace</span> <span class='symbol'>:line</span> <span class='op'>=&gt;</span> <span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='symbol'>:filename</span> <span class='op'>=&gt;</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:filename</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse_interpolated-instance_method">
#<strong>parse_interpolated</strong>(warn_for_color = false) &#x21d2; <tt><span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses a SassScript expression within an interpolated segment (`#{}`). This
means that it stops when it comes across an unmatched `}`, which signals
the end of an interpolated segment, it returns rather than throwing an
error.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>warn_for_color</span>
<span class='type'>(<tt>Boolean</tt>)</span>
<em class="default">(defaults to: <tt>false</tt>)</em>
&mdash;
<div class='inline'>
<p>Whether raw color values passed to interoplation should cause a warning.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The root node of the parse tree</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the expression isn&#39;t valid SassScript</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
48
49
50
51
52
53
54
55
56
57
58
59
60
61</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 48</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_interpolated'>parse_interpolated</span><span class='lparen'>(</span><span class='id identifier rubyid_warn_for_color'>warn_for_color</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
<span class='comment'># Start two characters back to compensate for #{
</span> <span class='id identifier rubyid_start_pos'>start_pos</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="../Source.html" title="Sass::Source (module)">Source</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Source/Position.html" title="Sass::Source::Position (class)">Position</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Source/Position.html#initialize-instance_method" title="Sass::Source::Position#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='id identifier rubyid_offset'>offset</span> <span class='op'>-</span> <span class='int'>2</span><span class='rparen'>)</span>
<span class='id identifier rubyid_expr'>expr</span> <span class='op'>=</span> <span class='id identifier rubyid_assert_expr'>assert_expr</span> <span class='symbol'>:expr</span>
<span class='id identifier rubyid_assert_tok'>assert_tok</span> <span class='symbol'>:end_interpolation</span>
<span class='id identifier rubyid_expr'>expr</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="Tree.html" title="Sass::Script::Tree (module)">Tree</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Tree/Interpolation.html" title="Sass::Script::Tree::Interpolation (class)">Interpolation</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Tree/Interpolation.html#initialize-instance_method" title="Sass::Script::Tree::Interpolation#initialize (method)">new</a></span></span><span class='lparen'>(</span>
<span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_expr'>expr</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='symbol'>:warn_for_color</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_warn_for_color'>warn_for_color</span><span class='rparen'>)</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_expr'>expr</span>
<span class='id identifier rubyid_expr'>expr</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='id identifier rubyid_node'>node</span><span class='lparen'>(</span><span class='id identifier rubyid_expr'>expr</span><span class='comma'>,</span> <span class='id identifier rubyid_start_pos'>start_pos</span><span class='rparen'>)</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_e'>e</span>
<span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_modify_backtrace'>modify_backtrace</span> <span class='symbol'>:line</span> <span class='op'>=&gt;</span> <span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='symbol'>:filename</span> <span class='op'>=&gt;</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:filename</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse_mixin_definition_arglist-instance_method">
#<strong>parse_mixin_definition_arglist</strong> &#x21d2; <tt>(Array&lt;<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>&gt;, <span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>)</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses the argument list for a mixin definition.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>(Array&lt;<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>&gt;, <span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>)</tt>)</span>
&mdash;
<div class='inline'>
<p>The root nodes of the arguments, and the splat argument.</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the argument list isn&#39;t valid SassScript</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 144</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_mixin_definition_arglist'>parse_mixin_definition_arglist</span>
<span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_splat'>splat</span> <span class='op'>=</span> <span class='id identifier rubyid_defn_arglist!'>defn_arglist!</span><span class='lparen'>(</span><span class='kw'>false</span><span class='rparen'>)</span>
<span class='id identifier rubyid_assert_done'>assert_done</span>
<span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_k'>k</span>
<span class='id identifier rubyid_k'>k</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>if</span> <span class='id identifier rubyid_v'>v</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_v'>v</span>
<span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>end</span>
<span class='kw'>return</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_splat'>splat</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_e'>e</span>
<span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_modify_backtrace'>modify_backtrace</span> <span class='symbol'>:line</span> <span class='op'>=&gt;</span> <span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='symbol'>:filename</span> <span class='op'>=&gt;</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:filename</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse_mixin_include_arglist-instance_method">
#<strong>parse_mixin_include_arglist</strong> &#x21d2; <tt>(Array&lt;<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>&gt;,
{String =&gt; <span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>},
<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>,
<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>)</tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses the argument list for a mixin include.</p>
<pre class="code ruby"><code class="ruby">The root nodes of the positional arguments, keyword arguments, and
splat argument(s). Keyword arguments are in a hash from names to values.
</code></pre>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>(Array&lt;<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>&gt;,
{String =&gt; <span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>},
<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>,
<span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span>)</tt>)</span>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the argument list isn&#39;t valid SassScript</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
105
106
107
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
137</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 105</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_mixin_include_arglist'>parse_mixin_include_arglist</span>
<span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_keywords'>keywords</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='kw'>if</span> <span class='id identifier rubyid_try_tok'>try_tok</span><span class='lparen'>(</span><span class='symbol'>:lparen</span><span class='rparen'>)</span>
<span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_keywords'>keywords</span><span class='comma'>,</span> <span class='id identifier rubyid_splat'>splat</span><span class='comma'>,</span> <span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span> <span class='op'>=</span> <span class='id identifier rubyid_mixin_arglist'>mixin_arglist</span>
<span class='id identifier rubyid_assert_tok'>assert_tok</span><span class='lparen'>(</span><span class='symbol'>:rparen</span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_assert_done'>assert_done</span>
<span class='id identifier rubyid_args'>args</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_a'>a</span><span class='op'>|</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_a'>a</span>
<span class='id identifier rubyid_a'>a</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_keywords'>keywords</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='comma'>,</span> <span class='id identifier rubyid_v'>v</span><span class='op'>|</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_v'>v</span>
<span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_splat'>splat</span>
<span class='id identifier rubyid_splat'>splat</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>end</span>
<span class='kw'>if</span> <span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span>
<span class='id identifier rubyid_kwarg_splat'>kwarg_splat</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='kw'>end</span>
<span class='kw'>return</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_keywords'>keywords</span><span class='comma'>,</span> <span class='id identifier rubyid_splat'>splat</span><span class='comma'>,</span> <span class='id identifier rubyid_kwarg_splat'>kwarg_splat</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_e'>e</span>
<span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_modify_backtrace'>modify_backtrace</span> <span class='symbol'>:line</span> <span class='op'>=&gt;</span> <span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='symbol'>:filename</span> <span class='op'>=&gt;</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:filename</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse_string-instance_method">
#<strong>parse_string</strong> &#x21d2; <tt><span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parse a single string value, possibly containing interpolation. Doesn&#39;t
assert that the scanner is finished after parsing.</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="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The root node of the parse tree.</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the string isn&#39;t valid SassScript</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 204</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_string'>parse_string</span>
<span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_peek'>peek</span> <span class='op'>=</span> <span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_peek'>peek</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span>
<span class='lparen'>(</span><span class='id identifier rubyid_peek'>peek</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:string</span> <span class='op'>||</span>
<span class='lparen'>(</span><span class='id identifier rubyid_peek'>peek</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:funcall</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_peek'>peek</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>url</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
<span class='id identifier rubyid_lexer'>lexer</span><span class='period'>.</span><span class='id identifier rubyid_expected!'>expected!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>string</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_expr'>expr</span> <span class='op'>=</span> <span class='id identifier rubyid_assert_expr'>assert_expr</span> <span class='symbol'>:funcall</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_expr'>expr</span>
<span class='id identifier rubyid_expr'>expr</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_unpeek!'>unpeek!</span>
<span class='id identifier rubyid_expr'>expr</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_e'>e</span>
<span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_modify_backtrace'>modify_backtrace</span> <span class='symbol'>:line</span> <span class='op'>=&gt;</span> <span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='symbol'>:filename</span> <span class='op'>=&gt;</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:filename</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="parse_until-instance_method">
#<strong>parse_until</strong>(tokens) &#x21d2; <tt><span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>
</h3><div class="docstring">
<div class="discussion">
<p>Parses a SassScript expression, ending it when it encounters one of the
given identifier tokens.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>tokens</span>
<span class='type'>(<tt>#include?(String)</tt>)</span>
&mdash;
<div class='inline'>
<p>A set of strings that delimit the expression.</p>
</div>
</li>
</ul>
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt><span class='object_link'><a href="Tree/Node.html" title="Sass::Script::Tree::Node (class)">Script::Tree::Node</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>The root node of the parse tree</p>
</div>
</li>
</ul>
<p class="tag_title">Raises:</p>
<ul class="raise">
<li>
<span class='type'>(<tt><span class='object_link'><a href="../SyntaxError.html" title="Sass::SyntaxError (class)">Sass::SyntaxError</a></span></tt>)</span>
&mdash;
<div class='inline'>
<p>if the expression isn&#39;t valid SassScript</p>
</div>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
84
85
86
87
88
89
90
91
92
93
94</pre>
</td>
<td>
<pre class="code"><span class="info file"># File '.ruby-sass/lib/sass/script/parser.rb', line 84</span>
<span class='kw'>def</span> <span class='id identifier rubyid_parse_until'>parse_until</span><span class='lparen'>(</span><span class='id identifier rubyid_tokens'>tokens</span><span class='rparen'>)</span>
<span class='ivar'>@stop_at</span> <span class='op'>=</span> <span class='id identifier rubyid_tokens'>tokens</span>
<span class='id identifier rubyid_expr'>expr</span> <span class='op'>=</span> <span class='id identifier rubyid_assert_expr'>assert_expr</span> <span class='symbol'>:expr</span>
<span class='id identifier rubyid_assert_done'>assert_done</span>
<span class='id identifier rubyid_expr'>expr</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='ivar'>@options</span>
<span class='id identifier rubyid_check_for_interpolation'>check_for_interpolation</span> <span class='id identifier rubyid_expr'>expr</span>
<span class='id identifier rubyid_expr'>expr</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_e'>e</span>
<span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_modify_backtrace'>modify_backtrace</span> <span class='symbol'>:line</span> <span class='op'>=&gt;</span> <span class='ivar'>@lexer</span><span class='period'>.</span><span class='id identifier rubyid_line'>line</span><span class='comma'>,</span> <span class='symbol'>:filename</span> <span class='op'>=&gt;</span> <span class='ivar'>@options</span><span class='lbracket'>[</span><span class='symbol'>:filename</span><span class='rbracket'>]</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Oct 22 13:20:53 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>