diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2021-03-01 15:37:46 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-01 15:37:46 -0500 |
| commit | 837a155b3d33035ee0739858f4ab25c65048ad6c (patch) | |
| tree | 7abc4859a6669c9b8e0bcdaad6eb7b37471679ba /source/core | |
| parent | b3501add6c4dda798acf7b84b71b638d8d0b7898 (diff) | |
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>
* 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.
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-string.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 <size_t SIZE> + 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 |
