File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public class Main {
3737 * A version identifier that should be updated every time the extractor changes in such a way that
3838 * it may produce different tuples for the same file under the same {@link ExtractorConfig}.
3939 */
40- public static final String EXTRACTOR_VERSION = "2019-07-24 " ;
40+ public static final String EXTRACTOR_VERSION = "2019-07-25 " ;
4141
4242 public static final Pattern NEWLINE = Pattern .compile ("\n " );
4343
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ public LoCInfo extract(TextualExtractor textualExtractor) {
9999 trapWriter = textualExtractor .getTrapwriter ();
100100
101101 Label fileLabel = locationManager .getFileLabel ();
102+ locationManager .setHasLocationTable ("yaml_locations" );
102103 try {
103104 parser = new ParserImpl (new StreamReader (textualExtractor .getSource ()));
104105 resolver = new Resolver ();
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import javascript
1313 * referring to some other YAML value.
1414 */
1515class YAMLNode extends @yaml_node, Locatable {
16- override Location getLocation ( ) { hasLocation ( this , result ) }
16+ override Location getLocation ( ) { yaml_locations ( this , result ) }
1717
1818 /**
1919 * Gets the parent node of this node, which is always a collection.
@@ -300,6 +300,8 @@ class YAMLDocument extends YAMLNode {
300300 * An error message produced by the YAML parser while processing a YAML file.
301301 */
302302class YAMLParseError extends @yaml_error, Error {
303+ override Location getLocation ( ) { yaml_locations ( this , result ) }
304+
303305 override string getMessage ( ) { yaml_errors ( this , result ) }
304306
305307 override string toString ( ) { result = getMessage ( ) }
Original file line number Diff line number Diff line change @@ -933,7 +933,7 @@ case @json_value.kind of
933933 | @token
934934 | @cfg_node
935935 | @jsdoc | @jsdoc_type_expr | @jsdoc_tag
936- | @yaml_node | @yaml_error
936+ | @yaml_locatable
937937 | @xmllocatable;
938938
939939hasLocation (unique int locatable: @locatable ref,
@@ -1027,6 +1027,11 @@ yaml_scalars (unique int scalar: @yaml_scalar_node ref,
10271027yaml_errors (unique int id: @yaml_error,
10281028 varchar(900) message: string ref);
10291029
1030+ yaml_locations(unique int locatable: @yaml_locatable ref,
1031+ int location: @location_default ref);
1032+
1033+ @yaml_locatable = @yaml_node | @yaml_error;
1034+
10301035/* XML Files */
10311036
10321037xmlEncoding(
You can’t perform that action at this time.
0 commit comments