From: Jean Privat Date: Wed, 20 Jun 2018 18:59:09 +0000 (-0400) Subject: Merge: src/indexing: Introduces CodeIndex X-Git-Url: http://nitlanguage.org Merge: src/indexing: Introduces CodeIndex This PR introduces a new Index based on VSM: CodeIndex, which can be used to retrieve pieces of code from a code query. Model entities are indexed by their ANode and vectorization is based on model usage such as: * modules importation * classes spcialization and refinement * methods calls and refinements Example: ~~~nit # Create the index var index = new CodeIndex(toolcontext) for mentity in mentities do index.index_mentity(mentity) end # Match a piece of code var matches = index.match_code("print \"Hello, World!\"") for match in matches do print match end ~~~ Pull-Request: #2719 --- be92c2280ff8c251167ef52da1377d3166a84e08