diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-06-22 03:46:42 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-06-22 22:56:57 +0800 |
commit | 1d4f40e3a2fa4e4316847a143d64916baf76580f (patch) | |
tree | 7f897e38639f75fe4882417f5e19edf1076b87e4 /docs/contributing.rst | |
parent | cb7021881a3ccd97311a580b903dc82bebbc092d (diff) | |
download | dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.tar.gz dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.tar.zst dexon-solidity-1d4f40e3a2fa4e4316847a143d64916baf76580f.zip |
Document Whiskers.
Diffstat (limited to 'docs/contributing.rst')
-rw-r--r-- | docs/contributing.rst | 19 |
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 |