[PATCH v2 2/2] vbscript: Allow GET, SET and LET to be used as id

Jacek Caban jacek at codeweavers.com
Tue Feb 12 05:56:56 CST 2019


Hi Brendan,

On 2/10/19 1:45 AM, Brendan McGrath wrote:
> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46318
> Signed-off-by: Brendan McGrath <brendan at redmandi.com>
> ---
> I took a look at the way jscript did this - but I couldn't work out how it
> was using '$1' as a value. So I ended up following the approach used for
> 'property'.


jscript can do that, because it declares tokens to have <identifier> 
type (see line 170 of its parser) and lexer returns appropriate value 
(see check_keywords lval handling). Anyway, I'd be fine with your 
version once it has proper tests.


BTW, it's probably a good idea to merge test and fix into one patch in 
this case.


> This meant I had to add a new constant definition for each keyword that
> could be used as an indentifier.As a result I went with a conservative
> approach and only added three more (in addition to 'property').


Conservative approach is fine and even preferred. Some of other keywords 
may cause parser conflicts, so we need to be careful about that.


Thanks,

Jacek




More information about the wine-devel mailing list