Skip to content

[JavaScript runtime] Bad field name, bad comments #3710

Closed

Description

@kaby76

In this SO question, I took a look at the JavaScript runtime to see if buildParseTrees is defined for a parser. Indeed it is, but I noticed there is one applied occurrence of the field erroneously spelled _buildParseTrees. Of course, in the warped world of JS, this is not caught either by compiler or runtime.

Also, there is no "getBuildParseTree()" noted here and here.

I realize "code reviews" are old school, but relying on a terrible programming language like Javascript to find errors is not going to work.

Activity

  1. added this to the 4.12.0 milestone on Jan 16, 2023
  2. matthew-dean commented on May 1, 2023

    @matthew-dean

    Ideally the runtime would / should be written in TypeScript (or at least type-checked JavaScript annotated with JSDoc types), which would catch these immediately at build time. JavaScript is only a "terrible programming language" if the tools one is using for it are terrible.

  3. KvanTTT commented on May 1, 2023

    @KvanTTT
    Member

    Maybe discussion about TypeScript target would be interesting for you: #3867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions