easycoder 3__tar.gz → 4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of easycoder might be problematic. Click here for more details.
- {easycoder-3 → easycoder-4}/PKG-INFO +1 -1
- {easycoder-3 → easycoder-4}/easycoder/__init__.py +1 -1
- {easycoder-3 → easycoder-4}/easycoder/ec_program.py +4 -1
- easycoder-4/scripts/fizzbuzz.ecs +14 -0
- {easycoder-3/tests → easycoder-4/scripts}/tests.ecs +1 -0
- {easycoder-3 → easycoder-4}/LICENSE +0 -0
- {easycoder-3 → easycoder-4}/README.md +0 -0
- {easycoder-3 → easycoder-4}/easycoder/ec_classes.py +0 -0
- {easycoder-3 → easycoder-4}/easycoder/ec_compiler.py +0 -0
- {easycoder-3 → easycoder-4}/easycoder/ec_condition.py +0 -0
- {easycoder-3 → easycoder-4}/easycoder/ec_core.py +0 -0
- {easycoder-3 → easycoder-4}/easycoder/ec_handler.py +0 -0
- {easycoder-3 → easycoder-4}/easycoder/ec_timestamp.py +0 -0
- {easycoder-3 → easycoder-4}/easycoder/ec_value.py +0 -0
- {easycoder-3 → easycoder-4}/plugins/ec_p100.py +0 -0
- {easycoder-3 → easycoder-4}/pyproject.toml +0 -0
- {easycoder-3/tests → easycoder-4/scripts}/benchmark.ecs +0 -0
|
@@ -5,10 +5,12 @@ from .ec_classes import Script, Token, FatalError, RuntimeError
|
|
|
5
5
|
from .ec_compiler import Compiler
|
|
6
6
|
from .ec_core import Core
|
|
7
7
|
import importlib
|
|
8
|
+
from importlib.metadata import version
|
|
8
9
|
|
|
9
10
|
class Program:
|
|
10
11
|
|
|
11
12
|
def __init__(self, argv):
|
|
13
|
+
print(f'EasyCoder version {version('easycoder')}')
|
|
12
14
|
scriptName = None
|
|
13
15
|
domains=[Core]
|
|
14
16
|
if len(argv)>0:
|
|
@@ -29,7 +31,7 @@ class Program:
|
|
|
29
31
|
print('No script supplied')
|
|
30
32
|
exit();
|
|
31
33
|
|
|
32
|
-
print('Domains:',domains)
|
|
34
|
+
# print('Domains:',domains)
|
|
33
35
|
f = open(scriptName, 'r')
|
|
34
36
|
source = f.read()
|
|
35
37
|
f.close()
|
|
@@ -301,6 +303,7 @@ class Program:
|
|
|
301
303
|
return -1
|
|
302
304
|
return 0
|
|
303
305
|
|
|
306
|
+
# This is the program launcher
|
|
304
307
|
def Main():
|
|
305
308
|
if (len(sys.argv) > 1):
|
|
306
309
|
Program(sys.argv[1:])
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
! FizzBuzz
|
|
2
|
+
|
|
3
|
+
script FizzBuzz
|
|
4
|
+
|
|
5
|
+
variable Number
|
|
6
|
+
put 0 into Number
|
|
7
|
+
while Number is less than 100
|
|
8
|
+
begin
|
|
9
|
+
add 1 to Number
|
|
10
|
+
if Number modulo 3 is 0 print `Fizz`
|
|
11
|
+
else if Number modulo 5 is 0 print `Buzz`
|
|
12
|
+
else if Number modulo 15 is 0 print `FizzBuzz`
|
|
13
|
+
else print Number
|
|
14
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|