forked from publicsuffix/list
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/internal/parser: refactor to separate text processing from pars…
…er main logic (publicsuffix#1999) * tools/internal/parser: add a text processing helper This helper contains no parsing "business logic", it just provides some text processing helpers while keeping track of source locations for future reporting. This commit just adds the text helper, but doesn't use it yet. * tools/internal/parser: rewrite parsing logic using the text processing helper * tools/internal/parser: fix documentation inconsistency for newSource. * tools/internal/parser: make Source use 0-indexed half open intervals This matches the semantics of Go slices, and makes all code that uses Source easier to reason about. Source.LocationString() still prints 1-indexed closed intervals, which is the convention for telling a human where errors are. * tools/internal/parser: merge source and Source into one.
- Loading branch information
Showing
7 changed files
with
725 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.