Add some documentation anchors

This commit is contained in:
Kodi Arfer 2019-08-13 16:54:45 -04:00
parent 1b8b1f110a
commit 627455a336
5 changed files with 48 additions and 0 deletions

View File

@ -206,6 +206,8 @@ Recursively performs all possible macroexpansions in form, using the ``require``
Macros Macros
====== ======
.. _let:
let let
--- ---

View File

@ -1,3 +1,5 @@
.. _hacking:
=============== ===============
Hacking on Hy Hacking on Hy
=============== ===============

View File

@ -1,3 +1,5 @@
.. _special-forms:
================= =================
Built-Ins Built-Ins
================= =================
@ -279,6 +281,8 @@ This is completely discarded and doesn't expand to anything, not even ``None``.
Hy Hy
.. _cond:
cond cond
---- ----
@ -338,6 +342,8 @@ is only called on every other value in the list.
(side-effect2 x)) (side-effect2 x))
.. _do:
do do
---------- ----------
@ -400,6 +406,8 @@ the second of which becomes each value.
{0: 0, 1: 10, 2: 20, 3: 30, 4: 40} {0: 0, 1: 10, 2: 20, 3: 30, 4: 40}
.. _setv:
setv setv
---- ----
@ -444,6 +452,8 @@ Whereas ``setv`` creates an assignment statement, ``setx`` creates an assignment
3 is greater than 0 3 is greater than 0
.. _defclass:
defclass defclass
-------- --------
@ -914,6 +924,9 @@ raising an exception.
=> (first []) => (first [])
None None
.. _for:
for for
--- ---
@ -992,6 +1005,8 @@ written without accidental variable name clashes.
Section :ref:`using-gensym` Section :ref:`using-gensym`
.. _get:
get get
--- ---
@ -1022,6 +1037,8 @@ successive elements in a nested structure. Example usage:
index that is out of bounds. index that is out of bounds.
.. _gfor:
gfor gfor
---- ----
@ -1063,6 +1080,8 @@ keyword, the second function would have raised a ``NameError``.
(set-a 5) (set-a 5)
(print-a) (print-a)
.. _if:
if / if* / if-not if / if* / if-not
----------------- -----------------
@ -1188,6 +1207,8 @@ that ``import`` can be used.
(import [sys [*]]) (import [sys [*]])
.. _fn:
fn fn
----------- -----------
@ -1253,6 +1274,8 @@ last
6 6
.. _lfor:
lfor lfor
---- ----
@ -1396,6 +1419,8 @@ print
.. note:: ``print`` always returns ``None``. .. note:: ``print`` always returns ``None``.
.. _quasiquote:
quasiquote quasiquote
---------- ----------
@ -1414,6 +1439,8 @@ using ``unquote`` (``~``). The evaluated form can also be spliced using
; equivalent to '(foo bar baz) ; equivalent to '(foo bar baz)
.. _quote:
quote quote
----- -----
@ -1431,6 +1458,8 @@ alternatively be written using the apostrophe (``'``) symbol.
Hello World Hello World
.. _require:
require require
------- -------
@ -1571,6 +1600,8 @@ sfor
equivalent to ``(set (lfor CLAUSES VALUE))``. See `lfor`_. equivalent to ``(set (lfor CLAUSES VALUE))``. See `lfor`_.
.. _cut:
cut cut
----- -----
@ -1677,6 +1708,8 @@ the given conditional is ``False``. The following shows the expansion of this ma
(do statement)) (do statement))
.. _unpack-iterable:
unpack-iterable, unpack-mapping unpack-iterable, unpack-mapping
------------------------------- -------------------------------
@ -1717,6 +1750,8 @@ more than once in one expression (:pep:`3132`, :pep:`448`).
[1, 2, 3, 4] [1, 2, 3, 4]
.. _unquote:
unquote unquote
------- -------
@ -1792,6 +1827,8 @@ following shows the expansion of the macro.
(if conditional (do statement)) (if conditional (do statement))
.. _while:
while while
----- -----
@ -1851,6 +1888,9 @@ prints
In condition In condition
At end of outer loop At end of outer loop
.. _with:
with with
---- ----

View File

@ -1,3 +1,5 @@
.. _interop:
===================== =====================
Hy <-> Python interop Hy <-> Python interop
===================== =====================

View File

@ -1,3 +1,5 @@
.. _syntax:
============== ==============
Syntax Syntax
============== ==============