File: powershell.jsf

package info (click to toggle)
joe 4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,308 kB
  • sloc: ansic: 51,623; sh: 4,358; makefile: 149; csh: 26
file content (329 lines) | stat: -rw-r--r-- 6,024 bytes parent folder | download | duplicates (3)
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
# PowerShell syntax highlighting for Joe's Own Editor
# Oskar Liljeblad <oskar@osk.mine.nu>, 2014-02-11
#
# PowerShell is the poor man's[1] replacement for a real shell such as Bash.
# [1] Someone who has to use Windows for whatever reason.
#
# Reference: http://www.microsoft.com/en-us/download/details.aspx?id=36389
# Status:
# 	1	100%
#	2.1	100%
#  	2.2.1	100% except signature support
#	2.2.2	100%
#	2.2.3	100% except requires support
#	2.2.4	100%
#	2.3.1	100%
#	2.3.2	100% except automatic variables
#	2.3.3	100% no coloring
#	2.3.4	100% no coloring
#	2.3.5	100% no coloring
#	2.3.6	100%

=Idle
=Ident
=Comment
=Constant
=Number		+Constant
=Boolean	+Constant
=String		+Constant
=StringEscape	+Escape
=StringVariable	+StringEscape
=Keyword
=Type
=Operator	+Keyword
=Statement	+Keyword
=Structure	+Statement
=Conditional	+Statement
=Loop		+Statement
=Variable	+DefinedIdent
=VariableEscape +Escape

=ParamKey	+Attr +Operator

:idle Idle
	*		idle
	"#"		comment			recolor=-1
	"$"		var			recolor=-1 mark
	"@"		var_array		recolor=-1
	"<"		idle1
	"["		typespec
	"\""		string_dq		recolor=-1
	"'"		string_sq		recolor=-1
	"@"		idle2
	"a-zA-Z_"	ident			buffer
	"-"		param			recolor=-1

:idle1 Idle
	*		idle			noeat
	"#"		delim_comment		recolor=-2

:idle2 Idle
	*		idle			noeat
	"\""		herestr_dq		recolor=-2
	"'"		herestr_sq		recolor=-2

:comment Comment comment
	*		comment
	"BFHNTX"	comment			noeat call=comment_todo.comment_todo()
	"\r\n"		idle

:var_array Variable
	*		idle			noeat
	"$?^"		idle			mark
	"a-zA-Z_"	var_name

:var Variable
	*		idle			noeat
	"{"		var_brack
	"$?^"		idle
	"a-zA-Z_"	var_name		buffer

:var_name Variable
	*		idle			noeat recolor=-1 istrings
	"true"		bool			recolormark markend
	"false"		bool			recolormark markend
	"null"		kw			recolormark markend
done
	"a-zA-Z0-9_:?"	var_name

:bool Boolean
	*		idle

:var_brack Variable
	*		var_brack
	"`"		var_escape		recolor=-1
	"}"		idle

:var_escape VariableEscape
	*		var_brack

:delim_comment Comment comment
	*		delim_comment
	"BFHNTX"	delim_comment		noeat call=comment_todo.comment_todo()
	"#"		delim_comment1

:delim_comment1 Comment comment
	*		delim_comment		noeat
	">"		idle

:string_dq String string
	*		string_dq
	"\"\n"		idle
	"$"		string_dq_subst		recolor=-1
	"`"		string_dq_esc		recolor=-1

:string_dq_subst StringVariable string
	*		string_dq		noeat recolor=-2
	"a-zA-Z_"	string_dq_subst_name
	"{"		string_dq_subst_brack
	"("		string_dq_subst_parens
	"`"		string_dq_subst_escape 	recolor=-1

:string_dq_subst_name StringVariable string
	*		string_dq		recolor=-1 noeat
	"a-zA-Z0-9_:"	string_dq_subst_name
	"`"		string_dq_subst_escape 	recolor=-1

:string_dq_subst_escape VariableEscape string
	*		string_dq_subst_name

:string_dq_subst_brack Variable string
	*		string_dq_subst_brack
	"}"		string_dq

:string_dq_subst_parens Variable string
	*		string_dq_sustr_parens
	")"		string_dq

:string_sq String string
	*		string_sq
	"\'\n"		idle

:string_dq_esc StringEscape string
	*		string_dq

:string_sq_esc StringEscape string
	*		string_sq

:herestr_dq String string
	*		herestr_dq
	"\""		herestr_dq1
	"$"		herestr_dq_subst	recolor=-1

