mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Make template parent optional
Not recommended, since you lose some type checking.
This commit is contained in:
parent
1897478480
commit
6b78338d1a
5 changed files with 24 additions and 8 deletions
|
@ -140,8 +140,12 @@ def parse(tokens) -> T.Tuple[ast.UI, T.Optional[MultipleErrors]]:
|
|||
Sequence(
|
||||
Keyword("template"),
|
||||
UseIdent("name").expected("template class name"),
|
||||
Op(":").expected("`:`"),
|
||||
class_name.expected("parent class"),
|
||||
Optional(
|
||||
Sequence(
|
||||
Op(":"),
|
||||
class_name.expected("parent class"),
|
||||
)
|
||||
),
|
||||
object_content.expected("block"),
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue