Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change types of complex numbers to c32 and c64 #135

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/lpython/semantics/python_ast_to_asr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,10 @@ class CommonVisitor : public AST::BaseVisitor<Derived> {
} else if (var_annotation == "f64") {
type = ASRUtils::TYPE(ASR::make_Real_t(al, loc,
8, dims.p, dims.size()));
} else if (var_annotation == "c128") {
} else if (var_annotation == "c32") {
type = ASRUtils::TYPE(ASR::make_Complex_t(al, loc,
4, dims.p, dims.size()));
} else if (var_annotation == "c64") {
type = ASRUtils::TYPE(ASR::make_Complex_t(al, loc,
8, dims.p, dims.size()));
} else if (var_annotation == "str") {
Expand Down
3 changes: 2 additions & 1 deletion src/runtime/ltypes/ltypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
i64 = []
f32 = []
f64 = []
c128 = []
c32 = []
c64 = []
8 changes: 4 additions & 4 deletions tests/complex1.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
def test_complex():
c: c128
c1: c128
c2: c128
c3: c128
c: c32
c1: c32
c2: c32
c3: c64
b: bool

# constant real or int as args
Expand Down
2 changes: 1 addition & 1 deletion tests/complex2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def test_complex_cpp():
c: c128
c: c64
c = complex(423., 23423.54)
c = complex(1, 2)
2 changes: 1 addition & 1 deletion tests/expr10.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def test_UnaryOp():
a = -False
a = ~True

c: c128
c: c32
c = +complex(1, 2)
c = -complex(3, 65.0)
b1 = not complex(3, 4)
Expand Down
4 changes: 2 additions & 2 deletions tests/reference/asr-complex1-f26c460.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "asr-complex1-f26c460",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/complex1.py",
"infile_hash": "675b6441d21e32ad7819fe67b9985efec7e09e7ef083869c6890ed53",
"infile_hash": "e5e897465f4a0e1e59bcde88e49ce7adb1ddb84283450b631d5479f7",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-complex1-f26c460.stdout",
"stdout_hash": "6b79a89bed13fddcf9956c3154fe9d880267f7410044eb3cb29cee9b",
"stdout_hash": "3d30525175033241e93db499e684dd2744b4272da6e49756d4a9aa46",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-complex1-f26c460.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(TranslationUnit (SymbolTable 1 {main_program: (Program (SymbolTable 3 {}) main_program [] []), test_complex: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Logical 1 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 8 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 8 []) Source Public Required .false.), c2: (Variable 2 c2 Local () () Default (Complex 8 []) Source Public Required .false.), c3: (Variable 2 c3 Local () () Default (Complex 8 []) Source Public Required .false.)}) test_complex [] [(= (Var 2 c) (ConstantComplex 0.000000 0.000000 (Complex 8 [])) ()) (= (Var 2 c) (ConstantComplex 3.400000 0.000000 (Complex 8 [])) ()) (= (Var 2 c) (ConstantComplex 5.000000 4.300000 (Complex 8 [])) ()) (= (Var 2 c) (ConstantComplex 1.000000 0.000000 (Complex 8 [])) ()) (= (Var 2 c1) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) (= (Var 2 c2) (ConstantComplex 2.000000 4.500000 (Complex 8 [])) ()) (= (Var 2 c3) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) (= (Var 2 b) (Compare (Var 2 c1) NotEq (Var 2 c2) (Logical 4 []) () ()) ()) (= (Var 2 b) (Compare (Var 2 c1) Eq (Var 2 c3) (Logical 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c1) Add (Var 2 c2) (Complex 8 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c2) Sub (Var 2 c1) (Complex 8 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c1) Mul (Var 2 c2) (Complex 8 []) () ()) ()) (= (Var 2 c) (BinOp (ConstantComplex 1.000000 2.000000 (Complex 8 [])) Pow (ConstantComplex 3.345340 4.867868 (Complex 8 [])) (Complex 8 []) (ConstantComplex 0.015553 0.065561 (Complex 8 [])) ()) ()) (= (Var 2 c) (BinOp (ConstantComplex 1.000000 2.000000 (Complex 8 [])) Mul (ConstantComplex 3.000000 4.000000 (Complex 8 [])) (Complex 8 []) (ConstantComplex -5.000000 10.000000 (Complex 8 [])) ()) ()) (= (Var 2 c) (BinOp (ConstantComplex 4.000000 5.000000 (Complex 8 [])) Sub (ConstantComplex 3.000000 4.000000 (Complex 8 [])) (Complex 8 []) (ConstantComplex 1.000000 1.000000 (Complex 8 [])) ()) ())] Source Public Implementation () .false. .false.)}) [])
(TranslationUnit (SymbolTable 1 {main_program: (Program (SymbolTable 3 {}) main_program [] []), test_complex: (Subroutine (SymbolTable 2 {b: (Variable 2 b Local () () Default (Logical 1 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), c1: (Variable 2 c1 Local () () Default (Complex 4 []) Source Public Required .false.), c2: (Variable 2 c2 Local () () Default (Complex 4 []) Source Public Required .false.), c3: (Variable 2 c3 Local () () Default (Complex 8 []) Source Public Required .false.)}) test_complex [] [(= (Var 2 c) (ConstantComplex 0.000000 0.000000 (Complex 8 [])) ()) (= (Var 2 c) (ConstantComplex 3.400000 0.000000 (Complex 8 [])) ()) (= (Var 2 c) (ConstantComplex 5.000000 4.300000 (Complex 8 [])) ()) (= (Var 2 c) (ConstantComplex 1.000000 0.000000 (Complex 8 [])) ()) (= (Var 2 c1) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) (= (Var 2 c2) (ConstantComplex 2.000000 4.500000 (Complex 8 [])) ()) (= (Var 2 c3) (ConstantComplex 3.000000 4.000000 (Complex 8 [])) ()) (= (Var 2 b) (Compare (Var 2 c1) NotEq (Var 2 c2) (Logical 4 []) () ()) ()) (= (Var 2 b) (Compare (Var 2 c1) Eq (Var 2 c3) (Logical 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c1) Add (Var 2 c2) (Complex 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c2) Sub (Var 2 c1) (Complex 4 []) () ()) ()) (= (Var 2 c) (BinOp (Var 2 c1) Mul (Var 2 c2) (Complex 4 []) () ()) ()) (= (Var 2 c) (BinOp (ConstantComplex 1.000000 2.000000 (Complex 8 [])) Pow (ConstantComplex 3.345340 4.867868 (Complex 8 [])) (Complex 8 []) (ConstantComplex 0.015553 0.065561 (Complex 8 [])) ()) ()) (= (Var 2 c) (BinOp (ConstantComplex 1.000000 2.000000 (Complex 8 [])) Mul (ConstantComplex 3.000000 4.000000 (Complex 8 [])) (Complex 8 []) (ConstantComplex -5.000000 10.000000 (Complex 8 [])) ()) ()) (= (Var 2 c) (BinOp (ConstantComplex 4.000000 5.000000 (Complex 8 [])) Sub (ConstantComplex 3.000000 4.000000 (Complex 8 [])) (Complex 8 []) (ConstantComplex 1.000000 1.000000 (Complex 8 [])) ()) ())] Source Public Implementation () .false. .false.)}) [])
4 changes: 2 additions & 2 deletions tests/reference/asr-expr10-efcbb1b.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "asr-expr10-efcbb1b",
"cmd": "lpython --show-asr --no-color {infile} -o {outfile}",
"infile": "tests/expr10.py",
"infile_hash": "47b6bf92746de0a4c15a2b71c025b442d84f7c2711d2c74c2e0b34ab",
"infile_hash": "b49c0f11a3568a0eac16d4998317034b70b81d6be5a597cfada7438c",
"outfile": null,
"outfile_hash": null,
"stdout": "asr-expr10-efcbb1b.stdout",
"stdout_hash": "d53b1e4e45094f0b1f978fc38bb612bd511a2de2fc5b066876220e16",
"stdout_hash": "1a93821086e684082caf0339703a51dd3cfb1de772987dacdfd63ada",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/asr-expr10-efcbb1b.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(TranslationUnit (SymbolTable 1 {main_program: (Program (SymbolTable 3 {}) main_program [] []), test_UnaryOp: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), b1: (Variable 2 b1 Local () () Default (Logical 1 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 1 []) Source Public Required .false.), b3: (Variable 2 b3 Local () () Default (Logical 1 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 8 []) Source Public Required .false.), f: (Variable 2 f Local () () Default (Real 4 []) Source Public Required .false.)}) test_UnaryOp [] [(= (Var 2 a) (UnaryOp UAdd (ConstantInteger 4 (Integer 4 [])) (Integer 4 []) (ConstantInteger 4 (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp USub (ConstantInteger 500 (Integer 4 [])) (Integer 4 []) (ConstantInteger -500 (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp Invert (ConstantInteger 5 (Integer 4 [])) (Integer 4 []) (ConstantInteger -6 (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp Not (ConstantInteger 5 (Integer 4 [])) (Integer 4 []) (ConstantLogical .false. (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp Not (UnaryOp USub (ConstantInteger 1 (Integer 4 [])) (Integer 4 []) (ConstantInteger -1 (Integer 4 []))) (Integer 4 []) (ConstantLogical .false. (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp Not (ConstantInteger 0 (Integer 4 [])) (Integer 4 []) (ConstantLogical .true. (Integer 4 []))) ()) (= (Var 2 f) (UnaryOp UAdd (ConstantReal 1.000000 (Real 8 [])) (Real 8 []) (ConstantReal 1.000000 (Real 8 []))) ()) (= (Var 2 f) (UnaryOp USub (ConstantReal 183745.534000 (Real 8 [])) (Real 8 []) (ConstantReal -183745.534000 (Real 8 []))) ()) (= (Var 2 b1) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 2 b2) (UnaryOp Not (ConstantLogical .false. (Logical 1 [])) (Logical 1 []) (ConstantLogical .true. (Logical 1 []))) ()) (= (Var 2 b3) (UnaryOp Not (Var 2 b2) (Logical 1 []) ()) ()) (= (Var 2 a) (UnaryOp UAdd (ConstantLogical .true. (Logical 1 [])) (Logical 1 []) (ConstantInteger 1 (Logical 1 []))) ()) (= (Var 2 a) (UnaryOp USub (ConstantLogical .false. (Logical 1 [])) (Logical 1 []) (ConstantInteger 0 (Logical 1 []))) ()) (= (Var 2 a) (UnaryOp Invert (ConstantLogical .true. (Logical 1 [])) (Logical 1 []) (ConstantInteger -2 (Logical 1 []))) ()) (= (Var 2 c) (UnaryOp UAdd (ConstantComplex 1.000000 2.000000 (Complex 8 [])) (Complex 8 []) (ConstantComplex 1.000000 2.000000 (Complex 8 []))) ()) (= (Var 2 c) (UnaryOp USub (ConstantComplex 3.000000 65.000000 (Complex 8 [])) (Complex 8 []) (ConstantComplex -3.000000 -65.000000 (Complex 8 []))) ()) (= (Var 2 b1) (UnaryOp Not (ConstantComplex 3.000000 4.000000 (Complex 8 [])) (Complex 8 []) (ConstantLogical .false. (Complex 8 []))) ()) (= (Var 2 b2) (UnaryOp Not (ConstantComplex 0.000000 0.000000 (Complex 8 [])) (Complex 8 []) (ConstantLogical .true. (Complex 8 []))) ())] Source Public Implementation () .false. .false.)}) [])
(TranslationUnit (SymbolTable 1 {main_program: (Program (SymbolTable 3 {}) main_program [] []), test_UnaryOp: (Subroutine (SymbolTable 2 {a: (Variable 2 a Local () () Default (Integer 4 []) Source Public Required .false.), b1: (Variable 2 b1 Local () () Default (Logical 1 []) Source Public Required .false.), b2: (Variable 2 b2 Local () () Default (Logical 1 []) Source Public Required .false.), b3: (Variable 2 b3 Local () () Default (Logical 1 []) Source Public Required .false.), c: (Variable 2 c Local () () Default (Complex 4 []) Source Public Required .false.), f: (Variable 2 f Local () () Default (Real 4 []) Source Public Required .false.)}) test_UnaryOp [] [(= (Var 2 a) (UnaryOp UAdd (ConstantInteger 4 (Integer 4 [])) (Integer 4 []) (ConstantInteger 4 (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp USub (ConstantInteger 500 (Integer 4 [])) (Integer 4 []) (ConstantInteger -500 (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp Invert (ConstantInteger 5 (Integer 4 [])) (Integer 4 []) (ConstantInteger -6 (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp Not (ConstantInteger 5 (Integer 4 [])) (Integer 4 []) (ConstantLogical .false. (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp Not (UnaryOp USub (ConstantInteger 1 (Integer 4 [])) (Integer 4 []) (ConstantInteger -1 (Integer 4 []))) (Integer 4 []) (ConstantLogical .false. (Integer 4 []))) ()) (= (Var 2 a) (UnaryOp Not (ConstantInteger 0 (Integer 4 [])) (Integer 4 []) (ConstantLogical .true. (Integer 4 []))) ()) (= (Var 2 f) (UnaryOp UAdd (ConstantReal 1.000000 (Real 8 [])) (Real 8 []) (ConstantReal 1.000000 (Real 8 []))) ()) (= (Var 2 f) (UnaryOp USub (ConstantReal 183745.534000 (Real 8 [])) (Real 8 []) (ConstantReal -183745.534000 (Real 8 []))) ()) (= (Var 2 b1) (ConstantLogical .true. (Logical 1 [])) ()) (= (Var 2 b2) (UnaryOp Not (ConstantLogical .false. (Logical 1 [])) (Logical 1 []) (ConstantLogical .true. (Logical 1 []))) ()) (= (Var 2 b3) (UnaryOp Not (Var 2 b2) (Logical 1 []) ()) ()) (= (Var 2 a) (UnaryOp UAdd (ConstantLogical .true. (Logical 1 [])) (Logical 1 []) (ConstantInteger 1 (Logical 1 []))) ()) (= (Var 2 a) (UnaryOp USub (ConstantLogical .false. (Logical 1 [])) (Logical 1 []) (ConstantInteger 0 (Logical 1 []))) ()) (= (Var 2 a) (UnaryOp Invert (ConstantLogical .true. (Logical 1 [])) (Logical 1 []) (ConstantInteger -2 (Logical 1 []))) ()) (= (Var 2 c) (UnaryOp UAdd (ConstantComplex 1.000000 2.000000 (Complex 8 [])) (Complex 8 []) (ConstantComplex 1.000000 2.000000 (Complex 8 []))) ()) (= (Var 2 c) (UnaryOp USub (ConstantComplex 3.000000 65.000000 (Complex 8 [])) (Complex 8 []) (ConstantComplex -3.000000 -65.000000 (Complex 8 []))) ()) (= (Var 2 b1) (UnaryOp Not (ConstantComplex 3.000000 4.000000 (Complex 8 [])) (Complex 8 []) (ConstantLogical .false. (Complex 8 []))) ()) (= (Var 2 b2) (UnaryOp Not (ConstantComplex 0.000000 0.000000 (Complex 8 [])) (Complex 8 []) (ConstantLogical .true. (Complex 8 []))) ())] Source Public Implementation () .false. .false.)}) [])
4 changes: 2 additions & 2 deletions tests/reference/ast-complex1-800b4bb.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "ast-complex1-800b4bb",
"cmd": "lpython --show-ast --no-color {infile} -o {outfile}",
"infile": "tests/complex1.py",
"infile_hash": "675b6441d21e32ad7819fe67b9985efec7e09e7ef083869c6890ed53",
"infile_hash": "e5e897465f4a0e1e59bcde88e49ce7adb1ddb84283450b631d5479f7",
"outfile": null,
"outfile_hash": null,
"stdout": "ast-complex1-800b4bb.stdout",
"stdout_hash": "e29d418825d97179f821c342aeef7a7de21d41bfb2ef31d912045f23",
"stdout_hash": "90fc1deef6ad16c1f2bb64550c84699e09c23fc39b34b28f97c143f4",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
2 changes: 1 addition & 1 deletion tests/reference/ast-complex1-800b4bb.stdout
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(Module [(FunctionDef test_complex ([] [] [] [] [] [] []) [(AnnAssign (Name c Store) (Name c128 Load) () 1) (AnnAssign (Name c1 Store) (Name c128 Load) () 1) (AnnAssign (Name c2 Store) (Name c128 Load) () 1) (AnnAssign (Name c3 Store) (Name c128 Load) () 1) (AnnAssign (Name b Store) (Name bool Load) () 1) (Assign [(Name c Store)] (Call (Name complex Load) [] []) ()) (Assign [(Name c Store)] (Call (Name complex Load) [(ConstantFloat 3.400000 ())] []) ()) (Assign [(Name c Store)] (Call (Name complex Load) [(ConstantFloat 5.000000 ()) (ConstantFloat 4.300000 ())] []) ()) (Assign [(Name c Store)] (Call (Name complex Load) [(ConstantInt 1 ())] []) ()) (Assign [(Name c1 Store)] (Call (Name complex Load) [(ConstantInt 3 ()) (ConstantInt 4 ())] []) ()) (Assign [(Name c2 Store)] (Call (Name complex Load) [(ConstantInt 2 ()) (ConstantFloat 4.500000 ())] []) ()) (Assign [(Name c3 Store)] (Call (Name complex Load) [(ConstantFloat 3.000000 ()) (ConstantFloat 4.000000 ())] []) ()) (Assign [(Name b Store)] (Compare (Name c1 Load) NotEq [(Name c2 Load)]) ()) (Assign [(Name b Store)] (Compare (Name c1 Load) Eq [(Name c3 Load)]) ()) (Assign [(Name c Store)] (BinOp (Name c1 Load) Add (Name c2 Load)) ()) (Assign [(Name c Store)] (BinOp (Name c2 Load) Sub (Name c1 Load)) ()) (Assign [(Name c Store)] (BinOp (Name c1 Load) Mult (Name c2 Load)) ()) (Assign [(Name c Store)] (BinOp (Call (Name complex Load) [(ConstantInt 1 ()) (ConstantInt 2 ())] []) Pow (Call (Name complex Load) [(ConstantFloat 3.345340 ()) (ConstantFloat 4.867868 ())] [])) ()) (Assign [(Name c Store)] (BinOp (Call (Name complex Load) [(ConstantInt 1 ()) (ConstantInt 2 ())] []) Mult (Call (Name complex Load) [(ConstantInt 3 ()) (ConstantInt 4 ())] [])) ()) (Assign [(Name c Store)] (BinOp (Call (Name complex Load) [(ConstantInt 4 ()) (ConstantInt 5 ())] []) Sub (Call (Name complex Load) [(ConstantInt 3 ()) (ConstantInt 4 ())] [])) ())] [] () ())] [])
(Module [(FunctionDef test_complex ([] [] [] [] [] [] []) [(AnnAssign (Name c Store) (Name c32 Load) () 1) (AnnAssign (Name c1 Store) (Name c32 Load) () 1) (AnnAssign (Name c2 Store) (Name c32 Load) () 1) (AnnAssign (Name c3 Store) (Name c64 Load) () 1) (AnnAssign (Name b Store) (Name bool Load) () 1) (Assign [(Name c Store)] (Call (Name complex Load) [] []) ()) (Assign [(Name c Store)] (Call (Name complex Load) [(ConstantFloat 3.400000 ())] []) ()) (Assign [(Name c Store)] (Call (Name complex Load) [(ConstantFloat 5.000000 ()) (ConstantFloat 4.300000 ())] []) ()) (Assign [(Name c Store)] (Call (Name complex Load) [(ConstantInt 1 ())] []) ()) (Assign [(Name c1 Store)] (Call (Name complex Load) [(ConstantInt 3 ()) (ConstantInt 4 ())] []) ()) (Assign [(Name c2 Store)] (Call (Name complex Load) [(ConstantInt 2 ()) (ConstantFloat 4.500000 ())] []) ()) (Assign [(Name c3 Store)] (Call (Name complex Load) [(ConstantFloat 3.000000 ()) (ConstantFloat 4.000000 ())] []) ()) (Assign [(Name b Store)] (Compare (Name c1 Load) NotEq [(Name c2 Load)]) ()) (Assign [(Name b Store)] (Compare (Name c1 Load) Eq [(Name c3 Load)]) ()) (Assign [(Name c Store)] (BinOp (Name c1 Load) Add (Name c2 Load)) ()) (Assign [(Name c Store)] (BinOp (Name c2 Load) Sub (Name c1 Load)) ()) (Assign [(Name c Store)] (BinOp (Name c1 Load) Mult (Name c2 Load)) ()) (Assign [(Name c Store)] (BinOp (Call (Name complex Load) [(ConstantInt 1 ()) (ConstantInt 2 ())] []) Pow (Call (Name complex Load) [(ConstantFloat 3.345340 ()) (ConstantFloat 4.867868 ())] [])) ()) (Assign [(Name c Store)] (BinOp (Call (Name complex Load) [(ConstantInt 1 ()) (ConstantInt 2 ())] []) Mult (Call (Name complex Load) [(ConstantInt 3 ()) (ConstantInt 4 ())] [])) ()) (Assign [(Name c Store)] (BinOp (Call (Name complex Load) [(ConstantInt 4 ()) (ConstantInt 5 ())] []) Sub (Call (Name complex Load) [(ConstantInt 3 ()) (ConstantInt 4 ())] [])) ())] [] () ())] [])
4 changes: 2 additions & 2 deletions tests/reference/ast-expr10-a8d646d.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"basename": "ast-expr10-a8d646d",
"cmd": "lpython --show-ast --no-color {infile} -o {outfile}",
"infile": "tests/expr10.py",
"infile_hash": "47b6bf92746de0a4c15a2b71c025b442d84f7c2711d2c74c2e0b34ab",
"infile_hash": "b49c0f11a3568a0eac16d4998317034b70b81d6be5a597cfada7438c",
"outfile": null,
"outfile_hash": null,
"stdout": "ast-expr10-a8d646d.stdout",
"stdout_hash": "890a7cd211aedfdaaba06f9097b065d85960075afcbb8d34824e52ee",
"stdout_hash": "5960bf68938783329070504ab762d2073d60e455f07d347860708d16",
"stderr": null,
"stderr_hash": null,
"returncode": 0
Expand Down
Loading