Skip to content

Commit afb654e

Browse files
cilkc
1 parent 24aee53 commit afb654e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/languages/cilkc.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
import { insertBefore } from '../util/language-util.js';
21
import c from './c.js';
32

43
/** @type {import('../types.d.ts').LanguageProto<'cilkc'>} */
54
export default {
65
id: 'cilkc',
76
base: c,
87
alias: 'cilk-c',
9-
grammar ({ base }) {
10-
insertBefore(base, 'function', {
11-
'parallel-keyword': {
12-
pattern: /\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,
13-
alias: 'keyword',
8+
grammar () {
9+
return {
10+
$insert: {
11+
'parallel-keyword': {
12+
$before: 'function',
13+
pattern: /\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,
14+
alias: 'keyword',
15+
},
1416
},
15-
});
16-
return {};
17+
};
1718
},
1819
};

0 commit comments

Comments
 (0)