!BulletML
type: vertical
actions:
- top: !ActionDef
+ - !ActionDef
actions:
- !FireDef
bullet: !BulletDef {}
parser.BulletML]:
def add(cls, loader, dumper):
+ """Register a class in a new variable scope."""
tag = "!" + cls.__name__
if loader:
def construct(loader, node):
+ """Construct an object."""
return loader.construct_yaml_object(node, cls)
loader.add_constructor(tag, construct)
if dumper:
def represent(dumper, obj):
+ """Represent an object."""
return dumper.represent_yaml_object(tag, obj, cls)
dumper.add_representer(cls, represent)