-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Performance, No Breaking] Refactoring of
scan_line_break
. (#188)
* Refactoring of `scan_line_break`. * Performance improvement of `scan_line_break`. * Rename `scan_line_break` to `yaml_1_1_scan_line_break`. * Add `yaml_1_2_scan_line_break`. * Add better comments. * Add a TODO comment about possible bugs. * Add objects to represent YAML versions. Here we use abstract type & subtyping because it's common traits pattern in Julia. We do not need to export these objects because we can use strings for versions in user-facing functions like: ```julia function load(str::AbstractString; version::YAMLVersion) # ... end function load(str::AbstractString; version::AbstractString) version == "1.1" ? load(str, version=YAMLV1_1()) : version == "1.2" ? load(str, version=YAMLV1_2()) : throw(ErrorException()) end load(str, version="1.1") ``` * Use YAML version traits for `b-char`. * Use better implementation because the document iterator bug has been fixed. * Use YAML version traits for `scan_line_break`.
- Loading branch information
Showing
1 changed file
with
72 additions
and
28 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