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

fix parse() throws error on valid ReflectOnly Blink extended attributes #443

Closed
wants to merge 4 commits into from

Conversation

TG1999
Copy link
Contributor

@TG1999 TG1999 commented Oct 13, 2019

Signed-off-by: tushar goel [email protected]

This patch closes #256 and includes:

  • A relevant test
  • A relevant documentation update

@TG1999
Copy link
Contributor Author

TG1999 commented Oct 13, 2019

@saschanaz please have a look on it 😀

Copy link
Member

@saschanaz saschanaz left a 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 currentlytokens` 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.

Comment on lines 294 to 298
* Returns a proxy that auto-assign `parent` field.
* @template T
* @param {T} tokeniser
* @param {*} [tokenName] either can be a string or identifier
* @return {T}
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay got it

@TG1999
Copy link
Contributor Author

TG1999 commented Oct 13, 2019

How can I merge the changes that you done in gh-pages @saschanaz

@saschanaz
Copy link
Member

How can I merge the changes that you done in gh-pages @saschanaz

That worked! Though the new (expected) error:

##[error] 313:2 error Newline required at end of file but not found eol-last

Copy link
Member

@saschanaz saschanaz left a 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
*/
Copy link
Member

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) {
Copy link
Member

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!

@saschanaz
Copy link
Member

Closing in favor of #445

@saschanaz saschanaz closed this Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parse() throws error on valid ReflectOnly Blink extended attributes
2 participants