Skip to content

Commit d970a1c

Browse files
committed
docs(query): add new resolve-value query to docs - #1107
1 parent e5e412e commit d970a1c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/documentation/print-query-wiki.ts

+22
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,28 @@ ${
221221
}
222222
});
223223

224+
registerQueryDocumentation('resolve-value', {
225+
name: 'Resolve Value Query',
226+
type: 'active',
227+
shortDescription: 'Provides access to flowR\'s alias tracking',
228+
functionName: executeSearch.name,
229+
functionFile: '../queries/catalog/resolve-value-query/resolve-value-query-executor.ts',
230+
buildExplanation: async(shell: RShell) => {
231+
const exampleCode = 'x <- 1\nprint(x)';
232+
return `
233+
With this query you can use flowR's alias-tracking capabilities to resolve identifiers to their values.
234+
235+
Using the example code \`${exampleCode}\`, the following query returns all values of 'x' in the code:
236+
${
237+
await showQuery(shell, exampleCode, [{
238+
type: 'resolve-value',
239+
criteria: ["2@x"]
240+
}], { showCode: true })
241+
}
242+
`;
243+
}
244+
});
245+
224246
registerQueryDocumentation('search', {
225247
name: 'Search Query',
226248
type: 'active',

0 commit comments

Comments
 (0)