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

Expansion requires all possible objects to have been declared #29

Open
ClementSparrow opened this issue Jan 24, 2022 · 0 comments
Open
Labels
expansion any expansion mechanism feature New feature or request syntax/language Concerns the language or its syntax

Comments

@ClementSparrow
Copy link
Owner

ClementSparrow commented Jan 24, 2022

Context

We can declare two objects like that:

TAGS
T = A B

OBJECTS

Obj:A:B
transparent

Obj:B:A
transparent

And then use the following mappings in expansions:

MAPPINGS
T => Tbar
A B -> B A

So that we can expand Obj:T:Tbar with tag class parameter T to match our two objects.

Problem

The expansion code currently requires to have declared all four possible objects Obj:T:T, i.e. Obj:A:A, Obj:A:B, Obj:B:A, and Obj:B:B.

Solution

Checking the validity of a mapping-allowed identifier should use the expansion mechanism to check that all expansions lead to a valid expanded identifier. But this might be a complex modification of the code in identifiers.js.

@ClementSparrow ClementSparrow added feature New feature or request syntax/language Concerns the language or its syntax labels Jan 24, 2022
@ClementSparrow ClementSparrow added the expansion any expansion mechanism label Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expansion any expansion mechanism feature New feature or request syntax/language Concerns the language or its syntax
Projects
None yet
Development

No branches or pull requests

1 participant