ExpParser.js
// aux to validate that the expression type is the same as the saved one and to emit the correct store
aux to validate that the expression type is the same as the saved one and to emit the correct store
aux to validate that the expression type is the same as the saved one and to emit the correct store
function validateTypesToStore(expType, savedType, index, variable) {
      if (expType === savedType) {
        if (savedType === 'i') {
          emit(`istore ${index}`, -1);
        } else if (expType === 's') {
          emit(`astore ${index}`, -1);
        }
      } else {
        console.error(`ERROR: types not matching`);
        process.exit(1);
      }
    }
function validateTypesToStore ( expType , savedType , index , variable ) { if ( expType === savedType ) { if ( savedType === 'i' ) { emit ( ` ${ index } ` , - 1 ) ; } else if ( expType === 's' ) { emit ( ` ${ index } ` , - 1 ) ; } } else { console . error ( ` ` ) ; process . exit ( 1 ) ; } }
aux to validate that the expression type is the same as the saved one and to emit the correct store
aux to validate that the expression type is the same as the saved one and to emit the correct store