From 7bc353c7aa31786724d21123044b83bb25c96760 Mon Sep 17 00:00:00 2001 From: germax26 Date: Mon, 6 Jan 2025 13:58:40 +1100 Subject: [PATCH] Fix errors --- examples/fib.ppp | 4 ++-- ppp_ast.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/fib.ppp b/examples/fib.ppp index b4ac859..3e5ba16 100644 --- a/examples/fib.ppp +++ b/examples/fib.ppp @@ -1,5 +1,5 @@ a: (int, int) = (0, 1); for i in range(0, 100) { - a = (a[1], a[0] + a[1]); - print(int_to_str(a[0])+"\n"); + a = (a.1, a.0 + a.1); + print(int_to_str(a.0)+"\n"); } \ No newline at end of file diff --git a/ppp_ast.py b/ppp_ast.py index 709a1f9..e7f57be 100644 --- a/ppp_ast.py +++ b/ppp_ast.py @@ -43,7 +43,7 @@ class TypeSpecification(TypeExpression): types: List[TypeExpression] def represent(self) -> str: - return f'{self.type.represent()}<{', '.join([type.represent() for type in self.types])}>' + return f"{self.type.represent()}<{', '.join([type.represent() for type in self.types])}>" @dataclass class FunctionTypeExpr(TypeExpression):