|
Bash++
Bash++ compiler internal documentation
|
A map of file positions to Bash++ container entities. More...
#include <EntityMap.h>

Public Member Functions | |
| void | insert (FilePosition start, FilePosition end, const std::shared_ptr< bpp::bpp_entity > &entity) |
| Add an entity to the entity map. | |
| std::shared_ptr< bpp::bpp_entity > | find (FilePosition point) |
| std::shared_ptr< bpp::bpp_entity > | find (uint32_t line, uint32_t column) |
| Find the active code entity at a specific line and column. | |
Private Attributes | |
| FlatIntervalTree< std::shared_ptr< bpp::bpp_entity > > | tree |
A map of file positions to Bash++ container entities.
The EntityMap is used to mark regions of source files with the entities that are active in those regions. For instance, if a class is defined from line 10 to line 20, the EntityMap will map that range to the class entity. A method internal to that class defined from line 12 to line 15 will map that range to the method entity.
This allows us to quickly look up the active entity at any given position in the source file. This class is used primarily by the language server to resolve entities for features like go-to-definition and rename refactoring.
|
inline |
|
inline |
Find the active code entity at a specific line and column.
|
inline |
Add an entity to the entity map.
|
private |