File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 1- import { insertBefore } from '../util/language-util.js' ;
21import clike from './clike.js' ;
32
43/** @type {import('../types.d.ts').LanguageProto<'birb'> } */
54export 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 (?: a s s e r t | b r e a k | c a s e | c l a s s | c o n s t | d e f a u l t | e l s e | e n u m | f i n a l | f o l l o w s | f o r | g r a b | i f | n e s t | n e w | n e x t | n o S e e b | r e t u r n | s t a t i c | s w i t c h | t h r o w | v a r | v o i d | w h i l e ) \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} ;
You can’t perform that action at this time.
0 commit comments