{"id":25901,"library":"llparse-frontend","title":"llparse-frontend","description":"Frontend for the LLParse compiler, version 3.0.0. This package provides the parsing and AST generation logic for llparse, an LL(1) parser generator for Node.js and browsers. It is part of a larger ecosystem that includes llparse-backend and llparse-util. The library is written in TypeScript and ships type definitions. It is actively maintained but still considered WIP. Key differentiators: designed for performance and low memory footprint, suitable for building efficient parsers. Released under MIT License.","status":"active","version":"3.0.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/indutny/llparse-frontend","tags":["javascript","llparse","frontend","typescript"],"install":[{"cmd":"npm install llparse-frontend","lang":"bash","label":"npm"},{"cmd":"yarn add llparse-frontend","lang":"bash","label":"yarn"},{"cmd":"pnpm add llparse-frontend","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only since v3","wrong":"const llparseFrontend = require('llparse-frontend')","symbol":"default","correct":"import llparseFrontend from 'llparse-frontend'"},{"note":"Named export for the Frontend class","wrong":"import Frontend from 'llparse-frontend'","symbol":"Frontend","correct":"import { Frontend } from 'llparse-frontend'"},{"note":"Use type import for TypeScript interfaces to avoid runtime overhead","wrong":"import { Options } from 'llparse-frontend'","symbol":"Options","correct":"import type { Options } from 'llparse-frontend'"}],"quickstart":{"code":"import { Frontend } from 'llparse-frontend';\n\nconst frontend = new Frontend();\nconst code = '1 + 2 * 3';\nconst ast = frontend.parse(code);\nconsole.log(ast);","lang":"typescript","description":"Create a Frontend instance, parse an arithmetic expression, and log the AST."},"warnings":[{"fix":"Use ES module imports (import ... from 'llparse-frontend') or downgrade to v2.x.","message":"ESM-only since version 3.0.0. CommonJS require() will not work.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Pin to exact version and test upgrades thoroughly.","message":"The library is WIP and the API may change without major version bump before reaching 4.0.0.","severity":"gotcha","affected_versions":">=3.0.0"},{"fix":"Verify types against runtime, especially for complex grammars.","message":"TypeScript types are provided but may not be fully accurate; always check the actual runtime behavior.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use dynamic import() or switch to ES modules in your project.","cause":"Using CommonJS require() with ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Ensure you are using the named export Frontend: import { Frontend } from 'llparse-frontend';","cause":"Frontend class not properly instantiated or import error.","error":"TypeError: frontend.parse is not a function"},{"fix":"Check the syntax of the input code; ensure it matches the expected grammar.","cause":"Provided code string has invalid syntax for the parser.","error":"SyntaxError: Unexpected token"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}