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
Masaaki Goshima
4a90c16927
Supports decoding for null value
2019-10-30 16:57:59 +09:00
Masaaki Goshima
8475c5e180
Supports binary/octet/hex number literal
2019-10-29 19:08:02 +09:00
Masaaki Goshima
1b5109e632
Merge pull request #6 from lestrrat-go/topic/errors
...
streamline error generation
2019-10-24 17:26:23 +09:00
Masaaki Goshima
265cae5062
Optimize parsing for mapping-value token
2019-10-24 13:52:12 +09:00
Daisuke Maki
d6a5e04d34
PoC for #4
2019-10-24 11:07:40 +09:00
Masaaki Goshima
3882855ddc
Fix parser bugs
...
- double sequence entry
- multiple column based mapping value
2019-10-23 20:22:14 +09:00
Masaaki Goshima
b4289af609
Support syntax error printing
2019-10-23 13:30:22 +09:00
Masaaki Goshima
c5db11901c
Improve error format
...
- %v : beautiful syntax error with source code
- %#+v : error with stack trace ( for debugging )
- others : simple syntax error ( without source code )
2019-10-23 03:21:42 +09:00
Masaaki Goshima
0a63aea474
Fix scan and parse error
2019-10-21 15:59:36 +09:00
Masaaki Goshima
293ee9861c
Add document
2019-10-21 12:53:30 +09:00
Masaaki Goshima
14ebb2f291
Remove ast.MappingNode
2019-10-21 02:55:09 +09:00
Masaaki Goshima
ae67570d98
Support Anchor and Alias
2019-10-18 14:27:49 +09:00
Masaaki Goshima
a02f24c9ad
Add parser package
2019-10-16 18:21:20 +09:00