bug-gettext
[Top][All Lists]
Advanced

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

Re: [bug-gettext] [PATCH v2] xgettext: Add E4X support to JavaScript sca


From: Andreas Stricker
Subject: Re: [bug-gettext] [PATCH v2] xgettext: Add E4X support to JavaScript scanner
Date: Fri, 29 Nov 2013 01:28:43 +0100

Hi Daiki

> Reported by Piotr Drąg at: <https://savannah.gnu.org/bugs/?40125>.
> * src/xgettext.h (enum lexical_context_ty): New enumeration items
> lc_xml_open_tag, lc_xml_close_tag, lc_xml_content.
> * src/x-javascript.c (phase5_scan_xml_markup): New
> function.
> (phase5_get): Handle '<', '>', '/', '=', '{', and '}' specially
> to support E4X.

The patch looks good: It shouldn't affect the non-E4X JavaScript
code. By introducing the phase5_get it is implemented in a sane
way.

I've run it over our code base and it works as expected. Finally
I played a bit with it, so I end up with more checks in the
xgettext-javascript-6 test file. The patch is attached.

Regards, Andy

Attachment: 0001-JavaScript-E4X-Add-more-tests.patch
Description: Text Data


reply via email to

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