@@ -1359,40 +1359,40 @@ export class CstToAstConverter {
13591359
13601360 command . args . push ( value ) ;
13611361
1362- for ( const configCtx of ctx . changePointConfiguration_list ( ) ) {
1363- if ( configCtx . _key && configCtx . _key . getText ( ) ) {
1364- const key = this . toColumn ( configCtx . _key ) ;
1365- const option = Builder . option (
1366- {
1367- name : 'on' ,
1368- args : [ key ] ,
1369- } ,
1370- {
1371- location : getPosition ( configCtx . ON ( ) . symbol , configCtx . _key . stop ) ,
1372- }
1373- ) ;
1362+ if ( ctx . _key && ctx . _key . getText ( ) ) {
1363+ const key = this . toColumn ( ctx . _key ) ;
1364+ const option = Builder . option (
1365+ {
1366+ name : 'on' ,
1367+ args : [ key ] ,
1368+ } ,
1369+ {
1370+ location : getPosition ( ctx . ON ( ) . symbol , ctx . _key . stop ) ,
1371+ }
1372+ ) ;
13741373
1375- command . key = key ;
1376- command . args . push ( option ) ;
1377- } else if ( configCtx . _targetType && configCtx . _targetPvalue ) {
1378- const type = this . toColumn ( configCtx . _targetType ) ;
1379- const pvalue = this . toColumn ( configCtx . _targetPvalue ) ;
1380- const option = Builder . option (
1381- {
1382- name : 'as' ,
1383- args : [ type , pvalue ] ,
1384- } ,
1385- {
1386- location : getPosition ( configCtx . AS ( ) . symbol , configCtx . _targetPvalue . stop ) ,
1387- }
1388- ) ;
1374+ command . key = key ;
1375+ command . args . push ( option ) ;
1376+ }
13891377
1390- command . target = {
1391- type,
1392- pvalue,
1393- } ;
1394- command . args . push ( option ) ;
1395- }
1378+ if ( ctx . _targetType && ctx . _targetPvalue ) {
1379+ const type = this . toColumn ( ctx . _targetType ) ;
1380+ const pvalue = this . toColumn ( ctx . _targetPvalue ) ;
1381+ const option = Builder . option (
1382+ {
1383+ name : 'as' ,
1384+ args : [ type , pvalue ] ,
1385+ } ,
1386+ {
1387+ location : getPosition ( ctx . AS ( ) . symbol , ctx . _targetPvalue . stop ) ,
1388+ }
1389+ ) ;
1390+
1391+ command . target = {
1392+ type,
1393+ pvalue,
1394+ } ;
1395+ command . args . push ( option ) ;
13961396 }
13971397
13981398 return command ;
0 commit comments