Commit graph

63 commits

Author SHA1 Message Date
Masaaki Goshima
8b2110bca9
fix invalid token error (#536) 2024-11-15 00:22:47 +09:00
Masaaki Goshima
2c6a0e723d
fix comment position of map node has multiple values (#532) 2024-11-13 19:45:38 +09:00
Masaaki Goshima
9c6665c9b4
support to disallow duplicate map key at parsing (#531) 2024-11-13 18:29:20 +09:00
Masaaki Goshima
cb4e1b0610
Support local tag and boolean tag (#527)
* support local tag and boolean tag

* add test case
2024-11-13 00:40:31 +09:00
Masaaki Goshima
a2d04d6cf5
fix parsing of tag (#526) 2024-11-12 22:08:26 +09:00
Masaaki Goshima
3fa49bfdb5
fix validation of map at flow mode (#523) 2024-11-12 10:39:52 +09:00
Masaaki Goshima
7e833a2d40
fix parsing of invalid map key (#520) 2024-11-11 21:37:43 +09:00
Masaaki Goshima
6b0c68e62a
Fix parsing of document and string (#513)
* fix invalid test case
* fix parsing of document
* fix validation
2024-11-09 13:00:12 +09:00
Masaaki Goshima
97070fb2f1
fix parsing of flow mapping (#505) 2024-11-05 13:28:23 +09:00
Masaaki Goshima
2e63415e81
fix invalid map token (#504) 2024-11-03 21:32:51 +09:00
Masaaki Goshima
ab16112f69
support empty sequence value (#503) 2024-11-03 14:06:57 +09:00
Masaaki Goshima
9fabf36dfa
Fix parsing of invalid yaml (#496)
* fix invalid test cases ( use space indent )

* fix parsing of invalid yaml
2024-11-01 15:03:27 +09:00
Masaaki Goshima
ad223ff817
improve parser performance (#494) 2024-10-31 18:26:08 +09:00
Masaaki Goshima
3788afc6f6
fix invalid sequence at map context (#493) 2024-10-31 16:05:37 +09:00
Masaaki Goshima
bbcd692a27
fix handling of invalid sequence (#492) 2024-10-31 15:35:43 +09:00
Masaaki Goshima
af5147b14c
fix implicit null value before collect entry (#490) 2024-10-30 19:48:44 +09:00
Masaaki Goshima
87ddfd1938
returns InvalidToken if scanner encounters error (#486) 2024-10-29 20:00:48 +09:00
Masaaki Goshima
548bbc7d4e
Remove xerrors (#483)
* remove xerrors

* move error variable

* update dependencies
2024-10-28 21:24:15 +09:00
Shuhei Kitagawa
8ad318cffc
Add lint job to CI (#477) 2024-10-28 11:31:15 +09:00
Chongyi Zheng
4653a1bb5c
Replace deprecated io/ioutil (#429) 2024-02-26 15:11:21 +09:00
Masaaki Goshima
957e9d7f32
Fix sequence with comment (#390) 2023-09-15 12:11:17 +09:00
Masaaki Goshima
264dc0f761
Fix comment parsing with null value (#388) 2023-09-14 12:25:21 +09:00
Masaaki Goshima
15640065c7
Fix comment option (#349) 2023-03-01 16:59:07 +09:00
itchyny
f7e91246a5 Introduce MapKeyNode interface to limit node types for map key 2022-08-18 16:16:40 +09:00
Taylor Thornton
0bb11a74cc
Handle empty sequence entries
- adds a nil check for tk, and returns a syntax error if nil is found
- adds a test verifying fix

Signed-off-by: Taylor Thornton <thornton.tn@gmail.com>
2021-12-07 17:06:18 -08:00
Masaaki Goshima
f62c2f2941
Fix parser for path 2021-09-07 19:27:40 +09:00
Masaaki Goshima
afed407e01
Support getting YAMLPath from ast.Node 2021-09-07 17:31:17 +09:00
Masaaki Goshima
fe709cd48c Fix parsing of literal with comment 2021-07-19 18:48:09 +09:00
Masaaki Goshima
30e4ba7210 Support encoding of comment node 2021-07-16 21:49:17 +09:00
Matthew Steffen
f6baeac88c Add error for unterminated flow mapping node 2021-03-04 12:06:00 -08:00
Masaaki Goshima
230b8518fd Fix syntax error about map value 2021-03-01 17:58:17 +09:00
Iskander Sharipov
38315098bd parser: fix parser panic for the invalid directive
`%YAML 1.1 {}` input makes the parser panic.

This change attempts to fix that by checking
for the token not to be nil. We use previous
token to specify the approx syntax error location.

Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2020-09-09 20:31:42 +03:00
Masaaki Goshima
23d3128925 Support io.Reader interface on ast.Node 2020-07-15 22:16:27 +09:00
Masaaki Goshima
4d2c5f0532 Fix parsing for mapping key or tag token 2020-07-02 17:25:31 +09:00
Masaaki Goshima
07b13f2a68 Fix processing of CRLF at parser ( removeLeftSideNewLineCharacter ) 2020-06-09 10:56:25 +09:00
Masaaki Goshima
5132bb68f3 Fix processing when specified empty token as map value 2020-06-03 17:52:23 +09:00
Masaaki Goshima
95f027399a Fix processing when specified empty token as map value 2020-06-03 17:12:33 +09:00
Masaaki Goshima
2b25063dba Fix handling for same line comment 2020-05-29 16:05:43 +09:00
Masaaki Goshima
fd608f3b07 Refactor parser 2020-05-29 15:32:25 +09:00
Masaaki Goshima
bff65e2e7b Support parsing with comment 2020-05-29 11:49:32 +09:00
Masaaki Goshima
b3d4080492 Support parsing with comment 2020-05-28 21:39:06 +09:00
k1LoW
81313a9432 Support "c-directives-end marker only" document. 2020-03-07 14:59:56 +09:00
Masaaki Goshima
0459fbb51e Fix scanner and parser for CR character 2019-12-22 11:59:49 +09:00
Masaaki Goshima
4dc8ed6703 Fix design of parser API 2019-11-05 17:02:55 +09:00
Masaaki Goshima
4780e46e37 Integrate FlowSequenceNode into SequenceNode 2019-10-31 13:06:35 +09:00
Masaaki Goshima
81ac425557 Add constructor for MappingNode 2019-10-31 12:47:23 +09:00
Masaaki Goshima
e0346b2e61 Fix type of Values field of MappingNode to MappingValueNode 2019-10-31 12:38:44 +09:00
Masaaki Goshima
e8a411abfc Integrate FlowMappingNode into MappingNode 2019-10-31 12:25:33 +09:00
Masaaki Goshima
66d213ca41 Rename MappingCollectionNode to MappingNode 2019-10-31 12:14:39 +09:00
Masaaki Goshima
7a66a19f84 Remove unused method of parser package 2019-10-30 17:26:51 +09:00