Fangrui Song
40ab5900de
Add TypeDefDefinitionData::declarations
...
Constructors and destructors are also included in declarations. But this is not necessarily bad, as textDocument/definition on class spelling names can jump to constructors as well as declarations.
2018-02-20 14:52:32 -08:00
Fangrui Song
f3134d564c
Simplify Index* Query*
2018-02-18 10:43:27 -08:00
Fangrui Song
015195036c
Maintain a list of Def in Query{Func,Var}::Def
2018-02-18 00:42:04 -08:00
Fangrui Song
0f03146daa
Change optional<...> Query{Func,Type}::Def to forward_list
2018-02-17 23:24:09 -08:00
Fangrui Song
cfdb6bf422
Change optional<...> QueryVar::Def to forward_list
...
Related to #403
2018-02-17 22:09:03 -08:00
Fangrui Song
5bbd3f4a29
Add $cquery/fileInfo
2018-02-14 22:47:55 -08:00
Fangrui Song
afd38cbce9
Add Id<QueryFile> file; to Use and simplify query.cc
2018-02-11 20:43:54 -08:00
Jacob Dufault
b71cf25186
Query GetFileId returns Maybe<QueryFileId>
2018-02-11 13:42:48 -08:00
Fangrui Song
aee79b3617
variable_type -> type; remove parent_{id,kind} (they should be inferred from Def::spell; clean up SymbolIdx, Reference, SymbolRef
2018-02-11 10:28:26 -08:00
Fangrui Song
9a6cbafa04
Add lexical parent to Type/Var and definition_spelling->spell, definition_extent->extent
2018-02-10 20:23:46 -08:00
Fangrui Song
420e84329b
Derive SymbolRef,Use from Reference and add lexical container to func/var/type uses
2018-02-10 17:33:56 -08:00
Fangrui Song
749ecf0faa
Add {Index,Query}Family to simplify template parameters
2018-02-10 00:06:45 -08:00
scturtle
1342522f2a
Make CI happy.
2018-02-10 12:43:48 +08:00
Fangrui Song
c28426bbb4
Remove QueryLocation and clean up
2018-02-09 19:13:50 -08:00
Fangrui Song
50cf05763b
Query* structs: QueryLocation -> Reference
2018-02-09 17:50:47 -08:00
Fangrui Song
aa125e34f3
Work around SIGSEGV and simplify SymbolIdx
2018-02-09 17:05:17 -08:00
Fangrui Song
95515643d8
Remove ToSymbol
2018-02-09 15:39:55 -08:00
Fangrui Song
c4bd7ef44b
Rename Reference members
2018-02-09 14:12:35 -08:00
Fangrui Song
67e8132dbe
struct QueryFuncRef : Reference {};
2018-02-08 23:10:54 -08:00
Fangrui Song
82b429bfbc
QueryLocation -> Reference
2018-02-08 21:26:34 -08:00
Fangrui Song
2d255da07b
{Index,Query}Type::uses: Range/QueryLocation -> Reference
...
And add serialization for Reference
2018-02-08 18:26:09 -08:00
Fangrui Song
715fece4dd
QueryLocation and QueryRef
2018-02-08 10:15:55 -08:00
Fangrui Song
dbdab02ff4
Change is_implicit to role in {Index,Query}FuncRef
...
Add `FileId file` to *DefDefinitionData::Def
2018-02-07 23:27:35 -08:00
Fangrui Song
10c2843846
Add IndexLocation and add role to QueryLocation
...
IndexFuncRef should be deprecated in favor of IndexLocation
2018-02-07 19:10:39 -08:00
Fangrui Song
9e730aacd4
Make before_deploy.sh work on FreeBSD
2018-02-06 22:46:05 -08:00
Fangrui Song
55c7519e93
Move ImportOrUpdate and header cleanup
2018-02-06 21:27:07 -08:00
Fangrui Song
0016d214c3
Convert copy constructor to move constructors piecemeal
...
If I replace all the important constructors used in query.cc, there will be a weird issue that strings following "Applying index update for " are empty.
2018-02-06 20:54:17 -08:00
Fangrui Song
1a82f1f113
We may should represent Query{Func,Type,Var} as a bag of definitions and references
2018-02-05 10:16:43 -08:00
Chao Shen
093dbac30c
Fix compilation.
2018-02-05 09:34:39 +08:00
Fangrui Song
d573a68130
Simplify operator==
2018-02-04 10:09:58 -08:00
Fangrui Song
985dec101d
Generation
2018-02-03 19:51:30 -08:00
Fangrui Song
0a721ff247
Simplify query.h
2018-02-03 18:16:30 -08:00
Fangrui Song
e5128d3db9
Wrap Query* references with WithGen
2018-02-03 17:44:20 -08:00
Fangrui Song
3d6d000297
Add Generation gen;
to Query{Func,Type,Var} and corresponding ToQueryLocation
2018-02-03 14:52:26 -08:00
Fangrui Song
6933870962
Change symbol id from size_t to RawId (uint32_t currently)
2018-02-03 10:35:17 -08:00
Fangrui Song
e42f6b6191
optional<...> GetQuery*IdFromUsr -> Maybe
2018-02-01 23:17:34 -08:00
Fangrui Song
ae999f9c92
size_t Query*::symbol_idx -> Maybe<Id<void>>
2018-02-01 22:52:03 -08:00
Fangrui Song
3c6f3f661f
Use Maybe<Id<T>> for {Func,Type,Var}DefDefinitionData
...
sizeof(db->funcs[0].def) 224 (-24)
sizeof(db->types[0].def) 248 (-24)
sizeof(db->vars[0].def) 160 (-24)
2018-02-01 22:31:43 -08:00
Fangrui Song
392cd79d04
Add Maybe<T> and change definition_{spelling,extent} from optional to Maybe
...
sizeof(db->funcs[0].def) decreases from 248 to 232
sizeof(db->types[0].def) decreases from 272 to 256
sizeof(db->vars[0].def) decreases from 184 to 168
2018-02-01 21:39:23 -08:00
Fangrui Song
ce6f1c7294
QueryDatabase::{detailed_names,short_names} -> GetSymbol{DetailedName,ShortName}
2018-02-01 18:15:22 -08:00
Fangrui Song
2fb85732c0
Add RemoveSymbol
2018-02-01 17:25:06 -08:00
Fangrui Song
642975ea17
Reflect string_view and fix workspace/symbol
2018-02-01 13:48:41 -08:00
Fangrui Song
8108de0cfa
Change short_names/detailed_names from const std::string& to std::string_view
2018-01-31 19:53:50 -08:00
Jacob Dufault
f6a2a55209
Import pipeline improvements
...
- Cache manager is created by request
- Index is always associated with its contents
- Reduced frequently of file reads
2018-01-29 21:34:36 -08:00
Jacob Dufault
0eb7d415d7
usr_to_file uses new NormalizedPath type
2018-01-29 16:56:00 -08:00
Jacob Dufault
a392301be3
Format
2018-01-29 16:27:43 -08:00
Fangrui Song
16bf3158c5
Add SymbolRole to SymbolRef and fix $cquery/{base,derived} by ordering definitions before uses
2018-01-28 20:39:41 -08:00
Fangrui Song
5763201838
Remove is_type_member & VarDefDefinitionData::declaring_type
...
Rename ClangStorageClass to StorageClass
Add semantic_parent & semantic_parent_kind (but not serialized yet)
Move query.h SymbolKind to indexer.h SymbolKind and make it uint8_t
2018-01-27 20:46:06 -08:00
Fangrui Song
d605217c1a
matcher.cc: use std::regex_search instead of std::regex_match
...
Prototype of non-working `dependencies` parameter of $cquery/freshenIndex
2018-01-27 10:42:18 -08:00
Fangrui Song
0bbabbcbd2
Move IndexVar::def::declarations to IndexVar::declarations
2018-01-26 21:50:17 -08:00