[Chapel Merge] chpldoc: display nil default values

Branch: refs/heads/master
Revision: 594f5de
Author: lydia-duncan
Log Message:

Merge pull request #17121 from cassella/chpldoc-print-nil

chpldoc: display nil default values
[contributed by @cassella, reviewed by Lydia]

This part of appendExpr() emits documentation for two sorts of cases:

var a: [something] int;
var o = nil;

When “something” in the first case is “”, appendExpr() receives a
var->name == “nil”. It has code to emit this as “”, to produce
“[] int” instead of “[nil] int”. This code was triggering in the
second case, leading to it being documented as “var o =”.

The first case has printingType==true and the second case has
printingType==false, so use that to distinguish them.

Remove the future for this case in favor of adding an “= nil”
expression to three default value tests.

While I was in those tests, enable the 1-tuple cases which are now
working.

resolves #16941

Passed a full paratest with futures

Modified Files:
R test/chpldoc/functions/functionArgDefaultNil.doc.bad
R test/chpldoc/functions/functionArgDefaultNil.doc.catfiles
R test/chpldoc/functions/functionArgDefaultNil.doc.chpl
R test/chpldoc/functions/functionArgDefaultNil.doc.future
R test/chpldoc/functions/functionArgDefaultNil.doc.good
M compiler/AST/AstToText.cpp
M test/chpldoc/functions/functionArgDefaults.doc.chpl
M test/chpldoc/functions/functionArgDefaults.doc.good
M test/chpldoc/globals/variableDefaultValues.doc.chpl
M test/chpldoc/globals/variableDefaultValues.doc.good
M test/chpldoc/types/fields/fieldDefaultValues.doc.chpl
M test/chpldoc/types/fields/fieldDefaultValues.doc.good

Compare: Comparing 7bd10392a644...594f5de9e7f4 · chapel-lang/chapel · GitHub