Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select Case statement #2

Open
circular17 opened this issue Apr 2, 2020 · 1 comment
Open

Select Case statement #2

circular17 opened this issue Apr 2, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@circular17
Copy link
Owner

No description provided.

@circular17 circular17 added the enhancement New feature or request label Apr 2, 2020
@circular17
Copy link
Owner Author

  if TryToken(ALine,index,'Select') then
  begin
    TryToken(ALine, index, 'Case');
    expr := TryExpression(AScope,ALine, index, true);
    if expr <> nil then
      AProg.Add(TSelectCaseIntegerInstruction.Create(expr))
    else
    begin
      pl := TryParsePlayer(AScope, ALine, index);
      if pl <> plNone then
        AProg.Add(TSelectCasePlayerInstruction.Create(pl))
      else
      begin
        if TryStringConstant(AScope, ALine, index, text) then
          AProg.Add(TSelectCaseStringConstantInstruction.Create(text))
        else
        begin
          conds := ExpectConditions(AScope, ALine, index, AThreads);
          AProg.Add(TSelectCaseBooleanInstruction.Create(conds));
        end;
      end;
    end;
  end else    

@circular17 circular17 pinned this issue Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant