letmutx
6038c32de9
Add Array.prototype.every method fixes #163 ( #157 )
...
* Make Interpreter::call crate public
* Add Array.prototype.every method
5 years ago
letmutx
b7544984bc
Add Array.prototype.find method fixes #165 ( #156 )
...
* Make Interpreter::call crate public
* Add Array.prototype.find method
5 years ago
evomassiny
3b1074d659
Handle white spaces as described in ECMAScript specs ( #155 )
...
* Handle white spaces as described in ECMAScript specs
5 years ago
simon brahan
b7afdae3af
Implement array.indexOf and .lastIndexOf ( #148 )
...
* Implemented array indexOf.
* Implemented array lastIndexOf
5 years ago
Dom Parfitt
92469528f9
Updated object global ( #147 )
5 years ago
Bojan Đurđević
fc8fb01e1b
String match all fixes #115 ( #138 )
...
* String.matchAll implementation
5 years ago
Victor Tuekam
a93f05cfe1
implement string.match(regexp) ( #131 )
...
* implement string.match(regexp)
5 years ago
Jason Williams
090126ea13
cargo fmt
5 years ago
Mathias Peters
f6467db21b
Fix clippy warnings ( #153 )
...
* Fixed clippy warnings option_unwrap_used and result_unwrap_used.
* Fixed float_cmp clippy error and the option_unwrap_used it was hiding.
* Fixed shadowing issues.
* Disabled some clippy lints in tests.
* Fixed clippy string_add issues.
* Added allow else_if_without_else since an else-block would not make sense.
* Fixed integer arithmetic issues.
* Fixed all clippy get_unwrap issues.
* Fixed usage of unimplemented and an occurrence of variable name shadowing.
* Fixed indexing may panic issues.
* Fixed a slicing may panic issue.
* Changed some unnecessary uses of match that I introduced for expect.
5 years ago
Dom Parfitt
6c3519f957
WIP - Update JSON Global ( #129 )
...
* Added create_constructor method
* Updated global to use json::create_constructor method
* unassigned var is undefined (#125 )
* Unassigned variables are set to `undefined` not `null`
Fixes #113
* Rust tests for `var x` and `let x` default to undefined
* CHANGELOG for issue #113 fix + add tests/js/test.js to gitignore.
* fixing PR benchmarks (#132 )
* fixing PR benchmarks
* Push after rebase
* Updated import order
* Formatting
5 years ago
Dom Parfitt
44d92c9220
Added create_constructor method ( #144 )
5 years ago
eman0n
117584c690
[Lexer]add single and multiple line test ( #134 )
...
* [Lexer]add single and multiple line test
* reformat the test
* fix tests
5 years ago
Dom Parfitt
6e90b74639
Update console global ( #143 )
...
* Added create_constructor method
* Added new console constructor to realm
5 years ago
simon brahan
ce70796581
Implement exponentiation operator ( #130 )
...
* Exponentiation (**) now works.
Added missing NumOp type, token match, and calculation.
* Assignment exponentiation (**=) now works.
Added missing AssignOp type, token match, and calculation.
This fixes #89 .
5 years ago
Jason Williams
38b1a9d6a1
Test2 ( #135 )
...
* testing
* updating yml
* sd
* env
5 years ago
Elijah Caine M. Voigt
d798566377
unassigned var is undefined ( #125 )
...
* Unassigned variables are set to `undefined` not `null`
Fixes #113
* Rust tests for `var x` and `let x` default to undefined
* CHANGELOG for issue #113 fix + add tests/js/test.js to gitignore.
5 years ago
Jason Williams
1c3fea4cf1
replacing ExecutorBuilder with Realm ( #126 )
...
* replacing ExecutorBuilder with Realm
* fixing global_env
* adding benchmark for realm
* instrinsics was being called twice
* update changelog
5 years ago
Jason Williams
27178e1645
fixes #10 ( #112 )
5 years ago
arbroween
83616efca7
implements toLowerCase, toUpperCase, substring, substr and valueOf String prototype methods ( #91 )
5 years ago
Jason Williams
821632972b
Addition of arguments object ( #109 )
...
* testing PR
* making a start to arguments object
* arguments
* finishing arguments for now
5 years ago
Julian Laubstein
6da58a21b8
Set proper base for boashell ( #107 )
5 years ago
Olle Sandberg
d98b42c8bb
Implement assign operators ( #95 ) ( #97 )
...
* Operators implemented: +=, -=, /=, *=, %=, &=, |=, ^=, <<=, >>=
* Add parser tests for new operators
5 years ago
Jason Williams
73d158cce2
testing small change ( #104 )
5 years ago
Jason Williams
be9e93ac9c
fixing fmt
5 years ago
Jason Williams
910d20f6a5
support early returns, fixes #101
5 years ago
Jason Williams
e305fbda53
clippy updates and updating wasm-pack
5 years ago
Jason Williams
e35b66b412
moving to function objects, work started on boashell other bug fixes
5 years ago
Jason Williams
5a90e32888
cargo fmt
5 years ago
Jason Williams
2df9a24011
Adding object internal methods ( #96 )
...
* adding internal methods
* adding more methods
* Property refactored for optional fields, Docker container now working for debugging
* working through object internal methods
5 years ago
Sophie Tauchert
5e7df4f3cb
Add support for regex literals ( #94 )
...
* Implement regex literal lexing
* Add parser support for regex literals
* Implement very basic RegExp object
* Fix escaping a backslash
* Store rust structs as internal state in objects
* Remove unnecessary regexp constant
* Implement RegExp.test()
* Implement properties on RegExp
* Implement RegExp.exec()
* Implement RegExp.toString()
* Rename RegularExpression to RegularExpressionLiteral
5 years ago
Olle Sandberg
6d81538969
Allow to re-assign value to an existing binding. ( #92 )
5 years ago
Sophie Tauchert
8af9945dde
Implement setting global values ( #93 )
...
* Use builder pattern to create interpreter
* Add method to initialize global object
* Run rustfmt to fix CI build
* Run rustfmt beta to fix CI build
5 years ago
Jason Williams
f90f976732
move Property to its own module
5 years ago
Matt
4b70af6232
Spelling edit to file names, functions, and vars: decler* -> declar* ( #87 )
5 years ago
Jason Williams
c5b75c55ad
passing primitives to methods ( #86 )
...
* passing primitives to methods
* finishing unboxing_primitives, tests added, using internal_slots for __proto__
5 years ago
Jason Williams
903cbcdccc
Adding operations ( #85 )
...
* adding operations to exec
* using StringData instead of PrimitiveData (to match with spec)
* function signature changed to allow mutable ctx (this is needed for some functions)
* tidy (clippy)
* value to rust string (clippy)
* removing static lifetime - Not needed from Rust 1.36
5 years ago
Jason Williams
111d232c94
clippy changes, including benchmark updates for more accuracy, fixes #84
5 years ago
Callum Ward
0ecfd0e02b
String and Array specific console.log formats ( #68 )
...
* Add Array and String specific console.log format
* Fix rustfmt warnings
* Fix cargo fmt warnings
* Tiny rustfmt markup
5 years ago
KrisChambers
0a46bdbe04
Is property key implementation ( #72 ) ( #79 )
...
* Implemented Property::is_property_key static function.
* Fixed rust formating.
5 years ago
Jason Williams
fe42b0c616
adding context into every native function, changing this to be passed… ( #73 )
5 years ago
SasakiSaki
9110254232
Unit testing for Array and String ( #63 )
...
* Make interpreter engine reusable
* Testing Array.prototype.join()
* Testing Array.prototype.concat()
* Fix format problems
* Testing String.prototype.length
* Testing String.prototype.concat()
* Try to fix String.prototype.length
* Testing String.prototype.repeat()
* Testing String.prototype.startsWith()
* Testing String.prototype.endsWith()
* Remove unnecessary `dbg!`
5 years ago
Callum Ward
9e6389e032
Implementation of Array.prototype.{shift(), unshift(), reverse()} ( #67 )
5 years ago
Iban Eguia
d7b32ed64e
Added MIT/Unlicense licenses ( #65 )
...
Also updated Cargo.toml to adapt it to the common license syntax,
and upgraded dependencies. I also had to remove the check for unsafe
code, but this might need some extra care (using a feature or something
in that sense).
5 years ago
Jason Williams
860bace8e8
fix string clippy errors
5 years ago
Jason Williams
0de110a82c
fixing formatting
5 years ago
Jason Williams
2427b3b755
fixing master
5 years ago
Jason Williams
0e92d37756
Refactor objects ( #69 )
...
Refactoring Objects into Structs. Changing the way objects are accessed.
New `internal_slots` and `sym_properties` fields
5 years ago
Zach Gotsch
b891ac3b9b
Parse array elisions and trailing commas ( #58 )
...
* Parse array elisions and trailing commas
* cargo fmt
5 years ago
Callum Ward
0885e0018b
Implement String.prototype.{padStart(), padEnd()} ( #56 )
...
* Implement String.prototype.{padStart(), padEnd()}
* Fix formatting
5 years ago
Iban Eguia
b5bd54293b
Updated the definition of constant declarations, it fixes #46 ( #60 )
5 years ago