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
======
.. _let:
let
---

View File

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

View File

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

View File

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

View File

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