![]() |
Spicy
|
#include <scope.h>
Classes | |
| struct | Referee |
Public Member Functions | |
| void | insert (NodeRef &&n) |
| void | insert (ID id, NodeRef &&n) |
| void | insertNotFound (ID id) |
| bool | has (const ID &id) const |
| std::vector< Referee > | lookupAll (const ID &id) const |
| std::optional< Referee > | lookup (const ID &id) const |
| void | clear () |
| const auto & | items () const |
| void | render (std::ostream &out, const std::string &prefix="") const |
| Scope (const Scope &other)=delete | |
| Scope (Scope &&other)=delete | |
| Scope & | operator= (const Scope &other)=delete |
| Scope & | operator= (Scope &&other)=delete |
Identifier scope. A scope maps identifiers to AST nodes (more precisely: to references to AST nodes). An identifier can be mapped to more than one node.
|
inline |
Empties the scope.
|
inline |
Returns if there's at least one mapping for an ID.
|
inline |
Returns all mappings of the scope.
Returns first mapping for an ID.
Returns all mappings for an ID.
| void Scope::render | ( | std::ostream & | out, |
| const std::string & | prefix = "" |
||
| ) | const |
Prints out a debugging representation of the scope's content.
| out | stream to print to |
| prefix | string to prefix each printed scope item with |
1.8.13