Commit 8ceb499d authored by David Lamparter's avatar David Lamparter

Add docstrings to schema.capnp

parent f05559d7
...@@ -171,6 +171,19 @@ struct Node { ...@@ -171,6 +171,19 @@ struct Node {
} }
} }
struct NodeDoc {
# separate carrier for documentation comments on Nodes,
# to keep them out of the binary descriptors
id @0 :Id;
# ID should exist as Node in the same request
docComment @1 :Text;
fieldDocs @2 :List(FieldDoc);
# valid only if Node is a "struct"
}
struct Field { struct Field {
# Schema for a field of a struct. # Schema for a field of a struct.
...@@ -229,6 +242,13 @@ struct Field { ...@@ -229,6 +242,13 @@ struct Field {
} }
} }
struct FieldDoc {
# separate container to carry field docstrings
codeOrder @0 :UInt16;
docComment @1 :Text;
}
struct Enumerant { struct Enumerant {
# Schema for member of an enum. # Schema for member of an enum.
...@@ -468,6 +488,9 @@ struct CodeGeneratorRequest { ...@@ -468,6 +488,9 @@ struct CodeGeneratorRequest {
# All nodes parsed by the compiler, including for the files on the command line and their # All nodes parsed by the compiler, including for the files on the command line and their
# imports. # imports.
nodeDocs @3 :List(NodeDoc);
# documentation comments for nodes, where present
requestedFiles @1 :List(RequestedFile); requestedFiles @1 :List(RequestedFile);
# Files which were listed on the command line. # Files which were listed on the command line.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment