Lines Matching refs:Node
29 // yaml::Node *n = di->getRoot();
58 class Node;
93 void printError(Node *N, const Twine &Msg);
103 class Node {
117 Node(unsigned int Type, std::unique_ptr<Document> &, StringRef Anchor,
120 /// \brief Get the value of the anchor attached to this node. If it does not
128 /// \brief Get the verbatium tag for a given Node. This performs tag resoluton
138 Node *parseBlockNode();
163 ~Node() = default;
176 class NullNode final : public Node {
181 : Node(NK_Null, D, StringRef(), StringRef()) {}
183 static inline bool classof(const Node *N) { return N->getType() == NK_Null; }
186 /// \brief A scalar node is an opaque datum that can be presented as a
191 class ScalarNode final : public Node {
197 : Node(NK_Scalar, D, Anchor, Tag), Value(Val) {
208 /// \brief Gets the value of this node as a StringRef.
215 static inline bool classof(const Node *N) {
227 /// \brief A block scalar node is an opaque datum that can be presented as a
234 class BlockScalarNode final : public Node {
240 : Node(NK_BlockScalar, D, Anchor, Tag), Value(Value) {
246 /// \brief Gets the value of this node as a StringRef.
249 static inline bool classof(const Node *N) {
257 /// \brief A key and value pair. While not technically a Node under the YAML
260 /// TODO: Consider making this not a child of Node.
264 class KeyValueNode final : public Node {
269 : Node(NK_KeyValue, D, StringRef(), StringRef()), Key(nullptr),
277 Node *getKey();
284 Node *getValue();
288 if (Node *Val = getValue())
292 static inline bool classof(const Node *N) {
297 Node *Key;
298 Node *Value;
349 // The following two templates are used for both MappingNode and Sequence Node.
375 class MappingNode final : public Node {
382 MT_Inline ///< An inline mapping node is used for "[key: value]".
387 : Node(NK_Mapping, D, Anchor, Tag), Type(MT), IsAtBeginning(true),
401 static inline bool classof(const Node *N) {
422 class SequenceNode final : public Node {
441 : Node(NK_Sequence, D, Anchor, Tag), SeqType(ST), IsAtBeginning(true),
446 friend class basic_collection_iterator<SequenceNode, Node>;
447 typedef basic_collection_iterator<SequenceNode, Node> iterator;
459 static inline bool classof(const Node *N) {
468 Node *CurrentEntry;
471 /// \brief Represents an alias to a Node with an anchor.
475 class AliasNode final : public Node {
480 : Node(NK_Alias, D, StringRef(), StringRef()), Name(Val) {}
483 Node *getTarget();
485 static inline bool classof(const Node *N) { return N->getType() == NK_Alias; }
492 /// node.
495 /// \brief Root for parsing a node. Returns a single node.
496 Node *parseBlockNode();
504 /// \brief Parse and return the root level node.
505 Node *getRoot() {
514 friend class Node;
524 /// \brief The root node. Used to support skipping a partially parsed
526 Node *Root;