:herestr_dq1 String string
	*		herestr_dq		noeat
	"@"		idle

:herestr_dq_subst Variable string
	*		herestr_dq		noeat recolor=-2
	"a-zA-Z_"	herestr_dq_subst_name
	"("		herestr_dq_subst_parens
	"`"		herestr_dq_subst_escape recolor=-1

:herestr_dq_subst_name Variable string
	*		herestr_dq		recolor=-1 noeat
	"a-zA-Z0-9_:"	herestr_dq_subst_name
	"`"		herestr_dq_subst_escape	recolor=-1

:herestr_dq_subst_escape VariableEscape string
	*		herestr_dq_subst_name

:herestr_dq_subst_parens Variable string
	*		herestr_dq_subst_parens
	")"		herestr_dq

:herestr_sq String string
	*		herestr_sq
	"\'"		herestr_sq1

:herestr_sq1 String string
	*		herestr_sq		noeat
	"@"		idle

:typespec_start Idle
	*		idle			noeat
	"\s"		typespec_start
	"\i.:"		typespec		noeat

:typespec Type
	*		idle			noeat
	"\i.:\s"	typespec
	"["		typespec_brack

:typespec_brack Type
	*		typespec		noeat
	"\s"		typespec_brack
	"]"		typespec

:param ParamKey
	*		after_param		noeat istrings
	"-and"		oper
	"-band"		oper
	"-bnot"		oper
	"-bor"		oper
	"-bxor"		oper
	"-not"		oper
	"-or"		oper
	"-xor"		oper
	"-f"		oper
	"-as"		oper
	"-ccontains"	oper
	"-ceq"		oper
	"-cge"		oper
	"-cgt"		oper
	"-cle"		oper
	"-clike"	oper
	"-clt"		oper
	"-cmatch"	oper
	"-cne"		oper
	"-cnotcontains"	oper
	"-cnotlike"	oper
	"-cnotmatch"	oper
	"-contains"	oper
	"-creplace"	oper
	"-csplit"	oper
	"-eq"		oper
	"-ge"		oper
	"-gt"		oper
	"-icontains"	oper
	"-ieq"		oper
	"-ige"		oper
	"-igt"		oper
	"-ile"		oper
	"-ilike"	oper
	"-ilt"		oper
	"-imatch"	oper
	"-in"		oper
	"-ine"		oper
	"-inotcontains"	oper
	"-inotlike"	oper
	"-inotmatch"	oper
	"-ireplace"	oper
	"-is"		oper
	"-isnot"	oper
	"-isplit"	oper
	"-join"		oper
	"-le"		oper
	"-like"		oper
	"-lt"		oper
	"-match"	oper
	"-ne"		oper
	"-notcontains"	oper
	"-notin"	oper
	"-notlike"	oper
	"-notmatch"	oper
	"-replace"	oper
	"-shl"		oper
	"-shr"		oper
	"-split"	oper
done
	"a-zA-Z_"	param

:after_param Ident
	*		herestr_noq		noeat
	" \t"		after_param

# Unquoted strings (after -parameter key)
:herestr_noq String string
	*		idle			noeat
	" \t\r\n"	idle			recolor=-1
	"\i"		herestr_noq

# After an operator, we do not assume what follows is an unquoted string.
:oper Operator
	*		idle			noeat

:ident Ident
	*		idle			noeat istrings
	"begin"		kw
	"break"		loop
	"catch"		kw
	"class"		struct
	"continue"	loop
	"data"		kw
	"define"	kw
	"do"		loop
	"dynamicparam"	struct
	"else"		cond
	"elseif"	cond
	"end"		kw
	"exit"		stmt
	"filter"	kw
	"finally"	kw
	"for"		loop
	"foreach"	loop
	"from"		kw
	"function"	struct
	"if"		cond
	"in"		kw
	"inlinescript"	kw
	"parallel"	kw
	"param"		struct
	"process"	kw
	"return"	stmt
	"switch"	cond
	"throw"		kw
	"trap"		kw
	"try"		kw
	"until"		loop
	"using"		kw
	"var"		kw
	"while"		loop
	"workflow"	kw
done
	"a-zA-Z_\-"	ident

:kw Keyword
	*		idle			noeat

:loop Loop
	*		idle			noeat

:cond Conditional
	*		idle			noeat

:stmt Statement
	*		idle			noeat

:struct Structure
	*		idle			noeat