372 void BotscriptParser::ParseGoto() |
372 void BotscriptParser::ParseGoto() |
373 { |
373 { |
374 CheckNotToplevel(); |
374 CheckNotToplevel(); |
375 |
375 |
376 // Get the name of the label |
376 // Get the name of the label |
377 mLexer->MustGetNext(); |
377 mLexer->MustGetNext (tkAny); |
378 |
378 |
379 // Find the mark this goto statement points to |
379 // Find the mark this goto statement points to |
380 String target = GetTokenString(); |
380 String target = GetTokenString(); |
381 ByteMark* mark = buffer()->FindMarkByName (target); |
381 ByteMark* mark = buffer()->FindMarkByName (target); |
382 |
382 |
507 Error ("bad statement for condition of for"); |
507 Error ("bad statement for condition of for"); |
508 |
508 |
509 mLexer->MustGetNext (tkSemicolon); |
509 mLexer->MustGetNext (tkSemicolon); |
510 |
510 |
511 // Incrementor |
511 // Incrementor |
512 mLexer->MustGetNext(); |
512 mLexer->MustGetNext (tkAny); |
513 DataBuffer* incr = ParseStatement(); |
513 DataBuffer* incr = ParseStatement(); |
514 |
514 |
515 if (incr == null) |
515 if (incr == null) |
516 Error ("bad statement for incrementor of for"); |
516 Error ("bad statement for incrementor of for"); |
517 |
517 |
967 if (curarg >= comm->args.Size()) |
967 if (curarg >= comm->args.Size()) |
968 Error ("too many arguments passed to %1\n\tusage is: %2", |
968 Error ("too many arguments passed to %1\n\tusage is: %2", |
969 comm->name, comm->GetSignature()); |
969 comm->name, comm->GetSignature()); |
970 |
970 |
971 r->MergeAndDestroy (ParseExpression (comm->args[curarg].type, true)); |
971 r->MergeAndDestroy (ParseExpression (comm->args[curarg].type, true)); |
972 mLexer->MustGetNext(); |
972 mLexer->MustGetNext (tkAny); |
973 |
973 |
974 if (curarg < comm->minargs - 1) |
974 if (curarg < comm->minargs - 1) |
975 { |
975 { |
976 mLexer->TokenMustBe (tkComma); |
976 mLexer->TokenMustBe (tkComma); |
977 mLexer->MustGetNext(); |
977 mLexer->MustGetNext (tkAny); |
978 } |
978 } |
979 else if (curarg < comm->args.Size() - 1) |
979 else if (curarg < comm->args.Size() - 1) |
980 { |
980 { |
981 // Can continue, but can terminate as well. |
981 // Can continue, but can terminate as well. |
982 if (TokenIs (tkParenEnd)) |
982 if (TokenIs (tkParenEnd)) |