You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "matthiasblaesing (via GitHub)" <gi...@apache.org> on 2024/03/30 17:07:33 UTC
[PR] JS: Handle meta-properties new.target and import.meta and improve code completion with newlines and comments [netbeans]
matthiasblaesing opened a new pull request, #7211:
URL: https://github.com/apache/netbeans/pull/7211
JS currently provides two meta-properties:
- `new.target`
- `import.meta`
`new.target` was already partially supported and lexed as a single identifier. This makes it hard to support embedded comments or new lines. MDN describes both as properties as:
> The import.meta syntax consists of the keyword import, a dot, and the identifier meta. Because import is a reserved word not an identifier, this is not a property accessor but a special expression syntax.
The lexer lexes `import.meta` and `new.target` as three tokens:
- Keyword `new` or `import`
- Operator `.`
- Identifier `target` or `meta`
The parser will handle it slightly different and create an `AccessNode` with the property name `target` or `import` on an IdentNode `new` or `import`.
In addition the handling of new lines and comments in expression chains (`obj.prop1.prop2`) was improved.
Closes: #5919
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] JS: Handle meta-properties new.target and import.meta and improve code completion with newlines and comments [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing merged PR #7211:
URL: https://github.com/apache/netbeans/pull/7211
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [PR] JS: Handle meta-properties new.target and import.meta and improve code completion with newlines and comments [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on PR #7211:
URL: https://github.com/apache/netbeans/pull/7211#issuecomment-2048179495
This was successfully tested - so lets get it in.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists