(text: string, start: number)
| 548 | |
| 549 | const slashRegEx = /\s*(\/)\s*/gy; |
| 550 | function parseSlash(text: string, start: number): Parsed<'/'> { |
| 551 | slashRegEx.lastIndex = start; |
| 552 | const slash = slashRegEx.exec(text); |
| 553 | if (!slash) { |
| 554 | return null; |
| 555 | } |
| 556 | const end = slashRegEx.lastIndex; |
| 557 | |
| 558 | return { start, end, value: '/' }; |
| 559 | } |
| 560 | |
| 561 | export function parseBackground(text: string, start = 0): Parsed<Background> { |
| 562 | const value: any = {}; |