Ethiraric
76b3773ffd
Fix indent in block scalars.
2024-01-23 00:19:04 +01:00
Ethiraric
9f4b1480df
Fix dquote indentation.
2024-01-23 00:19:04 +01:00
Ethiraric
2e94a4217b
Fix dquote string escape sequences.
2024-01-23 00:19:04 +01:00
Ethiraric
7145ee8282
Fix tests related to anchor/alias indentation.
...
I have no idea what I'm doing.
2024-01-23 00:19:04 +01:00
Ethiraric
9281e35bbb
Fix flow adjacent value with complex key.
2024-01-23 00:19:04 +01:00
Ethiraric
7c3e8ed7c4
Lint and improve formatting.
2024-01-23 00:19:04 +01:00
Ethiraric
5dbd6f9a55
Fix use of dashes in flow contexts.
2024-01-23 00:19:04 +01:00
Ethiraric
628549085c
Fix block scalar / eof interactions.
2024-01-23 00:19:04 +01:00
Ethiraric
c0caeb84e9
Fix block scalars and document end interaction.
2024-01-23 00:19:04 +01:00
Ethiraric
ff28b55d22
Fix duplicate version directive.
2024-01-23 00:19:04 +01:00
Ethiraric
7b744d092e
Fixes towards implicit document end.
2024-01-23 00:19:04 +01:00
Ethiraric
f27a7c25a8
Fixes towards spaces before comments.
2024-01-23 00:19:04 +01:00
Ethiraric
0b58be1458
Fix possible misindent in block scalar.
2024-01-23 00:19:04 +01:00
Ethiraric
0a1aebaf3c
Fix towards multiple documents in a single stream.
2024-01-23 00:19:04 +01:00
Ethiraric
1606523193
Fix towards invalid trailing characters.
2024-01-23 00:19:04 +01:00
Ethiraric
4118cfab7c
Split fetch_flow_scalar
.
2024-01-23 00:19:04 +01:00
Ethiraric
f0ae6473aa
Fix towards flow mapping and colons.
2024-01-23 00:19:04 +01:00
Ethiraric
4c1376a2b0
Finally grasped how SimpleKey
works.
...
This is a huge commit that cannot easily be broken down as it contains
fixes for the next ignored test in the suite which, one fixed, broke
tests that used to pass and were only then fixed.
There is also a substantial amount of comments that were added,
especially around `SimpleKey`. Minor improvements around the code were
added and I did not bother making a separate commit for them.
Overall, that commit fixes 7 tests from the matrix that were related to
the handling of simple keys.
2024-01-23 00:19:04 +01:00
Ethiraric
79046225e7
Minor improvement to debug prints.
2024-01-23 00:19:04 +01:00
Ethiraric
e9bcc8a28b
Fix anchor names' character set.
2024-01-23 00:19:04 +01:00
Ethiraric
6308bbe98f
Fix empty documents tests.
2024-01-23 00:19:04 +01:00
Ethiraric
e7f29450ca
Fix empty keys in implicit mappings.
2024-01-23 00:19:04 +01:00
Ethiraric
7006620027
Add comments to TokenType
and Scanner
.
2024-01-23 00:19:04 +01:00
Ethiraric
be6a05916f
Add debugging helpers.
2024-01-23 00:19:04 +01:00
Ethiraric
2e5605ddc2
More fixes towards invalid tabs.
2024-01-23 00:19:04 +01:00
Ethiraric
6e8af26435
More fixes towards invalid tabs?
2024-01-23 00:19:04 +01:00
Ethiraric
06b03f5cf5
More fixes towards invalid tabs.
2024-01-23 00:19:04 +01:00
Ethiraric
5437f5d9cb
More fixes towards invalid tabs.
2024-01-23 00:19:04 +01:00
Ethiraric
49bfa590a6
More fixes towards invalid tabs.
2024-01-23 00:19:04 +01:00
Ethiraric
125c0a411a
Fix towards invalid tabs.
2024-01-23 00:19:04 +01:00
Ethiraric
458d22ef80
Fix indent when -
& entry have \n
in-between.
2024-01-23 00:19:04 +01:00
Ethiraric
a80091795b
More fixes towards invalid tabs.
2024-01-23 00:19:04 +01:00
Ethiraric
88833f8a06
Fix DK95-00, I guess.
2024-01-23 00:19:04 +01:00
Ethiraric
e683932e7a
Rework block scalar indent skipping.
2024-01-23 00:19:04 +01:00
Ethiraric
abac504295
Minor improvements.
2024-01-23 00:19:04 +01:00
Ethiraric
29b513bea3
More fixes towards tabulations.
2024-01-23 00:19:04 +01:00
Ethiraric
e1ae3bd5b2
Fix more inappropriate use of tabs.
2024-01-23 00:19:04 +01:00
Ethiraric
d9287638b9
Use type aliases where appropriate.
2024-01-23 00:19:04 +01:00
Ethiraric
1590018312
Doccomment is_
series of functions.
2024-01-23 00:19:04 +01:00
Ethiraric
c670b32461
Fix tab used as indentation checks.
2024-01-23 00:19:04 +01:00
Ethiraric
06a6fb34c1
Handle "!!" tag overriding.
2024-01-23 00:19:04 +01:00
Ethiraric
ffed282a9f
Remove stale tag handling code.
2024-01-23 00:19:04 +01:00
Ethiraric
92e20e6eb4
Don't inherit tag directives between documents.
2024-01-23 00:19:04 +01:00
Ethiraric
5f6dc2246f
Reslove tag directives.
2024-01-23 00:19:04 +01:00
Ethiraric
8da6ddef10
Remove _
prefix to used method.
2024-01-23 00:19:04 +01:00
Ethiraric
3f10cf9e5d
Propagate tag to SequenceStart event.
2024-01-23 00:19:04 +01:00
Ethiraric
e6fdcddceb
Propagate tag to MappingStart event.
2024-01-23 00:19:04 +01:00
Ethiraric
3ffb231e40
Minor improvements.
...
* Doc comments
* Helper functions
* Line breaks for readability
2024-01-23 00:19:04 +01:00
Ethiraric
81f9a376fb
Rustfmt + clippy.
2024-01-23 00:19:04 +01:00
Ethiraric
8c4ea2c838
Move emitter/scanner tests to their folder.
...
Change scanner's complex test:
```diff
- *coffee:
+ *coffee :
amount: 4
- *cookies:
+ *cookies :
amount: 4
```
According to https://play.yaml.io/main/parser , this example was invalid
in the first place. Adding a space makes it so that the colon is not
part of the alias name.
Also fix colons not being able to be part of anchors.
2024-01-23 00:19:04 +01:00
Denis Lisov
fb8ef31546
yaml-test-suite: print the YAML text on failure
2024-01-23 00:19:04 +01:00
Denis Lisov
c7e371a24c
yaml-test-suite: update to YTS v2022-01-17
2024-01-23 00:19:04 +01:00
Denis Lisov
9fd57469a4
yaml-test-suite: print the names of missing XFAILs
2024-01-23 00:19:04 +01:00
Denis Lisov
080d7d5275
yaml-test-suite: ensure all XFAILs do exist as tests
2024-01-23 00:19:04 +01:00
Denis Lisov
4ba34544ad
yaml-test-suite: add ignores and classify failures
2024-01-23 00:19:04 +01:00
Denis Lisov
a8cf1bb642
yaml-test-suite: move to libtest-mimic
2024-01-23 00:19:04 +01:00
Denis Lisov
9001d564b6
testing: add an integration test for yaml-test-suite
...
The official YAML test suite (https://github.com/yaml/yaml-test-suite ).
Requires the submodule to be checked out.
2024-01-23 00:19:04 +01:00
Ethiraric
ff2d5fc5b6
Expose ScanError::info
.
...
From https://github.com/chyh1990/yaml-rust/pull/190 .
2023-08-17 23:43:15 +02:00
Ethiraric
0a11923625
Fix more clippy lints.
2023-08-17 23:31:32 +02:00
Ethiraric
df4d520878
Add a dump_events example to aid debugging.
2023-08-17 23:16:09 +02:00
Ethiraric
d77db591bc
Add a release-lto cargo profile.
2023-08-17 23:16:09 +02:00
Ethiraric
0c4a395829
Add documentation and move tests to their folder.
2023-08-17 23:16:06 +02:00
Ethiraric
fd37ebd6e5
Clippy set to pedantic.
2023-08-14 16:11:33 +02:00
Alexander Kjäll
b6e65fb359
library is now in the crates repo ( #164 )
2021-07-12 15:48:17 +08:00
Yuheng Chen
bb249d9b36
Bump to v0.4.5
2021-01-03 11:57:28 -08:00
Dylan DPC
2f8b14aaaa
Update Cargo.toml ( #162 )
2020-07-10 13:44:57 +08:00
Yuheng Chen
a833b49831
Bump to v0.4.4
2020-06-01 21:02:16 +08:00
Evan Harvey
35619eaa5c
Spellcheck ( #143 )
...
* Spellcheck src
* Spellcheck README
2020-06-01 20:59:27 +08:00
Yuheng Chen
e35bbd7c5a
fix CI for clippy 0.9
2020-06-01 20:34:13 +08:00
Chen Yuheng
b28f7deeb7
Raise minimum rustc support to 1.31
2020-06-01 20:18:27 +08:00
Chen Yuheng
fcde455b8d
Update .travis.yml
2020-06-01 20:15:32 +08:00
Chen Yuheng
8bdc9ae8e4
Merge pull request #158 from XVilka/rust2018
...
Rust 2018 transition.
2020-06-01 20:05:39 +08:00
Anton Kochkov
89d53b9498
Fix build
2020-05-27 14:36:22 +08:00
Anton Kochkov
4c86941869
Update AppVeyor
2020-05-27 14:29:54 +08:00
Anton Kochkov
3cfe953325
Update quickcheck to 0.9
2020-05-27 14:25:59 +08:00
Anton Kochkov
92d775a448
Remove deprecated API
2020-05-27 14:19:22 +08:00
Anton Kochkov
5170d0374d
Rust 2018 transition
2020-05-27 14:15:28 +08:00
Hendrik Sollich
32214e92bf
Raise minimum rustc version to 1.28 (Fixes CI)
...
Known minimum version to build [regex](https://crates.io/crates/regex ).
Old enough as it is, we're not c++ here!
2019-07-24 18:37:03 +02:00
Hendrik Sollich
de742fbcd6
Fix emitting hexlike strings without quotes
...
The emitter omitted quotes for strings that start with `0x` those would
subsequently be parsed as strings again. This should fix #133 .
2019-07-24 16:40:02 +02:00
Yuheng Chen
508ed37d05
Bump to v0.4.3
2019-03-07 14:27:03 +08:00
Robin Stocker
3ae23d47de
Fix handling of indicators in plain scalars to conform to YAML 1.2
...
YAML 1.2 has special handling of indicators to be compatible with JSON.
The following is equivalent to `{"a": "b"}` (note, no space after `:`):
{"a":b}
But without the quoted key, a space is required. So the `:` here is part
of the plain scalar:
{a:b} # == {"a:b"}
A plain scalar can also start with a `:` as long as it's followed by
"safe" characters:
{a: :b} # == {"a": ":b"}
(Fixes #118 )
2019-03-04 11:45:39 +11:00
Tibo Delor
f6cbf1bbd3
Bump minimum version for test to 1.24.1
...
quickcheckv0.7.2 comes with lazy_static v1.2.0 which only support Rust 1.24.1.
See https://github.com/rust-lang-nursery/lazy-static.rs/releases/tag/1.2.0
2018-12-13 19:03:31 +11:00
Tibo Delor
3f8a60627f
Format using rustfmt 1.0
2018-12-13 18:35:01 +11:00
David Tolnay
9fc1b3f22d
Address write_with_newline lint
2018-09-16 00:00:48 -07:00
David Tolnay
20190538af
Replace try! with question mark
2018-09-15 23:58:48 -07:00
David Tolnay
e73d5d0256
Release 0.4.2
2018-09-15 13:09:48 -07:00
David Tolnay
dc1ed3d396
Lowercase the recursion limit error message
...
To be consistent with the other errors in this crate.
2018-09-15 13:09:11 -07:00
David Tolnay
fd169229b0
Release 0.4.1
2018-09-15 12:31:11 -07:00
David Tolnay
5443ce4368
Set html_root_url
2018-09-15 12:30:27 -07:00
David Tolnay
ddad3c762c
Stop recommending a git dependency
2018-09-15 12:29:20 -07:00
David Tolnay
e7b5041443
Remove outdated note about version support
2018-09-15 12:29:02 -07:00
David Tolnay
9fe981bc69
Reorganize readme links
2018-09-15 12:28:45 -07:00
David Tolnay
cd4ad69696
Fix docs.rs link
2018-09-15 12:25:55 -07:00
David Tolnay
f5afa33150
Render readme on crates.io
2018-09-15 12:25:15 -07:00
David Tolnay
b30f9a0a30
Remove commented key in Cargo.toml
2018-09-15 12:24:47 -07:00
David Tolnay
ec00203abb
Merge pull request #112 from xfix/add-testing-input-output-identity-in-quickcheck
...
Add testing whether load(dump(x)) is an identity in quickcheck
2018-09-15 12:23:08 -07:00
David Tolnay
cedb185876
Escape string containing colon
...
I don't know whether this is always necessary but it is required for
correctly serializing `["x: %"]`. If we serialize this without quotes to
`[x: %]` then the result is not valid YAML.
2018-09-15 12:20:14 -07:00
David Tolnay
51566fafce
Tag clippy build in travis build list
2018-09-15 10:12:16 -07:00
David Tolnay
261942922f
Require clippy to pass when it can be installed
2018-09-15 10:11:00 -07:00
David Tolnay
ef9b526d59
Ignore should_implement_trait lint
...
The Parser::next method is already a public API.
2018-09-15 10:07:05 -07:00
Konrad Borowski
3250426de7
Add testing whether load(dump(x)) is an identity in quickcheck
2018-09-15 19:06:39 +02:00
David Tolnay
1f0d33259b
Address redundant_field_names lint
2018-09-15 10:06:34 -07:00
David Tolnay
760f4f86d0
Don't yet use tool attrs because they are not stable
2018-09-15 10:02:56 -07:00
David Tolnay
f26a44bcdc
Format with rustfmt 0.99.4
2018-09-15 09:49:08 -07:00
David Tolnay
5929fdbd90
Hide verbose output in travis
2018-09-15 09:38:22 -07:00
David Tolnay
decf69540d
Add a dedicated clippy builder
2018-09-15 09:31:41 -07:00
David Tolnay
389ffe24a1
Add a travis build on rust stable
2018-09-15 09:29:35 -07:00
David Tolnay
e359ad16de
Add a build-only build on rustc 1.13.0
2018-09-15 09:28:56 -07:00
David Tolnay
5ae7c6d119
Remove travis secure token
...
Since we are no longer publishing docs from Travis.
2018-09-15 09:28:07 -07:00
David Tolnay
5911cb864e
Switch to matrix style CI target list
...
To allow specifying a different script for each.
2018-09-15 09:27:29 -07:00
David Tolnay
ce1831ec39
Raise the tested rustc version to 1.22.1
2018-09-15 09:24:52 -07:00
David Tolnay
1078665c32
Merge branch 'master' into prevent-too-deep-recursion
2018-09-15 09:16:25 -07:00
David Tolnay
3e1e42f720
Merge pull request #108 from ignatenkobrain/patch-4
...
Update quickcheck to 0.7
2018-09-15 09:10:58 -07:00
David Tolnay
b09c5518da
Merge pull request #104 from hoodie/feature/test-indentation-behaviour
...
Add tests to show expected indentation interpretation
2018-09-15 09:09:05 -07:00
Konrad Borowski
b17fbe703c
Prevent too deep recursion
2018-09-15 12:34:21 +02:00
Chen Yuheng
d3dadda704
Update .travis.yml
...
update ci to rust 1.19 for regex.
2018-09-04 16:16:37 +08:00
Chen Yuheng
5990b5c427
Merge pull request #99 from hdevalke/master
...
Do not quote hyphenated strings unnecessarily.
2018-09-04 16:11:11 +08:00
Igor Gnatenko
1577b9c224
Update quickcheck to 0.7
2018-09-02 18:13:50 +02:00
Chen Yuheng
6cc0504038
README: remove warning
...
Fix #106
This library is production-ready.
2018-08-30 19:23:41 +08:00
Hendrik Sollich
2249926d86
Add tests to show expected indentation interpretation
2018-06-22 21:17:16 +02:00
Hannes De Valkeneer
8237744091
update minimum version to 1.18.0 because of env_logger
2018-04-20 21:40:14 +02:00
Hannes De Valkeneer
2ad74a791b
Do not quote hyphenated strings unnecessarily.
...
fixes #54
2018-04-20 21:01:45 +02:00
Chen Yuheng
eedfa62ffb
Merge pull request #96 from chyh1990/fix_boolean_quotes
...
fix boolean escape and quotes
2018-01-15 21:14:09 +08:00
Chen Yuheng
410e43f07d
Update README.md
2018-01-06 15:28:14 +08:00
Chen Yuheng
aaf50d6c51
Update document link
...
Fix #94
2018-01-06 15:27:42 +08:00
Yuheng Chen
6761ff9b48
fix boolean quotes
...
Fix #92
2018-01-03 21:44:54 +08:00
Chen Yuheng
c80b302478
Merge pull request #95 from ignatenkobrain/patch-3
...
bump quickcheck to 0.6
2018-01-02 14:58:05 +08:00
Yuheng Chen
e14465c6a2
Fix warning
2018-01-02 14:57:27 +08:00
Chen Yuheng
6df45317d3
Update .travis.yml
2018-01-02 14:49:37 +08:00
Igor Gnatenko
907692cc3e
bump quickcheck to 0.6
2018-01-01 12:33:30 +01:00
Yuheng Chen
f15fe186f8
Bump to 0.4.0
...
This version contains breaking API changes in low level event-based API:
- The EventReceiver gets ownership of events
2017-11-22 15:53:12 +08:00
Yuheng Chen
d370a2192b
Bump to 0.3.9
2017-11-22 11:02:17 +08:00
Chen Yuheng
bf0ec957d2
Merge pull request #89 from marcaddeo/master
...
Add a cause() method to EmitError
2017-11-22 10:48:52 +08:00
cetra3
652e42d1c4
Include Scanner
2017-11-15 14:11:39 +10:30
cetra3
201c16217a
Allow the Marker from ScanError
2017-11-15 12:06:16 +10:30
Marc Addeo
bccfe35587
Add a cause() method to EmitError
...
For compatibility with error_chain
2017-11-12 12:02:34 -05:00
Chen Yuheng
5923972e42
Merge pull request #80 from chris-m-h/pull-parser
...
Make pull parser accessible
2017-11-02 12:16:58 +08:00
Martin Hoffmann
b9b79a5cf8
Allow access to Marker’s content.
2017-09-02 13:49:53 +02:00
Yuheng Chen
94510e7e68
Bump to 0.3.8
2017-08-21 13:58:49 +08:00
Pedro Côrte-Real
14fd2e2e2e
Upgrade to latest linked-hash-map
2017-08-18 21:42:02 +01:00
Christian Hofer
7471f27194
Replace ? by try!
2017-07-16 18:00:50 +02:00
Christian Hofer
b2f0df8e00
Extract pull parser.
2017-07-15 18:49:27 +02:00
David Tolnay
92809b3f8a
Merge pull request #78 from chris-m-h/do-not-clone-on-peek
...
Parser: Do not clone on peeking
2017-07-11 07:04:59 -07:00
Chen Yuheng
7585851369
Merge pull request #79 from tshepang/patch-1
...
readme: nit-picking
2017-07-11 10:55:10 +08:00
Charlie Ozinga
078e1e882d
Version bump
2017-07-10 10:08:20 -06:00
Charlie Ozinga
dc2e0a75c6
Merge branch 'master' of https://github.com/chyh1990/yaml-rust into chyh1990
2017-07-10 10:05:43 -06:00
Tshepang Lekhonkhobe
9687ac3cc3
readme: nit-picking
2017-06-26 12:32:52 +02:00
Christian Hofer
2bc73c90a3
Fix version incompatibilities
...
Also: Fix clippy errors
2017-06-22 09:54:13 +02:00
Christian Hofer
75d1b53914
Parser: Do not clone on peeking
...
This eliminates calls to clone() and to_owned() in the parser
- Peeking now returns reference only
- To obtain value, fetch_token needs to be called
- The parser was adapted accordingly
- Also: Pass anchor name by value to register_anchor
2017-06-21 10:20:16 +02:00
Christian Hofer
505b1d6ec1
Always pass events by value
...
- The EventReceiver gets ownership of events
- Breaks compatilibility with previous interface
2017-06-19 15:41:26 +02:00