Skip to content

Commit

Permalink
fix(pencil): Token range issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Alpert committed Jun 16, 2018
1 parent 4b818d0 commit 23b8ea2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,12 @@ export class RokuBRSParser extends Parser {
export const parserInstance = new RokuBRSParser([])

const tokens = (list = []): Token[] => {
return list.map(t => {
return list.map((t: IToken) => {
const range: [number, number] = [t.startOffset, t.endOffset]

return {
loc: { start: { column: t.startColumn, line: t.startLine }, end: { column: t.endColumn, line: t.endLine } },
range: [t.startOffset, t.endOffset],
range,
type: t.tokenType.tokenName,
value: t.image
}
Expand Down

0 comments on commit 23b8ea2

Please sign in to comment.