()
| 846 | } |
| 847 | |
| 848 | function state_attr_end() { |
| 849 | if(!gathered.length && !quote) { |
| 850 | quote = /['"]/.test(c) ? c : null |
| 851 | |
| 852 | if(quote) { |
| 853 | return |
| 854 | } |
| 855 | } |
| 856 | |
| 857 | if(quote) { |
| 858 | if(!escaped && c === quote) { |
| 859 | quote = null |
| 860 | |
| 861 | return |
| 862 | } |
| 863 | |
| 864 | if(c === '\\') { |
| 865 | if(escaped) { |
| 866 | gathered.push(c) |
| 867 | } |
| 868 | |
| 869 | escaped = !escaped |
| 870 | |
| 871 | return |
| 872 | } |
| 873 | |
| 874 | escaped = false |
| 875 | gathered.push(c) |
| 876 | |
| 877 | return |
| 878 | } |
| 879 | |
| 880 | state_gather(true) |
| 881 | |
| 882 | if(state !== READY) { |
| 883 | return |
| 884 | } |
| 885 | |
| 886 | stream.queue({ |
| 887 | type: ATTR |
| 888 | , data: { |
| 889 | lhs: lhs |
| 890 | , rhs: gathered.join('') |
| 891 | , cmp: cmp |
| 892 | } |
| 893 | }) |
| 894 | |
| 895 | state = READY |
| 896 | lhs = rhs = cmp = null |
| 897 | gathered.length = 0 |
| 898 | |
| 899 | return |
| 900 | } |
| 901 | |
| 902 | function state_gather(quietly) { |
| 903 | if(/[^\d\w\-_]/.test(c) && !escaped) { |
no test coverage detected