@repometry/language-c 0.0.1 → 0.1.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repometry/language-c",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "Experimental C and C headers 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.6.0",
42
- "@repometry/tree-sitter": "0.5.0"
41
+ "@repometry/core": "0.7.0",
42
+ "@repometry/tree-sitter": "0.5.1"
43
43
  }
44
44
  }
@@ -1,4 +1,5 @@
1
1
  import { measures } from '@repometry/tree-sitter';
2
+ import { cSyntax } from '@repometry/core/internal/model/file-type-syntax.js';
2
3
  import manifest from '../resources/grammar.json' with { type: 'json' };
3
4
  const comments = new Set(['comment']);
4
5
  const typeDefinition = { flow: 'class', requiresBody: true };
@@ -47,7 +48,7 @@ const tokens = {
47
48
  ]),
48
49
  };
49
50
  export const c = {
50
- language: { id: 'c', label: 'C', color: '#555555', extensions: ['.c', '.h'], measures: [...measures, 'classes'] },
51
+ language: { id: 'c', label: 'C', color: '#555555', extensions: ['.c', '.h'], measures: [...measures, 'classes'], syntax: cSyntax },
51
52
  tool: { package: manifest.package, version: manifest.version },
52
53
  asset: new URL('../resources/tree-sitter.wasm', import.meta.url),
53
54
  prepareSource: text => text,