Branch: refs/heads/main
Revision: b968680
Author: arezaii
Link: dyno-chpldoc: get more chpldoc tests passing by arezaii · Pull Request #20061 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #20061 from arezaii/chpldoc-cont2
dyno-chpldoc: get more chpldoc tests passing
This PR gets dyno-chpldoc
to pass many more chpldoc
tests than
before. At the end of last sprint, we could pass ~46/152 chpldoc
tests and after these changes we pass ~124/152 tests.
-
stop stripping newlines from begin and end of comment. Needed to
preserve blank lines intest/chpldoc/extensions/mathjax.doc.chpl
-
exclude first line in comment block from minimum space to dedent.
Better matches howchpldoc
previously worked, assuming the first
line has been trimmed -
indent blank lines when showing the comment, needed to match output
of chpldoc intest/chpldoc/extensions/mathjax.doc.chpl
-
when printing module headers, move the comment below the submodule
listing, if present. Adjust the printing of newlines to support
this update -
add extra newline when printing a comment for classes and records
as well as enums. There's aTODO
to see if we fix that branch
in the show template -
in some tests we were printing comments twice, once for the outer
class/record/module, and one for the first method/attribute, in
the case that the first method/attribute didn't have a comment
of its own. Seetest/chpldoc/basics/disconnectedComment.doc.chpl
as an example -
fix up some indentation when printing attributes or primary methods
-
some format cleanup, spacing, move common code out of if/else
-
break up OpCall printing logic into helpers
-
initial work to get --text-only option working with dyno-chpldoc.
this gets all the tests in test/chpldoc/compflags/textonly
to produce the correct output, with the exception of three tests
which still fail due to the missing warning about implicit modules
reviewed by @benharsh - thanks!
TESTING:
- paratest
-
util/start_test test/chpldoc
passes 124/152 tests (vs. 46)
Signed-off-by: arezaii ahmad.rezaii@hpe.com
Modified Files:
M compiler/dyno/include/chpl/queries/all-global-strings.h
M compiler/dyno/lib/queries/Context.cpp
M compiler/dyno/lib/uast/chpl-syntax-printer.cpp
M compiler/dyno/test/uast/testStringify.cpp
M compiler/dyno/tools/chpldoc/chpldoc.cpp
Compare: https://github.com/chapel-lang/chapel/compare/a2fce92902b4...b9686805ba04