no edit summary
(s concatenated block format) |
No edit summary |
||
Line 10:
The file format permits, as an alternative to [[t-block]]s, delimiters that look like <code>//? <script></code> and <code>//? </script></code> to denote a [[g-block]]s. Files comprising a sequence of g-blocks are not meant to have strong guarantees about the contents the way that t-blocks do. The [[trplkt/publish|trplkt publish command]] may be used to convert a valid program into a triple script for wide distribution. Programs that are *not* valid triple scripts (because they fail to abide by the three [[invariants]]) may repurpose the triple script tooling to produce files comprising a sequence of g-blocks instead, so as not to confuse recipients.
== Compilation form ==
The [[triple script dialect]] has two forms: '''compilation form''' and '''normal form'''. Normal form is the pre-compilation form that exists in [[1 file = 1 module = 1 class|files dedicated to a single source module]], and compilation from is the form that source code appears in after it has been prepared for execution (or distribution) in concatenated block format. The rules for mapping between compilation form and normal form are simple:
* <code>import</code> and <code>export</code> in normal form get replaced by <code>/// import</code> and <code>/// export</code> [[triple slash sequences]], respectively
* in compilation form
|