[Chapel Merge] Updates and fixes to dyno-chpldoc

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

Merge pull request #19993 from arezaii/chpldoc-init

Updates and fixes to dyno-chpldoc

This PR captures work to get dyno-chpldoc to pass more of our
chpldoc test suite. We were previously passing about 15/150 tests
and this update brings us up to ~29 passing tests.

  • Added new command-line arguments to match chpldoc

  • Added checkVersion from chpldoc to validate a version
    number passed from the command line.

  • Fixed printing of MultiDecl to match format needed
    by docs. Type and value information will print on the
    first var and subsequent matching types and values
    will refer to the first var.type and value.

    var x, y, z: int;

    printed in docs like:

    .. data:: var x: int
    .. data:: var y: x.type
    .. data:: var z: y.type
  • Print iterfunction instead of iter for docs

  • Print attribute when a var is part of a Class or Record.

  • Add custom printing for TypeQuery, VarArgFormal, and Conditional

  • Update Expression to AstNode due to previous change to class name

  • Print a comma as last character of 1-tuples

  • Improve printing of Function signatures to include more information
    as needed by docs

  • Collapse most kindToString functions into a single function that
    handles all entries as IntentList

  • Add lambda as a Function::Kind

  • Add handling for FnCall, remove Call

  • Improve handling for OpCall printing by evaluating prefix/postfix operators
    and operator precedence

  • Add handling for Class


  • dyno-chpldoc passes ~29/150 chpldoc tests (vs. ~15)
  • paratest

reviewed by @mppf - thanks!

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

Modified Files:
M compiler/dyno/tools/chpldoc/chpldoc.cpp

Compare: https://github.com/chapel-lang/chapel/compare/fb8f79313c44...b710db7e5e9a