Hi Brendan,
On 2/13/19 1:33 AM, Brendan McGrath wrote:
I tried 'Dim Get' and 'Get = "xx"' in Windows, but they both create a "compilation error". So I think 'Get' can be used as a Function on an external object - but maybe can not be used as a declaration in vbscript.
I'm not really familiar with the grammatical notation of vbscript - but I did find this: https://rosettacode.org/wiki/BNF_Grammar#VBScript
It looks like after a 'dot', all the Keywords can be used (referred to as a QualifiedIDTail in the link above), but after a 'Dim', only an ExtendedID can be used (which only includes a subset of Keywords referred to as 'SafeKeywordID' - which includes 'Property'). So I think I should only be including the SafeKeywordIDs as an Identifier (which does not include 'Get', 'Set' or 'Let').
For items after a dot, I guess I should introduce a new token (maybe called DotIdentifier) which will include all the Keywords?
Yes, it looks like we will need something like that.
I believe I would therefore need to use an external object to test those.
Note that we already have such object in tests. It's accessible as testObj in scripts and implemented in run.c (mostly testObj_GetDispID and testObj_InvokeEx). We could probably have a single dispid for multiple keyword identifiers there to simplify things.
Thanks,
Jacek