Ethiraric
e4c4182020
Minor improvements.
...
* Doc comments
* Helper functions
* Line breaks for readability
2024-01-23 00:19:04 +01:00
Ethiraric
f9eb8c6d60
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
Ethiraric
da67c9a763
Expose ScanError::info
.
...
From https://github.com/chyh1990/yaml-rust/pull/190 .
2023-08-17 23:43:15 +02:00
Ethiraric
91ed5dca21
Clippy set to pedantic.
2023-08-14 16:11:33 +02:00
Evan Harvey
d5bfbcb047
Spellcheck ( #143 )
...
* Spellcheck src
* Spellcheck README
2020-06-01 20:59:27 +08:00
Anton Kochkov
95562ac849
Rust 2018 transition
2020-05-27 14:15:28 +08:00
Robin Stocker
a3591b3fef
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
0705722551
Format using rustfmt 1.0
2018-12-13 18:35:01 +11:00
David Tolnay
34da7f5f01
Replace try! with question mark
2018-09-15 23:58:48 -07:00
David Tolnay
31a54ded85
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
05eb495917
Address redundant_field_names lint
2018-09-15 10:06:34 -07:00
David Tolnay
5039af6862
Format with rustfmt 0.99.4
2018-09-15 09:49:08 -07:00
Konrad Borowski
bbb80f1ee7
Prevent too deep recursion
2018-09-15 12:34:21 +02:00
cetra3
a7df76be5f
Include Scanner
2017-11-15 14:11:39 +10:30
cetra3
b2c59b8950
Allow the Marker from ScanError
2017-11-15 12:06:16 +10:30
Martin Hoffmann
0e2b66a42d
Allow access to Marker’s content.
2017-09-02 13:49:53 +02:00
Yuheng Chen
4c7a335bac
Fix #65
2017-05-13 20:48:48 +08:00
Yuheng Chen
562eed85a4
Use push_str() instead of extend()
2016-11-24 18:10:49 +08:00
Hendrik Sollich
20cf5959cf
Fix logic error that caused infinite loop
2016-06-23 00:22:03 +02:00
Hendrik Sollich
cb28e81e69
returning ScanError instead of running unreachable!()
...
fixes #23
2016-06-22 15:54:22 +08:00
Yuheng Chen
59234a4a2a
Fix clippy warnings about not
2016-03-10 20:49:24 +08:00
David Tolnay
6ba6fec475
Resolve remaining clippy lints and add to Travis build
2016-02-27 16:42:32 -08:00
David Tolnay
b3c34c4f29
Remove common suffix from TokenType enum
...
See https://github.com/Manishearth/rust-clippy/wiki#enum_variant_names
2016-02-27 15:29:36 -08:00
Yuheng Chen
dbb5575452
Fix CR/LF in literal scalar
2015-09-15 15:27:32 +08:00
Yuheng Chen
ab579f1716
Display error line and col number for ScanError
2015-07-02 23:46:04 +08:00
Yuheng Chen
a566c7647c
remove trailing space
2015-06-30 00:31:22 +08:00
m-r-r
a52b22a165
Implementation of std::scanner::Error for ScanError
2015-06-18 23:49:28 +02:00
Yuheng Chen
c1b5dd296f
Better code coverage
2015-06-04 16:10:43 +08:00
Yuheng Chen
6af58dea81
Add LICENSE and build status
2015-05-31 00:13:21 +08:00
Yuheng Chen
8e629d4637
Add tag:yaml.org,2002 parsing
2015-05-30 22:39:50 +08:00
Yuheng Chen
6b61f4357d
Add scan_uri_escapes
2015-05-30 18:49:54 +08:00
Yuheng Chen
10b91f6a31
Add scan_tag_directive_value
2015-05-29 02:57:41 +08:00
Yuheng Chen
5d0683c396
Add partial anchor support
2015-05-29 01:56:03 +08:00
Yuheng Chen
5237e538eb
Fix unicode escape
2015-05-28 22:19:06 +08:00
Yuheng Chen
008da5005c
Add VersionDirectiveToken
2015-05-28 22:07:59 +08:00
Yuheng Chen
1b636097c0
Fix test_spec_ex7_3
2015-05-28 17:18:20 +08:00
Yuheng Chen
56e28c630e
Add indentless_sequence_entry
2015-05-27 16:35:31 +08:00
Yuheng Chen
63c0a32918
Refactory YAML document loader
2015-05-27 14:57:44 +08:00
Yuheng Chen
8e43d42621
Add block_scalar
2015-05-27 00:29:40 +08:00
Yuheng Chen
840ccc939f
Add scanner unit tests
2015-05-25 19:32:48 +08:00
Yuheng Chen
78134e144f
Add scan_flow_scalar
2015-05-25 03:21:53 +08:00
Yuheng Chen
f49d6c0099
Add yaml value coerce
2015-05-25 01:34:18 +08:00
Yuheng Chen
0ab86869e7
fix lookahead spelling
2015-05-24 14:38:54 +08:00
Yuheng Chen
760f935a87
Fix warnings
2015-05-24 14:37:36 +08:00
Yuheng Chen
d03dec2197
Initial commit
2015-05-24 14:27:42 +08:00