File tree Expand file tree Collapse file tree 2 files changed +30
-18
lines changed Expand file tree Collapse file tree 2 files changed +30
-18
lines changed Original file line number Diff line number Diff line change @@ -346,15 +346,18 @@ const EasyCoder_Core = {
346
346
name
347
347
} ) ;
348
348
return true ;
349
- } else if ( compiler . tokenIs ( `step` ) ) {
350
- compiler . next ( ) ;
351
- compiler . addCommand ( {
352
- domain : `core` ,
353
- keyword : `debug` ,
354
- lino,
355
- item : `step`
356
- } ) ;
357
- return true ;
349
+ } else {
350
+ const item = compiler . getToken ( ) ;
351
+ if ( [ `step` , `stop` ] . includes ( item ) ) {
352
+ compiler . next ( ) ;
353
+ compiler . addCommand ( {
354
+ domain : `core` ,
355
+ keyword : `debug` ,
356
+ lino,
357
+ item
358
+ } ) ;
359
+ return true ;
360
+ }
358
361
}
359
362
return false ;
360
363
} ,
@@ -376,6 +379,9 @@ const EasyCoder_Core = {
376
379
case `step` :
377
380
program . debugStep = true ;
378
381
break ;
382
+ case `stop` :
383
+ program . debugStep = false ;
384
+ break ;
379
385
case `program` :
380
386
console . log ( `Debug program: ${ JSON . stringify ( program , null , 2 ) } ` ) ;
381
387
break ;
Original file line number Diff line number Diff line change @@ -346,15 +346,18 @@ const EasyCoder_Core = {
346
346
name
347
347
} ) ;
348
348
return true ;
349
- } else if ( compiler . tokenIs ( `step` ) ) {
350
- compiler . next ( ) ;
351
- compiler . addCommand ( {
352
- domain : `core` ,
353
- keyword : `debug` ,
354
- lino,
355
- item : `step`
356
- } ) ;
357
- return true ;
349
+ } else {
350
+ const item = compiler . getToken ( ) ;
351
+ if ( [ `step` , `stop` ] . includes ( item ) ) {
352
+ compiler . next ( ) ;
353
+ compiler . addCommand ( {
354
+ domain : `core` ,
355
+ keyword : `debug` ,
356
+ lino,
357
+ item
358
+ } ) ;
359
+ return true ;
360
+ }
358
361
}
359
362
return false ;
360
363
} ,
@@ -376,6 +379,9 @@ const EasyCoder_Core = {
376
379
case `step` :
377
380
program . debugStep = true ;
378
381
break ;
382
+ case `stop` :
383
+ program . debugStep = false ;
384
+ break ;
379
385
case `program` :
380
386
console . log ( `Debug program: ${ JSON . stringify ( program , null , 2 ) } ` ) ;
381
387
break ;
You can’t perform that action at this time.
0 commit comments