Skip to content

Javascript parsing fails with quoted path. #43

@cmalcom

Description

@cmalcom

If there is a quoted path that contains a * the parser fails with UnterminatedCommentError().
I found this when parsing a file with CDK having a policy statement like:

new iam.PolicyStatement({
        effect: iam.Effect.ALLOW,
        actions: [
          "logs:CreateLogGroup",
          "logs:CreateLogStream",
          "logs:PutLogEvents"
        ],
        resources: [`arn:aws:logs:${environment.region}:${environment.account}:log-group/*`]
      })

Would be nice if the quotes were tracked so you would know if the /* was a string rather than comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions