lib/kissy/5.0.0-alpha.3/build/html-parser-debug.js
function (start, quoteSmart) {
            var done = 0, ch, page = this.page, cursor = this.cursor, quote = 0;
            while (!done) {
                ch = page.getChar(cursor);
                if (NEGATIVE_1 === ch) {
                    done = 1;
                } else if (quoteSmart && 0 === quote && ('"' === ch || '\'' === ch)) {
                    quote = ch;    // enter quoted state
                } else // enter quoted state
                if (quoteSmart && 0 !== quote && '\\' === ch) {
                    // handle escaped closing quote
                    ch = page.getChar(cursor);    // try to consume escape
                    // try to consume escape
                    if (NEGATIVE_1 !== ch && '\\' !== ch && // escaped backslash
                        ch !== quote)
                        // escaped quote character
                        {
                            // ( reflects ['] or [']  whichever opened the quotation)
                            page.ungetChar(cursor);    // unconsume char if char not an escape
                        }
                } else // unconsume char if char not an escape
                if (quoteSmart && ch === quote) {
                    quote = 0;    // exit quoted state
                } else // exit quoted state
                if (quoteSmart && 0 === quote && ch === '/') {
                    // handle multiline and double slash comments (with a quote)
                    // in script like:
                    // I can't handle single quotations.
                    ch = page.getChar(cursor);
                    if (NEGATIVE_1 === ch) {
                        done = 1;
                    } else if ('/' === ch) {
                        do {
                            ch = page.getChar(cursor);
                        } while (NEGATIVE_1 !== ch && '\n' !== ch);
                    } else if ('*' === ch) {
                        do {
                            do {
                                ch = page.getChar(cursor);
                            } while (NEGATIVE_1 !== ch && '*' !== ch);
                            ch = page.getChar(cursor);
                            if (ch === '*') {
                                page.ungetChar(cursor);
                            }
                        } while (NEGATIVE_1 !== ch && '/' !== ch);
                    } else {
                        page.ungetChar(cursor);
                    }
                } else if (0 === quote && '<' === ch) {
                    ch = page.getChar(cursor);
                    if (NEGATIVE_1 === ch) {
                        done = 1;
                    } else if ('/' === ch || Utils.isLetter(ch) || '!' === ch || // <?xml:namespace
                        '?' === ch) {
                        done = 1;
                        page.ungetChar(cursor);
                        page.ungetChar(cursor);
                    } else {
                        // it's not a tag, so keep going, but check for quotes
                        page.ungetChar(cursor);
                    }
                }
            }
            return this.makeString(start, cursor.position);
        }
function (start, quoteSmart) {
            var done = 0, ch, page = this.page, cursor = this.cursor, quote = 0;
            while (!done) {
                ch = page.getChar(cursor);
                if (NEGATIVE_1 === ch) {
                    done = 1;
                } else if (quoteSmart && 0 === quote && ('"' === ch || '\'' === ch)) {
                    quote = ch;    // enter quoted state
                } else // enter quoted state
                if (quoteSmart && 0 !== quote && '\\' === ch) {
                    // handle escaped closing quote
                    ch = page.getChar(cursor);    // try to consume escape
                    // try to consume escape
                    if (NEGATIVE_1 !== ch && '\\' !== ch && // escaped backslash
                        ch !== quote)
                        // escaped quote character
                        {
                            // ( reflects ['] or [']  whichever opened the quotation)
                            page.ungetChar(cursor);    // unconsume char if char not an escape
                        }
                } else // unconsume char if char not an escape
                if (quoteSmart && ch === quote) {
                    quote = 0;    // exit quoted state
                } else // exit quoted state
                if (quoteSmart && 0 === quote && ch === '/') {
                    // handle multiline and double slash comments (with a quote)
                    // in script like:
                    // I can't handle single quotations.
                    ch = page.getChar(cursor);
                    if (NEGATIVE_1 === ch) {
                        done = 1;
                    } else if ('/' === ch) {
                        do {
                            ch = page.getChar(cursor);
                        } while (NEGATIVE_1 !== ch && '\n' !== ch);
                    } else if ('*' === ch) {
                        do {
                            do {
                                ch = page.getChar(cursor);
                            } while (NEGATIVE_1 !== ch && '*' !== ch);
                            ch = page.getChar(cursor);
                            if (ch === '*') {
                                page.ungetChar(cursor);
                            }
                        } while (NEGATIVE_1 !== ch && '/' !== ch);
                    } else {
                        page.ungetChar(cursor);
                    }
                } else if (0 === quote && '<' === ch) {
                    ch = page.getChar(cursor);
                    if (NEGATIVE_1 === ch) {
                        done = 1;
                    } else if ('/' === ch || Utils.isLetter(ch) || '!' === ch || // <?xml:namespace
                        '?' === ch) {
                        done = 1;
                        page.ungetChar(cursor);
                        page.ungetChar(cursor);
                    } else {
                        // it's not a tag, so keep going, but check for quotes
                        page.ungetChar(cursor);
                    }
                }
            }
            return this.makeString(start, cursor.position);
        }
function ( start , quoteSmart ) { var done = 0 , ch , page = this . page , cursor = this . cursor , quote = 0 ; while ( ! done ) { ch = page . getChar ( cursor ) ; if ( NEGATIVE_1 === ch ) { done = 1 ; } else if ( quoteSmart && 0 === quote && ( '"' === ch || '\'' === ch ) ) { quote = ch ; // enter quoted state } else // enter quoted state if ( quoteSmart && 0 !== quote && '\\' === ch ) { // handle escaped closing quote ch = page . getChar ( cursor ) ; // try to consume escape // try to consume escape if ( NEGATIVE_1 !== ch && '\\' !== ch && // escaped backslash ch !== quote ) // escaped quote character { // ( reflects ['] or [']  whichever opened the quotation) page . ungetChar ( cursor ) ; // unconsume char if char not an escape } } else // unconsume char if char not an escape if ( quoteSmart && ch === quote ) { quote = 0 ; // exit quoted state } else // exit quoted state if ( quoteSmart && 0 === quote && ch === '/' ) { // handle multiline and double slash comments (with a quote) // in script like: // I can't handle single quotations. ch = page . getChar ( cursor ) ; if ( NEGATIVE_1 === ch ) { done = 1 ; } else if ( '/' === ch ) { do { ch = page . getChar ( cursor ) ; } while ( NEGATIVE_1 !== ch && '\n' !== ch ) ; } else if ( '*' === ch ) { do { do { ch = page . getChar ( cursor ) ; } while ( NEGATIVE_1 !== ch && '*' !== ch ) ; ch = page . getChar ( cursor ) ; if ( ch === '*' ) { page . ungetChar ( cursor ) ; } } while ( NEGATIVE_1 !== ch && '/' !== ch ) ; } else { page . ungetChar ( cursor ) ; } } else if ( 0 === quote && '<' === ch ) { ch = page . getChar ( cursor ) ; if ( NEGATIVE_1 === ch ) { done = 1 ; } else if ( '/' === ch || Utils . isLetter ( ch ) || '!' === ch || // <?xml:namespace '?' === ch ) { done = 1 ; page . ungetChar ( cursor ) ; page . ungetChar ( cursor ) ; } else { // it's not a tag, so keep going, but check for quotes page . ungetChar ( cursor ) ; } } } return this . makeString ( start , cursor . position ) ; }
parse a string node
@private
@param start
@param quoteSmart strings ignore quoted contents
parse a string node