mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Merge pull request #16597 from hvitved/tree-sitter/empty-location
Tree-sitter: Emit `empty_location` relation to avoid scan
This commit is contained in:
@@ -75,7 +75,7 @@ fn populate_empty_file(writer: &mut trap::Writer) -> trap::Label {
|
||||
|
||||
pub fn populate_empty_location(writer: &mut trap::Writer) {
|
||||
let file_label = populate_empty_file(writer);
|
||||
global_location(
|
||||
let loc_label = global_location(
|
||||
writer,
|
||||
file_label,
|
||||
trap::Location {
|
||||
@@ -85,6 +85,7 @@ pub fn populate_empty_location(writer: &mut trap::Writer) {
|
||||
end_column: 0,
|
||||
},
|
||||
);
|
||||
writer.add_tuple("empty_location", vec![trap::Arg::Label(loc_label)]);
|
||||
}
|
||||
|
||||
pub fn populate_parent_folders(
|
||||
|
||||
@@ -33,6 +33,12 @@ containerparent(
|
||||
unique int child: @container ref
|
||||
);
|
||||
|
||||
/*- Empty location -*/
|
||||
|
||||
empty_location(
|
||||
int location: @location_default ref
|
||||
);
|
||||
|
||||
/*- Source location prefix -*/
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user