aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contributing.rst
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-06-22 03:46:42 +0800
committerchriseth <chris@ethereum.org>2017-06-22 22:56:57 +0800
commit1d4f40e3a2fa4e4316847a143d64916baf76580f (patch)
tree7f897e38639f75fe4882417f5e19edf1076b87e4 /docs/contributing.rst
parentcb7021881a3ccd97311a580b903dc82bebbc092d (diff)
downloaddexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.tar
dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.tar.gz
dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.tar.bz2
dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.tar.lz
dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.tar.xz
dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.tar.zst
dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.zip
Document Whiskers.
Diffstat (limited to 'docs/contributing.rst')
-rw-r--r--docs/contributing.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 1f869dbb..559f9f6a 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -74,3 +74,22 @@ To run a subset of tests, filters can be used:
``soltest -t TestSuite/TestName -- --ipcpath /tmp/testeth/geth.ipc``, where ``TestName`` can be a wildcard ``*``.
Alternatively, there is a testing script at ``scripts/test.sh`` which executes all tests.
+
+Whiskers
+========
+
+*Whiskers* is a templating system similar to `Moustache <https://mustache.github.io>`_. It is used by the
+compiler in various places to aid readability, and thus maintainability and verifiability, of the code.
+
+The syntax comes with a substantial difference to Moustache: the template markers ``{{`` and ``}}`` are
+replaced by ``<`` and ``>`` in order to aid parsing and avoid conflicts with :ref:`inline-assembly`
+(The symbols ``<`` and ``>`` are invalid in inline assembly, while ``{`` and ``}`` are used to delimit blocks).
+Another limitation is that lists are only resolved one depth and they will not recurse. This may change in the future.
+
+A rough specification is the following:
+
+Any occurrence of ``<name>`` is replaced by the string-value of the supplied variable ``name`` without any
+escaping and without iterated replacements. An area can be delimited by ``<#name>...</name>``. It is replaced
+by as many concatenations of its contents as there were sets of variables supplied to the template system,
+each time replacing any ``<inner>`` items by their respective value. Top-level variales can also be used
+inside such areas. \ No newline at end of file