diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2024-10-29 14:49:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-29 14:49:26 +0800 |
| commit | f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch) | |
| tree | ea1d61342cd29368e19135000ec2948813096205 /tools/slang-cpp-extractor/file-util.h | |
| parent | a729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff) | |
format
* format
* Minor test fixes
* enable checking cpp format in ci
Diffstat (limited to 'tools/slang-cpp-extractor/file-util.h')
| -rw-r--r-- | tools/slang-cpp-extractor/file-util.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/tools/slang-cpp-extractor/file-util.h b/tools/slang-cpp-extractor/file-util.h index 01aafeedf..201825973 100644 --- a/tools/slang-cpp-extractor/file-util.h +++ b/tools/slang-cpp-extractor/file-util.h @@ -3,7 +3,8 @@ #include "diagnostics.h" -namespace CppExtract { +namespace CppExtract +{ using namespace Slang; // A macro to define a single indent as a string @@ -11,15 +12,23 @@ using namespace Slang; struct FileUtil { - /// Read text into outRead. Any failures written to sink (can be passed as nullptr, for no output) - static SlangResult readAllText(const Slang::String& fileName, DiagnosticSink* sink, String& outRead); - /// Write text to filename. Any failures written to sink. (can be passed as nullptr, for no output) - static SlangResult writeAllText(const Slang::String& fileName, DiagnosticSink* sink, const UnownedStringSlice& text); + /// Read text into outRead. Any failures written to sink (can be passed as nullptr, for no + /// output) + static SlangResult readAllText( + const Slang::String& fileName, + DiagnosticSink* sink, + String& outRead); + /// Write text to filename. Any failures written to sink. (can be passed as nullptr, for no + /// output) + static SlangResult writeAllText( + const Slang::String& fileName, + DiagnosticSink* sink, + const UnownedStringSlice& text); - /// Appends CPP_EXTRACT_INDENT_STRING indentCount number of times to out + /// Appends CPP_EXTRACT_INDENT_STRING indentCount number of times to out static void indent(Index indentCount, StringBuilder& out); }; -} // CppExtract +} // namespace CppExtract #endif |
