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

Using existing pattern for embedded files #214

Open
meganukebmp opened this issue Jan 1, 2024 · 2 comments
Open

Using existing pattern for embedded files #214

meganukebmp opened this issue Jan 1, 2024 · 2 comments

Comments

@meganukebmp
Copy link

Hello, I have a list of offsets with JPEG files. Since we already have a JPEG file pattern is it possible to use it as a type with an include, or am I forced to have to recreate a JPEG type.

It'd be nice if I could do something along the lines of:

#include <jpeg.hexpat>
JPEG myjpeg @ 0x112233;
@jumanji144
Copy link
Collaborator

that is actually a feature proposal that we moved onto the import statement, where you would eventually be able to do something like:

import jpeg::JPEG as jpeg;

jpeg myjpeg @ 0x112233;

The import statement would have broader scope than that, and replace #include entirely.

This will be implemented as soon as the internal refactor of the pattern language is finished.

What you have to do is now, copy the jpeg.hexpat from our patterns repo, remove the last placement line, and then write the rest of the pattern

@meganukebmp
Copy link
Author

Thanks for the quick response! I see, I'm glad this is being worked on.

Should this issue be left open until that feature is complete? To avoid other people asking the same.

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