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

Aliases must be resolved before we check command argument types #32

Open
Infernio opened this issue Jun 1, 2022 · 0 comments
Open

Aliases must be resolved before we check command argument types #32

Infernio opened this issue Jun 1, 2022 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@Infernio
Copy link
Member

Infernio commented Jun 1, 2022

Otherwise you could get into situations where e.g. a Word-typed argument has to reject all aliases since one of them could later expand to more than a word, or a Text-typed argument has an alias that then expands into commands etc.

The underlying reason for this is because every alias has the type Content:

\def_alias[
    key: Word;
    val: Content;
] -> None

The val is the newly defined alias' value, which has type Content. So we have to resolve the alias first to verify the actual type matches.

@Infernio Infernio added the bug Something isn't working label Jun 1, 2022
@Infernio Infernio added this to the v0.2.0 milestone Jun 1, 2022
@Infernio Infernio changed the title Aliases must be evaluated before we check command argument types Aliases must be resolved before we check command argument types Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant