easycoder 241211.2__py2.py3-none-any.whl → 241211.3__py2.py3-none-any.whl

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.
easycoder/__init__.py CHANGED
@@ -9,4 +9,4 @@ from .ec_program import *
9
9
  from .ec_timestamp import *
10
10
  from .ec_value import *
11
11
 
12
- __version__ = "241211.2"
12
+ __version__ = "241211.3"
easycoder/ec_classes.py CHANGED
@@ -9,11 +9,14 @@ class FatalError:
9
9
  sys.exit()
10
10
 
11
11
  class AssertionError:
12
- def __init__(self, program):
12
+ def __init__(self, program, msg=None):
13
13
  code = program.code[program.pc]
14
14
  lino = code['lino']
15
15
  script = program.script.lines[lino].strip()
16
- print(f'Assertion Error in {program.name} at line {lino + 1}')
16
+ message = f'Assertion Error in {program.name} at line {lino + 1}'
17
+ if msg != None:
18
+ message += f': {msg}'
19
+ print(message)
17
20
  sys.exit()
18
21
 
19
22
  class RuntimeError:
easycoder/ec_core.py CHANGED
@@ -1640,7 +1640,7 @@ class Core(Handler):
1640
1640
  return value
1641
1641
  return None
1642
1642
 
1643
- print(f'Unknown token {token}')
1643
+ self.warning(f'Core: Unknown token {token}')
1644
1644
  return None
1645
1645
 
1646
1646
  #############################################################################
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: easycoder
3
- Version: 241211.2
3
+ Version: 241211.3
4
4
  Summary: EasyCoder for Python
5
5
  Author-email: Graham Trott <gtanyware@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -58,14 +58,15 @@ Here in the repository is a folder called `scripts` containing some sample scrip
58
58
  `tests.ecs` is a test program containing many of the EasyCoder features
59
59
  `fizzbuzz.ecs` is a simple programming challenge often given at job interviews
60
60
 
61
- ## The EasyCoder programming language
62
- There are three primary components to the language:
63
-
64
- - Keywords
65
- - Values
66
- - Conditions
61
+ ## EasyCoder programming reference
67
62
 
68
63
  The language comprises a general-purpose core package, which can be enhanced by plugins to provide special features on demand.
69
64
 
70
- [The core package](doc/core.md)
65
+ [The core package](doc/README.md)
66
+
67
+ ## Extending the language
68
+
69
+ **_EasyCoder_** can be extended to add new functionality with the use of 'plugins'. These contain compiler and runtime modules for the added language features. **_EasyCoder_** can use the added keywords, values and conditions freely; the effect is completely seamless. There is an outline example in the `plugins` directory called `example.py`, which comprises a module called `Points` with new language syntax to deal with two-valued items such as coordinates. In the `scripts` directory there is `points.ecs`, which exercises the new functionality.
70
+
71
+ A plugin can act as a wrapper around any Python functionality that has a sensible API, thereby hiding its complexity. The only challenge is to devise an unambiguous syntax that doesn't clash with anything already existing in **_EasyCoder_**
71
72
 
@@ -1,14 +1,14 @@
1
- easycoder/__init__.py,sha256=LIhu5HcPlI3Zt29F96x0rEbK1NwA4gqMYpkKxtvK3aI,262
2
- easycoder/ec_classes.py,sha256=onBKF6Lj8BZKNuJKacx4HyhOrVLXsoHdzl6RnMf77uM,1413
1
+ easycoder/__init__.py,sha256=vys8r-4skG-XdH6b0L8eS4WpTpCkVdV_-RaKL1snTMA,262
2
+ easycoder/ec_classes.py,sha256=mRvIk2d-yc20u54oX8fauKeYy-z_g30Otbl-dn5O6T4,1486
3
3
  easycoder/ec_compiler.py,sha256=1z5U92uzUdCOO5-k0VXLnU581iAhwzQga04kfdTlpMY,4629
4
4
  easycoder/ec_condition.py,sha256=WSbONo4zs2sX1icOVpscZDFSCAEFmTsquoc2RGcLx_k,763
5
- easycoder/ec_core.py,sha256=AnPrSJ4oUIOFGV0iF6KxE3AmEb9NG77ae0KwoyvafYs,76175
5
+ easycoder/ec_core.py,sha256=j4YPwERad7iKSaUpbcFG6d5dlyLETK3M-np132G6d9s,76188
6
6
  easycoder/ec_handler.py,sha256=WDDIz0awD3vSQZ149rgbUWsClt6zXqED8ByXQJ5p1Ds,2200
7
7
  easycoder/ec_program.py,sha256=U5QRxcyYycTugyu1ew8prk6NUEqnvcGuFJSY9stN8vY,7870
8
8
  easycoder/ec_timestamp.py,sha256=_3QFJPzIWZ9Rzk3SQOQJ-gwmvB07pg78k23SPntoZtY,288
9
9
  easycoder/ec_value.py,sha256=aOvSF6bM1iKpcLLm0zyGerxHixBkyjE3iYl1Bx6jmzU,2381
10
- easycoder-241211.2.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
11
- easycoder-241211.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
- easycoder-241211.2.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
13
- easycoder-241211.2.dist-info/METADATA,sha256=nzof97vblfpCCdjDl9S0ZuOPHr5L2z58uBpTm61QjEs,2511
14
- easycoder-241211.2.dist-info/RECORD,,
10
+ easycoder-241211.3.dist-info/entry_points.txt,sha256=JXAZbenl0TnsIft2FcGJbJ-4qoztVu2FuT8PFmWFexM,44
11
+ easycoder-241211.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
12
+ easycoder-241211.3.dist-info/WHEEL,sha256=ssQ84EZ5gH1pCOujd3iW7HClo_O_aDaClUbX4B8bjKY,100
13
+ easycoder-241211.3.dist-info/METADATA,sha256=kk6Hmmny8KtnC3gQhlpZEHYHV5zAU-8dGZc_KPKsRbM,3242
14
+ easycoder-241211.3.dist-info/RECORD,,