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

Should an empty begin/end block be classified as ntEmptyStatement ? #320

Open
NickRing opened this issue Feb 4, 2022 · 1 comment
Open

Comments

@NickRing
Copy link

NickRing commented Feb 4, 2022

Hi,

Came across a piece of code that is like this:

if <expression> then
begin
end
else
begin
  // statements
end;

Yes, there is nothing in the initial begin/end group. The XML output is below. Since there is a type of ntEmptyStatement (used within Case statement - ntCaseSelector), I am just asking if ntEmptyStatement should be used in this kind of empty statement (not saying it is a bug, not saying it is a feature request... )

Cheers,
Nick

      <IF line="5010" col="3">
        <EXPRESSION line="5010" col="6">
          <... snipped ... >
        </EXPRESSION>
        <THEN line="5010" col="65">
          <STATEMENTS begin_line="5011" begin_col="3" end_line="5013" end_col="3"/>
        </THEN>
        <ELSE line="5013" col="3">
          <STATEMENTS begin_line="5014" begin_col="3" end_line="5018" end_col="6">
@bogdanpolak
Copy link

@NickRing can you elaborate what kid of problem do you have with existing code, because personally for me this is hard to guess what do you expect. Do you want to have updated XML generator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants