Improved exceptions, bugfixes when calling script functions from native
lex.c - Fixed static/const being the same as global