mirror of
https://github.com/mcuadros/ascode
synced 2024-11-26 06:01:08 +01:00
deploy: b6b3d7da9f756856218429a23a73ff091425bfa1
This commit is contained in:
parent
a4c117bfcd
commit
dfb91d36e9
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -64,7 +64,7 @@ Entry = Test ':' Test .
|
||||
<span class=p>{</span><span class=s2>"one"</span><span class=p>:</span> <span class=mi>1</span><span class=p>}</span>
|
||||
<span class=p>{</span><span class=s2>"one"</span><span class=p>:</span> <span class=mi>1</span><span class=p>,</span> <span class=s2>"two"</span><span class=p>:</span> <span class=mi>2</span><span class=p>,}</span>
|
||||
</code></pre></div><p>The key and value expressions are evaluated in left-to-right order.
|
||||
Evaluation fails if the same key is used multiple times.</p><p>Only <a href=#hashing>hashable</a> values may be used as the keys of a dictionary.
|
||||
Evaluation fails if the same key is used multiple times.</p><p>Only <a href=/docs/starlark/value-concepts/#hashing>hashable</a> values may be used as the keys of a dictionary.
|
||||
This includes all built-in types except dictionaries, sets, and lists;
|
||||
a tuple is hashable only if its elements are hashable.</p><h2 id=list-expressions>List expressions</h2><p>A list expression is a comma-separated list of element expressions,
|
||||
enclosed in square brackets, and it yields a new list object.
|
||||
@ -374,7 +374,7 @@ Applications may define additional types whose values may be called in the same
|
||||
of two operations, <code>m = filename.endswith</code> and <code>m(".star")</code>.
|
||||
The first, a dot operation, yields a <em>bound method</em>, a function value
|
||||
that pairs a receiver value (the <code>filename</code> string) with a choice of
|
||||
method (<a href=#string%C2%B7endswith>string·endswith</a>).</p><p>Only built-in or application-defined types may have methods.</p><p>See <a href=#functions>Functions</a> for an explanation of function parameter passing.</p><h2 id=dot-expressions>Dot expressions</h2><p>A dot expression <code>x.f</code> selects the attribute <code>f</code> (a field or method)
|
||||
method (<a href=/docs/starlark/built-in-methods/#stringendswith>string·endswith</a>).</p><p>Only built-in or application-defined types may have methods.</p><p>See <a href=/docs/starlark/data-types/#functions>Functions</a> for an explanation of function parameter passing.</p><h2 id=dot-expressions>Dot expressions</h2><p>A dot expression <code>x.f</code> selects the attribute <code>f</code> (a field or method)
|
||||
of the value <code>x</code>.</p><p>Fields are possessed by none of the main Starlark <a href=#data-types>data types</a>,
|
||||
but some application-defined types have them.
|
||||
Methods belong to the built-in types <code>string</code>, <code>list</code>, <code>dict</code>, and
|
||||
|
@ -5,13 +5,13 @@ application, and this application may define additional
|
||||
domain-specific functions and data types beyond those provided by the
|
||||
core language. For example, Starlark is embedded within (and was
|
||||
originally developed for) the <a href=https://bazel.build>Bazel build tool</a>,
|
||||
and <a href=https://docs.bazel.build/versions/master/starlark/language.html>Bazel’s build language</a> is based on Starlark.</p><p>This document describes the Go implementation of Starlark
|
||||
and <a href=https://docs.bazel.build/versions/2.0.0/skylark/language.html>Bazel’s build language</a> is based on Starlark.</p><p>This document describes the Go implementation of Starlark
|
||||
at go.starlark.net/starlark.
|
||||
The language it defines is similar but not identical to
|
||||
<a href=https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/starlark/Starlark.java>the Java-based implementation</a>
|
||||
<a href=https://github.com/bazelbuild/starlark>the Java-based implementation</a>
|
||||
used by Bazel.
|
||||
We identify places where their behaviors differ, and an
|
||||
<a href=#dialect-differences>appendix</a> provides a summary of those
|
||||
<a href=/docs/starlark/dialect-differences/>appendix</a> provides a summary of those
|
||||
differences.
|
||||
We plan to converge both implementations on a single specification.</p><p>This document is maintained by Alan Donovan <a href=mailto:adonovan@google.com>adonovan@google.com</a>.
|
||||
It was influenced by the Python specification,
|
||||
|
File diff suppressed because one or more lines are too long
@ -115,5 +115,5 @@ attempt to increment it.</p><div class=highlight><pre class=chroma><code class=l
|
||||
declarations, but as the first version of <code>squarer</code> showed, this
|
||||
omission can be worked around by using a list of a single element.)</p><p>A name appearing after a dot, such as <code>split</code> in
|
||||
<code>get_filename().split('/')</code>, is not resolved statically.
|
||||
The <a href=#dot-expressions>dot expression</a> <code>.split</code> is a dynamic operation
|
||||
The <a href=/docs/starlark/expressions/#dot-expressions>dot expression</a> <code>.split</code> is a dynamic operation
|
||||
on the value returned by <code>get_filename()</code>.</p></div></div></div></div></div></div><div class=sub-footer><div class=container><div class=row><div class=col-12><div class=sub-footer-inner><ul><li><a href=https://github.com/mcuadros/ascod>Documentation version dev</a></li><li>Template by <a href=https://www.zerostatic.io>Robert Austin</a></li></ul></div></div></div></div><script type=text/javascript src=/js/scripts.min.be6fe1294698d6acd837c5182149cd1a24daae9fa1903ce810c264539d254d62.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user