File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 68
68
start : [
69
69
{ regex : / " (?: [ ^ \\ ] | \\ .) * ?(?: " | $ ) / , token : "string" } ,
70
70
71
- { regex : / (?: e l i f | e l s e | f n | f o r | i f | i n | l e t | m a t c h | r e t u r n | s e l f | t r a i t | t y p e | v a r | w h i l e ) \b / ,
71
+ { regex : / (?: e l i f | e l s e | f n | f o r | i f | i n | l e t | m a t c h | r e t u r n | s e l f | t r a i t | t y p e | v a r | w h i l e | i m p o r t ) \b / ,
72
72
token : "keyword" } ,
73
73
74
74
{ regex : / 0 x [ a - f \d ] + | [ - + ] ? (?: \. \d + | \d + \. ? \d * ) (?: e [ - + ] ? \d + ) ? / i,
80
80
{ regex : / [ A - Z ] [ a - z A - Z 0 - 9 _ ] * / ,
81
81
token : "type" } ,
82
82
83
- { regex : / - - .* / , token : "comment" } ,
83
+ { regex : / # .* / , token : "comment" } ,
84
84
] ,
85
85
86
86
meta : {
87
87
dontIndentStates : [ "comment" ] ,
88
- lineComment : "-- "
88
+ lineComment : "# "
89
89
}
90
90
} ) ;
91
91
134
134
</ script >
135
135
136
136
< script type ="module ">
137
- import init , { run } from './fir.js' ;
137
+ import init , { run , setupPanicHook } from './fir.js' ;
138
138
139
139
await init ( ) ;
140
+ await setupPanicHook ( ) ;
140
141
141
142
window . run = function ( pgm , input ) {
142
143
try {
143
144
run ( pgm , input ) ;
144
145
} catch ( err ) {
145
- clearInterpreterOutput ( ) ;
146
146
addInterpreterOutput ( err ) ;
147
147
addInterpreterOutput ( err . stack ) ;
148
148
}
You can’t perform that action at this time.
0 commit comments