-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix parse() throws error on valid ReflectOnly Blink extended attributes #443
Conversation
Signed-off-by: tushar goel <[email protected]>
@saschanaz please have a look on it 😀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great work again, I think this is in the right path!
A suggestion though: I would move the new functions to ``extended-attributes.jsbecause currently
tokens` and `identifiersOrStrings` are only used within there. A principle: Keep them where they are used 😁
identifiers
should be also moved to extended-attributes.js
per the same principle.
lib/productions/helpers.js
Outdated
* Returns a proxy that auto-assign `parent` field. | ||
* @template T | ||
* @param {T} tokeniser | ||
* @param {*} [tokenName] either can be a string or identifier | ||
* @return {T} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the prose doesn't exactly describes what tokens()
is... Should probably say this consumes identifiers and strings.
For the JSDoc, tokeniser
should be import("../tokeniser").Tokeniser
instead of T
and tokenName
should be string
instead of *
. I think we don't need @return
here because it will be autodetected by TypeScript language service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay got it
How can I merge the changes that you done in gh-pages @saschanaz |
That worked! Though the new (expected) error:
|
Signed-off-by: tushar goel <[email protected]>
Signed-off-by: tushar goel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some nits!
@@ -43,9 +42,7 @@ export function list(tokeniser, { parser, allowDangler, listName = "list" }) { | |||
return items; | |||
} | |||
|
|||
/** | |||
* @param {import("../tokeniser").Tokeniser} tokeniser | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, this one is still needed!
/** | ||
* @param {import("../tokeniser").Tokeniser} tokeniser | ||
*/ | ||
function identifiers(tokeniser) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, forgot that we are replacing identifiers
with identifiersOrStrings
. That means it's safe to remove this!
Closing in favor of #445 |
Signed-off-by: tushar goel [email protected]
This patch closes #256 and includes: