Skip to content

Releases: ratel-rust/ratel-core

0.7.0

09 Nov 22:28
Compare
Choose a tag to compare
  • Added support for try-catch statements (#35).
  • Added support for sparse arrays (#36).
  • Added support for escaped characters (\uXXXX where X is a hexadecimal digit) in identifiers (#39).
  • Fixed operator precedence issues for function/method calls and computed member access that caused issues in ternary expressions (#40).
  • Fixed an issue where a variable declaration with initial value caused a parsing error in a for-in loop (#42).

0.6.2

06 Nov 14:40
Compare
Choose a tag to compare
  • Added support for if / while and for statements with empty bodies (e.g. if (true);)

0.6.1

06 Nov 14:12
Compare
Choose a tag to compare
  • Word operators (new, typeof...) are now correctly printed with spaces around them even in minified output.

0.6.0

03 Nov 07:30
Compare
Choose a tag to compare
  • Parameters with default values are now properly parsed and transformed to ES5.
  • Fixed issues where some statements or expressions would not be visited by the transformer.

0.5.5

23 Oct 17:15
Compare
Choose a tag to compare
  • Added support for Regular Expressions.
  • Fixed some bugs related to transforming classes into constructor functions.

0.5.4

22 Oct 07:58
Compare
Choose a tag to compare
  • Objects can now use number literals and reserved words as keys.
  • Classes can now have computed properties.
  • Classes can now use number literals and reserved words as method and property names.
  • Accessing an object member with the . operator now allows for reserved words to be used as identifiers.

In short, all of these are now acceptable syntax:

let object = { 100: 'foo', function: 'bar' };

class Foo {
    ['foo']() { }
    100() { }
    undefined() { }
}

console.log(object.function); // bar

0.5.3

20 Oct 17:59
Compare
Choose a tag to compare

Collective release:

0.5.3:

  • Numbers with scientific notation are now parsed correctly.
  • Fixed a bug that would strip parenthesis from binary operations where they'd be required to preserve intended order of operations - particularly when using addition on different types ("foo" + (1 + 2) vs "foo" + 1 + 2).

0.5.2:

  • Bugfixes following object member code refactoring.

0.5.1:

  • Allow numbers as object keys (let foo = { 10: 'ten' };)

0.5.0

19 Oct 07:00
Compare
Choose a tag to compare
  • Added template strings support, complete with transformation to ES5.
  • Raw strings out of template strings are not implemented. Transpiling the full functionality requires a significant bloat in the output code. It might be a good idea to add them behind an additional transformer flag?

0.4.1

16 Oct 13:51
Compare
Choose a tag to compare
  • Minor release that only adds Apache 2.0 as license option.

0.4.0

16 Oct 12:08
Compare
Choose a tag to compare
  • Breaking: codegen::generate_code takes Program by referenceinstead of by value now. Bumped version to 0.4.0.
  • Removed main.rs and all dependencies now that we have Node.js CLI.
  • Added Rust benchmarks.
  • Added intial tokenizer tests.
  • Correcting an issue with OperatorType::BitShiftRight.
  • Improvements to error handling: In case of errors ocurring at position 0 in the input string, an attempt was made to unwrap None.