Skip to content

offset is missing from node.source #105

@romainmenke

Description

@romainmenke

For example:

end: { column: last[5], line: last[4] },

While the default PostCSS parser for example has:
https://github.com/postcss/postcss/blob/77420d62919b4d53921a113bbc939ad5e5b49fe6/lib/parser.js#L361

  getPosition(offset) {
    let pos = this.input.fromOffset(offset)
    return {
      column: pos.col,
      line: pos.line,
      offset
    }
  }

offset was likely added later in PostCSS and wasn't backported to this syntax.

This is not trivial to fix because the tokenizer also doesn't record the offset values in tokens.
I think this issue is fairly minor, but maybe someone is willing to volunteer their time :) (I don't use sugarss myself)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions