File tree Expand file tree Collapse file tree 3 files changed +61
-12
lines changed Expand file tree Collapse file tree 3 files changed +61
-12
lines changed Original file line number Diff line number Diff line change @@ -3003,8 +3003,7 @@ const EasyCoder_Core = {
3003
3003
value1
3004
3004
} ;
3005
3005
case `greater` :
3006
- compiler . next ( ) ;
3007
- if ( compiler . tokenIs ( `than` ) ) {
3006
+ if ( compiler . nextTokenIs ( `than` ) ) {
3008
3007
compiler . next ( ) ;
3009
3008
const value2 = compiler . getValue ( ) ;
3010
3009
return {
@@ -3017,8 +3016,7 @@ const EasyCoder_Core = {
3017
3016
}
3018
3017
return null ;
3019
3018
case `less` :
3020
- compiler . next ( ) ;
3021
- if ( compiler . tokenIs ( `than` ) ) {
3019
+ if ( compiler . nextTokenIs ( `than` ) ) {
3022
3020
compiler . next ( ) ;
3023
3021
const value2 = compiler . getValue ( ) ;
3024
3022
return {
@@ -3030,6 +3028,26 @@ const EasyCoder_Core = {
3030
3028
} ;
3031
3029
}
3032
3030
return null ;
3031
+ case `an` :
3032
+ switch ( compiler . nextToken ( ) ) {
3033
+ case `array` :
3034
+ compiler . next ( ) ;
3035
+ return {
3036
+ domain : `core` ,
3037
+ type : `array` ,
3038
+ value1
3039
+ } ;
3040
+ break ;
3041
+ case `object` :
3042
+ compiler . next ( ) ;
3043
+ return {
3044
+ domain : `core` ,
3045
+ type : `object` ,
3046
+ value1
3047
+ } ;
3048
+ break ;
3049
+ }
3050
+ return null ;
3033
3051
default :
3034
3052
const value2 = compiler . getValue ( ) ;
3035
3053
return {
@@ -3077,6 +3095,12 @@ const EasyCoder_Core = {
3077
3095
case `less` :
3078
3096
comparison = program . compare ( program , condition . value1 , condition . value2 ) ;
3079
3097
return condition . negate ? comparison >= 0 : comparison < 0 ;
3098
+ case `array` :
3099
+ test = Array . isArray ( condition . value1 ) ;
3100
+ return condition . negate ? ! test : test ;
3101
+ case `object` :
3102
+ test = typeof condition . value1 === `object` ;
3103
+ return condition . negate ? ! test : test ;
3080
3104
case `not` :
3081
3105
return ! program . getValue ( condition . value ) ;
3082
3106
case `moduleRunning` :
Original file line number Diff line number Diff line change @@ -3003,8 +3003,7 @@ const EasyCoder_Core = {
3003
3003
value1
3004
3004
} ;
3005
3005
case `greater` :
3006
- compiler . next ( ) ;
3007
- if ( compiler . tokenIs ( `than` ) ) {
3006
+ if ( compiler . nextTokenIs ( `than` ) ) {
3008
3007
compiler . next ( ) ;
3009
3008
const value2 = compiler . getValue ( ) ;
3010
3009
return {
@@ -3017,8 +3016,7 @@ const EasyCoder_Core = {
3017
3016
}
3018
3017
return null ;
3019
3018
case `less` :
3020
- compiler . next ( ) ;
3021
- if ( compiler . tokenIs ( `than` ) ) {
3019
+ if ( compiler . nextTokenIs ( `than` ) ) {
3022
3020
compiler . next ( ) ;
3023
3021
const value2 = compiler . getValue ( ) ;
3024
3022
return {
@@ -3030,6 +3028,26 @@ const EasyCoder_Core = {
3030
3028
} ;
3031
3029
}
3032
3030
return null ;
3031
+ case `an` :
3032
+ switch ( compiler . nextToken ( ) ) {
3033
+ case `array` :
3034
+ compiler . next ( ) ;
3035
+ return {
3036
+ domain : `core` ,
3037
+ type : `array` ,
3038
+ value1
3039
+ } ;
3040
+ break ;
3041
+ case `object` :
3042
+ compiler . next ( ) ;
3043
+ return {
3044
+ domain : `core` ,
3045
+ type : `object` ,
3046
+ value1
3047
+ } ;
3048
+ break ;
3049
+ }
3050
+ return null ;
3033
3051
default :
3034
3052
const value2 = compiler . getValue ( ) ;
3035
3053
return {
@@ -3077,6 +3095,12 @@ const EasyCoder_Core = {
3077
3095
case `less` :
3078
3096
comparison = program . compare ( program , condition . value1 , condition . value2 ) ;
3079
3097
return condition . negate ? comparison >= 0 : comparison < 0 ;
3098
+ case `array` :
3099
+ test = Array . isArray ( condition . value1 ) ;
3100
+ return condition . negate ? ! test : test ;
3101
+ case `object` :
3102
+ test = typeof condition . value1 === `object` ;
3103
+ return condition . negate ? ! test : test ;
3080
3104
case `not` :
3081
3105
return ! program . getValue ( condition . value ) ;
3082
3106
case `moduleRunning` :
You can’t perform that action at this time.
0 commit comments