vpx-js icon indicating copy to clipboard operation
vpx-js copied to clipboard

Handle VBScript's case insensitivity

Open freezy opened this issue 6 years ago • 3 comments

Still a few items on the list:

  • [X] Handle global scope (handled at runtime, uses a ScopeHandler proxy)
  • [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.

freezy avatar Nov 17 '19 23:11 freezy

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 avatar Nov 18 '19 07:11 neophob

@neophob is this a blocker for you?

freezy avatar Nov 18 '19 19:11 freezy

no - i will add the workaround and reference this issue.

See https://github.com/vpdb/vpx-js/commits/feature/wpc-integrationtest

neophob avatar Nov 18 '19 19:11 neophob