Skip to content

Commit 4edfc09

Browse files
author
Finn Plummer
committed
self-review: docs
1 parent e6b32c1 commit 4edfc09

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

clang/include/clang/Parse/ParseHLSLRootSignature.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ class RootSignatureParser {
4040
private:
4141
DiagnosticsEngine &Diags() { return PP.getDiagnostics(); }
4242

43+
/// All private Parse.* methods follow a similar pattern:
44+
/// - Each method will start with an assert to denote what the CurToken is
45+
/// expected to be and will parse from that token forward
46+
/// - Therefore, it is the callers responsibility to ensure that you are
47+
/// at the correct CurToken. This should be done with the pattern of:
48+
/// if (TryConsumeExpectedToken(TokenKind)
49+
/// if (Parse.*())
50+
/// return true;
51+
/// - All methods return true if a parsing error is encountered. It is the
52+
/// callers responsibility to propogate this error up, or deal with it
53+
/// otherwise
54+
/// - An error will be raised if the proceeding tokens are not what is
55+
/// expected, or, there is a lexing error
56+
4357
/// Root Element parse methods:
4458
bool ParseDescriptorTable();
4559
bool ParseDescriptorTableClause();

0 commit comments

Comments
 (0)