JSPM

@ast-grep/lang-c

0.0.5
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 11177
    • Score
      100M100P100Q147100F
    • License ISC

    Package Exports

    • @ast-grep/lang-c
    • @ast-grep/lang-c/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@ast-grep/lang-c) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    ast-grep napi language for c

    Installation

    In a pnpm project, run:

    pnpm install @ast-grep/lang-c
    pnpm install @ast-grep/napi
    # install the tree-sitter-cli if no prebuild is available
    pnpm install @tree-sitter/cli --save-dev

    Usage

    import c from '@ast-grep/lang-c'
    import { registerDynamicLanguage, parse } from '@ast-grep/napi'
    
    registerDynamicLanguage({ c })
    
    const sg = parse('c', `your code`)
    sg.root().kind()