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

Cannot import enums: #293

Closed
qux42 opened this issue Nov 22, 2017 · 1 comment
Closed

Cannot import enums: #293

qux42 opened this issue Nov 22, 2017 · 1 comment

Comments

@qux42
Copy link

qux42 commented Nov 22, 2017

Hello,
I have several Enums, that I wanna use in different .ksy files.
I tried to import it the following way:
type_enum.ksy

meta:
  id: type_enum
enums:
  type_enum:
    1: test
    2: hey

and file.ksy

meta:
  id: file
  imports:
    - type_enum
types:
  entry:
    seq:
      - id: filetype
        type: u1      
        enum: type_enum

Is there a way to import Enum? If not is it possible to support it?
Big Thanks :)
Samuel

@GreyCat
Copy link
Member

GreyCat commented Dec 7, 2017

The overall problem here is described in #275 — it's not exactly enum-specific — right now you can't really access any members of imported type, i.e. subtypes or enums declared inside that main type. With the syntax proposed in #275, probably something like enum: type_enum::type_enum should be possible.

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

No branches or pull requests

2 participants