Beispiel #1
0
void compileParams(void) {
 while(lookAhead->tokenType == SB_LPAR){
    eat(SB_LPAR);
    compileParam();
    compileParams2();
    eat(SB_RPAR);
  }
}
Beispiel #2
0
void compileParams2(void) {
  // TODO
  if(lookAhead->tokenType==SB_SEMICOLON)
    {
      eat(SB_SEMICOLON);
      compileParam();
      compileParams2();
    }
}
Beispiel #3
0
void compileParams2(void) {
  // TODO
  switch(lookAhead->tokenType){
      case SB_SEMICOLON:
        eat(SB_SEMICOLON);
        compileParam();
        compileParams2();
        break;
    case SB_RPAR:
        break;
    default:
        error(ERR_INVALIDPARAM,lookAhead->lineNo,lookAhead->colNo);
        break;
      }
}