1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 02:37:25 -04:00
notes/node_modules/postcss-less/dist/tokenizer/tokenize-at-rule.min.js
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

1 line
1.5 KiB
JavaScript

"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function tokenizeAtRule(e){e.css.charCodeAt(e.pos+1)===_globals.openedCurlyBracket?(e.nextPos=e.css.indexOf("}",e.pos+2),e.nextPos===-1&&(0,_unclosed2["default"])(e,"interpolation"),e.cssPart=e.css.slice(e.pos,e.nextPos+1),e.lines=e.cssPart.split("\n"),e.lastLine=e.lines.length-1,e.lastLine>0?(e.nextLine=e.line+e.lastLine,e.nextOffset=e.nextPos-e.lines[e.lastLine].length):(e.nextLine=e.line,e.nextOffset=e.offset),e.tokens.push(["word",e.cssPart,e.line,e.pos-e.offset,e.nextLine,e.nextPos-e.nextOffset]),e.offset=e.nextOffset,e.line=e.nextLine):(_globals.atEndPattern.lastIndex=e.pos+1,_globals.atEndPattern.test(e.css),0===_globals.atEndPattern.lastIndex?e.nextPos=e.css.length-1:e.nextPos=_globals.atEndPattern.lastIndex-2,e.cssPart=e.css.slice(e.pos,e.nextPos+1),e.token="at-word",_globals.variablePattern.test(e.cssPart)&&(_globals.wordEndPattern.lastIndex=e.pos+1,_globals.wordEndPattern.test(e.css),0===_globals.wordEndPattern.lastIndex?e.nextPos=e.css.length-1:e.nextPos=_globals.wordEndPattern.lastIndex-2,e.cssPart=e.css.slice(e.pos,e.nextPos+1),e.token="word"),e.tokens.push([e.token,e.cssPart,e.line,e.pos-e.offset,e.line,e.nextPos-e.offset])),e.pos=e.nextPos}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=tokenizeAtRule;var _globals=require("./globals"),_unclosed=require("./unclosed"),_unclosed2=_interopRequireDefault(_unclosed);module.exports=exports["default"];