markuplint-angular-parser
Version:
Angular parser for markuplint.
19 lines • 538 B
JavaScript
import { getEndCol, getEndLine } from '@markuplint/parser-utils/location';
import { v4 as uuid } from 'uuid';
export function tokenizer(raw, startLine, startCol, startOffset) {
raw ??= '';
const endLine = getEndLine(raw, startLine);
const endCol = getEndCol(raw, startCol);
const endOffset = startOffset + raw.length;
return {
uuid: uuid(),
raw,
startOffset,
endOffset,
startLine,
endLine,
startCol,
endCol,
};
}
//# sourceMappingURL=tokenizer.js.map