Lexer JavaScript ES6 (ECMAScript 6)

All questions regarding lexer highlighting schemes are discussed here...
Developer
Posts: 23
Joined: 13.08.2018 13:14

Post by Developer »

Lexer JavaScript (ES6) v1.04
Change:
  • Fixed parser's '$' interrupt for templates
  • Returned string parser fix accidentally deleted in version 1.03
Сlarifications about templates:
In ES, using multiple variables between ${...} will use only the last of variable
and will ignore all previous, therefore, you need to close ${...} on the same line
and use simple calls like functions call, variables or do simple calculation.
That why, multi-line between {...} in ES templates, will not be implemented in lexer.

current parsers are checked on the following examples:

Code: Select all

 console.log(`one line, no variable $(test) $[test] $<test> all ok`);
 console.log(`one line, variable inside, ${variable}  no spaces`);
 console.log(`one line, variable inside, ${ variable } spaces included`);
 console.log(`one line ${variable} multi-variable ${ $var } end of line`);

 console.log(`multi line, 
     		  no variable`);

 console.log(`multi line and calls ${call_functions()} functions
 			  second line ${ 2+2*2-foo[0]} calculation`);
Attachments
lexer.JavaScript_(ES6).v1.04.zip.txt
(13.35 KiB) Downloaded 115 times
lexer.JavaScript_(ES6)L.v1.04.zip.txt
(3.71 KiB) Downloaded 105 times
Alexey
Posts: 1633
Joined: 05.10.2012 22:10

Post by Alexey »

Updated again.
Post Reply