Skip to content

Commit 4540e33

Browse files
committed
feat: Allow numbers in 'LINE' rule
1 parent 4e267b3 commit 4540e33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

grammar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,10 @@ module.exports = grammar({
256256
*/
257257
// <specifying-locations-in-code>
258258
/**
259-
lineMarker: Points to specific line via its trimmed contents.
259+
lineMarker: Points to specific line via either its trimmed contents or its line number.
260260
*NEVER* use an ambiguous line (one that appears 2 or more times) as reference. Instead, prefer a different, nearby line.
261261
*/
262-
lineMarker: $ => seq('LINE', field('lineMarker', $.string), optional($.offset_clause)),
262+
lineMarker: $ => seq('LINE', field('lineMarker', choice($.string, $.number)), optional($.offset_clause)),
263263
/**
264264
identifierMarker: Points to an identifier (variable, function or class).
265265
Use `OFFSET <n>` to pinpoint which (if there are 2 or more with same name)

0 commit comments

Comments
 (0)