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

[javascript] CPD: Added support for decorator notation #4673

Merged
merged 9 commits into from Oct 26, 2023

Conversation

wener-tiobe
Copy link
Contributor

@wener-tiobe wener-tiobe commented Sep 12, 2023

Describe the PR

This is to resolve the following error on a javascript file:

[main] ERROR net.sourceforge.pmd.cli - Error while tokenizing: Lexical error in file '.\TableList.js' at
line 67, column 1: "@" (64), after : "" (in lexical state DEFAULT)

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

This is to resolve the following error on a typescript file:

[main] ERROR net.sourceforge.pmd.cli - Error while tokenizing: Lexical error in file '.\TableList.js' at
 line 67, column 1: "@" (64), after : "" (in lexical state DEFAULT)
@wener-tiobe wener-tiobe changed the title CPD: Added support for "@" in identifiers CPD: Added support for decorator notation Sep 12, 2023
@wener-tiobe
Copy link
Contributor Author

I'll add a unit test too.

@pmd-test
Copy link

1 Message
📖 No regression tested rules have been changed.

Generated by 🚫 Danger

@wener-tiobe wener-tiobe changed the title CPD: Added support for decorator notation [javascript] CPD: Added support for decorator notation Sep 14, 2023
@adangel adangel added the in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception label Oct 26, 2023
@adangel adangel added this to the 7.0.0 milestone Oct 26, 2023
Copy link
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

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

Thanks!

I'll change the grammar myself before merging.

In case, someone wonders: Decorators are an experimental feature of ecmascript not yet part of the standard, see https://github.com/tc39/proposal-decorators and tc39/ecma262#2417

See https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2417#sec-decorators for the proposed standard document.

@adangel adangel merged commit df52c37 into pmd:master Oct 26, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:grammar About the grammar of a lexer or parser, eg, a parse/lex exception
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants