| 760 | } |
| 761 | |
| 762 | function state_pseudostart() { |
| 763 | if(gathered.length === 0 && !quote) { |
| 764 | quote = /['"]/.test(c) ? c : null |
| 765 | |
| 766 | if(quote) { |
| 767 | return |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | if(quote) { |
| 772 | if(!escaped && c === quote) { |
| 773 | quote = null |
| 774 | |
| 775 | return |
| 776 | } |
| 777 | |
| 778 | if(c === '\\') { |
| 779 | escaped ? gathered.push(c) : (escaped = true) |
| 780 | |
| 781 | return |
| 782 | } |
| 783 | |
| 784 | escaped = false |
| 785 | gathered.push(c) |
| 786 | |
| 787 | return |
| 788 | } |
| 789 | |
| 790 | gathered.push(c) |
| 791 | |
| 792 | if(c === '(') { |
| 793 | ++depth |
| 794 | } else if(c === ')') { |
| 795 | --depth |
| 796 | } |
| 797 | |
| 798 | if(!depth) { |
| 799 | gathered.pop() |
| 800 | stream.queue({ |
| 801 | type: rhs |
| 802 | , data: lhs + '(' + gathered.join('') + ')' |
| 803 | }) |
| 804 | |
| 805 | state = READY |
| 806 | lhs = rhs = cmp = null |
| 807 | gathered.length = 0 |
| 808 | } |
| 809 | |
| 810 | return |
| 811 | } |
| 812 | |
| 813 | function state_attr_start() { |
| 814 | state_gather(true) |