| 
									
										
										
										
											2019-10-16 18:20:46 +09:00
										 |  |  | package lexer_test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							| 
									
										
										
										
											2021-02-18 21:18:38 +00:00
										 |  |  | 	"sort" | 
					
						
							| 
									
										
										
										
											2019-10-16 18:20:46 +09:00
										 |  |  | 	"testing" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	"github.com/goccy/go-yaml/lexer" | 
					
						
							| 
									
										
										
										
											2021-02-18 21:18:38 +00:00
										 |  |  | 	"github.com/goccy/go-yaml/token" | 
					
						
							| 
									
										
										
										
											2019-10-16 18:20:46 +09:00
										 |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func TestTokenize(t *testing.T) { | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 	tests := []struct { | 
					
						
							|  |  |  | 		YAML   string | 
					
						
							|  |  |  | 		Tokens token.Tokens | 
					
						
							|  |  |  | 	}{ | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `null | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  |   `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.NullType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "null", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        "null\n  ", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							| 
									
										
										
										
											2024-11-02 18:44:43 +09:00
										 |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `0_`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							| 
									
										
										
										
											2024-11-06 16:00:36 +09:00
										 |  |  | 					Type:          token.IntegerType, | 
					
						
							| 
									
										
										
										
											2024-11-02 18:44:43 +09:00
										 |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0_", | 
					
						
							|  |  |  | 					Origin:        "0_", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-15 09:29:57 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `"hello\tworld"`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "hello\tworld", | 
					
						
							|  |  |  | 					Origin:        `"hello\tworld"`, | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-06 16:00:36 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `0x_1A_2B_3C`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.HexIntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0x_1A_2B_3C", | 
					
						
							|  |  |  | 					Origin:        "0x_1A_2B_3C", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `+0b1010`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.BinaryIntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "+0b1010", | 
					
						
							|  |  |  | 					Origin:        "+0b1010", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `0100`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.OctetIntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0100", | 
					
						
							|  |  |  | 					Origin:        "0100", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `0o10`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.OctetIntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0o10", | 
					
						
							|  |  |  | 					Origin:        "0o10", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-06 17:25:05 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `0.123e+123`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FloatType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0.123e+123", | 
					
						
							|  |  |  | 					Origin:        "0.123e+123", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `{} | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  |   `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingStartType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         "{", | 
					
						
							|  |  |  | 					Origin:        "{", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingEndType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         "}", | 
					
						
							|  |  |  | 					Origin:        "}", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: hi`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "hi", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " hi", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v:	a`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							| 
									
										
										
										
											2024-12-18 09:32:13 +01:00
										 |  |  | 					// nolint: gci | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin: "	a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `v: "true"`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "true", | 
					
						
							|  |  |  | 					Origin:        " \"true\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: "false"`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "false", | 
					
						
							|  |  |  | 					Origin:        " \"false\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: true`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.BoolType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "true", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " true", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: false`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.BoolType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "false", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " false", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: 10`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "10", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 10", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: -10`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "-10", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " -10", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: 42`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "42", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 42", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: 4294967296`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "4294967296", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 4294967296", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: "10"`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "10", | 
					
						
							|  |  |  | 					Origin:        " \"10\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: 0.1`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FloatType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0.1", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 0.1", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: 0.99`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FloatType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0.99", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 0.99", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: -0.1`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FloatType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "-0.1", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " -0.1", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: .inf`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.InfinityType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         ".inf", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " .inf", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: -.inf`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.InfinityType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "-.inf", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " -.inf", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: .nan`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.NanType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         ".nan", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " .nan", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-12 00:09:28 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | a: | 
					
						
							|  |  |  |   "bbb  \ | 
					
						
							|  |  |  |       ccc | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       ddd eee\n\ | 
					
						
							|  |  |  |   \ \ fff ggg\nhhh iii\n | 
					
						
							|  |  |  |   jjj kkk | 
					
						
							|  |  |  |   " | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "\na", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "bbb  ccc\nddd eee\n  fff ggg\nhhh iii\n jjj kkk ", | 
					
						
							|  |  |  | 					Origin:        "\n  \"bbb  \\\n      ccc\n\n      ddd eee\\n\\\n  \\ \\ fff ggg\\nhhh iii\\n\n  jjj kkk\n  \"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: null`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.NullType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "null", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " null", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `v: ""`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							|  |  |  | 					Origin:        "v", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "", | 
					
						
							|  |  |  | 					Origin:        " \"\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | v: | 
					
						
							|  |  |  | - A | 
					
						
							|  |  |  | - B | 
					
						
							|  |  |  | `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\nv", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\n-", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "A", | 
					
						
							|  |  |  | 					Origin:        " A\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "-", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "B", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        " B", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | v: | 
					
						
							|  |  |  | - A | 
					
						
							|  |  |  | - |- | 
					
						
							|  |  |  |  B | 
					
						
							|  |  |  |  C | 
					
						
							|  |  |  | `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\nv", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\n-", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "A", | 
					
						
							|  |  |  | 					Origin:        " A\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "-", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.LiteralType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "|-", | 
					
						
							|  |  |  | 					Origin:        " |-\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Value:         "B\nC", | 
					
						
							|  |  |  | 					Origin:        " B\n C\n", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | v: | 
					
						
							|  |  |  | - A | 
					
						
							|  |  |  | - 1 | 
					
						
							|  |  |  | - B: | 
					
						
							|  |  |  |  - 2 | 
					
						
							|  |  |  |  - 3 | 
					
						
							|  |  |  | `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "v", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\nv", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\n-", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "A", | 
					
						
							|  |  |  | 					Origin:        " A\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "-", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1", | 
					
						
							|  |  |  | 					Origin:        " 1\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "-", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "B", | 
					
						
							|  |  |  | 					Origin:        " B", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\n -", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "2", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        " 2\n ", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "-", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "3", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        " 3", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | a: | 
					
						
							|  |  |  |  b: c | 
					
						
							|  |  |  | `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\na", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Value:         "b", | 
					
						
							|  |  |  | 					Origin:        "\n b", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "c", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        " c", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: '-'`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SingleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "-", | 
					
						
							|  |  |  | 					Origin:        " '-'", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `123`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "123", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        "123", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `hello: world | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "hello", | 
					
						
							|  |  |  | 					Origin:        "hello", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "world", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        " world", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: null`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.NullType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "null", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " null", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: {x: 1}`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingStartType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         "{", | 
					
						
							|  |  |  | 					Origin:        " {", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "x", | 
					
						
							|  |  |  | 					Origin:        "x", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1", | 
					
						
							|  |  |  | 					Origin:        " 1", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingEndType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         "}", | 
					
						
							|  |  |  | 					Origin:        "}", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: [1, 2]`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceStartType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         "[", | 
					
						
							|  |  |  | 					Origin:        " [", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1", | 
					
						
							|  |  |  | 					Origin:        "1", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.CollectEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         ",", | 
					
						
							|  |  |  | 					Origin:        ",", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "2", | 
					
						
							|  |  |  | 					Origin:        " 2", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SequenceEndType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         "]", | 
					
						
							|  |  |  | 					Origin:        "]", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | t2: 2018-01-09T10:40:47Z | 
					
						
							|  |  |  | t4: 2098-01-09T10:40:47Z | 
					
						
							|  |  |  | `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "t2", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        "\nt2", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "2018-01-09T10:40:47Z", | 
					
						
							|  |  |  | 					Origin:        " 2018-01-09T10:40:47Z\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Value:         "t4", | 
					
						
							|  |  |  | 					Origin:        "t4", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "2098-01-09T10:40:47Z", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 2098-01-09T10:40:47Z", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: {b: c, d: e}`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingStartType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         "{", | 
					
						
							|  |  |  | 					Origin:        " {", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "b", | 
					
						
							|  |  |  | 					Origin:        "b", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "c", | 
					
						
							|  |  |  | 					Origin:        " c", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.CollectEntryType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         ",", | 
					
						
							|  |  |  | 					Origin:        ",", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "d", | 
					
						
							|  |  |  | 					Origin:        " d", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "e", | 
					
						
							|  |  |  | 					Origin:        " e", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingEndType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.FlowCollectionIndicator, | 
					
						
							|  |  |  | 					Value:         "}", | 
					
						
							|  |  |  | 					Origin:        "}", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: 3s`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "3s", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 3s", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: <foo>`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "<foo>", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " <foo>", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: "1:1"`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "1:1", | 
					
						
							|  |  |  | 					Origin:        " \"1:1\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: "\0"`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-30 10:16:17 +09:00
										 |  |  | 					Value:         "\x00", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 					Origin:        " \"\\0\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: !!binary gIGC`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.TagType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.NodePropertyIndicator, | 
					
						
							|  |  |  | 					Value:         "!!binary", | 
					
						
							|  |  |  | 					Origin:        " !!binary ", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "gIGC", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        "gIGC", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | a: !!binary | | 
					
						
							|  |  |  |  kJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJ | 
					
						
							|  |  |  |  CQ | 
					
						
							|  |  |  | `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Origin:        "\na", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.TagType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.NodePropertyIndicator, | 
					
						
							|  |  |  | 					Value:         "!!binary", | 
					
						
							|  |  |  | 					Origin:        " !!binary ", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.LiteralType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "|", | 
					
						
							|  |  |  | 					Origin:        "|\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-01 15:03:27 +09:00
										 |  |  | 					Value:         "kJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJ\nCQ\n", | 
					
						
							|  |  |  | 					Origin:        " kJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJ\n CQ\n", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | b: 2 | 
					
						
							|  |  |  | a: 1 | 
					
						
							|  |  |  | d: 4 | 
					
						
							|  |  |  | c: 3 | 
					
						
							|  |  |  | sub: | 
					
						
							|  |  |  |   e: 5 | 
					
						
							|  |  |  | `, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "b", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        "\nb", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "2", | 
					
						
							|  |  |  | 					Origin:        " 2\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1", | 
					
						
							|  |  |  | 					Origin:        " 1\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Value:         "d", | 
					
						
							|  |  |  | 					Origin:        "d", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "4", | 
					
						
							|  |  |  | 					Origin:        " 4\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Value:         "c", | 
					
						
							|  |  |  | 					Origin:        "c", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "3", | 
					
						
							|  |  |  | 					Origin:        " 3\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Value:         "sub", | 
					
						
							|  |  |  | 					Origin:        "sub", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Value:         "e", | 
					
						
							|  |  |  | 					Origin:        "\n  e", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.IntegerType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "5", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 5", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: 1.2.3.4`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1.2.3.4", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 1.2.3.4", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: "2015-02-24T18:19:39Z"`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "2015-02-24T18:19:39Z", | 
					
						
							|  |  |  | 					Origin:        " \"2015-02-24T18:19:39Z\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: 'b: c'`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SingleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "b: c", | 
					
						
							|  |  |  | 					Origin:        " 'b: c'", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: 'Hello #comment'`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SingleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "Hello #comment", | 
					
						
							|  |  |  | 					Origin:        " 'Hello #comment'", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: 100.5`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FloatType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "100.5", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " 100.5", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: `a: bogus`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "bogus", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        " bogus", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `"a": double quoted map key`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "\"a\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "double quoted map key", | 
					
						
							|  |  |  | 					Origin:        " double quoted map key", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `'a': single quoted map key`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SingleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "'a'", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "single quoted map key", | 
					
						
							|  |  |  | 					Origin:        " single quoted map key", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | a: "double quoted" | 
					
						
							|  |  |  | b: "value map"`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        "\na", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "double quoted", | 
					
						
							|  |  |  | 					Origin:        " \"double quoted\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Value:         "b", | 
					
						
							|  |  |  | 					Origin:        "\nb", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "value map", | 
					
						
							|  |  |  | 					Origin:        " \"value map\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			YAML: ` | 
					
						
							|  |  |  | a: 'single quoted' | 
					
						
							|  |  |  | b: 'value map'`, | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Origin:        "\na", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SingleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "single quoted", | 
					
						
							|  |  |  | 					Origin:        " 'single quoted'", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 					Value:         "b", | 
					
						
							|  |  |  | 					Origin:        "\nb", | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SingleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "value map", | 
					
						
							|  |  |  | 					Origin:        " 'value map'", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `json: '\"expression\": \"thi:\"'`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "json", | 
					
						
							|  |  |  | 					Origin:        "json", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.SingleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "\\\"expression\\\": \\\"thi:\\\"", | 
					
						
							|  |  |  | 					Origin:        " '\\\"expression\\\": \\\"thi:\\\"'", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `json: "\"expression\": \"thi:\""`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "json", | 
					
						
							|  |  |  | 					Origin:        "json", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.DoubleQuoteType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.QuotedScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "\"expression\": \"thi:\"", | 
					
						
							|  |  |  | 					Origin:        " \"\\\"expression\\\": \\\"thi:\\\"\"", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-02 20:55:35 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							| 
									
										
										
										
											2024-11-09 13:00:12 +09:00
										 |  |  | a: | 
					
						
							|  |  |  |  b | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |  c | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "\na", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "b\nc", | 
					
						
							|  |  |  | 					Origin:        "\n b\n\n c", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | a:    | 
					
						
							|  |  |  |  b    | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |  c | 
					
						
							|  |  |  |  d  | 
					
						
							|  |  |  | e: f | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "\na", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "b\nc d", | 
					
						
							|  |  |  | 					Origin:        "\n b\n\n\n c\n d\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "e", | 
					
						
							|  |  |  | 					Origin:        "e", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "f", | 
					
						
							|  |  |  | 					Origin:        " f", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | a: | | 
					
						
							|  |  |  |  b    | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |  c | 
					
						
							|  |  |  |  d  | 
					
						
							|  |  |  | e: f | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "\na", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.LiteralType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "|", | 
					
						
							|  |  |  | 					Origin:        " |\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "b   \n\n \nc\nd \n", | 
					
						
							|  |  |  | 					Origin:        " b   \n\n  \n c\n d \n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "e", | 
					
						
							|  |  |  | 					Origin:        "e", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "f", | 
					
						
							|  |  |  | 					Origin:        " f", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | a: > | 
					
						
							|  |  |  |  b    | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |    | 
					
						
							|  |  |  |  c | 
					
						
							|  |  |  |  d  | 
					
						
							|  |  |  | e: f | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "\na", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">", | 
					
						
							|  |  |  | 					Origin:        " >\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "b   \n\n \nc d \n", | 
					
						
							|  |  |  | 					Origin:        " b   \n\n  \n c\n d \n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "e", | 
					
						
							|  |  |  | 					Origin:        "e", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "f", | 
					
						
							|  |  |  | 					Origin:        " f", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							| 
									
										
										
										
											2024-11-02 20:55:35 +09:00
										 |  |  | a: > | 
					
						
							|  |  |  |   Text`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a", | 
					
						
							|  |  |  | 					Origin:        "\na", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">", | 
					
						
							|  |  |  | 					Origin:        " >\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "Text", | 
					
						
							|  |  |  | 					Origin:        "  Text", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-03 02:11:50 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | s: > | 
					
						
							|  |  |  |         1s | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "s", | 
					
						
							|  |  |  | 					Origin:        "\ns", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">", | 
					
						
							|  |  |  | 					Origin:        " >\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1s\n", | 
					
						
							|  |  |  | 					Origin:        "        1s\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							| 
									
										
										
										
											2024-11-28 17:36:29 +09:00
										 |  |  | s: >1        # comment | 
					
						
							| 
									
										
										
										
											2024-11-03 02:11:50 +09:00
										 |  |  |         1s | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "s", | 
					
						
							|  |  |  | 					Origin:        "\ns", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">1", | 
					
						
							| 
									
										
										
										
											2024-11-28 17:36:29 +09:00
										 |  |  | 					Origin:        " >1        ", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.CommentType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.CommentIndicator, | 
					
						
							|  |  |  | 					Value:         " comment", | 
					
						
							|  |  |  | 					Origin:        "# comment\n", | 
					
						
							| 
									
										
										
										
											2024-11-03 02:11:50 +09:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "       1s\n", | 
					
						
							|  |  |  | 					Origin:        "        1s\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | s: >+2 | 
					
						
							|  |  |  |         1s | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "s", | 
					
						
							|  |  |  | 					Origin:        "\ns", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">+2", | 
					
						
							|  |  |  | 					Origin:        " >+2\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "      1s\n", | 
					
						
							|  |  |  | 					Origin:        "        1s\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | s: >-3 | 
					
						
							|  |  |  |         1s | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "s", | 
					
						
							|  |  |  | 					Origin:        "\ns", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">-3", | 
					
						
							|  |  |  | 					Origin:        " >-3\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "     1s", | 
					
						
							|  |  |  | 					Origin:        "        1s\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | s: > | 
					
						
							|  |  |  |     1s | 
					
						
							|  |  |  |     2s | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "s", | 
					
						
							|  |  |  | 					Origin:        "\ns", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">", | 
					
						
							|  |  |  | 					Origin:        " >\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1s 2s\n", | 
					
						
							|  |  |  | 					Origin:        "    1s\n    2s\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | s: > | 
					
						
							|  |  |  |     1s | 
					
						
							|  |  |  |       2s | 
					
						
							|  |  |  |     3s | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "s", | 
					
						
							|  |  |  | 					Origin:        "\ns", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">", | 
					
						
							|  |  |  | 					Origin:        " >\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1s\n  2s\n3s\n", | 
					
						
							|  |  |  | 					Origin:        "    1s\n      2s\n    3s\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | s: > | 
					
						
							|  |  |  |     1s | 
					
						
							|  |  |  |       2s | 
					
						
							|  |  |  |       3s | 
					
						
							|  |  |  |     4s | 
					
						
							|  |  |  |     5s | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "s", | 
					
						
							|  |  |  | 					Origin:        "\ns", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">", | 
					
						
							|  |  |  | 					Origin:        " >\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1s\n  2s\n  3s\n4s 5s\n", | 
					
						
							|  |  |  | 					Origin:        "    1s\n      2s\n      3s\n    4s\n    5s\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | s: >-3 | 
					
						
							|  |  |  |     1s | 
					
						
							|  |  |  |       2s | 
					
						
							|  |  |  |       3s | 
					
						
							|  |  |  |     4s | 
					
						
							|  |  |  |     5s | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "s", | 
					
						
							|  |  |  | 					Origin:        "\ns", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.MappingValueType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockStructureIndicator, | 
					
						
							|  |  |  | 					Value:         ":", | 
					
						
							|  |  |  | 					Origin:        ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.FoldedType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         ">-3", | 
					
						
							|  |  |  | 					Origin:        " >-3\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         " 1s\n   2s\n   3s\n 4s\n 5s", | 
					
						
							|  |  |  | 					Origin:        "    1s\n      2s\n      3s\n    4s\n    5s\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-05 15:25:58 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | |2- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                   text | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.LiteralType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "|2-", | 
					
						
							|  |  |  | 					Origin:        "\n|2-\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "\n                text", | 
					
						
							|  |  |  | 					Origin:        "\n                  text\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-06 12:48:45 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | | | 
					
						
							|  |  |  |   a | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.LiteralType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "|", | 
					
						
							|  |  |  | 					Origin:        "\n|\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "a\n", | 
					
						
							|  |  |  | 					Origin:        "  a\n\n\n\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-28 17:36:29 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: ` | 
					
						
							|  |  |  | |  		  # comment | 
					
						
							|  |  |  |   foo | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.LiteralType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.BlockScalarIndicator, | 
					
						
							|  |  |  | 					Value:         "|", | 
					
						
							| 
									
										
										
										
											2024-12-18 09:32:13 +01:00
										 |  |  | 					Origin:        "\n|  		  ", | 
					
						
							| 
									
										
										
										
											2024-11-28 17:36:29 +09:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.CommentType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeIndicator, | 
					
						
							|  |  |  | 					Indicator:     token.CommentIndicator, | 
					
						
							|  |  |  | 					Value:         " comment", | 
					
						
							|  |  |  | 					Origin:        "# comment\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "foo\n", | 
					
						
							|  |  |  | 					Origin:        "  foo\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-06 16:00:36 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `1x0`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "1x0", | 
					
						
							|  |  |  | 					Origin:        "1x0", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-06 17:25:05 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `0b98765`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0b98765", | 
					
						
							|  |  |  | 					Origin:        "0b98765", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `098765`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "098765", | 
					
						
							|  |  |  | 					Origin:        "098765", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			YAML: `0o98765`, | 
					
						
							|  |  |  | 			Tokens: token.Tokens{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					Type:          token.StringType, | 
					
						
							|  |  |  | 					CharacterType: token.CharacterTypeMiscellaneous, | 
					
						
							|  |  |  | 					Indicator:     token.NotIndicator, | 
					
						
							|  |  |  | 					Value:         "0o98765", | 
					
						
							|  |  |  | 					Origin:        "0o98765", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2019-10-16 18:20:46 +09:00
										 |  |  | 	} | 
					
						
							| 
									
										
										
										
											2024-07-16 12:30:20 +02:00
										 |  |  | 	for _, test := range tests { | 
					
						
							|  |  |  | 		t.Run(test.YAML, func(t *testing.T) { | 
					
						
							|  |  |  | 			tokens := lexer.Tokenize(test.YAML) | 
					
						
							|  |  |  | 			if len(tokens) != len(test.Tokens) { | 
					
						
							|  |  |  | 				t.Fatalf("Tokenize(%q) token count mismatch, expected: %d got: %d", test.YAML, len(test.Tokens), len(tokens)) | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			for i := range test.Tokens { | 
					
						
							|  |  |  | 				if tokens[i].Type != test.Tokens[i].Type { | 
					
						
							|  |  |  | 					t.Errorf("Tokenize(%q)[%d] token.Type mismatch, expected: %s got: %s", test.YAML, i, test.Tokens[i].Type, tokens[i].Type) | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				if tokens[i].CharacterType != test.Tokens[i].CharacterType { | 
					
						
							|  |  |  | 					t.Errorf("Tokenize(%q)[%d] token.CharacterType mismatch, expected: %s got: %s", test.YAML, i, test.Tokens[i].CharacterType, tokens[i].CharacterType) | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				if tokens[i].Indicator != test.Tokens[i].Indicator { | 
					
						
							|  |  |  | 					t.Errorf("Tokenize(%q)[%d] token.Indicator mismatch, expected: %s got: %s", test.YAML, i, test.Tokens[i].Indicator, tokens[i].Indicator) | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				if tokens[i].Value != test.Tokens[i].Value { | 
					
						
							|  |  |  | 					t.Errorf("Tokenize(%q)[%d] token.Value mismatch, expected: %q got: %q", test.YAML, i, test.Tokens[i].Value, tokens[i].Value) | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				if tokens[i].Origin != test.Tokens[i].Origin { | 
					
						
							|  |  |  | 					t.Errorf("Tokenize(%q)[%d] token.Origin mismatch, expected: %q got: %q", test.YAML, i, test.Tokens[i].Origin, tokens[i].Origin) | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		}) | 
					
						
							| 
									
										
										
										
											2019-10-16 18:20:46 +09:00
										 |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2021-02-18 21:18:38 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | type testToken struct { | 
					
						
							|  |  |  | 	line   int | 
					
						
							|  |  |  | 	column int | 
					
						
							|  |  |  | 	value  string | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-03-01 15:09:40 +00:00
										 |  |  | func TestSingleLineToken_ValueLineColumnPosition(t *testing.T) { | 
					
						
							| 
									
										
										
										
											2021-02-18 21:18:38 +00:00
										 |  |  | 	tests := []struct { | 
					
						
							|  |  |  | 		name   string | 
					
						
							|  |  |  | 		src    string | 
					
						
							|  |  |  | 		expect map[int]string // Column -> Value map. | 
					
						
							|  |  |  | 	}{ | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "single quote, single value array", | 
					
						
							|  |  |  | 			src:  "test: ['test']", | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "test", | 
					
						
							|  |  |  | 				5:  ":", | 
					
						
							|  |  |  | 				7:  "[", | 
					
						
							|  |  |  | 				8:  "test", | 
					
						
							|  |  |  | 				14: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "double quote, single value array", | 
					
						
							|  |  |  | 			src:  `test: ["test"]`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "test", | 
					
						
							|  |  |  | 				5:  ":", | 
					
						
							|  |  |  | 				7:  "[", | 
					
						
							|  |  |  | 				8:  "test", | 
					
						
							|  |  |  | 				14: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "no quotes, single value array", | 
					
						
							|  |  |  | 			src:  "test: [somevalue]", | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "test", | 
					
						
							|  |  |  | 				5:  ":", | 
					
						
							|  |  |  | 				7:  "[", | 
					
						
							|  |  |  | 				8:  "somevalue", | 
					
						
							|  |  |  | 				17: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "single quote, multi value array", | 
					
						
							|  |  |  | 			src:  "myarr: ['1','2','3', '444' , '55','66' ,  '77'  ]", | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "myarr", | 
					
						
							|  |  |  | 				6:  ":", | 
					
						
							|  |  |  | 				8:  "[", | 
					
						
							|  |  |  | 				9:  "1", | 
					
						
							|  |  |  | 				12: ",", | 
					
						
							|  |  |  | 				13: "2", | 
					
						
							|  |  |  | 				16: ",", | 
					
						
							|  |  |  | 				17: "3", | 
					
						
							|  |  |  | 				20: ",", | 
					
						
							|  |  |  | 				22: "444", | 
					
						
							|  |  |  | 				28: ",", | 
					
						
							|  |  |  | 				30: "55", | 
					
						
							|  |  |  | 				34: ",", | 
					
						
							|  |  |  | 				35: "66", | 
					
						
							|  |  |  | 				40: ",", | 
					
						
							|  |  |  | 				43: "77", | 
					
						
							|  |  |  | 				49: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "double quote, multi value array", | 
					
						
							|  |  |  | 			src:  `myarr: ["1","2","3", "444" , "55","66" ,  "77"  ]`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "myarr", | 
					
						
							|  |  |  | 				6:  ":", | 
					
						
							|  |  |  | 				8:  "[", | 
					
						
							|  |  |  | 				9:  "1", | 
					
						
							|  |  |  | 				12: ",", | 
					
						
							|  |  |  | 				13: "2", | 
					
						
							|  |  |  | 				16: ",", | 
					
						
							|  |  |  | 				17: "3", | 
					
						
							|  |  |  | 				20: ",", | 
					
						
							|  |  |  | 				22: "444", | 
					
						
							|  |  |  | 				28: ",", | 
					
						
							|  |  |  | 				30: "55", | 
					
						
							|  |  |  | 				34: ",", | 
					
						
							|  |  |  | 				35: "66", | 
					
						
							|  |  |  | 				40: ",", | 
					
						
							|  |  |  | 				43: "77", | 
					
						
							|  |  |  | 				49: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "no quote, multi value array", | 
					
						
							|  |  |  | 			src:  "numbers: [1, 5, 99,100, 3, 7 ]", | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "numbers", | 
					
						
							|  |  |  | 				8:  ":", | 
					
						
							|  |  |  | 				10: "[", | 
					
						
							|  |  |  | 				11: "1", | 
					
						
							|  |  |  | 				12: ",", | 
					
						
							|  |  |  | 				14: "5", | 
					
						
							|  |  |  | 				15: ",", | 
					
						
							|  |  |  | 				17: "99", | 
					
						
							|  |  |  | 				19: ",", | 
					
						
							|  |  |  | 				20: "100", | 
					
						
							|  |  |  | 				23: ",", | 
					
						
							|  |  |  | 				25: "3", | 
					
						
							|  |  |  | 				26: ",", | 
					
						
							|  |  |  | 				28: "7", | 
					
						
							|  |  |  | 				30: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "double quotes, nested arrays", | 
					
						
							|  |  |  | 			src:  `Strings: ["1",["2",["3"]]]`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "Strings", | 
					
						
							|  |  |  | 				8:  ":", | 
					
						
							|  |  |  | 				10: "[", | 
					
						
							|  |  |  | 				11: "1", | 
					
						
							|  |  |  | 				14: ",", | 
					
						
							|  |  |  | 				15: "[", | 
					
						
							|  |  |  | 				16: "2", | 
					
						
							|  |  |  | 				19: ",", | 
					
						
							|  |  |  | 				20: "[", | 
					
						
							|  |  |  | 				21: "3", | 
					
						
							|  |  |  | 				24: "]", | 
					
						
							|  |  |  | 				25: "]", | 
					
						
							|  |  |  | 				26: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "mixed quotes, nested arrays", | 
					
						
							|  |  |  | 			src:  `Values: [1,['2',"3",4,["5",6]]]`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "Values", | 
					
						
							|  |  |  | 				7:  ":", | 
					
						
							|  |  |  | 				9:  "[", | 
					
						
							|  |  |  | 				10: "1", | 
					
						
							|  |  |  | 				11: ",", | 
					
						
							|  |  |  | 				12: "[", | 
					
						
							|  |  |  | 				13: "2", | 
					
						
							|  |  |  | 				16: ",", | 
					
						
							|  |  |  | 				17: "3", | 
					
						
							|  |  |  | 				20: ",", | 
					
						
							|  |  |  | 				21: "4", | 
					
						
							|  |  |  | 				22: ",", | 
					
						
							|  |  |  | 				23: "[", | 
					
						
							|  |  |  | 				24: "5", | 
					
						
							|  |  |  | 				27: ",", | 
					
						
							|  |  |  | 				28: "6", | 
					
						
							|  |  |  | 				29: "]", | 
					
						
							|  |  |  | 				30: "]", | 
					
						
							|  |  |  | 				31: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "double quote, empty array", | 
					
						
							|  |  |  | 			src:  `Empty: ["", ""]`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1:  "Empty", | 
					
						
							|  |  |  | 				6:  ":", | 
					
						
							|  |  |  | 				8:  "[", | 
					
						
							|  |  |  | 				9:  "", | 
					
						
							|  |  |  | 				11: ",", | 
					
						
							|  |  |  | 				13: "", | 
					
						
							|  |  |  | 				15: "]", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2022-12-02 03:56:31 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			name: "double quote key", | 
					
						
							|  |  |  | 			src:  `"a": b`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1: "a", | 
					
						
							|  |  |  | 				4: ":", | 
					
						
							|  |  |  | 				6: "b", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "single quote key", | 
					
						
							|  |  |  | 			src:  `'a': b`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1: "a", | 
					
						
							|  |  |  | 				4: ":", | 
					
						
							|  |  |  | 				6: "b", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "double quote key and value", | 
					
						
							|  |  |  | 			src:  `"a": "b"`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1: "a", | 
					
						
							|  |  |  | 				4: ":", | 
					
						
							|  |  |  | 				6: "b", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "single quote key and value", | 
					
						
							|  |  |  | 			src:  `'a': 'b'`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1: "a", | 
					
						
							|  |  |  | 				4: ":", | 
					
						
							|  |  |  | 				6: "b", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "double quote key, single quote value", | 
					
						
							|  |  |  | 			src:  `"a": 'b'`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1: "a", | 
					
						
							|  |  |  | 				4: ":", | 
					
						
							|  |  |  | 				6: "b", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "single quote key, double quote value", | 
					
						
							|  |  |  | 			src:  `'a': "b"`, | 
					
						
							|  |  |  | 			expect: map[int]string{ | 
					
						
							|  |  |  | 				1: "a", | 
					
						
							|  |  |  | 				4: ":", | 
					
						
							|  |  |  | 				6: "b", | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2021-02-18 21:18:38 +00:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	for _, tc := range tests { | 
					
						
							|  |  |  | 		t.Run(tc.name, func(t *testing.T) { | 
					
						
							|  |  |  | 			got := lexer.Tokenize(tc.src) | 
					
						
							|  |  |  | 			sort.Slice(got, func(i, j int) bool { | 
					
						
							|  |  |  | 				return got[i].Position.Column < got[j].Position.Column | 
					
						
							|  |  |  | 			}) | 
					
						
							|  |  |  | 			var expected []testToken | 
					
						
							|  |  |  | 			for k, v := range tc.expect { | 
					
						
							|  |  |  | 				tt := testToken{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: k, | 
					
						
							|  |  |  | 					value:  v, | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				expected = append(expected, tt) | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			sort.Slice(expected, func(i, j int) bool { | 
					
						
							|  |  |  | 				return expected[i].column < expected[j].column | 
					
						
							|  |  |  | 			}) | 
					
						
							|  |  |  | 			if len(got) != len(expected) { | 
					
						
							|  |  |  | 				t.Errorf("Tokenize(%s) token count mismatch, expected:%d got:%d", tc.src, len(expected), len(got)) | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			for i, tok := range got { | 
					
						
							|  |  |  | 				if !tokenMatches(tok, expected[i]) { | 
					
						
							| 
									
										
										
										
											2021-02-19 19:34:18 +00:00
										 |  |  | 					t.Errorf("Tokenize(%s) expected:%+v got line:%d column:%d value:%s", tc.src, expected[i], tok.Position.Line, tok.Position.Column, tok.Value) | 
					
						
							| 
									
										
										
										
											2021-02-18 21:18:38 +00:00
										 |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		}) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func tokenMatches(t *token.Token, e testToken) bool { | 
					
						
							|  |  |  | 	return t != nil && t.Position != nil && | 
					
						
							|  |  |  | 		t.Value == e.value && | 
					
						
							|  |  |  | 		t.Position.Line == e.line && | 
					
						
							|  |  |  | 		t.Position.Column == e.column | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2021-03-01 15:09:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | func TestMultiLineToken_ValueLineColumnPosition(t *testing.T) { | 
					
						
							|  |  |  | 	tests := []struct { | 
					
						
							|  |  |  | 		name   string | 
					
						
							|  |  |  | 		src    string | 
					
						
							|  |  |  | 		expect []testToken | 
					
						
							|  |  |  | 	}{ | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "double quote", | 
					
						
							|  |  |  | 			src: `one: "1 2 3 4 5" | 
					
						
							|  |  |  | two: "1 2 | 
					
						
							|  |  |  | 3 4 | 
					
						
							|  |  |  | 5" | 
					
						
							|  |  |  | three: "1 2 3 4 | 
					
						
							|  |  |  | 5"`, | 
					
						
							|  |  |  | 			expect: []testToken{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "one", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 6, | 
					
						
							|  |  |  | 					value:  "1 2 3 4 5", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   2, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "two", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   2, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   2, | 
					
						
							|  |  |  | 					column: 6, | 
					
						
							|  |  |  | 					value:  "1 2 3 4 5", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   5, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "three", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   5, | 
					
						
							|  |  |  | 					column: 6, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   5, | 
					
						
							|  |  |  | 					column: 8, | 
					
						
							|  |  |  | 					value:  "1 2 3 4 5", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "single quote in an array", | 
					
						
							|  |  |  | 			src: `arr: ['1', 'and | 
					
						
							|  |  |  | two'] | 
					
						
							|  |  |  | last: 'hello'`, | 
					
						
							|  |  |  | 			expect: []testToken{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "arr", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 6, | 
					
						
							|  |  |  | 					value:  "[", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 7, | 
					
						
							|  |  |  | 					value:  "1", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 10, | 
					
						
							|  |  |  | 					value:  ",", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 12, | 
					
						
							|  |  |  | 					value:  "and two", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   2, | 
					
						
							|  |  |  | 					column: 5, | 
					
						
							|  |  |  | 					value:  "]", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "last", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 5, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 7, | 
					
						
							|  |  |  | 					value:  "hello", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "single quote and double quote", | 
					
						
							|  |  |  | 			src: `foo: "test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | bar" | 
					
						
							|  |  |  | foo2: 'bar2'`, | 
					
						
							|  |  |  | 			expect: []testToken{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "foo", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 6, | 
					
						
							| 
									
										
										
										
											2024-11-12 00:09:28 +09:00
										 |  |  | 					value:  "test\n\n\n\nbar", | 
					
						
							| 
									
										
										
										
											2021-03-01 15:09:40 +00:00
										 |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   7, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "foo2", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   7, | 
					
						
							|  |  |  | 					column: 5, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   7, | 
					
						
							|  |  |  | 					column: 7, | 
					
						
							|  |  |  | 					value:  "bar2", | 
					
						
							|  |  |  | 				}, | 
					
						
							| 
									
										
										
										
											2022-12-02 03:56:31 +09:00
										 |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "single and double quote map keys", | 
					
						
							|  |  |  | 			src: `"a": test | 
					
						
							|  |  |  | 'b': 1 | 
					
						
							|  |  |  | c: true`, | 
					
						
							|  |  |  | 			expect: []testToken{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 6, | 
					
						
							|  |  |  | 					value:  "test", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   2, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "b", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   2, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   2, | 
					
						
							|  |  |  | 					column: 6, | 
					
						
							|  |  |  | 					value:  "1", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "c", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 2, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  "true", | 
					
						
							|  |  |  | 				}, | 
					
						
							| 
									
										
										
										
											2022-12-19 16:04:56 +10:30
										 |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "issue326", | 
					
						
							|  |  |  | 			src: `a: | | 
					
						
							|  |  |  |   Text | 
					
						
							|  |  |  | b: 1`, | 
					
						
							|  |  |  | 			expect: []testToken{ | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "a", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 2, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   1, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  "|", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   2, | 
					
						
							|  |  |  | 					column: 3, | 
					
						
							|  |  |  | 					value:  "Text\n", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 1, | 
					
						
							|  |  |  | 					value:  "b", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 2, | 
					
						
							|  |  |  | 					value:  ":", | 
					
						
							|  |  |  | 				}, | 
					
						
							|  |  |  | 				{ | 
					
						
							|  |  |  | 					line:   3, | 
					
						
							|  |  |  | 					column: 4, | 
					
						
							|  |  |  | 					value:  "1", | 
					
						
							|  |  |  | 				}, | 
					
						
							| 
									
										
										
										
											2021-03-01 15:09:40 +00:00
										 |  |  | 			}, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	for _, tc := range tests { | 
					
						
							|  |  |  | 		t.Run(tc.name, func(t *testing.T) { | 
					
						
							|  |  |  | 			got := lexer.Tokenize(tc.src) | 
					
						
							|  |  |  | 			sort.Slice(got, func(i, j int) bool { | 
					
						
							|  |  |  | 				// sort by line, then column | 
					
						
							|  |  |  | 				if got[i].Position.Line < got[j].Position.Line { | 
					
						
							|  |  |  | 					return true | 
					
						
							|  |  |  | 				} else if got[i].Position.Line == got[j].Position.Line { | 
					
						
							|  |  |  | 					return got[i].Position.Column < got[j].Position.Column | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				return false | 
					
						
							|  |  |  | 			}) | 
					
						
							|  |  |  | 			sort.Slice(tc.expect, func(i, j int) bool { | 
					
						
							|  |  |  | 				if tc.expect[i].line < tc.expect[j].line { | 
					
						
							|  |  |  | 					return true | 
					
						
							|  |  |  | 				} else if tc.expect[i].line == tc.expect[j].line { | 
					
						
							|  |  |  | 					return tc.expect[i].column < tc.expect[j].column | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 				return false | 
					
						
							|  |  |  | 			}) | 
					
						
							|  |  |  | 			if len(got) != len(tc.expect) { | 
					
						
							|  |  |  | 				t.Errorf("Tokenize() token count mismatch, expected:%d got:%d", len(tc.expect), len(got)) | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 			for i, tok := range got { | 
					
						
							|  |  |  | 				if !tokenMatches(tok, tc.expect[i]) { | 
					
						
							|  |  |  | 					t.Errorf("Tokenize() expected:%+v got line:%d column:%d value:%s", tc.expect[i], tok.Position.Line, tok.Position.Column, tok.Value) | 
					
						
							|  |  |  | 				} | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		}) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2024-10-29 20:00:48 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | func TestInvalid(t *testing.T) { | 
					
						
							|  |  |  | 	tests := []struct { | 
					
						
							|  |  |  | 		name string | 
					
						
							|  |  |  | 		src  string | 
					
						
							|  |  |  | 	}{ | 
					
						
							|  |  |  | 		{ | 
					
						
							| 
									
										
										
										
											2024-10-30 19:25:18 +09:00
										 |  |  | 			name: "literal opt with content", | 
					
						
							| 
									
										
										
										
											2024-10-29 20:00:48 +09:00
										 |  |  | 			src: ` | 
					
						
							|  |  |  | a: |invalid | 
					
						
							|  |  |  |   foo`, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "literal opt", | 
					
						
							|  |  |  | 			src: ` | 
					
						
							|  |  |  | a: |invalid`, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-10-31 22:54:26 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid single-quoted", | 
					
						
							|  |  |  | 			src:  `a: 'foobarbaz`, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid double-quoted", | 
					
						
							|  |  |  | 			src:  `a: "\"key\": \"value:\"`, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-02 19:29:48 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid document folded", | 
					
						
							|  |  |  | 			src:  ">\n>", | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid document number", | 
					
						
							|  |  |  | 			src:  ">\n1", | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-03 02:11:50 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid document header option number", | 
					
						
							|  |  |  | 			src:  "a: >3\n  1", | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-09 20:43:51 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			name: "use reserved character @", | 
					
						
							|  |  |  | 			src:  "key: [@val]", | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "use reserved character `", | 
					
						
							|  |  |  | 			src:  "key: [`val]", | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			name: "use tab character as indent", | 
					
						
							| 
									
										
										
										
											2024-12-18 09:32:13 +01:00
										 |  |  | 			// nolint: gci | 
					
						
							| 
									
										
										
										
											2024-11-13 16:21:12 +09:00
										 |  |  | 			src: "	a: b", | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "use tab character as indent in literal", | 
					
						
							|  |  |  | 			src: ` | 
					
						
							|  |  |  | a: | | 
					
						
							|  |  |  | 	b | 
					
						
							|  |  |  | 	c | 
					
						
							|  |  |  | `, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-12-02 11:30:11 +09:00
										 |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid UTF-16 character", | 
					
						
							|  |  |  | 			src:  `"\u00"`, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid UTF-16 surrogate pair length", | 
					
						
							|  |  |  | 			src:  `"\ud800"`, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid UTF-16 low surrogate prefix", | 
					
						
							|  |  |  | 			src:  `"\ud800\v"`, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid UTF-16 low surrogate", | 
					
						
							|  |  |  | 			src:  `"\ud800\u0000"`, | 
					
						
							|  |  |  | 		}, | 
					
						
							|  |  |  | 		{ | 
					
						
							|  |  |  | 			name: "invalid UTF-32 character", | 
					
						
							|  |  |  | 			src:  `"\U0000"`, | 
					
						
							|  |  |  | 		}, | 
					
						
							| 
									
										
										
										
											2024-10-29 20:00:48 +09:00
										 |  |  | 	} | 
					
						
							|  |  |  | 	for _, test := range tests { | 
					
						
							|  |  |  | 		t.Run(test.name, func(t *testing.T) { | 
					
						
							|  |  |  | 			got := lexer.Tokenize(test.src) | 
					
						
							|  |  |  | 			if got.InvalidToken() == nil { | 
					
						
							|  |  |  | 				t.Fatal("expected contains invalid token") | 
					
						
							|  |  |  | 			} | 
					
						
							|  |  |  | 		}) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2024-11-12 16:44:43 +09:00
										 |  |  | 
 | 
					
						
							|  |  |  | func TestTokenOffset(t *testing.T) { | 
					
						
							|  |  |  | 	t.Run("crlf", func(t *testing.T) { | 
					
						
							|  |  |  | 		content := "project:\r\n  version: 1.2.3\r\n" | 
					
						
							|  |  |  | 		tokens := lexer.Tokenize(content) | 
					
						
							|  |  |  | 		if len(tokens) != 5 { | 
					
						
							|  |  |  | 			t.Fatalf("invalid token num. got %d", len(tokens)) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		if tokens[4].Value != "1.2.3" { | 
					
						
							|  |  |  | 			t.Fatalf("unexpected value. got %q", tokens[4].Value) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		if tokens[4].Position.Offset != 22 { | 
					
						
							|  |  |  | 			t.Fatalf("unexpected offset. got %d", tokens[4].Position.Offset) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	}) | 
					
						
							|  |  |  | 	t.Run("lf", func(t *testing.T) { | 
					
						
							|  |  |  | 		content := "project:\n  version: 1.2.3\n" | 
					
						
							|  |  |  | 		tokens := lexer.Tokenize(content) | 
					
						
							|  |  |  | 		if len(tokens) != 5 { | 
					
						
							|  |  |  | 			t.Fatalf("invalid token num. got %d", len(tokens)) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		if tokens[4].Value != "1.2.3" { | 
					
						
							|  |  |  | 			t.Fatalf("unexpected value. got %q", tokens[4].Value) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 		if tokens[4].Position.Offset != 21 { | 
					
						
							|  |  |  | 			t.Fatalf("unexpected offset. got %d", tokens[4].Position.Offset) | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	}) | 
					
						
							|  |  |  | } |