ExpParser.js
// aux function to emit the correct print type
aux function to emit the correct print type
aux function to emit the correct print type
function printResolver(type) {
      if (type === 'i') {
        emit(`invokevirtual java/io/PrintStream/print(I)V \n`, -2);
      } else if (type === 's') {
        emit(`invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V \n`, -2);
      } else if (type === 'a') {
        emit(`invokevirtual Array/string()Ljava/lang/String;`, 0);
        emit(`invokevirtual java/io/PrintStream/print(Ljava/lang/String;)V \n`, -2);
      } else {
        console.error(`ERROR: check printResolver`);
        process.exit(1);
      }
    }
function printResolver ( type ) { if ( type === 'i' ) { emit ( ` \n ` , - 2 ) ; } else if ( type === 's' ) { emit ( ` \n ` , - 2 ) ; } else if ( type === 'a' ) { emit ( ` ` , 0 ) ; emit ( ` \n ` , - 2 ) ; } else { console . error ( ` ` ) ; process . exit ( 1 ) ; } }
aux function to emit the correct print type
aux function to emit the correct print type