![]() |
Spicy
|
#include <meta.h>
Public Types | |
| using | Comments = std::vector< std::string > |
Public Member Functions | |
| Meta (Location location, Comments comments={}) | |
| Meta (Comments comments={}) | |
| Meta (const Meta &)=default | |
| Meta (Meta &&)=default | |
| const Comments & | comments () const |
| const Location & | location () const |
| void | setLocation (Location l) |
| void | setComments (Comments c) |
| Meta | mergeLocation (const Location &l) const |
| operator bool () const | |
| Meta & | operator= (const Meta &)=default |
| Meta & | operator= (Meta &&)=default |
Static Public Member Functions | |
| static const Meta * | get (Meta m) |
Friends | |
| bool | operator== (const Meta &a, const Meta &b) |
| bool | operator!= (const Meta &a, const Meta &b) |
Meta information associated with AST nodes. The meta data can include a source code location, source code comments, and an error message.
| using hilti::Meta::Comments = std::vector<std::string> |
List of comments.
|
inline |
Constructor that leaves location unset.
Returns pointer to a globally shared/cached version of a meta instance. The returned pointer can be used instead of the Meta instance passed in, and it guaranteed to remain valid for the entire lifetime of the program.
|
inlineexplicit |
Returns true if the location does not equal a default constructed instance.