Skip to content

Commit 9c25c15

Browse files
committed
Python: add YAML dbscheme fragment
1 parent 4bf03e7 commit 9c25c15

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

python/ql/lib/semmlecode.python.dbscheme

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,3 +1104,44 @@ xmllocations(int xmlElement: @xmllocatable ref,
11041104
int location: @location_default ref);
11051105

11061106
@xmllocatable = @xmlcharacters | @xmlelement | @xmlcomment | @xmlattribute | @xmldtd | @file | @xmlnamespace;
1107+
1108+
/**
1109+
* YAML
1110+
*/
1111+
1112+
#keyset[parent, idx]
1113+
yaml (unique int id: @yaml_node,
1114+
int kind: int ref,
1115+
int parent: @yaml_node_parent ref,
1116+
int idx: int ref,
1117+
varchar(900) tag: string ref,
1118+
varchar(900) tostring: string ref);
1119+
1120+
case @yaml_node.kind of
1121+
0 = @yaml_scalar_node
1122+
| 1 = @yaml_mapping_node
1123+
| 2 = @yaml_sequence_node
1124+
| 3 = @yaml_alias_node
1125+
;
1126+
1127+
@yaml_collection_node = @yaml_mapping_node | @yaml_sequence_node;
1128+
1129+
@yaml_node_parent = @yaml_collection_node | @file;
1130+
1131+
yaml_anchors (unique int node: @yaml_node ref,
1132+
varchar(900) anchor: string ref);
1133+
1134+
yaml_aliases (unique int alias: @yaml_alias_node ref,
1135+
varchar(900) target: string ref);
1136+
1137+
yaml_scalars (unique int scalar: @yaml_scalar_node ref,
1138+
int style: int ref,
1139+
varchar(900) value: string ref);
1140+
1141+
yaml_errors (unique int id: @yaml_error,
1142+
varchar(900) message: string ref);
1143+
1144+
yaml_locations(unique int locatable: @yaml_locatable ref,
1145+
int location: @location_default ref);
1146+
1147+
@yaml_locatable = @yaml_node | @yaml_error;

0 commit comments

Comments
 (0)