From 837a155b3d33035ee0739858f4ab25c65048ad6c Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 1 Mar 2021 15:37:46 -0500 Subject: Doc improvements (#1729) * #include an absolute path didn't work - because paths were taken to always be relative. * Split out AST 'printing'. * Replace listener with List
* Section -> Part. * Kind -> Type Flags -> Kind for ASTPrinter::Part * Improve comments around ASTPrinter. * toString -> toText on Val derived types. toText appends to a StringBuilder. * Added toSlice free function. Added operator<< for Val derived types. Use << where appropriate in doing toText. * More work at mark down output. * Fill in sourceloc for enum case. Add more sophisticated location determination for EnumCase. Refactored documentation output into DocMarkdownWriter. * Improvements for sig output. --- source/core/slang-string.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/core') diff --git a/source/core/slang-string.h b/source/core/slang-string.h index 3fb184ac7..2312c0439 100644 --- a/source/core/slang-string.h +++ b/source/core/slang-string.h @@ -181,6 +181,10 @@ namespace Slang char const* m_end; }; + // A more convenient way to make slices from *string literals* + template + SLANG_FORCE_INLINE UnownedStringSlice toSlice(const char (&in)[SIZE]) { return UnownedStringSlice(in, SIZE - 1); } + // A `StringRepresentation` provides the backing storage for // all reference-counted string-related types. class StringRepresentation : public RefObject -- cgit v1.2.3