Gabriel Ivăncescu
7c9139dffb
vbscript: Handle NULL code text in ParseScriptText and ParseProcedureText.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-23 19:44:18 +02:00
Gabriel Ivăncescu
f05dd8cba5
vbscript/tests: Add test for ParseProcedureText with the SCRIPTPROC_ISEXPRESSION flag.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 18:49:57 +02:00
Gabriel Ivăncescu
ce9ef827f8
vbscript: Add support for the SCRIPTPROC_ISEXPRESSION flag in ParseProcedureText.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 18:49:55 +02:00
Gabriel Ivăncescu
9dda8ca67a
vbscript/tests: Add tests for ParseScriptText with the SCRIPTTEXT_ISEXPRESSION flag.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 18:49:53 +02:00
Gabriel Ivăncescu
8037b13078
vbscript: Add support for the SCRIPTTEXT_ISEXPRESSION flag in ParseScriptText.
...
To simplify the amount of special cases both in ParseScriptText and
ParseProcedureText, add a new pseudo statement and opcode to return the
expression and value at the top of the stack, respectively. Script texts
that have this flag will be parsed specially as a single expression with
such a statement at the end.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-17 18:49:47 +02:00
Gabriel Ivăncescu
848c6e4f93
vbscript/tests: Test lack of newline parsing before End statements.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-09 16:25:55 +02:00
Gabriel Ivăncescu
9a6a4dc33e
vbscript/parser: Handle lack of newlines before certain End statements.
...
In the Windows vbscript parser, some End statements don't require a newline
preceeding them. The game Ymir actually depends on this.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-06 15:34:16 +02:00
Jacek Caban
0131a9c47b
vbscript: Suport + sign in exponential literals.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-26 19:21:33 +02:00
Jacek Caban
17c5a25091
vbscript: Support unary + expressions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 21:56:17 +02:00
Jacek Caban
9b18772c0b
vbscript: Rename OP_long expression to OP_int.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 21:56:15 +02:00
Jacek Caban
d01d629420
vbscript: Handle long/short distinction in interpreter.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 21:56:12 +02:00
Jacek Caban
a390b7e870
vbscript: Support arrays in VarType.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 21:56:10 +02:00
Jacek Caban
139b0ef3fd
vbscript/tests: Fix tests on some Vista versions.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-22 21:56:07 +02:00
Jacek Caban
fb5b0c6463
vbscript: Fix handling null argument in CStr.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 20:40:08 +02:00
Jacek Caban
c9a606faf6
vbscript: Add Asc implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 20:40:06 +02:00
Jacek Caban
6cc7b0e8d5
vbscript: Return correct error when builtin call argument count is invalid.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 20:40:04 +02:00
Jacek Caban
17fb70efe6
vbscript/tests: Fix tests on recent win10.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-21 20:40:02 +02:00
Jacek Caban
0359583718
vbscript: Build with ucrtbase.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 00:12:25 +02:00
Alexandre Julliard
3911e6696a
vbscript: Build with msvcrt.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 08:46:31 +02:00
Francois Gouget
c05a2ae4a7
vbscript/tests: A spelling fix in a comment.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 17:42:42 +01:00
Zebediah Figura
1bd7dbfbc4
vbscript: Handle carriage return in more places.
...
This fixes a regression introduced by 5800c9ed23
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46772
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-05 09:22:42 +01:00
Alistair Leslie-Hughes
b75627ec10
vbscript: Move variable declaration outside of for.
...
This stops a compile error under gcc 4.8.4.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:14 +01:00
Brendan McGrath
dac7441b4e
vbscript: Add todo test for 'rem' as 'dot' identifier.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46318
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Brendan McGrath
78078b65b2
vbscript: Allow most keywords to be used as 'dot' identifiers.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46318
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:30 +01:00
Brendan McGrath
d2937bfff2
vbscript: Allow more keywords to be used as identifiers.
...
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-15 15:07:06 +01:00
Alex Henrie
36f25a4b8a
vbscript: Make constant 'html_delimiterW' static.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:05 +01:00
Michael Stefaniuc
b4a24c6575
vbscript: Use the ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-20 18:36:55 +02:00
Zebediah Figura
5800c9ed23
vbscript: Treat \r as a newline separator.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-19 20:47:03 +02:00
Zebediah Figura
3dde8287c6
vbscript: Add stub IActiveScriptDebug interface.
...
Visual Pinball 9.9.5 expects this interface to be present, and crashes
on teardown trying to Release() it.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-22 21:58:02 +02:00
Jacek Caban
a4824803da
vbscript/tests: Added named item ref count tests.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-20 23:20:08 +01:00
Jacek Caban
7e10941083
vbscript: Added support for script context in ParseScriptText.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 12:35:11 +01:00
Jacek Caban
aa5b68ac40
vbscript: Split named item lookup into a helper function.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-19 12:35:11 +01:00
Michael Stefaniuc
6ab10f2eb0
vbscript: Use the global HeapAlloc() wrappers.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-29 20:28:59 +01:00
Alex Henrie
e04a1c4210
vbscript/tests: Fix first-day-of-week test on mixed locales.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-03 23:26:21 +01:00
Piotr Caban
f595523413
vbscript: Don't leak IEnumVARIANT in interp_enumnext.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:22:09 +01:00
Piotr Caban
a2438ce810
vbscript: Don't return error on VBScript_SetScriptState(SCRIPTSTATE_DISCONNECTED) call.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:22:03 +01:00
Piotr Caban
c8a94b5d7a
vbscript: Add for each tests on array.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:21:59 +01:00
Piotr Caban
a85d12af44
vbscript: Add support for "for each" on arrays.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:21:52 +01:00
Piotr Caban
e95492bc83
vbscript: Add UBound implementation.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-07 18:13:12 +01:00
Dmitry Kislyuk
31ef99245a
vbscript: Improve parsing of separators in functions and classes.
...
Signed-off-by: Dmitry Kislyuk <dimaki@rocketmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 19:33:06 +01:00
Alex Henrie
4438b2706b
vbscript/tests: Fix test for WeekDayName(foo, bar, 0).
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-02 19:12:07 +01:00
Alex Henrie
8d8ebc9641
vbscript/tests: Try calling GetObject again if it fails the first time.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-24 19:09:17 +02:00
Dmitry Kislyuk
5193b6fa69
vbscript: Improve parsing of separators after Option Explicit.
...
Signed-off-by: Dmitry Kislyuk <dimaki@rocketmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-11 14:23:27 +02:00
Piotr Caban
0b5473c166
vbscript: Reimplement array_access function.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-11 14:23:25 +02:00
Piotr Caban
8f0d12e261
vbscript/tests: Add more function call tests with array arguments.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-11 14:23:22 +02:00
Piotr Caban
c4d7243833
vbscript/tests: Expose todo_wine_ok function to scripts.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-10 20:00:08 +02:00
Piotr Caban
775671c3d8
vbscript: Be more verbose on unexpected error in a script.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-10 20:00:05 +02:00
Piotr Caban
0a15f2e02f
vbscript: Add Array implementation.
...
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-10 20:00:03 +02:00
Dmitry Kislyuk
56b31ba2e1
vbscript: Improve parsing of separators in loops and switches.
...
Signed-off-by: Dmitry Kislyuk <dimaki@rocketmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-09 19:45:37 +02:00
Dmitry Kislyuk
4ecc00f6ff
vbscript: Allow colons at the end of first line of loops.
...
Signed-off-by: Dmitry Kislyuk <dimaki@rocketmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-03 17:15:05 +02:00