Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow JS files for opaque types and processes #42

Open
SpenserStyles opened this issue Aug 30, 2017 · 2 comments
Open

Allow JS files for opaque types and processes #42

SpenserStyles opened this issue Aug 30, 2017 · 2 comments
Assignees

Comments

@SpenserStyles
Copy link

Currently when opaque types/processes are used the script fails because it does not have definitions for opaque items. It would be nice if .js files could be loaded into the Web IDE and used to "fill in" opaque types and processes during KSY development. The Web IDE could scan the JS Code (debug) for opaque items by looking for "require('./SOME_FILE.js')" to extract the file name then identify if this external item has a KSY file. If it does then do nothing. If it does not then scan for a corresponding .js file and if found then copy js file contents to bottom of JS Code (Debug). The re-parsing would then work and allow users to test opaque items.

@GreyCat
Copy link
Member

GreyCat commented Aug 30, 2017

@SpenserStyles Please also take a look at kaitai-io/kaitai_struct#143 as well. It discusses probable decoupling of "visualizing" and "parser engine" parts, which would allow to use language-specific class implementations (for example, by running "engine" written in C# and using C# parsers + C#-specific opaque types + webIDE written in JS).

@koczkatamas
Copy link
Member

Meanwhile there is a workaround for this issue, see here: https://github.com/kaitai-io/kaitai_struct_webide/wiki/Features#opaque-type-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants