[Chapel Merge] dyno: add EmptyStmt node to represent a single sem

Branch: refs/heads/main
Revision: f3daed1
Author: arezaii
Link: Unavailable
Log Message:

Merge pull request #19566 from arezaii/empty-stmt

dyno: add EmptyStmt node to represent a single semicolon line

This PR adds a new uAST node to capture the single semicolon as an
empty statement.

When running tests that exercise a cobegin, I was getting messages
about a cobegin having no effect on fewer than 2 statements. The test
code is something like:

try! cobegin { ; writeln(""); }
warning: cobegin has no effect if it contains fewer than 2 statements

where we the old parser treated the ; as an empty block and the
dyno parser ignored it, seeing only 1 statement (writeln(""))

  • add a node to capture when an empty statement ; line has been


  • [x] paratest
  • [x] paratest with --dyno (473 failures vs. 475 on main)

Reviewed by @mppf - thanks!

Signed-off-by: arezaii ahmad.rezaii@hpe.com

Modified Files:
A compiler/dyno/include/chpl/uast/EmptyStmt.h

A compiler/dyno/lib/uast/EmptyStmt.cpp
A compiler/dyno/test/parsing/testParseEmptyStmt.cpp
M compiler/dyno/include/chpl/uast/all-uast.h
M compiler/dyno/include/chpl/uast/uast-classes-list.h
M compiler/dyno/lib/parsing/ParserContext.h
M compiler/dyno/lib/parsing/ParserContextImpl.h
M compiler/dyno/lib/parsing/bison-chpl-lib.cpp
M compiler/dyno/lib/parsing/chpl.ypp
M compiler/dyno/lib/parsing/flex-chpl-lib.cpp
M compiler/dyno/lib/parsing/flex-chpl-lib.h
M compiler/dyno/lib/uast/CMakeLists.txt
M compiler/dyno/lib/uast/Makefile.include
M compiler/dyno/lib/uast/chpl-syntax-printer.cpp
M compiler/dyno/test/parsing/CMakeLists.txt
M compiler/dyno/test/parsing/testParseAggregate.cpp
M compiler/dyno/test/uast/testStringify.cpp
M compiler/passes/convert-uast.cpp

Compare: https://github.com/chapel-lang/chapel/compare/254203979ca4...f3daed1506d3