You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.
For qualified identifiers, are we allowing the [ ] notation in paths?
Today, we have several places in the grammar which use such paths, but I’m unsure if these are supposed to be that way. The existing grammar and defines a special "simple path"
And the AST has used the general expr in place of where a qualified identifier would be expected. In the past, this has allowed us to use an expr.path type where a qualified identifier is expected.
This rule is used across many grammar rules where one would expected qualified identifiers. For example,
removeCommand
: REMOVE pathSimple;
Which means we can do REMOVE hello[0][goodbye] which looks wrong?
Which would suggest hello[0][goodbye] is not a qualified identifier, implying we have a bug in our grammar. But do we want to expand qualified identifiers to include the bracket path notation? It seems useful!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
For qualified identifiers, are we allowing the
[ ]
notation in paths?Today, we have several places in the grammar which use such paths, but I’m unsure if these are supposed to be that way. The existing grammar and defines a special "simple path"
And the AST has used the general
expr
in place of where a qualified identifier would be expected. In the past, this has allowed us to use anexpr.path
type where a qualified identifier is expected.This rule is used across many grammar rules where one would expected qualified identifiers. For example,
Which means we can do
REMOVE hello[0][goodbye]
which looks wrong?Our spec has qualified identifier as simply
Which would suggest hello[0][goodbye] is not a qualified identifier, implying we have a bug in our grammar. But do we want to expand qualified identifiers to include the bracket path notation? It seems useful!
Beta Was this translation helpful? Give feedback.
All reactions