tools/spec: use more consistent block comment separators
This commit is contained in:
parent
e592afd8e0
commit
7aca56ce9e
@ -130,7 +130,6 @@ class Placeholder(Type):
|
||||
super().__init__(name)
|
||||
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
class Unscoped(Type):
|
||||
def __init__(self, name: str):
|
||||
@ -144,7 +143,6 @@ class Unscoped(Type):
|
||||
return "\n".join(t.define(reg.types) for t in self.values)
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
class Include(Type):
|
||||
def __init__(self, node):
|
||||
@ -159,6 +157,7 @@ class Include(Type):
|
||||
return self.directive or "#include <%s>" % self.name
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
class Define(Type):
|
||||
def __init__(self, node):
|
||||
assert node.tag == 'type'
|
||||
@ -173,6 +172,7 @@ class Define(Type):
|
||||
return self.directive
|
||||
|
||||
|
||||
###############################################################################
|
||||
class Bitmask(Type):
|
||||
def __init__(self, node):
|
||||
assert node.tag == 'type'
|
||||
@ -217,6 +217,7 @@ class Bitmask(Type):
|
||||
}
|
||||
|
||||
|
||||
###############################################################################
|
||||
class Handle(Type):
|
||||
parents: List[str]
|
||||
type: str
|
||||
@ -263,6 +264,7 @@ class Handle(Type):
|
||||
return False
|
||||
|
||||
|
||||
###############################################################################
|
||||
class Enum(Type):
|
||||
def __init__(self, node):
|
||||
assert node.tag == 'type'
|
||||
@ -292,6 +294,7 @@ class Enum(Type):
|
||||
}
|
||||
|
||||
|
||||
###############################################################################
|
||||
class BaseType(AliasType):
|
||||
"""
|
||||
Represents fundamental types that aliases of system provided types and used
|
||||
@ -308,6 +311,7 @@ class BaseType(AliasType):
|
||||
)
|
||||
|
||||
|
||||
###############################################################################
|
||||
class FuncPointer(Type):
|
||||
def __init__(self, node):
|
||||
assert node.tag == 'type'
|
||||
@ -324,6 +328,7 @@ class FuncPointer(Type):
|
||||
return self.text
|
||||
|
||||
|
||||
###############################################################################
|
||||
class POD(Type):
|
||||
def __init__(self, node):
|
||||
assert node.tag == 'type'
|
||||
@ -370,16 +375,19 @@ class POD(Type):
|
||||
}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
class Struct(POD):
|
||||
def __init__(self, node):
|
||||
super().__init__(node)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
class Union(POD):
|
||||
def __init__(self, node):
|
||||
super().__init__(node)
|
||||
|
||||
|
||||
###############################################################################
|
||||
class Constant(Type):
|
||||
def __init__(self, node, **kwargs):
|
||||
assert node.tag == 'enum'
|
||||
@ -410,6 +418,7 @@ class Constant(Type):
|
||||
}
|
||||
|
||||
|
||||
###############################################################################
|
||||
class Command(Type):
|
||||
class Param(Type):
|
||||
def __init__(self, node, **kwargs):
|
||||
@ -484,6 +493,7 @@ class Command(Type):
|
||||
return not self.is_instance(reg)
|
||||
|
||||
|
||||
###############################################################################
|
||||
class Require(object):
|
||||
def __init__(self, root):
|
||||
self.values = []
|
||||
@ -533,6 +543,7 @@ class Require(object):
|
||||
return required
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
class Feature(Type):
|
||||
def __init__(self, root):
|
||||
assert root.tag == 'feature'
|
||||
@ -560,6 +571,7 @@ class Feature(Type):
|
||||
return result
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
class Extension(Type):
|
||||
def __init__(self, root):
|
||||
assert root.tag == 'extension'
|
||||
@ -600,7 +612,6 @@ class Extension(Type):
|
||||
return required
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
def ignore_node(types:Dict[str, Type], root):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user