File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2737,6 +2737,12 @@ module YAML {
27372737 class ParseErrorBase extends LocatableBase , @yaml_error {
27382738 string getMessage ( ) { yaml_errors ( this , result ) }
27392739 }
2740+
2741+ class CommentBase extends LocatableBase , @yaml_comment {
2742+ string getText ( ) { yaml_comments ( this , result , _) }
2743+
2744+ override string toString ( ) { yaml_comments ( this , _, result ) }
2745+ }
27402746 }
27412747
27422748 import LibYaml:: Make< YamlSig >
Original file line number Diff line number Diff line change @@ -46,6 +46,12 @@ private module YamlSig implements LibYaml::InputSig {
4646 class ParseErrorBase extends LocatableBase , @yaml_error {
4747 string getMessage ( ) { yaml_errors ( this , result ) }
4848 }
49+
50+ class CommentBase extends LocatableBase , @yaml_comment {
51+ string getText ( ) { yaml_comments ( this , result , _) }
52+
53+ override string toString ( ) { yaml_comments ( this , _, result ) }
54+ }
4955}
5056
5157import LibYaml:: Make< YamlSig >
Original file line number Diff line number Diff line change @@ -101,13 +101,17 @@ yaml_scalars (unique int scalar: @yaml_scalar_node ref,
101101 int style: int ref,
102102 string value: string ref);
103103
104+ yaml_comments (unique int id: @yaml_comment,
105+ string text: string ref,
106+ string tostring: string ref);
107+
104108yaml_errors (unique int id: @yaml_error,
105109 string message: string ref);
106110
107111yaml_locations(unique int locatable: @yaml_locatable ref,
108112 int location: @location_default ref);
109113
110- @yaml_locatable = @yaml_node | @yaml_error;
114+ @yaml_locatable = @yaml_node | @yaml_error | @yaml_comment ;
111115
112116/*- Database metadata -*/
113117
You can’t perform that action at this time.
0 commit comments