Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unify scoped_identifier and field_expression #74

Open
ChrHorn opened this issue Nov 6, 2022 · 1 comment
Open

Unify scoped_identifier and field_expression #74

ChrHorn opened this issue Nov 6, 2022 · 1 comment

Comments

@ChrHorn
Copy link
Contributor

ChrHorn commented Nov 6, 2022

These are used in different places but represent nearly the same syntax. I don't think we need both.

scoped_identifier is also currently defined recursively. Recursive structures of arbitrary depth are very hard to query. A flat structure would be better.

@savq
Copy link
Collaborator

savq commented Nov 28, 2022

Scoped identifiers were originally only used for import statements. I added them to other places where I don't think it makes sense to have a field expression (like function signatures) for the same reason we distinguish between parameters and arguments. Parameters are restricted to symbol-like things, but arguments allow any primary expression.

There are a couple of things that do need to get fixed tho:

  1. There's two ways to call scoped macros, but only one is parsed correctly:

    @M.foo x y z    # ok
    M.@foo x y z    # not parsed correctly
  2. quoted operators like Base.:+ are not parsed correctly either.

scoped_identifier is also currently defined recursively

Yes, that needs to get fixed too.

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

No branches or pull requests

2 participants