easycoder 241211.3__py2.py3-none-any.whl → 250116.1__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.

Potentially problematic release.


This version of easycoder might be problematic. Click here for more details.

easycoder/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # EasyCode source code
2
+ These are the Python files that comprise **_EasyCoder_**.
3
+
4
+ **_EasyCoder_** has a small number of third-party dependencies. A minor one is `pytz`, which handles timezones. The biggest one by far is `kivy`, a comprehensive Python graphics library.
5
+
6
+ If an **_EasyCoder_** script filename ends with `.ecs` it's a command-line script. If it ends with `.ecg` it's a script for a graphical application and will cause `kivy` to be imported. Obviously this will only work on a GUI-based system, whereas command-line scripts will run anywhere there is Python.
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.3"
12
+ __version__ = "250116.1"
easycoder/ec_classes.py CHANGED
@@ -52,3 +52,6 @@ class Token:
52
52
 
53
53
  class Condition():
54
54
  negate = False
55
+
56
+ class Object():
57
+ pass
easycoder/ec_compiler.py CHANGED
@@ -16,6 +16,7 @@ class Compiler:
16
16
  self.warnings = []
17
17
  self.program.compiler = self
18
18
  self.addCommand = self.program.add
19
+ self.compileConstant = self.value.compileConstant
19
20
 
20
21
  def getPC(self):
21
22
  return len(self.program.code)
@@ -44,6 +45,11 @@ class Compiler:
44
45
  except:
45
46
  return None
46
47
 
48
+ # Get a constant
49
+ def getConstant(self, token):
50
+ self.index += 1
51
+ return self.compileConstant(token)
52
+
47
53
  # Get a value
48
54
  def getValue(self):
49
55
  return self.value.compileValue()
@@ -53,11 +59,6 @@ class Compiler:
53
59
  self.index += 1
54
60
  return self.value.compileValue()
55
61
 
56
- # Get a constant
57
- def getConstant(self, token):
58
- self.index += 1
59
- return self.value.compileConstant(token)
60
-
61
62
  # Get a condition
62
63
  def getCondition(self):
63
64
  return self.condition.compileCondition()
@@ -101,7 +102,7 @@ class Compiler:
101
102
 
102
103
  def showWarnings(self):
103
104
  for warning in self.warnings:
104
- print(f'Line {self.getLino() + 1}: {warning}')
105
+ print(f'Warning at line {self.getLino() + 1} of {self.program.name}: {warning}')
105
106
 
106
107
  def getSymbolRecord(self):
107
108
  token = self.getToken()
@@ -127,6 +128,7 @@ class Compiler:
127
128
  FatalError(self, f'Duplicate symbol name "{name}"')
128
129
  return False
129
130
  self.symbols[name] = self.getPC()
131
+ command['program'] = self.program
130
132
  command['type'] = 'symbol'
131
133
  command['valueHolder'] = valueHolder
132
134
  command['name'] = name
@@ -135,6 +137,8 @@ class Compiler:
135
137
  command['value'] = [None]
136
138
  command['used'] = False
137
139
  command['debug'] = False
140
+ command['import'] = None
141
+ command['locked'] = False
138
142
  self.addCommand(command)
139
143
  return True
140
144