Skip to content

Commit 7d95c7e

Browse files
committedMay 2, 2016
changed macro schema
1 parent be2d819 commit 7d95c7e

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed
 

‎macros/call.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "call",
3-
"description": "function call",
3+
"description": "short syntax for function call",
44
"rules": [
55
{
66
"description": "call named function with arguments",
7-
"rule": {
7+
"pattern": {
88
"^\\$\\#(.+)$": 1
99
},
1010
"script": {

‎macros/exec.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
22
"name": "exec",
3-
"description": "executor call",
3+
"description": "short syntax for executor call",
44
"rules": [
55
{
6-
"description": "executor call without method",
7-
"rule": {
8-
"^\\$\\$([^\\.]+)$": 1
6+
"description": "executor call with method",
7+
"pattern": {
8+
"^\\$\\$([^\\.]+)\\.([^\\.]+)$": 1
99
},
1010
"script": {
1111
"$exec": "$1",
12+
"$method": "$2",
1213
"$args": 1
1314
}
1415
},
1516
{
16-
"description": "executor call with method",
17-
"rule": {
18-
"^\\$\\$([^\\.]+)\\.([^\\.]+)$": 1
17+
"description": "executor call without method",
18+
"pattern": {
19+
"^\\$\\$([^\\.]+)$": 1
1920
},
2021
"script": {
2122
"$exec": "$1",
22-
"$method": "$2",
2323
"$args": 1
2424
}
2525
}

‎schema/expand_macros.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,33 @@
1212
"anyOf": [
1313
{
1414
"expandJsMacro": {
15-
"description": "executor call without method",
16-
"rule": {
17-
"^\\$\\$([^\\.]+)$": 1
15+
"description": "executor call with method",
16+
"pattern": {
17+
"^\\$\\$([^\\.]+)\\.([^\\.]+)$": 1
1818
},
1919
"script": {
2020
"$exec": "$1",
21+
"$method": "$2",
2122
"$args": 1
2223
}
2324
}
2425
},
2526
{
2627
"expandJsMacro": {
27-
"description": "executor call with method",
28-
"rule": {
29-
"^\\$\\$([^\\.]+)\\.([^\\.]+)$": 1
28+
"description": "executor call without method",
29+
"pattern": {
30+
"^\\$\\$([^\\.]+)$": 1
3031
},
3132
"script": {
3233
"$exec": "$1",
33-
"$method": "$2",
3434
"$args": 1
3535
}
3636
}
3737
},
3838
{
3939
"expandJsMacro": {
4040
"description": "call named function with arguments",
41-
"rule": {
41+
"pattern": {
4242
"^\\$\\#(.+)$": 1
4343
},
4444
"script": {

‎schema/macro.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
"minItems": 1,
2020
"items": {
2121
"type": "object",
22-
"required": [ "description", "rule", "script" ],
22+
"required": [ "description", "pattern", "script" ],
2323
"additionalProperties": false,
2424
"properties": {
2525
"description": { "$ref": "#nonEmptyString" },
26-
"rule": {
26+
"pattern": {
2727
"type": "object",
2828
"minProperties": 1,
2929
"maxProperties": 1,

0 commit comments

Comments
 (0)
Please sign in to comment.