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

Resolve modifiers #30

Open
T0mstone opened this issue Jan 21, 2025 · 3 comments · May be fixed by #46
Open

Resolve modifiers #30

T0mstone opened this issue Jan 21, 2025 · 3 comments · May be fixed by #46
Labels
enhancement New feature or request meta Discussion about the structure of this repo

Comments

@T0mstone
Copy link
Collaborator

As it stands now, the concept of a "modifier" doesn't really exist in codex itself. It only knows about variants. The closest thing is the syntax validation in build.rs (and the partially applied modifier alias code from #27).

Despite the decision from #5 (comment) that codex shouldn't really aim to be independent for now, I think the code to resolve "symbol accessors" should be in codex instead of typst, so that the way modifiers work is formalized at our API boundary.

The way I envision this would be a get(&str) method on Symbol, so that you could resolve e.g. lt.eq by finding the lt symbol and calling get("eq") on it.

@T0mstone T0mstone added the enhancement New feature or request label Jan 21, 2025
@MDLC01
Copy link
Collaborator

MDLC01 commented Jan 21, 2025

Then, we would probably have to move the ability to create user-defined symbols to Codex as well.

@laurmaedje
Copy link
Member

I attempted moving this logic while setting up codex, but found it to be not entirely trivial.

@T0mstone
Copy link
Collaborator Author

Then, we would probably have to move the ability to create user-defined symbols to Codex as well.

Hm. While I think that that shouldn't be codex's responsibility, not doing this would require some code duplication between codex and typst, which is also really not good.

I'll look into this some more...

@T0mstone T0mstone added the meta Discussion about the structure of this repo label Jan 21, 2025
@T0mstone T0mstone linked a pull request Feb 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request meta Discussion about the structure of this repo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants