Skip to content

Commit 8a8eb75

Browse files
committed
Daily Update
1 parent 1ee348c commit 8a8eb75

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

ZeroLang.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import math
12
import os
23

34
TT_FLOAT = 'FLOAT'
@@ -1357,6 +1358,9 @@ def ored_by(self, other):
13571358
def notted(self):
13581359
return Number(1 if self.value == 0 else 0).set_context(self.context), None
13591360

1361+
def math_PI(self):
1362+
return math.pi
1363+
13601364
def copy(self):
13611365
copy = Number(self.value)
13621366
copy.set_pos(self.pos_start, self.pos_end)
@@ -1866,7 +1870,7 @@ def visit_CallNode(self, node, context):
18661870
global_symbol_table.set("NULL", Number.null)
18671871
global_symbol_table.set("FALSE", Number.false)
18681872
global_symbol_table.set("TRUE", Number.true)
1869-
# global_symbol_table.set("MATH_PI", Number.math_PI)
1873+
global_symbol_table.set("MATH_PI", Number.math_PI)
18701874
global_symbol_table.set("print", BuiltInFunction.print)
18711875
global_symbol_table.set("print_ret", BuiltInFunction.print_ret)
18721876
global_symbol_table.set("input", BuiltInFunction.input)
265 Bytes
Binary file not shown.
-2 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)