mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Doc comments: use std::unordered_map
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
This commit is contained in:
parent
131b6ccc71
commit
21817473e8
3 changed files with 4 additions and 4 deletions
|
@ -130,7 +130,7 @@ struct Constant
|
||||||
typedef std::map<std::string, Value *> ValMap;
|
typedef std::map<std::string, Value *> ValMap;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef std::map<PosIdx, DocComment> DocCommentMap;
|
typedef std::unordered_map<PosIdx, DocComment> DocCommentMap;
|
||||||
|
|
||||||
struct Env
|
struct Env
|
||||||
{
|
{
|
||||||
|
@ -335,7 +335,7 @@ private:
|
||||||
* Associate source positions of certain AST nodes with their preceding doc comment, if they have one.
|
* Associate source positions of certain AST nodes with their preceding doc comment, if they have one.
|
||||||
* Grouped by file.
|
* Grouped by file.
|
||||||
*/
|
*/
|
||||||
std::map<SourcePath, DocCommentMap> positionToDocComment;
|
std::unordered_map<SourcePath, DocCommentMap> positionToDocComment;
|
||||||
|
|
||||||
LookupPath lookupPath;
|
LookupPath lookupPath;
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ struct LexerState
|
||||||
/**
|
/**
|
||||||
* @brief Maps some positions to a DocComment, where the comment is relevant to the location.
|
* @brief Maps some positions to a DocComment, where the comment is relevant to the location.
|
||||||
*/
|
*/
|
||||||
std::map<PosIdx, DocComment> & positionToDocComment;
|
std::unordered_map<PosIdx, DocComment> & positionToDocComment;
|
||||||
|
|
||||||
PosTable & positions;
|
PosTable & positions;
|
||||||
PosTable::Origin origin;
|
PosTable::Origin origin;
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
typedef std::map<PosIdx, DocComment> DocCommentMap;
|
typedef std::unordered_map<PosIdx, DocComment> DocCommentMap;
|
||||||
|
|
||||||
Expr * parseExprFromBuf(
|
Expr * parseExprFromBuf(
|
||||||
char * text,
|
char * text,
|
||||||
|
|
Loading…
Reference in a new issue