Skip to content

Commit 7cef241

Browse files
birb
1 parent dd90d6e commit 7cef241

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/languages/birb.js

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

43
/** @type {import('../types.d.ts').LanguageProto<'birb'>} */
54
export default {
65
id: 'birb',
76
base: clike,
8-
grammar ({ base }) {
9-
insertBefore(base, 'function', {
10-
'metadata': {
11-
pattern: /<\w+>/,
12-
greedy: true,
13-
alias: 'symbol',
14-
},
15-
});
16-
7+
grammar () {
178
return {
189
'string': {
1910
pattern: /r?("|')(?:\\.|(?!\1)[^\\])*\1/,
@@ -29,6 +20,14 @@ export default {
2920
/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,
3021
'operator': /\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,
3122
'variable': /\b[a-z_]\w*\b/,
23+
$insert: {
24+
'metadata': {
25+
$before: 'function',
26+
pattern: /<\w+>/,
27+
greedy: true,
28+
alias: 'symbol',
29+
},
30+
},
3231
};
3332
},
3433
};

0 commit comments

Comments
 (0)