vpdb / vpx-js

:video_game: Visual Pinball in the Browser
GNU General Public License v2.0
50 stars 11 forks source link

Handle VBScript's case insensitivity #163

Open freezy opened 4 years ago

freezy commented 4 years ago

Still a few items on the list:

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.

neophob commented 4 years ago

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

freezy commented 4 years ago

@neophob is this a blocker for you?

neophob commented 4 years ago

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

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