[PATCH] jscript: Implemented conditional compilation support for @if, @elif, @else and @end keywords.

Jacek Caban jacek at codeweavers.com
Fri Sep 26 05:07:40 CDT 2014

Hi Qian,

On 09/26/14 07:17, Qian Hong wrote:
> This patch improves QQDownload on Wine. Most of parser code and
> compiler code for '@if statement' are implemented based on the Wine
> vbscript implementation of 'if statement' since Microsoft JScript
> conditional compilation '@if statement' shares similar syntax with
> vbscript 'if statement'.

Not really, @if causes conditional compilation. Your patch
unconditionally compiles everything. See my simple test on top of your
patch for what I mean.

-------------- next part --------------
diff --git a/dlls/jscript/tests/cc.js b/dlls/jscript/tests/cc.js
index 6a308b0..4ac008a 100644
--- a/dlls/jscript/tests/cc.js
+++ b/dlls/jscript/tests/cc.js
@@ -137,6 +137,7 @@ tmp = 1;
     tmp = tmp * 2 // missing semicolon
     ok(false, "unexpected call") // missing semicolon
+    this will fail to parse if parser tried to handle it
 ok(tmp == 4, "unexpected return " + tmp);

More information about the wine-devel mailing list