bare-script 4.2.8__tar.gz → 4.2.10__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.
Files changed (44) hide show
  1. {bare_script-4.2.8/src/bare_script.egg-info → bare_script-4.2.10}/PKG-INFO +1 -1
  2. {bare_script-4.2.8 → bare_script-4.2.10}/setup.cfg +1 -1
  3. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/markdownUp.bare +1 -0
  4. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/library.py +1 -5
  5. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/parser.py +4 -2
  6. {bare_script-4.2.8 → bare_script-4.2.10/src/bare_script.egg-info}/PKG-INFO +1 -1
  7. {bare_script-4.2.8 → bare_script-4.2.10}/LICENSE +0 -0
  8. {bare_script-4.2.8 → bare_script-4.2.10}/README.md +0 -0
  9. {bare_script-4.2.8 → bare_script-4.2.10}/pyproject.toml +0 -0
  10. {bare_script-4.2.8 → bare_script-4.2.10}/setup.py +0 -0
  11. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/__init__.py +0 -0
  12. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/__main__.py +0 -0
  13. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/bare.py +0 -0
  14. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/__init__.py +0 -0
  15. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/args.bare +0 -0
  16. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/baredoc.bare +0 -0
  17. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/baredocCLI.bare +0 -0
  18. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/data.bare +0 -0
  19. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/dataLineChart.bare +0 -0
  20. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/dataTable.bare +0 -0
  21. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/dataUtil.bare +0 -0
  22. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/diff.bare +0 -0
  23. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/draw.bare +0 -0
  24. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/elementModel.bare +0 -0
  25. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/forms.bare +0 -0
  26. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/markdown.bare +0 -0
  27. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/markdownElements.bare +0 -0
  28. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/markdownHighlight.bare +0 -0
  29. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/markdownParser.bare +0 -0
  30. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/pager.bare +0 -0
  31. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/qrcode.bare +0 -0
  32. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/schemaDoc.bare +0 -0
  33. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/unittest.bare +0 -0
  34. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/include/unittestMock.bare +0 -0
  35. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/model.py +0 -0
  36. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/options.py +0 -0
  37. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/runtime.py +0 -0
  38. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/runtime_c.c +0 -0
  39. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script/value.py +0 -0
  40. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script.egg-info/SOURCES.txt +0 -0
  41. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script.egg-info/dependency_links.txt +0 -0
  42. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script.egg-info/entry_points.txt +0 -0
  43. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script.egg-info/requires.txt +0 -0
  44. {bare_script-4.2.8 → bare_script-4.2.10}/src/bare_script.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bare-script
3
- Version: 4.2.8
3
+ Version: 4.2.10
4
4
  Summary: bare-script
5
5
  Home-page: https://github.com/craigahobbs/bare-script
6
6
  Author: Craig A. Hobbs
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = bare-script
3
- version = 4.2.8
3
+ version = 4.2.10
4
4
  url = https://github.com/craigahobbs/bare-script
5
5
  author = Craig A. Hobbs
6
6
  author_email = craigahobbs@gmail.com
@@ -147,6 +147,7 @@ endfunction
147
147
  # $doc:
148
148
  # $doc: **Note:** Element model "callback" members are a map of event name (e.g., "click") to
149
149
  # $doc: event callback function. The following events have callback arguments:
150
+ # $doc: - **click** - For an SVG element, the click's x and y coordinates and the SVG's width and height
150
151
  # $doc: - **keydown** - keyCode
151
152
  # $doc: - **keypress** - keyCode
152
153
  # $doc: - **keyup** - keyCode
@@ -149,8 +149,6 @@ _ARRAY_GET_ARGS = value_args_model([
149
149
  # $return: The first index of the value in the array; -1 if not found.
150
150
  def _array_index_of(args, options):
151
151
  array, value, index = value_args_validate(_ARRAY_INDEX_OF_ARGS, args, -1)
152
- if index >= len(array):
153
- raise ValueArgsError('index', index, -1)
154
152
 
155
153
  # Value function?
156
154
  if value_type(value) == 'function':
@@ -196,10 +194,8 @@ _ARRAY_JOIN_ARGS = value_args_model([
196
194
  # $return: The last index of the value in the array; -1 if not found.
197
195
  def _array_last_index_of(args, options):
198
196
  array, value, index = value_args_validate(_ARRAY_LAST_INDEX_OF_ARGS, args, -1)
199
- if index is None:
197
+ if index is None or index >= len(array):
200
198
  index = len(array) - 1
201
- if index >= len(array):
202
- raise ValueArgsError('index', index, -1)
203
199
 
204
200
  # Value function?
205
201
  if value_type(value) == 'function':
@@ -240,7 +240,7 @@ def parse_script(script_text, start_line_number=1, script_name=None):
240
240
  # Add the while-do label
241
241
  whiledo = {
242
242
  'loop': f'__barescriptLoop{label_index}',
243
- 'continue': f'__barescriptLoop{label_index}',
243
+ 'continue': f'__barescriptContinue{label_index}',
244
244
  'done': f'__barescriptDone{label_index}',
245
245
  'expr': while_begin_expr,
246
246
  'line': line,
@@ -269,6 +269,8 @@ def parse_script(script_text, start_line_number=1, script_name=None):
269
269
  raise BareScriptParserError('No matching while statement', line, 1, start_line_number + ix_line, script_name)
270
270
 
271
271
  # Add the while-do footer statements
272
+ if whiledo.get('hasContinue'):
273
+ statements.append({'label': {'name': whiledo['continue'], **statement_base}})
272
274
  statements.extend([
273
275
  {'jump': {'label': whiledo['loop'], 'expr': whiledo['expr'], **statement_base}},
274
276
  {'label': {'name': whiledo['done'], **statement_base}}
@@ -764,7 +766,7 @@ def _parse_unary_expression(expr_text, array_literals):
764
766
  # BareScript expression regex
765
767
  _R_EXPR_BINARY_OP = re.compile(r'^\s*(\*\*|\*|\/|%|\+|-|<<|>>|<=|<|>=|>|==|!=|&&|\|\||&|\^|\|)')
766
768
  _R_EXPR_UNARY_OP = re.compile(r'^\s*(!|-|~)')
767
- _R_EXPR_FUNCTION_OPEN = re.compile(r'^\s*([A-Za-z_]\w+)\s*\(')
769
+ _R_EXPR_FUNCTION_OPEN = re.compile(r'^\s*([A-Za-z_]\w*)\s*\(')
768
770
  _R_EXPR_FUNCTION_SEPARATOR = re.compile(r'^\s*,')
769
771
  _R_EXPR_FUNCTION_CLOSE = re.compile(r'^\s*\)')
770
772
  _R_EXPR_GROUP_OPEN = re.compile(r'^\s*\(')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bare-script
3
- Version: 4.2.8
3
+ Version: 4.2.10
4
4
  Summary: bare-script
5
5
  Home-page: https://github.com/craigahobbs/bare-script
6
6
  Author: Craig A. Hobbs
File without changes
File without changes
File without changes
File without changes