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

List of all built-in variables #787

Open
Mingun opened this issue Jul 29, 2020 · 1 comment
Open

List of all built-in variables #787

Mingun opened this issue Jul 29, 2020 · 1 comment
Labels

Comments

@Mingun
Copy link

Mingun commented Jul 29, 2020

I notice that KSC recognises that list of variables in expressions, but not all of them described neigher in User Guide or KSY Reference. Because I implementing alternative compiler I need to known which variables availible and in which contexts.

I found, that KSC has following list of variables (https://github.com/kaitai-io/kaitai_struct_compiler/blob/eb420a617ae91a803659dfc29c8a8b54516b7b70/shared/src/main/scala/io/kaitai/struct/format/Identifier.scala#L77-L86)

  • _root
  • _parent
  • _io
  • _
  • _buf
  • _index
  • _on
  • _is_le
  • _sizeof

Can someone helps me to fill the following table:

Variable Context Meaning
_root instances.<...>.io Reference to root type in the current file
... ... ...

(Context -- name of KSY property in which expression can be used)

@Mingun
Copy link
Author

Mingun commented Jul 29, 2020

Once such documentation is created, it will be easier to implement #404

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

No branches or pull requests

2 participants