Skip to content

OWScript 1.1

Latest
Compare
Choose a tag to compare
@adapap adapap released this 24 Jul 07:49
· 66 commits to master since this release

Error Handling, Dynamic Imports, String Parser, and more!

This update adds a ton of features and stability improvements to the language.
Here is a rundown of the major changes:

Error Handler

Instead of seeing a stack trace whenever a minor issue was encountered, a system was put in place to make debugging as painless as possible. If you see something that doesn't look like this type of error, please report the issue. Here is an example of what errors might look like:
image
image

Imports

Modularize your code by moving functions to separate files! .owpy files can now be imported using the #import keyword, even importing files that import files!

String Parser

No longer do you need to write chains of String(...String(...String(...))) as the string parser will infer what you are trying to achieve in the workshop. Simply plop your string in some backticks and use {} when introducing a value.

Map Checker

Using the built-in get_map function, you now have the ability to see what map the workshop mode is being played on. Credits to @Xerxes for the original code.

Overall Stability / Other Changes

  • For loop functionality (loop unrolling for known loop counts to save time/actions)
  • Array creation, modification, and usage (including strings/constants in arrays)
  • Function parameter/argument bugfixes
  • Variable scoping and definition checks
  • Accessing attributes using the . operator
  • Dynamic rulename support

Improved CLI & Syntax Highlighting

The runtime now supports command line arguments such as -c to copy to clipboard and -s [filename] to save output. Syntax highlighting is fully supported in Sublime Text 3 (default theme).