openscad-parser
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

Node.js CI License NPM package

openscad-parser

This package facilitates parsing, formatting and validating the OpenSCAD language using TypeScript and JavaScript.

Installation (formatter)

$ npm i -g openscad-parser

Usage:

$ scadfmt <file> # outputs the formatted OpenSCAD code to stdout

Installation (as a node module)

npm install openscad-parser

Features

  • [x] Parsing and full error reporting (reports even better errors than the default OpenSCAD parser)
  • [x] Symbol tree generation (VSCode "Outline" view)
  • [x] Formatting (fully AST-aware, needs some more work with breaking up large vectors)
  • [x] Semantic code completions (provides code completions for VSCode)
  • [x] Jump to definition (provides a "Go to definition" context menu item)

I will soon release a vscode extension with full OpenSCAD support, it just needs some more work.

Documentation

The API documentation is available here.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i openscad-parser

Weekly Downloads

9

Version

0.6.0

License

none

Unpacked Size

3.2 MB

Total Files

322

Last publish

Collaborators

  • alufers