fix(tests): serialize alias statements
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from typing import Optional, Sequence
|
||||
|
||||
from midas.ast.midas import (
|
||||
AliasStmt,
|
||||
BinaryExpr,
|
||||
CallExpr,
|
||||
ComplexType,
|
||||
@@ -61,6 +62,13 @@ class MidasAstJsonSerializer(
|
||||
"bound": self._serialize_optional(param.bound),
|
||||
}
|
||||
|
||||
def visit_alias_stmt(self, stmt: AliasStmt) -> dict:
|
||||
return {
|
||||
"_type": "AliasStmt",
|
||||
"name": stmt.name.lexeme,
|
||||
"type": stmt.type.accept(self),
|
||||
}
|
||||
|
||||
def visit_member_stmt(self, stmt: MemberStmt) -> dict:
|
||||
return {
|
||||
"_type": "MemberStmt",
|
||||
|
||||
Reference in New Issue
Block a user