Posted: 30.08.2019 03:27
Lexer JavaScript (ES6) v1.04
Change:
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:
Change:
- Fixed parser's '$' interrupt for templates
- Returned string parser fix accidentally deleted in version 1.03
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`);