Skip to content

Terser leading/trailing syntax in scm #2108

@AndreasArvidsson

Description

@AndreasArvidsson

It's unnecessary having to specify that the leading and trailing ranges should terminate at the content range. We could just specify their distal position and the range could be calculated for us.

from:

  (flow_node)? @collectionItem.leading.start.endOf
  .
  (flow_node) @collectionItem @collectionItem.leading.end.startOf @collectionItem.trailing.end.endOf
  .
  (flow_node)? @collectionItem.trailing.end.startOf

to:

  (flow_node)? @collectionItem.leading.endOf
  .
  (flow_node) @collectionItem
  .
  (flow_node)? @collectionItem.trailing.startOf

@pokey @josharian Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityImprovements to code quality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions