WIP on ast gen schema.
This commit is contained in:
parent
e9ccb0a5bd
commit
4c2ee8f929
@ -11,6 +11,7 @@ $defs:
|
||||
description: A definition of a node type.
|
||||
oneOf:
|
||||
- $ref: "#/$defs/StructNodeDefinition"
|
||||
- $ref: "#/$defs/LeafStructNodeDefinition"
|
||||
- $ref: "#/$defs/EnumNodeDefinition"
|
||||
- $ref: "#/$defs/LeafEnumNodeDefinition"
|
||||
StructNodeDefinition:
|
||||
@ -26,6 +27,20 @@ $defs:
|
||||
$ref: "#/$defs/StructChildDefinition"
|
||||
required:
|
||||
- children
|
||||
LeafStructNodeDefinition:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
description: A description of a Leaf-Struct node to be built.
|
||||
properties:
|
||||
type:
|
||||
const: leaf_struct
|
||||
children:
|
||||
description: Ordered child fields for this node.
|
||||
items:
|
||||
$ref: "#/$defs/LeafStructChildDefinition"
|
||||
required:
|
||||
- type
|
||||
- children
|
||||
EnumNodeDefinition:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
@ -199,6 +214,8 @@ $defs:
|
||||
type: string
|
||||
enum:
|
||||
- parse_number_base
|
||||
LeafStructChildDefinition:
|
||||
# TODO
|
||||
EnumChildDefinition:
|
||||
description: A definition of an enum node's child. Either a bare rule (string) in Pascal case, or an object.
|
||||
oneOf:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user