mirror of
https://github.com/github/codeql.git
synced 2026-03-20 22:46:47 +01:00
81 lines
1.9 KiB
Plaintext
81 lines
1.9 KiB
Plaintext
/*- YAML -*/
|
|
|
|
#keyset[parent, idx]
|
|
yaml (unique int id: @yaml_node,
|
|
int kind: int ref,
|
|
int parent: @yaml_node_parent ref,
|
|
int idx: int ref,
|
|
string tag: string ref,
|
|
string tostring: string ref);
|
|
|
|
case @yaml_node.kind of
|
|
0 = @yaml_scalar_node
|
|
| 1 = @yaml_mapping_node
|
|
| 2 = @yaml_sequence_node
|
|
| 3 = @yaml_alias_node
|
|
;
|
|
|
|
@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node;
|
|
|
|
@yaml_node_parent = @yaml_collection_node | @file;
|
|
|
|
yaml_anchors (unique int node: @yaml_node ref,
|
|
string anchor: string ref);
|
|
|
|
yaml_aliases (unique int alias: @yaml_alias_node ref,
|
|
string target: string ref);
|
|
|
|
yaml_scalars (unique int scalar: @yaml_scalar_node ref,
|
|
int style: int ref,
|
|
string value: 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;
|
|
|
|
/*- Files and folders -*/
|
|
|
|
/**
|
|
* The location of an element.
|
|
* The location spans column `startcolumn` of line `startline` to
|
|
* column `endcolumn` of line `endline` in file `file`.
|
|
* For more information, see
|
|
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
|
|
*/
|
|
locations_default(
|
|
unique int id: @location_default,
|
|
int file: @file ref,
|
|
int beginLine: int ref,
|
|
int beginColumn: int ref,
|
|
int endLine: int ref,
|
|
int endColumn: int ref
|
|
);
|
|
|
|
files(
|
|
unique int id: @file,
|
|
string name: string ref
|
|
);
|
|
|
|
folders(
|
|
unique int id: @folder,
|
|
string name: string ref
|
|
);
|
|
|
|
@container = @file | @folder
|
|
|
|
containerparent(
|
|
int parent: @container ref,
|
|
unique int child: @container ref
|
|
);
|
|
|
|
/*- Source location prefix -*/
|
|
|
|
/**
|
|
* The source location of the snapshot.
|
|
*/
|
|
sourceLocationPrefix(string prefix : string ref);
|