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

Add support for ES2022 StaticBlock #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willdurand
Copy link

@willdurand willdurand commented Apr 4, 2022

This is similar to eslint/eslint-visitor-keys#29.

@willdurand
Copy link
Author

cc @michaelficarra, thanks

@connor4312
Copy link

Hit this today, would love to see this merged.

Example syntax:

class Foo {
  static {
    
  }
}

Associated estree:

{
  "type": "Program",
  "start": 0,
  "end": 33,
  "body": [
    {
      "type": "ClassDeclaration",
      "start": 0,
      "end": 33,
      "id": {
        "type": "Identifier",
        "start": 6,
        "end": 9,
        "name": "Foo"
      },
      "superClass": null,
      "body": {
        "type": "ClassBody",
        "start": 10,
        "end": 33,
        "body": [
          {
            "type": "StaticBlock",
            "start": 14,
            "end": 31,
            "body": []
          }
        ]
      }
    }
  ],
  "sourceType": "module"
}

connor4312 added a commit to microsoft/vscode-extension-test-runner that referenced this pull request Oct 27, 2023
Fixes parsing failing in copilot due to a lack of static blocks (estools/estraverse#120)
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.

None yet

2 participants