Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Standardize errors #112

Merged
merged 5 commits into from
Oct 3, 2018
Merged

Commits on Sep 21, 2018

  1. Configuration menu
    Copy the full SHA
    b7783f5 View commit details
    Browse the repository at this point in the history
  2. Use the standard error names and give gumbo an error API

    All of the standard tokenizer errors are implemented with their given
    error code strings.
    
    Each transition of the tokenizer state machine that emit one or more
    errors is tested to emit exactly those errors and no others. Those
    transitions that do not emit an error are tested to ensure that they do
    not.
    
    The `GumboError` is opaque to callers and the `GumboStringBuffer` is not
    exposed. The error codes of the defined errors as well as the two
    encoding errors and a generic parser error are available via
    `gumbo_error_code`.
    
    In Nokogiri, the error code is exposed via
    `Nokogiri::XML::SyntaxError#str1`.
    stevecheckoway committed Sep 21, 2018
    Configuration menu
    Copy the full SHA
    f82f32f View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2018

  1. Don't use else after return

    Replace
    
    ```
    if (foo) {
      return x();
    } else if (bar) {
      return y();
    } else {
      return z();
    }
    ```
    
    with
    
    ```
    if (foo) {
      return x();
    }
    if (bar) {
      return y();
    }
    return z();
    ```
    stevecheckoway committed Sep 30, 2018
    Configuration menu
    Copy the full SHA
    01002d4 View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2018

  1. Update the parser to match the current standard

    The parser now implements the updated tree-construction stage including
    producing the same number of errors specified in the html5lib-tests
    tree-construction tests (at least it will after the tests are fixed as
    per
    https://github.com/html5lib/html5lib-tests/compare/master...stevecheckoway:all-error-fixes?expand=1).
    stevecheckoway committed Oct 3, 2018
    Configuration menu
    Copy the full SHA
    9acd7fe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    730497f View commit details
    Browse the repository at this point in the history