added hsargs, hsexit and bundler mode

This commit is contained in:
Luxferre
2026-07-04 08:52:56 +03:00
parent 10f0b39d8e
commit 4fc3ee518a
7 changed files with 116 additions and 1 deletions
+2
View File
@@ -62,6 +62,8 @@ class Clyx:
'delf': lambda: os.remove(self._stack.pop()), 'maked': lambda: os.mkdir(self._stack.pop()), 'listd': lambda: self._stack.append(os.listdir(self._stack.pop())), 'deld': lambda: os.rmdir(self._stack.pop()),
'rand': lambda: self._stack.append(randrange(int(self._stack.pop()))), '.s': lambda: self._out_num(repr(self._stack)), 'dip': lambda: (lambda q, y: (self._exec_quot(q), self._stack.append(y)))(self._stack.pop(), self._stack.pop()),
'loop': lambda: (lambda body, cond: self._exec_loop(cond, body))(self._stack.pop(), self._stack.pop()),
'hsargs': lambda: self._stack.append(list(sys.argv)),
'hsexit': lambda: sys.exit(int(self._stack.pop())),
'hseval': lambda: self._stack.append(eval(self._stack.pop())),
'chr': lambda: self._stack.append(chr(int(self._stack.pop()))), 'asc': lambda: self._stack.append(ord(self._stack.pop())),
'sin': lambda: self._stack.append(math.sin(float(self._stack.pop()))), 'cos': lambda: self._stack.append(math.cos(float(self._stack.pop()))), 'atan': lambda: self._stack.append(math.atan(float(self._stack.pop()))),
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "clyx"
version = "0.1.1"
version = "0.2"
description = "Clyx programming language interpreter"
readme = "README.md"
requires-python = ">=3.7"