.. Hurdy documentation master file, created by
sphinx-quickstart on Thu Oct 12 20:22:42 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. toctree::
:maxdepth: 1
:hidden:
installation
compiler
highlighting
qa
.. toctree::
:caption: Language
:maxdepth: 1
:hidden:
syntax
variables
functions
blocks
tables
advanced
planned
Meet Hurdy
==========
Hurdy is a scripting language that compiles to `Lua `_.
Its main features are:
* *C-style brackets* to make the language less verbose by removing the need for keywords such as :code:`then`, :code:`end`, and :code:`do`.
* No *global-by-default* for variable declarations. Variables must explicitly be declared as local or global before they can be assigned to.
* Works with Lua 5.1 and higher, as well as `LuaJIT `_ (some features only work when the compiled code is run with a more recent version of Lua).
* Lua module to load Hurdy files and compile them on the fly, which includes a way to remap error lines to the original Hurdy code on runtime errors.
* Outputs *human-readable* Lua code without creating additional unexpected Lua objects on compilation—what you mean is what you get.
* Additional :ref:`assignment operators ` (such as addition assignment).
The following Hurdy code highlights the main features of the language.
.. literalinclude:: hurdy/sample.hurdy
:language: hurdy
The code above compiles to the following Lua code:
.. literalinclude:: hurdy/sample.lua
:language: lua