From 004a5b464594aa1307d3574990d80b4529cb632d Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 17 Jun 2026 17:04:43 +0100 Subject: [PATCH 1/2] Python: Ensure that YAML comment extraction is properly reflected in the dbscheme template. --- python/extractor/semmle/dbscheme.template | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/extractor/semmle/dbscheme.template b/python/extractor/semmle/dbscheme.template index 8c6b16d444d4..e164ca700290 100644 --- a/python/extractor/semmle/dbscheme.template +++ b/python/extractor/semmle/dbscheme.template @@ -272,13 +272,17 @@ yaml_scalars (unique int scalar: @yaml_scalar_node ref, int style: int ref, string value: string ref); +yaml_comments (unique int id: @yaml_comment, + string text: string ref, + string tostring: string ref); + yaml_errors (unique int id: @yaml_error, string message: string ref); yaml_locations(unique int locatable: @yaml_locatable ref, int location: @location_default ref); -@yaml_locatable = @yaml_node | @yaml_error; +@yaml_locatable = @yaml_node | @yaml_error | @yaml_comment; /*- Python dbscheme -*/ From 55f2f041eefa65d1f4ec40ba53e925af4539c4d7 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Wed, 17 Jun 2026 17:05:04 +0100 Subject: [PATCH 2/2] Shared: Ensure that YAML comment extraction is properly reflected in the dbscheme template. --- shared/tree-sitter-extractor/src/generator/prefix.dbscheme | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/tree-sitter-extractor/src/generator/prefix.dbscheme b/shared/tree-sitter-extractor/src/generator/prefix.dbscheme index d59777f5e3d7..0caa7b34fcd6 100644 --- a/shared/tree-sitter-extractor/src/generator/prefix.dbscheme +++ b/shared/tree-sitter-extractor/src/generator/prefix.dbscheme @@ -97,13 +97,17 @@ yaml_scalars (unique int scalar: @yaml_scalar_node ref, int style: int ref, string value: string ref); +yaml_comments (unique int id: @yaml_comment, + string text: string ref, + string tostring: string ref); + yaml_errors (unique int id: @yaml_error, string message: string ref); yaml_locations(unique int locatable: @yaml_locatable ref, int location: @location_default ref); -@yaml_locatable = @yaml_node | @yaml_error; +@yaml_locatable = @yaml_node | @yaml_error | @yaml_comment; /*- Database metadata -*/