ID:84307
 
Keywords: library, n_scripting

I've decided to release my scripting library. It comes with a /doc folder which contains the documentation and some examples (although the demo file has the most comprehensive example so far). I'm still looking for feedback and willing to answer questions, though, so if you have either of those, please comment! The documentation may be lacking in some parts, so feel free to give your ideas on that as well.

While one implementation of a scripting language is included ('n_Script'), the library should be extensible enough so that you can write your own language on top of it. For an example of nS's syntax, see my earlier post.

Here are some of the library's features:

  • Functions and variables - can be defined in any type of block.
  • Expression parsing - A bit of a challenge to implement, but expressions should be more or less flaweless and support function calls inside of function calls and other complicated syntax.
  • If/else statements - No else if support yet, however.
  • Loops
    • Break & continue statements

And some things I'd like to implement in the future:

  • Complex datatypes - such as arrays or lists (currently the library is limited to numbers and strings only)
  • Else if statements
  • Constants - if they become necessary, but variables should suffice for now
  • Labels and goto statements
  • User-defined objects - not likely to happen any time soon, but maybe...
  • Debugging features
Nice!
Very nice.
It'd also be nice if you could implement a lambda-like system in the future too. :)