Skip to content

ArkScript v4.0.0-rc5

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 17 May 11:50
6a4c644

Added

  • more tests for the io builtins
  • added lines and code coloration in the error context
  • new dependency: fmtlib
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader
  • $repr macro to get a string representation of a given node
  • added boost-ext/ut to write unit tests in C++
  • basic ArkScript code formatter, available through the CLI: arkscript -f|--format
  • comments are now tracked in the AST and attached to the nearest node below them
  • VM::forceReloadPlugins, to be used by the REPL to force reload the plugins and be sure that their symbols are all define
  • added help, save (save history to disk), history (print history), reset (reset vm and code) commands to the REPL
  • REPL can now show when a code block isn't terminated (prompt changes from > to :)
  • more controls available inside the REPL

Changed

  • instructions are on 4 bytes: 1 byte for the instruction, 1 byte of padding, 2 bytes for an immediate argument
  • enhanced the bytecode reader and its command line interface
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader
  • fixed underline bug in the error context
  • the str:format functions now expects strings following this syntax: https://fmt.dev/latest/syntax.html
  • more documentation about the compiler implementation
  • more documentation about the virtual machine
  • closures can be now be compared field per field: (= closure1 closure2) will work only if they have the same fields (name) and if the values match
  • macros are now defined like ($ name value) / ($ name (args args args) body) / ($if cond then else)
  • upgraded from C++17 to C++20
  • new parser, new syntax for imports: (import package.sub.file)
  • allow nodes to be empty when dumping the AST to JSON
  • macros can be declared inside a begin block within a cond macro and used in the scope surrounding the cond macro
  • arkscript --version and arkscript --help now output ArkScript version with the commit hash
  • void Value::toString(std::ostream&, VM&) now becomes std::string Value::toString(VM&)
  • removed Node::operator<< to replace it with Node::debugPrint

Removed

  • removed unused NodeType::Closure
  • removing the custom string, replacing it with std::string (the format engine of the custom string had a lot of memory leaks)
  • Utils::digPlaces and Utils::decPlaces got removed as they were no longer needed
  • removed deprecated code (list:removeAt, ark executable now replaced by arkscript)
  • removed VM::getUserPointer and VM::setUserPointer
  • removed ARK_PROFILER_COUNT define