LLVM: llvm::json::Path Class Reference (original) (raw)
A "cursor" marking a position within a Value. More...
#include "[llvm/Support/JSON.h](JSON%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| LLVM_ABI void | report (llvm::StringLiteral Message) |
| Records that the value at the current path is invalid. | |
| Path (Root &R) | |
| The root may be treated as a [Path](classllvm%5F1%5F1json%5F1%5F1Path.html "A "cursor" marking a position within a Value."). | |
| Path | index (unsigned Index) const |
| Derives a path for an array element: this[Index]. | |
| Path | field (StringRef Field) const |
| Derives a path for an object field: this.Field. |
A "cursor" marking a position within a Value.
The Value is a tree, and this is the path from the root to the current node. This is used to associate errors with particular subobjects.
Definition at line 668 of file JSON.h.
| llvm::json::Path::Path ( Root & R) | inline |
|---|
◆ field()
Derives a path for an object field: this.Field.
Definition at line 682 of file JSON.h.
References Path().
◆ index()
Derives a path for an array element: this[Index].
Definition at line 680 of file JSON.h.
References Path().
◆ report()
Records that the value at the current path is invalid.
Message is e.g. "expected number" and becomes part of the final error. This overwrites any previously written error message in the root.
Definition at line 204 of file JSON.cpp.
References llvm::Count, P, and Path().
The documentation for this class was generated from the following files: