([type, value], processor)
| 29 | } |
| 30 | |
| 31 | function getTokenType([type, value], processor) { |
| 32 | if (type === 'word') { |
| 33 | if (value[0] === '.') { |
| 34 | return 'class' |
| 35 | } |
| 36 | if (value[0] === '#') { |
| 37 | return 'hash' |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | if (!processor.endOfFile()) { |
| 42 | let next = processor.nextToken() |
| 43 | processor.back(next) |
| 44 | if (next[0] === 'brackets' || next[0] === '(') return 'call' |
| 45 | } |
| 46 | |
| 47 | return type |
| 48 | } |
| 49 | |
| 50 | function terminalHighlight(css) { |
| 51 | let processor = tokenizer(new Input(css), { ignoreErrors: true }) |
no outgoing calls
no test coverage detected
searching dependent graphs…