Make doxygen happy.
This CL adds some code comments to fixup doxygen warnings.
Change-Id: I0d0f4b20a1023691141b2f49f82f4538ffe18614
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31600
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
diff --git a/src/source.h b/src/source.h
index 4f689f4..ffc873b 100644
--- a/src/source.h
+++ b/src/source.h
@@ -30,19 +30,26 @@
class File {
public:
/// Constructs the File with the given file path and content.
+ /// @param file_path the path for this file
+ /// @param file_content the file contents
File(const std::string& file_path, const std::string& file_content);
~File();
- const std::string path; /// file path (optional)
- const std::string content; /// file content
- const std::vector<std::string> lines; /// |content| split by lines
+ /// file path (optional)
+ const std::string path;
+ /// file content
+ const std::string content;
+ /// |content| split by lines
+ const std::vector<std::string> lines;
};
/// Location holds a 1-based line and column index.
/// 0's for |line| or |column| represent invalid values.
class Location {
public:
+ /// The line number, 1-based
size_t line = 0;
+ /// The column number, 1-based
size_t column = 0;
};
@@ -53,28 +60,39 @@
inline Range() = default;
/// Constructs a zero-length Range starting at |loc|.
+ /// @param loc the location to use to build the range
inline explicit Range(const Location& loc) : begin(loc), end(loc) {}
/// Constructs the Range beginning at |b| and ending at |e|.
+ /// @param b the beginning of the range
+ /// @param e the end of the range
inline Range(const Location& b, const Location& e) : begin(b), end(e) {}
- Location begin; /// The location of the first character in the range.
- Location end; /// The location of one-past the last character in the range.
+ /// The location of the first character in the range.
+ Location begin;
+ /// The location of one-past the last character in the range.
+ Location end;
};
/// Constructs the Source with an zero initialized Range and null File.
inline Source() = default;
/// Constructs the Source with the Range |rng| and a null File.
+ /// @param rng the range to assign to the source
inline explicit Source(const Range& rng) : range(rng) {}
/// Constructs the Source with the Range |loc| and a null File.
+ /// @param loc the location to assign to the source
inline explicit Source(const Location& loc) : range(Range(loc)) {}
/// Constructs the Source with the Range |rng| and File |f|.
+ /// @param rng the range for the source
+ /// @param f the file for the source
inline Source(const Range& rng, File const* f) : range(rng), file(f) {}
+ /// Line/column range for this source
Range range;
+ /// Source file
File const* file = nullptr;
};