Update schema for ast gen.
This commit is contained in:
parent
e21b428e26
commit
4b59abc989
@ -35,8 +35,8 @@ $defs:
|
|||||||
- $ref: "#/$defs/ProductionDefinition"
|
- $ref: "#/$defs/ProductionDefinition"
|
||||||
- $ref: "#/$defs/NodeProductionDefinition"
|
- $ref: "#/$defs/NodeProductionDefinition"
|
||||||
- $ref: "#/$defs/PolymorphicTypeDefinition"
|
- $ref: "#/$defs/PolymorphicTypeDefinition"
|
||||||
- $ref: "#/$defs/PolymorphicBuildDefinition" # deprecated
|
|
||||||
- $ref: "#/$defs/PolymorphicEnumLoopBuildDefinition"
|
- $ref: "#/$defs/PolymorphicEnumLoopBuildDefinition"
|
||||||
|
- $ref: "#/$defs/PolymorphicPassThroughDefinition"
|
||||||
|
|
||||||
# Struct
|
# Struct
|
||||||
StructNodeDefinition:
|
StructNodeDefinition:
|
||||||
@ -171,7 +171,7 @@ $defs:
|
|||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
boolean:
|
boolean:
|
||||||
$ref: "#/$defs/StructChildMemberBuildBooleanProps"'
|
$ref: "#/$defs/StructChildMemberBuildBooleanProps"
|
||||||
required:
|
required:
|
||||||
- boolean
|
- boolean
|
||||||
StructChildMemberBuildBooleanProps:
|
StructChildMemberBuildBooleanProps:
|
||||||
@ -331,80 +331,6 @@ $defs:
|
|||||||
required:
|
required:
|
||||||
- kind
|
- 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
|
# Polymorphic Enum Loop Build
|
||||||
PolymorphicEnumLoopBuildDefinition:
|
PolymorphicEnumLoopBuildDefinition:
|
||||||
type: object
|
type: object
|
||||||
@ -512,6 +438,77 @@ $defs:
|
|||||||
required:
|
required:
|
||||||
- on_each
|
- 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
|
# Production
|
||||||
ProductionDefinition:
|
ProductionDefinition:
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
@ -1028,7 +1028,7 @@ ObjectIndex:
|
|||||||
children:
|
children:
|
||||||
- expression
|
- expression
|
||||||
PrimaryExpression:
|
PrimaryExpression:
|
||||||
polymorphic_type: # TODO: polymorphic pass through
|
polymorphic_pass_through:
|
||||||
build:
|
build:
|
||||||
kind: Expression
|
kind: Expression
|
||||||
variants:
|
variants:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user