test: bunch of tests
Written with AI, still need to check them ref: N25B-449
This commit is contained in:
@@ -77,7 +77,7 @@ class AstTerm(AstExpression, ABC):
|
||||
return AstBinaryOp(self, BinaryOperatorType.NOT_EQUALS, _coalesce_expr(other))
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class AstAtom(AstTerm):
|
||||
"""
|
||||
Grounded expression in all lowercase.
|
||||
@@ -89,7 +89,7 @@ class AstAtom(AstTerm):
|
||||
return self.value.lower()
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class AstVar(AstTerm):
|
||||
"""
|
||||
Ungrounded variable expression. First letter capitalized.
|
||||
@@ -101,7 +101,7 @@ class AstVar(AstTerm):
|
||||
return self.name.capitalize()
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class AstNumber(AstTerm):
|
||||
value: int | float
|
||||
|
||||
@@ -109,7 +109,7 @@ class AstNumber(AstTerm):
|
||||
return str(self.value)
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class AstString(AstTerm):
|
||||
value: str
|
||||
|
||||
@@ -117,7 +117,7 @@ class AstString(AstTerm):
|
||||
return f'"{self.value}"'
|
||||
|
||||
|
||||
@dataclass
|
||||
@dataclass(eq=False)
|
||||
class AstLiteral(AstTerm):
|
||||
functor: str
|
||||
terms: list[AstTerm] = field(default_factory=list)
|
||||
|
||||
Reference in New Issue
Block a user