bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] [bug #50920] support Javascript template strings in xgette


From: Bruno Haible
Subject: [bug-gettext] [bug #50920] support Javascript template strings in xgettext
Date: Sun, 7 Apr 2019 18:09:24 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Follow-up Comment #11, bug #50920 (project gettext):

> I think it is not straightforward to determine the end of template strings,
because substitutions may be nested

The grammar in
http://www.ecma-international.org/ecma-262/6.0/#sec-template-literal is pretty
straightforward. Yes, it looks like template strings can be nested, just like
expressions can be nested by using parentheses.

> Maybe, it could be based on the backtick support in the shell-script
scanner, which takes into account of nesting.

No, the backtick support in the shell-script scanner has additional
complexities because a backslash inside `...` in shell scripts is different
from a backslash outside `...`. Here, with the JavaScript template strings,
it's not that hairy.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?50920>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]