1.0.11 • Published 3 years ago

clang-tools-wrapper v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Clang Tools Wrapper

Installation

npm i clang-tools-wrapper

Description

Wrapper clang-tools-extra package for JavaScript

Clang Format

Utility for formatting C/C++, JavaScript, TypeScript code

PlatformArchitectureStatus
Windowsx32Completed
Windowsx64Completed
Linuxx32Completed
Linuxx64Completed
MacOsx32Completed
MacOsx64Completed

Clang Query

Utility for inspecting the Clang AST and assist in the construction of AST Matcher expressions.

PlatformArchitectureStatus
Windowsx32In progress
Windowsx64In progress
Linuxx32In progress
Linuxx64In progress
MacOsx32In progress
MacOsx64In progress

Clang Tidy

Utility for static analysis of source code and recognition of program bottlenecks

PlatformArchitectureStatus
Windowsx32In progress
Windowsx64In progress
Linuxx32In progress
Linuxx64In progress
MacOsx32In progress
MacOsx64In progress

Usage

Examples of usage clang-tools-wrapper library

Clang Format

const { ClangFormat, options, environment } = require('clang-tools-wrapper')

const { join } = require('path')
const fs = require('fs')

const filedir = join(process.cwd(), 'tests')
const filepath = join(filedir, 'sample.cpp')
const content = fs.readFileSync(filepath)

const editorConfig = options.generateEditorConfig(filepath, 0, 'LLVM', 'Google')
const execConfig = options.generateExecConfig(content, filedir)

const clangFormat = new ClangFormat(environment)

console.log(clangFormat.format(editorConfig, execConfig))
1.0.11

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago