def reduce_OptInheritable_ATTRIBUTE_NameAndExtends_NL(self, *kids): np: NameWithParents = kids[2].val self.val = esast.AttributeDeclaration( name=np.name, extends=np.extends, inheritable=kids[0].val )
def reduce_ATTRIBUTE_ParenRawString_DeclarationSpecsBlob(self, *kids): eql = kids[1].parse_as_attribute_decl() attributes = [] for spec in kids[2].val: if isinstance(spec, esast.Attribute): attributes.append(spec) else: raise SchemaSyntaxError( 'illegal definition', context=spec.context) self.val = esast.AttributeDeclaration( name=eql.name.name, extends=eql.bases, type=eql.type, attributes=attributes)
def reduce_attribute_with_specs(self, *kids): """%reduce OptInheritable ATTRIBUTE NameAndExtends DeclarationSpecsBlob """ np: NameWithParents = kids[2].val self.val = esast.AttributeDeclaration( name=np.name, extends=np.extends, **_process_decl_body( kids[3].val, ( esast.Attribute, esast.Field ) ) )
def reduce_ATTRIBUTE_ParenRawString_NL(self, *kids): eql = kids[1].parse_as_attribute_decl() self.val = esast.AttributeDeclaration( name=eql.name.name, extends=eql.bases, type=eql.type)
def reduce_ATTRIBUTE_ParenRawString_NL(self, *kids): eql = kids[1].parse_as_attribute_decl() self.val = esast.AttributeDeclaration( name=eql.name.name, extends=[qlast.TypeName(maintype=base) for base in eql.bases], type=eql.type)