Commit dfc19413d35919ebadd8514cb04b956c775354ba

thesave 2016-11-09T01:57:46

Add support for the Jolie language (#1014) * Added component for the Jolie language * Added Jolie among the supported components * update for merge - revised jolie component - added tests - added code example - minified with `gulp` * fixes * fixes * fixed Jolie html file example and highlight for punctuation * fixed indentation in test html file and added comma as punctuation

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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
diff --git a/components.js b/components.js
index 0b2b48a..0a49d3c 100644
--- a/components.js
+++ b/components.js
@@ -272,6 +272,11 @@ var components = {
 			"require": "clike",
 			"owner": "sherblot"
 		},
+		"jolie": {
+			"title": "Jolie",
+			"require": "clike",
+			"owner": "thesave"
+		},
 		"json": {
 			"title": "JSON",
 			"owner": "CupOfTea696"
diff --git a/components/prism-jolie.js b/components/prism-jolie.js
new file mode 100644
index 0000000..4c0d430
--- /dev/null
+++ b/components/prism-jolie.js
@@ -0,0 +1,56 @@
+Prism.languages.jolie = Prism.languages.extend('clike', {
+	'keyword': /\b(?:include|define|is_defined|undef|main|init|outputPort|inputPort|Location|Protocol|Interfaces|RequestResponse|OneWay|type|interface|extender|throws|cset|csets|forward|Aggregates|Redirects|embedded|courier|extender|execution|sequential|concurrent|single|scope|install|throw|comp|cH|default|global|linkIn|linkOut|synchronized|this|new|for|if|else|while|in|Jolie|Java|Javascript|nullProcess|spawn|constants|with|provide|until|exit|foreach|instanceof|over|service)\b/g,
+	'builtin': /\b(?:undefined|string|int|void|long|Byte|bool|double|float|char|any)\b/,
+	'number': /\b\d*\.?\d+(?:e[+-]?\d+)?l?\b/i,
+	'operator': /->|<<|[!+-<>=*]?=|[:<>!?*\/%^]|&&|\|\||--?|\+\+?/g,
+	'symbol': /[|;@]/,
+	'punctuation': /[,.]/,
+	'string': {
+		pattern: /(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
+		greedy: true
+	},
+});
+
+delete Prism.languages.jolie['class-name'];
+delete Prism.languages.jolie['function'];
+
+Prism.languages.insertBefore( 'jolie', 'keyword', {
+	'function':
+	{
+		pattern: /((?:\b(?:outputPort|inputPort|in|service|courier)\b|@)\s*)\w+/,
+		lookbehind: true
+	},
+	'aggregates': {
+		pattern: /(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,
+		lookbehind: true,
+		inside: {
+			'withExtension': {
+				pattern: /\bwith\s+\w+/,
+				inside: {
+					'keyword' : /\bwith\b/
+				}
+			},
+			'function': {
+				pattern: /\w+/
+			},
+			'punctuation': {
+				pattern: /,/
+			}
+		}
+	},
+	'redirects': {
+		pattern: /(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,
+		lookbehind: true,
+		inside: {
+			'punctuation': {
+				pattern: /,/
+			},
+			'function': {
+				pattern: /\w+/g
+			},
+			'symbol': {
+				pattern: /=>/g
+			}
+		}
+	}
+});
\ No newline at end of file
diff --git a/components/prism-jolie.min.js b/components/prism-jolie.min.js
new file mode 100644
index 0000000..f5a81ee
--- /dev/null
+++ b/components/prism-jolie.min.js
@@ -0,0 +1 @@
+Prism.languages.jolie=Prism.languages.extend("clike",{keyword:/\b(?:include|define|is_defined|undef|main|init|outputPort|inputPort|Location|Protocol|Interfaces|RequestResponse|OneWay|type|interface|extender|throws|cset|csets|forward|Aggregates|Redirects|embedded|courier|extender|execution|sequential|concurrent|single|scope|install|throw|comp|cH|default|global|linkIn|linkOut|synchronized|this|new|for|if|else|while|in|Jolie|Java|Javascript|nullProcess|spawn|constants|with|provide|until|exit|foreach|instanceof|over|service)\b/g,builtin:/\b(?:undefined|string|int|void|long|Byte|bool|double|float|char|any)\b/,number:/\b\d*\.?\d+(?:e[+-]?\d+)?l?\b/i,operator:/->|<<|[!+-<>=*]?=|[:<>!?*\/%^]|&&|\|\||--?|\+\+?/g,symbol:/[|;@]/,punctuation:/[,.]/,string:{pattern:/(["'])(\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0}}),delete Prism.languages.jolie["class-name"],delete Prism.languages.jolie["function"],Prism.languages.insertBefore("jolie","keyword",{"function":{pattern:/((?:\b(?:outputPort|inputPort|in|service|courier)\b|@)\s*)\w+/,lookbehind:!0},aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{withExtension:{pattern:/\bwith\s+\w+/,inside:{keyword:/\bwith\b/}},"function":{pattern:/\w+/},punctuation:{pattern:/,/}}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:{pattern:/,/},"function":{pattern:/\w+/g},symbol:{pattern:/=>/g}}}});
\ No newline at end of file
diff --git a/examples/prism-jolie.html b/examples/prism-jolie.html
new file mode 100644
index 0000000..a26c538
--- /dev/null
+++ b/examples/prism-jolie.html
@@ -0,0 +1,165 @@
+<h1>Jolie</h1>
+<p>To use this language, use the class "language-jolie".</p>
+
+<h2>Comments</h2>
+<pre><code>// Single line comment
+/* Multi-line
+comment */</code></pre>
+
+<h2>Strings</h2>
+<pre><code>"foo \"bar\" baz";
+'foo \'bar\' baz'</code></pre>
+
+<h2>Numbers</h2>
+<pre><code>42
+42L
+1.2e3
+0.1E-4
+0.2e+1
+</code></pre>
+
+<h2>Full example</h2>
+<pre><code>include "console.iol"
+
+type HubType: void {
+  .sid: undefined
+  .nodes[1,*] : NodeType
+}
+
+type NodeType: void {
+  .sid: string
+  .node: string
+  .load?: int
+}
+
+type NetType: HubType | NodeType
+
+interface NetInterface {
+  OneWay: start( string ), addElement( NetType ), removeElement( NetType ), quit( void )
+  RequestResponse: showElements( void )( NetType ) throws SomeFault
+}
+
+type LogType: void {
+  .message: string
+}
+
+interface LoggerInterface {
+  RequestResponse: log( LogType )( void )
+}
+
+outputPort LoggerService {
+    Interfaces: LoggerInterface
+}
+
+embedded {
+  Jolie: "logger.ol" in LoggerService
+}
+
+type AuthenticationData: void {
+    .key:string
+}
+
+interface extender AuthInterfaceExtender {
+    OneWay: *(AuthenticationData)
+}
+
+service SubService 
+{
+  Interfaces: NetInterface
+
+  main
+  {
+     println@Console( "I do nothing" )()
+  }
+}
+
+inputPort ExtLogger {
+  Location: "socket://localhost:9000"
+  Protocol: sodep
+  Interfaces: LoggerInterface
+  Aggregates: LoggerService with AuthInterfaceExtender
+}
+
+courier ExtLogger {
+  [interface LoggerInterface( request )] {
+    if ( key == "secret" ){
+      forward ( request )
+    }
+  }
+}
+
+inputPort In {
+  Location: "socket://localhost:8000"
+  Protocol: http {
+    .debug = true;
+    .debug.showContent = true
+  }
+  Interfaces: NetInterface
+  Aggregates: SubService, 
+              LoggerService
+  Redirects: A => SubService, 
+             B => SubService
+}
+
+cset {
+  sid: HubType.sid NodeType.sid
+}
+
+execution{ concurrent }
+
+define netmodule {
+  if( request.load == 0 || request.load < 1 && 
+      request.load <= 2 || request.load >= 3 && 
+      request.load > 4  || request.load%4 == 2
+  ) {
+    scope( scopeName ) {   
+      // inline comment
+      install( MyFault => println@Console( "Something \"Went\" Wrong" + ' but it\'s ok' )() );
+      /*
+      * Multi-line
+      * Comment
+      */
+      install( this => cH; println@Console( "Something went wrong: " + ^load )() );
+      install( default => comp( scopeName ); println@Console( "Something went wrong" )() );
+      load -> request.( "load" );
+      { ++load | load++ | --load | load-- };
+      throw( MyFault )
+    }
+  } else {
+    foreach ( node -> request.nodes ) {
+      with( node ){
+        while( .load != 100 ) {
+          .load++
+        }   
+      }
+    } 
+  }
+}
+
+main
+{
+  start( sid );
+  synchronized( unneededSync ){
+    csets.sid = sid;
+    undef( sid )
+  };
+  provide
+    [ addElement( request ) ]{
+      if( request instanceof NodeType ) {
+        netmodule
+      }
+    }
+    [ removeElement() ]
+    [ showElements()( response ){
+       /*
+       * assemble response
+       */
+       nullProcess
+     }]{
+       // log the request
+       log@LoggerService( new )();
+       log @ LoggerService( new )()
+     }
+  until
+   [ quit() ]{ exit }
+}</code></pre>
\ No newline at end of file
diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js
index 4c62483..9953637 100644
--- a/plugins/autoloader/prism-autoloader.js
+++ b/plugins/autoloader/prism-autoloader.js
@@ -4,7 +4,7 @@
 	}
 
 	// The dependencies map is built automatically with gulp
-	var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","aspnet":"markup","bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","fsharp":"clike","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup","haxe":"clike","jade":"javascript","java":"clike","kotlin":"clike","less":"css","markdown":"markup","nginx":"clike","objectivec":"c","parser":"markup","php":"clike","php-extras":"php","processing":"clike","protobuf":"clike","qore":"clike","jsx":["markup","javascript"],"ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup","swift":"clike","textile":"markup","twig":"markup","typescript":"javascript","wiki":"markup"}/*]*/;
+	var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","aspnet":"markup","bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","fsharp":"clike","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup","haxe":"clike","jade":"javascript","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","nginx":"clike","objectivec":"c","parser":"markup","php":"clike","php-extras":"php","processing":"clike","protobuf":"clike","qore":"clike","jsx":["markup","javascript"],"ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup","swift":"clike","textile":"markup","twig":"markup","typescript":"javascript","wiki":"markup"}/*]*/;
 
 	var lang_data = {};
 
diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js
index 472054b..e982e86 100644
--- a/plugins/autoloader/prism-autoloader.min.js
+++ b/plugins/autoloader/prism-autoloader.min.js
@@ -1 +1 @@
-!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",aspnet:"markup",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",fsharp:"clike",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup",haxe:"clike",jade:"javascript",java:"clike",kotlin:"clike",less:"css",markdown:"markup",nginx:"clike",objectivec:"c",parser:"markup",php:"clike","php-extras":"php",processing:"clike",protobuf:"clike",qore:"clike",jsx:["markup","javascript"],ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup",swift:"clike",textile:"markup",twig:"markup",typescript:"javascript",wiki:"markup"},c={},a="none",s=Prism.plugins.autoloader={languages_path:"components/",use_minified:!0},n=function(e,c,a){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),c&&c()},s.onerror=function(){document.body.removeChild(s),a&&a()},document.body.appendChild(s)},r=function(e){return s.languages_path+"prism-"+e+(s.use_minified?".min":"")+".js"},i=function(e,a){var s=c[e];s||(s=c[e]={});var n=a.getAttribute("data-dependencies");!n&&a.parentNode&&"pre"===a.parentNode.tagName.toLowerCase()&&(n=a.parentNode.getAttribute("data-dependencies")),n=n?n.split(/\s*,\s*/g):[],t(n,function(){l(e,function(){Prism.highlightElement(a)})})},t=function(e,c,a){"string"==typeof e&&(e=[e]);var s=0,n=e.length,r=function(){n>s?l(e[s],function(){s++,r()},function(){a&&a(e[s])}):s===n&&c&&c(e)};r()},l=function(a,s,i){var l=function(){var e=!1;a.indexOf("!")>=0&&(e=!0,a=a.replace("!",""));var t=c[a];if(t||(t=c[a]={}),s&&(t.success_callbacks||(t.success_callbacks=[]),t.success_callbacks.push(s)),i&&(t.error_callbacks||(t.error_callbacks=[]),t.error_callbacks.push(i)),!e&&Prism.languages[a])o(a);else if(!e&&t.error)u(a);else if(e||!t.loading){t.loading=!0;var l=r(a);n(l,function(){t.loading=!1,o(a)},function(){t.loading=!1,t.error=!0,u(a)})}},p=e[a];p&&p.length?t(p,l):l()},o=function(e){c[e]&&c[e].success_callbacks&&c[e].success_callbacks.length&&c[e].success_callbacks.forEach(function(c){c(e)})},u=function(e){c[e]&&c[e].error_callbacks&&c[e].error_callbacks.length&&c[e].error_callbacks.forEach(function(c){c(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==a&&i(e.language,e.element)})}}();
\ No newline at end of file
+!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",aspnet:"markup",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",fsharp:"clike",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup",haxe:"clike",jade:"javascript",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup",nginx:"clike",objectivec:"c",parser:"markup",php:"clike","php-extras":"php",processing:"clike",protobuf:"clike",qore:"clike",jsx:["markup","javascript"],ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup",swift:"clike",textile:"markup",twig:"markup",typescript:"javascript",wiki:"markup"},c={},a="none",s=Prism.plugins.autoloader={languages_path:"components/",use_minified:!0},n=function(e,c,a){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),c&&c()},s.onerror=function(){document.body.removeChild(s),a&&a()},document.body.appendChild(s)},r=function(e){return s.languages_path+"prism-"+e+(s.use_minified?".min":"")+".js"},i=function(e,a){var s=c[e];s||(s=c[e]={});var n=a.getAttribute("data-dependencies");!n&&a.parentNode&&"pre"===a.parentNode.tagName.toLowerCase()&&(n=a.parentNode.getAttribute("data-dependencies")),n=n?n.split(/\s*,\s*/g):[],t(n,function(){l(e,function(){Prism.highlightElement(a)})})},t=function(e,c,a){"string"==typeof e&&(e=[e]);var s=0,n=e.length,r=function(){n>s?l(e[s],function(){s++,r()},function(){a&&a(e[s])}):s===n&&c&&c(e)};r()},l=function(a,s,i){var l=function(){var e=!1;a.indexOf("!")>=0&&(e=!0,a=a.replace("!",""));var t=c[a];if(t||(t=c[a]={}),s&&(t.success_callbacks||(t.success_callbacks=[]),t.success_callbacks.push(s)),i&&(t.error_callbacks||(t.error_callbacks=[]),t.error_callbacks.push(i)),!e&&Prism.languages[a])o(a);else if(!e&&t.error)u(a);else if(e||!t.loading){t.loading=!0;var l=r(a);n(l,function(){t.loading=!1,o(a)},function(){t.loading=!1,t.error=!0,u(a)})}},p=e[a];p&&p.length?t(p,l):l()},o=function(e){c[e]&&c[e].success_callbacks&&c[e].success_callbacks.length&&c[e].success_callbacks.forEach(function(c){c(e)})},u=function(e){c[e]&&c[e].error_callbacks&&c[e].error_callbacks.length&&c[e].error_callbacks.forEach(function(c){c(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==a&&i(e.language,e.element)})}}();
\ No newline at end of file
diff --git a/tests/helper/test-case.js b/tests/helper/test-case.js
index 3a874fe..27cb5b9 100644
--- a/tests/helper/test-case.js
+++ b/tests/helper/test-case.js
@@ -65,7 +65,17 @@ module.exports = {
 		var compiledTokenStream = Prism.tokenize(testCase.testSource, mainLanguageGrammar);
 		var simplifiedTokenStream = TokenStreamTransformer.simplify(compiledTokenStream);
 
-		assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment);
+		var tzd = JSON.stringify( simplifiedTokenStream ); var exp = JSON.stringify( testCase.expectedTokenStream );
+	  var i = 0;var j = 0;var diff = "";
+    while ( j < tzd.length ){ if (exp[i] != tzd[j] || i == exp.length) diff += tzd[j]; else i++; j++; }
+
+		// var message = "\nToken Stream: \n" + JSON.stringify( simplifiedTokenStream, null, " " ) + 
+		var message = "\nToken Stream: \n" + tzd + 
+									"\n-----------------------------------------\n" +
+									"Expected Token Stream: \n" + exp + 
+									"\n-----------------------------------------\n" + diff;
+
+		var result = assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment + message);
 	},
 
 
diff --git a/tests/languages/jolie/deployment_features.test b/tests/languages/jolie/deployment_features.test
new file mode 100644
index 0000000..ebcd86a
--- /dev/null
+++ b/tests/languages/jolie/deployment_features.test
@@ -0,0 +1,43 @@
+Aggregates: First, Second with Third
+Redirects: First => Second, Third => Fourth
+Jolie: "logger.ol" in LoggerService
+log@LoggerService( new )();
+println @ Console( "none" )()
+----------------------------------------------------
+ [
+ [ "keyword", "Aggregates" ],
+ [ "operator", ":" ],
+ [ "aggregates", [
+	[ "function", "First" ], [ "punctuation", ","],
+ 	[ "function", "Second" ],
+ 	[ "withExtension", [
+		[ "keyword", "with" ], " Third" ]
+		]
+	]
+ ],
+ [ "keyword", "Redirects" ],
+ [ "operator", ":" ],
+ [ "redirects",
+  [
+   [ "function", "First" ],
+   [ "symbol", "=>" ],
+   [ "function", "Second" ], [ "punctuation", ","],
+   [ "function", "Third" ],
+   [ "symbol", "=>" ],
+   [ "function", "Fourth" ]
+  ]
+ ],
+ [ "keyword", "Jolie" ],
+ [ "operator", ":" ],
+ [ "string", "\"logger.ol\"" ],
+ [ "keyword", "in" ],
+ [ "function", "LoggerService" ], 
+ "\nlog", [ "symbol", "@" ], [ "function", "LoggerService" ],	
+ 		"( ", [ "keyword", "new" ], " )()", [ "symbol", ";" ], 
+ "\nprintln ", [ "symbol", "@" ], [ "function", "Console" ], 
+ 		"( ", [ "string", "\"none\"" ], " )()"
+]
+
+----------------------------------------------------
+
+Checks for outputPorts and Aggregates and Redirect constructs.
\ No newline at end of file
diff --git a/tests/languages/jolie/keyword_feature.test b/tests/languages/jolie/keyword_feature.test
new file mode 100644
index 0000000..55a95ca
--- /dev/null
+++ b/tests/languages/jolie/keyword_feature.test
@@ -0,0 +1,129 @@
+include 
+define 
+is_defined 
+undef 
+main 
+init 
+outputPort ; 
+inputPort ;
+Location 
+Protocol 
+Interfaces 
+RequestResponse 
+OneWay 
+type 
+interface 
+extender 
+throws 
+cset 
+csets 
+forward 
+courier ;
+Aggregates
+Redirects
+embedded
+extender
+execution
+sequential
+concurrent
+single
+scope
+install
+throw
+comp
+cH
+default
+global
+linkIn
+linkOut
+synchronized
+this
+new
+for
+if
+else
+while
+in ;
+Jolie
+Java 
+Javascript
+nullProcess
+spawn
+constants
+with
+provide
+until
+exit
+foreach
+instanceof
+over
+service
+
+----------------------------------------------------
+[
+	["keyword", "include" ],
+	["keyword", "define" ], 
+	["keyword", "is_defined" ], 
+	["keyword", "undef" ], 
+	["keyword", "main" ], 
+	["keyword", "init" ], 
+	["keyword", "outputPort" ], [ "symbol", ";" ], 
+	["keyword", "inputPort" ], [ "symbol", ";" ],
+	["keyword", "Location" ], 
+	["keyword", "Protocol" ], 
+	["keyword", "Interfaces" ], 
+	["keyword", "RequestResponse" ], 
+	["keyword", "OneWay" ], 
+	["keyword", "type" ], 
+	["keyword", "interface" ], 
+	["keyword", "extender" ], 
+	["keyword", "throws" ], 
+	["keyword", "cset" ], 
+	["keyword", "csets" ], 
+	["keyword", "forward" ], 
+	["keyword", "courier" ], [ "symbol", ";" ],
+	["keyword", "Aggregates" ],
+	["keyword", "Redirects" ],
+	["keyword", "embedded" ],
+	["keyword", "extender" ],
+	["keyword", "execution" ],
+	["keyword", "sequential" ],
+	["keyword", "concurrent" ],
+	["keyword", "single" ],
+	["keyword", "scope" ],
+	["keyword", "install" ],
+	["keyword", "throw" ],
+	["keyword", "comp" ],
+	["keyword", "cH" ],
+	["keyword", "default" ],
+	["keyword", "global" ],
+	["keyword", "linkIn" ],
+	["keyword", "linkOut" ],
+	["keyword", "synchronized" ],
+	["keyword", "this" ],
+	["keyword", "new" ],
+	["keyword", "for" ],
+	["keyword", "if" ],
+	["keyword", "else" ],
+	["keyword", "while" ],
+	["keyword", "in" ], [ "symbol", ";" ],
+	["keyword", "Jolie" ],
+	["keyword", "Java" ], 
+	["keyword", "Javascript" ],
+	["keyword", "nullProcess" ],
+	["keyword", "spawn" ],
+	["keyword", "constants" ],
+	["keyword", "with" ],
+	["keyword", "provide" ],
+	["keyword", "until" ],
+	["keyword", "exit" ],
+	["keyword", "foreach" ],
+	["keyword", "instanceof" ],
+	["keyword", "over" ],
+	["keyword", "service" ]
+
+]
+
+----------------------------------------------------
+
+Checks for all keywords.
\ No newline at end of file
diff --git a/tests/languages/jolie/number_feature.test b/tests/languages/jolie/number_feature.test
new file mode 100644
index 0000000..90d5c96
--- /dev/null
+++ b/tests/languages/jolie/number_feature.test
@@ -0,0 +1,19 @@
+42
+42L
+1.2e3
+0.1E-4
+0.2e+1
+
+----------------------------------------------------
+
+[
+	["number", "42" ],
+	["number", "42L" ],
+	["number", "1.2e3" ],
+	["number", "0.1E-4" ],
+	["number", "0.2e+1" ]
+]
+
+----------------------------------------------------
+
+Checks for decimal numbers.
\ No newline at end of file
diff --git a/tests/languages/jolie/operator_feature.test b/tests/languages/jolie/operator_feature.test
new file mode 100644
index 0000000..963acc2
--- /dev/null
+++ b/tests/languages/jolie/operator_feature.test
@@ -0,0 +1,42 @@
++ ++ +=
+- -- -=
+! !=
+< <= > >= -> <<
+= ==
+&&
+? * / % ; : | @
+
+----------------------------------------------------
+
+[
+	["operator", "+"],
+	["operator", "++"],
+	["operator", "+="],
+	["operator", "-"],
+	["operator", "--"],
+	["operator", "-="],
+	["operator", "!"],
+	["operator", "!="],
+	["operator", "<" ], 
+	["operator", "<=" ],
+	["operator", ">" ],
+	["operator", ">=" ],
+	["operator", "->" ],
+	["operator", "<<" ],
+	["operator", "=" ], 
+	["operator", "==" ],
+	["operator", "&&" ],
+	[ "operator", "?" ],
+	[ "operator", "*" ],
+	[ "operator", "/" ], 
+	[ "operator", "%" ],
+	[ "symbol", ";" ],
+	[ "operator", ":" ],
+	[ "symbol", "|" ],
+	[ "symbol", "@" ]
+
+]
+
+----------------------------------------------------
+
+Checks for all operators and symbols.
\ No newline at end of file