Skip to content

Commit

Permalink
Updated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Vin committed Jul 10, 2024
1 parent c9c4d5b commit 921d0ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ def maketable(items, columns=5, gap=4):
with open("_build/keywords_soft.txt", "w") as outFile:
for row in maketable(ScenicParser.SOFT_KEYWORDS):
outFile.write(row + "\n")
with open("_build/builtin_names.txt", "w") as outFile:
for row in maketable(scenic.syntax.compiler.builtinNames):
outFile.write(row + "\n")


# -- Monkeypatch ModuleAnalyzer to handle Scenic modules ---------------------

Expand Down
10 changes: 5 additions & 5 deletions docs/reference/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ To avoid confusion, we recommend not using ``distance``, ``angle``, ``offset``,
.. literalinclude:: /_build/keywords_soft.txt
:language: text

There are also three additional names in Scenic that are transformed internally when called: ``str``, ``int``, and ``float``. Calls using these names are transformed to versions that can handle distributions and lazy values as arguments, but are otherwise equivalent. If these names are re-defined in a Scenic program, then calls referencing them will **not** use the new definition. For example, in the following code block the ``newInt`` function will **not** be executed::
.. rubric:: Builtin Names

def newInt(*args, **kwargs):
...
int = newInt
int(1.5)
The following names are built into Scenic and can be used but not overwritten .

.. literalinclude:: /_build/builtin_names.txt
:language: text

0 comments on commit 921d0ac

Please sign in to comment.