CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-escodegen

ECMAScript code generator that transforms Mozilla's Parser API ASTs back into executable JavaScript code

95

1.07x
Overview
Eval results
Files

rubric.jsonevals/scenario-9/

{
  "context": "This criteria evaluates how well the engineer uses escodegen's precedence-based parenthesization capabilities to generate properly parenthesized JavaScript code from ASTs. The focus is on using escodegen.generate() with appropriate options to control parenthesis insertion based on operator precedence rules.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses escodegen.generate",
      "description": "Uses escodegen.generate() function as the primary method to transform AST nodes into JavaScript code",
      "max_score": 25
    },
    {
      "name": "Passes parentheses option",
      "description": "Correctly passes the 'parentheses' option to escodegen.generate() to control whether optional parentheses are included (true) or minimized (false)",
      "max_score": 25
    },
    {
      "name": "Handles AST input",
      "description": "Properly accepts and passes Mozilla Parser API compliant AST nodes to escodegen.generate() without manual transformation",
      "max_score": 20
    },
    {
      "name": "Leverages precedence handling",
      "description": "Relies on escodegen's built-in precedence-based parenthesization logic rather than manually adding or removing parentheses in the AST or output string",
      "max_score": 30
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-escodegen

tile.json