From 37e27296076ee1067f5409d3fd408a11ef4e69b6 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 1 Nov 2019 17:50:45 +0100 Subject: [PATCH] vbscript: Allow 'with' as an identifier. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/vbscript/parser.y | 1 + dlls/vbscript/tests/lang.vbs | 1 + dlls/vbscript/tests/run.c | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index ffa12b2c4ef..8bb99f9f9a4 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -536,6 +536,7 @@ DotIdentifier | tON { $$ = $1; } | tRESUME { $$ = $1; } | tGOTO { $$ = $1; } + | tWITH { $$ = $1; } /* Most statements accept both new line and ':' as separators */ StSep diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 0520038a023..8a6fa7834b5 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -1522,6 +1522,7 @@ sub test_dotIdentifiers Call ok(testObj.on = 10, "testObj.on = " & testObj.on & " expected 10") Call ok(testObj.resume = 10, "testObj.resume = " & testObj.resume & " expected 10") Call ok(testObj.goto = 10, "testObj.goto = " & testObj.goto & " expected 10") + Call ok(testObj.with = 10, "testObj.with = " & testObj.with & " expected 10") end sub call test_dotIdentifiers diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c index 765a0353d1e..527055f83b4 100644 --- a/dlls/vbscript/tests/run.c +++ b/dlls/vbscript/tests/run.c @@ -855,7 +855,8 @@ static HRESULT WINAPI testObj_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD { L"next", DISPID_TESTOBJ_KEYWORD }, { L"on", DISPID_TESTOBJ_KEYWORD }, { L"resume", DISPID_TESTOBJ_KEYWORD }, - { L"goto", DISPID_TESTOBJ_KEYWORD } + { L"goto", DISPID_TESTOBJ_KEYWORD }, + { L"with", DISPID_TESTOBJ_KEYWORD } }; test_grfdex(grfdex, fdexNameCaseInsensitive);