-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathphp.json
137 lines (113 loc) · 3.64 KB
/
php.json
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"name": "Php",
"ext": "php",
"h_ext": "php",
"line_end": ";",
"ident": "${{name}}",
"true": "true",
"false": "false",
"then": [],
"run": [
"php {{file}}.php"
],
"bracket": {
"block_open": "{",
"block_close": "}",
"value_open": "(",
"value_close": ")",
"dotarray_open": "[",
"dotarray_close": "]",
"list_open": "[",
"list_close": "]"
},
"operator": {
"commas" : ",",
"pointer" : "(&({{exp}}))",
"de_pointer" : "({{exp}})",
"await" : "({{exp}})",
"async" : "({{exp}})",
"tenary": "(({{condition}})?({{l}}):({{r}}))",
"assign" : "({{l}} = {{r}})",
"plus" : "({{l}} + {{r}})",
"minus" : "({{l}} - {{r}})",
"bitor" : "({{l}} | {{r}})",
"or" : "({{l}} || {{r}})",
"bitand" : "({{l}} & {{r}})",
"and" : "({{l}} && {{r}})",
"eq" : "({{l}} == {{r}})",
"neq" : "({{l}} != {{r}})",
"pair" : "[ {{l}} => {{r}} ]",
"property" : "{{object}}->{{name}}",
"context" : "{{context}}::{{member}}",
"index" : "{{exp}}[{{at}}]",
"else" : "({{l}} {{operator}} {{r}})"
},
"blocks": {
"if": "if ({{exp}}) { {{block}} }",
"else_if": "else if ({{exp}}) { {{block}} }",
"else": "else { {{block}} }",
"while": "while ({{exp}}) { {{block}} }",
"repeat": "for (${{var}} = 0; ${{var}}<{{time}}; ${{var}}++) { {{block}} }",
"foreach": "foreach ({{collection}} as {{var}}) { {{block}} }"
},
"calls": {
"call": "{{method}}({{args}})",
"call_wrapped": "{{method}}{{args}}",
"method_call" : "{{object}}->{{call}}"
},
"types": {
"deduce_type": "",
"constant": "",
"void_type": "",
"integer": ""
},
"lambda_blocks": "function({{args}}){{ {block} }}",
"to_lambdas": "function(...$pp){return ({{function}}({{args}}...$pp));}",
"lambdas": "function({{args}}){ return( {{exp}} ); }",
"returns": "return ({{exp}});",
"namespaces": "namespace {{name}} { {{block}} }",
"iter_vars": "${{name}}",
"arg_vars": "${{name}}",
"header_guards": "<?php {{contents}} ?>",
"funcs": {
"functions": "function {{name}}({{args}}) { {{block}} }",
"constructor": "fucntion __construct({{args}}){ {{block}} }",
"entry": "{{block}}"
},
"assigns": {
"reference": {
"const": "${{name}} = &{{ref}}",
"make": "${{name}} = &{{ref}}",
"let": "${{name}} = &{{ref}}",
"instance": "${{name}} = &{{ref}}"
},
"copy": {
"const": "${{name}} = {{copy}}",
"make": "${{name}} = new {{type}}({{copy}})",
"let": "${{name}} = {{copy}}",
"instance": "${{name}} = {{copy}}"
},
"construct": {
"const": "${{name}} = new{{type}}({{args}})",
"make": "${{name}} = new{{type}}({{args}})",
"let": "${{name}} = new{{type}}({{args}})",
"instance": "${{name}} = new{{type}}({{args}})"
}
},
"imports": {
"import": "include '{{path}}.php';\n",
"stdlib": "include 'worldlib.php';\n",
"library": "include '{{path}}';\n",
"targetstdlibpath": "worldlib.php",
"stdlibpath": "libs/worldlib.php"
},
"classes": {
"inherit": "class {{name}} extends {{super}} { {{block}} }",
"class": "class {{name}} { {{block}} }"
},
"access": {
"protected": "protected",
"private": "private",
"public": "public"
}
}