Changeset 250


Ignore:
Timestamp:
04/17/07 13:39:54 (7 years ago)
Author:
xi
Message:

Fixed a problem when the DOCUMENT-END event is not emitted until the beginning of the next document is available. Fixed #51. Thanks edward(at)sweetbytes.net for the bug report.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libyaml/trunk/src/parser.c

    r243 r250  
    353353    if (!token) return 0; 
    354354 
     355    /* Parse extra document end indicators. */ 
     356 
     357    if (!implicit) 
     358    { 
     359        while (token->type == YAML_DOCUMENT_END_TOKEN) { 
     360            SKIP_TOKEN(parser); 
     361            token = PEEK_TOKEN(parser); 
     362            if (!token) return 0; 
     363        } 
     364    } 
     365 
    355366    /* Parse an implicit document. */ 
    356367 
     
    468479    start_mark = end_mark = token->start_mark; 
    469480 
    470     while (token->type == YAML_DOCUMENT_END_TOKEN) { 
     481    if (token->type == YAML_DOCUMENT_END_TOKEN) { 
    471482        end_mark = token->end_mark; 
    472483        SKIP_TOKEN(parser); 
    473         token = PEEK_TOKEN(parser); 
    474         if (!token) return 0; 
    475484        implicit = 0; 
    476485    } 
Note: See TracChangeset for help on using the changeset viewer.