Commit graph

72 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
43851760c6
Fix parsing of tab character (#530)
* fix tab character handling

* ignore lint error
2024-11-13 16:21:12 +09:00
Masaaki Goshima
cab43643dc
Fix removeFromRightSpace process at scanner (#529)
* fix removeFromRightSpace process at scanner

* remove unnecessary path
2024-11-13 13:09:30 +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
8f36c1b309
fix parsing of reserved chars (#514) 2024-11-09 20:43:51 +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
8f8d730650
Fix parsing of document (#501)
* fix parsing of document
2024-11-03 02:11:50 +09:00
Masaaki Goshima
9b2c4569e2
fix parsing of invalid document (#499) 2024-11-02 19:29:48 +09:00
Masaaki Goshima
61505f3849
fix parsing of number (#498) 2024-11-02 18:44:43 +09:00
Matthew Warman
8713f53d13
feat: preserve line breaks from original input (#412)
* feat: preserve line breaks from original input
* docs: fix spelling error in comment

---------

Co-authored-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
2024-11-02 14:24:28 +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
975a624ace
fix invalid quoted-text handling (#495) 2024-10-31 22:54:26 +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
Semih Buyukgungor
c7e80a3d3e
Fix incorrect colon indicator scanning (#485)
* fix isNextEOS method in scanner context

* adding unit test
2024-10-29 00:59:54 +09:00
Masaaki Goshima
558921a517
Refactor indent state (#481)
* refactor indent state

* refactor function position

* remove unnecessary function
2024-10-28 17:07:44 +09:00
Matt Leader
56a6b5465b
trim right spaces before adding carriage return or linefeed (#462)
Signed-off-by: Matthew F Leader <mleader@redhat.com>
Co-authored-by: Webb Scales <wscales@redhat.com>
2024-07-16 19:17:13 +09:00
Masaaki Goshima
957e9d7f32
Fix sequence with comment (#390) 2023-09-15 12:11:17 +09:00
WillAbides
4df89231ed
Fix quoted comments (#370)
* Make path filtering work with quotes
2023-09-15 11:33:31 +09:00
Masaaki Goshima
264dc0f761
Fix comment parsing with null value (#388) 2023-09-14 12:25:21 +09:00
Kurochan
dc3fed8f0b
ast: append new line at the end of file (#329) 2022-12-08 22:48:12 +09:00
Masaaki Goshima
045101dc5f
add test cases 2022-12-02 03:56:31 +09:00
Masaaki Goshima
a471550c69
Fix indentState logic for multi-line value 2022-01-11 20:37:31 +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
99b4a891f6
Consider special characters for the YAMLPath 2021-09-07 19:44:06 +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
Masaaki Goshima
95509cf791 Fix parsing MergeKey ('<<') characters 2021-03-01 17:32:11 +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
4d2c5f0532 Fix parsing for mapping key or tag token 2020-07-02 17:25:31 +09:00
Masaaki Goshima
204d5ba8e9 Add test case for checking syntax error 2020-07-02 14:38:34 +09:00
Masaaki Goshima
bdfa98c567 Add test case for mapping value delimiter in flow style ( #142 ) 2020-07-02 12:49:18 +09:00
Masaaki Goshima
d81424f5f6 Fix parser test 2020-07-02 12:49:05 +09:00
Masaaki Goshima
9565ed166b Fix processing of Literal with NewLineCharacter 2020-06-15 20:16:51 +09:00
Masaaki Goshima
043e7bde32 Add null token to parsed result 2020-06-03 17:57:26 +09:00
Masaaki Goshima
1ee2aede3a Fix new line character in string surrounded by double quote 2020-06-02 13:06:46 +09:00
Masaaki Goshima
0c228d5cbc Fix scanning token of number in literal 2020-06-01 12:54:23 +09:00