Handle VBScript's case insensitivity
Still a few items on the list:
- [X] Handle global scope (handled at runtime, uses a
ScopeHandlerproxy) - [X] Handle table item APIs (sorted out at compile time)
- [X] Handle enums (handled at compile time, using
VbsApi) - [X] Handle global API (compile time, also
VbsApi) - [X] Handle stdlib calls (compile time, also
VbsApi) - [X] Handle ActiveX COM implementations (#174)
- [ ] Handle local scope
And probably more.
TODO
COM Implementations
I don't think they can be handled at compile time, since they are instances created by the table script we cannot query when compiling (table elements, enums etc work because we have them all at compile time).
So the getObject() method should return a ScopeHandler-like proxy that keeps an index when accessing props and methods and returns the correctly spelled version.
Local Scope
This should be doable at compile time, since all variables are declared in the same scope and don't come from other included files we know nothing about. I think I've tried this already but ascope choked at the AST we have when we do this.
One cheap workaround could be on the vpm-controller side, like this.DIP = this.Dip - I could check what other case sensitive differences there are
@neophob is this a blocker for you?
no - i will add the workaround and reference this issue.
See https://github.com/vpdb/vpx-js/commits/feature/wpc-integrationtest