Skip to content

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

@NickRing

Description

@NickRing

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">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions