Update schema for ast gen.
This commit is contained in:
parent
e21b428e26
commit
4b59abc989
@ -35,8 +35,8 @@ $defs:
|
||||
- $ref: "#/$defs/ProductionDefinition"
|
||||
- $ref: "#/$defs/NodeProductionDefinition"
|
||||
- $ref: "#/$defs/PolymorphicTypeDefinition"
|
||||
- $ref: "#/$defs/PolymorphicBuildDefinition" # deprecated
|
||||
- $ref: "#/$defs/PolymorphicEnumLoopBuildDefinition"
|
||||
- $ref: "#/$defs/PolymorphicPassThroughDefinition"
|
||||
|
||||
# Struct
|
||||
StructNodeDefinition:
|
||||
@ -171,7 +171,7 @@ $defs:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
boolean:
|
||||
$ref: "#/$defs/StructChildMemberBuildBooleanProps"'
|
||||
$ref: "#/$defs/StructChildMemberBuildBooleanProps"
|
||||
required:
|
||||
- boolean
|
||||
StructChildMemberBuildBooleanProps:
|
||||
@ -331,80 +331,6 @@ $defs:
|
||||
required:
|
||||
- kind
|
||||
|
||||
# Polymorphic Build
|
||||
PolymorphicBuildDefinition:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
polymorphic_build:
|
||||
type: object
|
||||
$ref: "#/$defs/PolymorphicBuildProps"
|
||||
required:
|
||||
- polymorphic_build
|
||||
PolymorphicBuildProps:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
return_type:
|
||||
type: string
|
||||
alternatives:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/$defs/PolymorphicBuildAlternative"
|
||||
required:
|
||||
- return_type
|
||||
- alternatives
|
||||
PolymorphicBuildAlternative:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
test:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
number_of_pairs:
|
||||
type: string
|
||||
required:
|
||||
- number_of_pairs
|
||||
action:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
oneOf:
|
||||
- $ref: "#/$defs/PolymorphicBuildAlternativeBuild"
|
||||
- $ref: "#/$defs/PolymorphicBuildAlternativeReturnBuild"
|
||||
required:
|
||||
- test
|
||||
- action
|
||||
PolymorphicBuildAlternativeBuild:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
build:
|
||||
type: object
|
||||
properties:
|
||||
enum_variant:
|
||||
type: string
|
||||
children:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/$defs/StructChildHash"
|
||||
required:
|
||||
- build
|
||||
PolymorphicBuildAlternativeReturnBuild:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
return_build:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
required:
|
||||
- return_build
|
||||
|
||||
# Polymorphic Enum Loop Build
|
||||
PolymorphicEnumLoopBuildDefinition:
|
||||
type: object
|
||||
@ -512,6 +438,77 @@ $defs:
|
||||
required:
|
||||
- on_each
|
||||
|
||||
# Polymorphic Pass Through
|
||||
PolymorphicPassThroughDefinition:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
polymorphic_pass_through:
|
||||
$ref: "#/$defs/PolymorphicPassThroughProps"
|
||||
required:
|
||||
- polymorphic_pass_through
|
||||
PolymorphicPassThroughProps:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
build:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
variants:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/$defs/PolymorphicPassThroughVariantHash"
|
||||
required:
|
||||
- build
|
||||
- variants
|
||||
PolymorphicPassThroughVariantHash:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
minProperties: 1
|
||||
maxProperties: 1
|
||||
patternProperties:
|
||||
"^([A-Z][a-z]*)*$":
|
||||
$ref: "#/$defs/PolymorphicPassThroughVariantProps"
|
||||
PolymorphicPassThroughVariantProps:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
oneOf:
|
||||
- $ref: "#/$defs/PolymorphicPassThroughVariantInner"
|
||||
- $ref: "#/$defs/PolymorphicPassThroughVariantPassThrough"
|
||||
PolymorphicPassThroughVariantInner:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
inner:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
required:
|
||||
- inner
|
||||
PolymorphicPassThroughVariantPassThrough:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
pass_through:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
kind:
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
required:
|
||||
- pass_through
|
||||
|
||||
# Production
|
||||
ProductionDefinition:
|
||||
type: object
|
||||
|
||||
@ -1028,7 +1028,7 @@ ObjectIndex:
|
||||
children:
|
||||
- expression
|
||||
PrimaryExpression:
|
||||
polymorphic_type: # TODO: polymorphic pass through
|
||||
polymorphic_pass_through:
|
||||
build:
|
||||
kind: Expression
|
||||
variants:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user