@repometry/language-cpp 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/target/main/ts/cpp.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repometry/language-cpp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Experimental C++ for Repometry, with its tree-sitter grammar",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"prepack": "npm run build"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@repometry/core": "0.
|
|
42
|
-
"@repometry/tree-sitter": "0.5.
|
|
41
|
+
"@repometry/core": "0.8.0",
|
|
42
|
+
"@repometry/tree-sitter": "0.5.2"
|
|
43
43
|
}
|
|
44
44
|
}
|
package/target/main/ts/cpp.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { measures } from '@repometry/tree-sitter';
|
|
2
|
+
import { cppSyntax } from '@repometry/core/internal/model/file-type-syntax.js';
|
|
2
3
|
import manifest from '../resources/grammar.json' with { type: 'json' };
|
|
3
4
|
export const cppExtensions = ['.cc', '.cpp', '.cxx', '.hpp', '.hh'];
|
|
4
5
|
const comments = new Set(['comment']);
|
|
@@ -101,7 +102,7 @@ const tokens = {
|
|
|
101
102
|
]),
|
|
102
103
|
};
|
|
103
104
|
export const cpp = {
|
|
104
|
-
language: { id: 'cpp', label: 'C++', color: '#f34b7d', extensions: cppExtensions, measures: [...measures, 'classes'] },
|
|
105
|
+
language: { id: 'cpp', label: 'C++', color: '#f34b7d', extensions: cppExtensions, measures: [...measures, 'classes'], syntax: cppSyntax },
|
|
105
106
|
tool: { package: manifest.package, version: manifest.version },
|
|
106
107
|
asset: new URL('../resources/tree-sitter.wasm', import.meta.url),
|
|
107
108
|
prepareSource: text => text,
|