[code][textadept] highlightig template strings in javascript

From: Heck Fy <shitpoet.att.gmail.com>
Date: Fri, 18 Mar 2016 13:43:52 +0300

hello!

old - simple strings:

    'aaa'
   "bbb"

new - added by the latest standard - template strings

    `hello, ${name}`

diff:

    20a21
> local template_str = l.delimited_range('`')
    23c24
    < local string = token(l.STRING, sq_str + dq_str) + token(l.REGEX,
regex_str)
    ---
> local string = token(l.STRING, sq_str + dq_str + template_str) +
token(l.REGEX, regex_str)

note: unfortunately, this doesnt highlight interpolated variables
inside of template strings that would be nice but harder to do.

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 18 Mar 2016 - 06:43:52 EDT

This archive was generated by hypermail 2.2.0 : Fri 18 Mar 2016 - 06:53:15 EDT