@@ -176,11 +176,11 @@ module.exports = grammar({
176
176
// ---
177
177
178
178
/**
179
- Syntax: (FUNCTION|CLASS) FROM FILE "<path/to/file>" WHERE <where...> [OFFSET <offset>]
180
- Use cases: Specify a function or class of a given file.
179
+ Syntax: (VARIABLE| FUNCTION|CLASS) "<name>" [OFFSET <offset>] FROM FILE "<path/to/file>"
180
+ Use cases: Specify an identifier in a given file.
181
181
<params>
182
- - `where... `: Identifies a function or class as the item of interest in the file.
183
- - `offset`: Specifies how many items to skip. See details in `offset_clause`.
182
+ - `<name> `: Identifies the name of a variable, function or class as the item of interest in the file.
183
+ - `< offset> `: Specifies how many items to skip. Mandatory when there are 2 or more matching elements . See details in `offset_clause`.
184
184
</params>
185
185
*/
186
186
identifier_from_file : $ => seq (
@@ -288,12 +288,12 @@ module.exports = grammar({
288
288
region_field : $ => field ( 'region' , choice ( BODY_OR_WHOLE , $ . marker_or_segment ) ) ,
289
289
290
290
/**
291
- Field `offset`: Integer to identify how many occurrences to skip. *MANDATORY* iff there are 2 or more occurrences .
291
+ Field `offset`: Integer to identify how many matches to skip. *MANDATORY* iff there are 2 or more matching elements .
292
292
<examples>
293
- <li>`OFFSET 0` is the default. It means to skip 0 items (so, points to the *1st* occurrence ).</li>
294
- <li>`OFFSET 1` skips 1 item , so points to the *2nd* occurrence </li>
295
- <li>`OFFSET 2` skips 2 items , so points to the *3rd* occurrence </li>
296
- <li>`OFFSET n` skips n items , thus specifies the (n+1)-th occurrence </li>
293
+ <li>`OFFSET 0` is the default when there's only one matching element . It means to skip 0 items (so, points to the *1st* match ).</li>
294
+ <li>`OFFSET 1` skips 1 matches , so points to the *2nd* matches </li>
295
+ <li>`OFFSET 2` skips 2 matches , so points to the *3rd* matches </li>
296
+ <li>`OFFSET n` skips n matches , thus specifies the (n+1)-th matches </li>
297
297
</examples>
298
298
*/
299
299
offset_clause : $ => seq ( 'OFFSET' , field ( 'offset' , $ . number ) ) ,
0 commit comments