-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext.doc.mc2.template
81 lines (64 loc) · 2.38 KB
/
ext.doc.mc2.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// this is a function documentation. Documentation of WarpScript is in WarpScript.
<%
{
'name' 'PleaseRenameFunction' // in this example, EUCLIDIANDIVISION
'since' '2.0.0'
'deprecated' ''
'deleted' ''
'version' 'all'
'tags' [ 'extensions' ]
'desc'
<'
This function does **marvelous things**. For example, EUCLIDIANDIVISION performs an euclidian division.
- Markdown is allowed here
@MODULE_DESCRIPTION@
'>
'sig' [
// The signature lists the parameter your function expect on the stack, and the result your function will push to the stack
// There could be multiple signatures.
//
// Beware of the order in the signature !
// true 'toto' MYFUNCTION 'outstring' STORE 'outboolean' STORE
// [ [ 'top:STRING' 'n-1:BOOLEAN' ] [ 'output_top:STRING' 'out_n-1:BOOLEAN' ] ]
// If you have a LIST as input or output, you must also reverse parameters inside :
// [ [ [ 'span:LONG' 'end:LONG' 'labels:MAP' 'class:STRING' 'token:STRING' ] ] [ 'data:LIST<GTS>' ] ]
// You must give a type to the LIST types:
// LIST<GTS> LIST<LIST<ANY>>
// for example, for EUCLIDIANDIVISION:
// 'sig' [ [ [ 'a:LONG' 'b:LONG' ] [ 'q:LONG' 'r:LONG' ] ] ]
[ [ ] [ ] ]
[ [ ] [ ] ]
]
// this sections describes each parameters of your function signature. for example, for EUCLIDIANDIVISION:
//
// 'params' {
// // Signature params description
// 'b' 'parameter b TOP of the stack'
// 'a' 'parameter a just below on the stack'
// 'q' 'the quotient of a/b, N-1 on the stack'
// 'r' 'the remainder of a/b, on the TOP of the stack'
// }
'params' {
}
// relate do other interesting/close WarpScript functions
// for example, for EUCLIDIANDIVISION:
// 'related' [ '/' ]
'related' [ ]
// Examples of your function use. Their could be several examples in the list.
'examples' [
<'
// Example 1
10 3 EUCLIDIANDIVISION [ 'q' 'r' ] STORE
'quotient is: ' $q TOSTRING +
'remainder is: ' $r TOSTRING +
'>
<'
// Example 2
'>
]
// if your extension needs more configurations, add the configuration keys in this list:
'conf' [ ]
// your also need to add and document these configuration in your @MODULE_GROUP@-@[email protected] file
'ext' '@[email protected]'
} INFO
%>