tofpie
f62a77d3fa
Implement template literals and tagged templates ( #997 )
...
* Implement template literals and tagged templates
* Merge master into for-in
* Implement suggestions from review
* Implement suggestions from review
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
3 years ago
Jevan Chan
f66a0999e7
Improve Unicode support for identifier names ( #1003 )
...
* Add identifier name unicode checkers
* Improve identifier name checkers
* cargo fmt
* Further improve identifier name checkers
* Rename modules and add comments
* Fix clippy
* Add unit tests
* Move unicode table to separate crate and add script
* Rename trait
* Minor fix
* Sort code points before writing to file
* Remove unused dependency
* Add table.rs doc comment
* Add trait level comment
* Add comments to script
* Update comments
* Update comments
* Add test to check Unicode version of dependency
* Add README.md and link to CONTRIBUTING.md
* Fix prettier
3 years ago
Annika
aac39cdd4b
Fix Clippy erorrs ( #1015 )
3 years ago
tofpie
23bc476a94
Implement coalescing (?? and ??=) ( #1013 )
...
* Implement coalescing (?? and ??=)
* Add unit tests
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
3 years ago
tofpie
6f3641d593
Add numeric separator lexing ( #995 )
...
* Add numeric separator handling
* Implement suggestions from PR review
Co-authored-by: tofpie <tofpie@users.noreply.github.com>
3 years ago
Jevan Chan
cc473855f1
Improve lexer by make cursor iterate over bytes ( #915 )
4 years ago
Paul Lancaster
6bcfc7a237
Strict Mode Lex/Parse ( #717 )
...
* Add strict mode to lex trait
* Lexer reserved keyword identifier strict mode lexing
* Prevent with statement in strict mode
* Add strict_mode flag to parse methods
* Enable function scope strict mode
* Script scope strict mode
* Delete statement strict mode
* Function decl in block in strict mode
* Fix merge
* Strict mode code tests
* Move strict_mode flag onto Lexer
* Move strict_mode lex flag to Lexer Cursor
* Isolated failing test parts
* Fixed bug in func decl in block in strict mode
* BindingIdentifier strict mode
* use to_string
* Remove dbg
* Add missing spec ref
* Missing spec ref for dup func params
* Remove clone
* .to_string -> .as_ref
4 years ago
David
01b5cec04f
Fix clippy on Nightly ( #668 )
4 years ago
Paul Lancaster
cb93472b4a
New lexer ( #559 )
...
Co-authored-by: HalidOdat <halidodat@gmail.com>
Co-authored-by: Iban Eguia <razican@protonmail.ch>
Co-authored-by: Paul Lancaster <paul@lancasterzone.com>
Co-authored-by: neeldug <5161147+neeldug@users.noreply.github.com>
4 years ago
croraf
5a45ab532e
[NaN] handle NaN token as identifier ( #475 )
4 years ago
croraf
863abb3747
[TemplateLiteral] Basic lexer implementation ( #455 )
...
* Basic template literal lexer implementation
* Fix formatting
4 years ago
HalidOdat
d847ff826b
Specification compliant `ToBigInt` (`to_bigint`) ( #450 )
...
- Merged Ast `BigInt` to Builtin `BigInt`.
- Split `BigInt` logic to separate files.
- Added `builtins/bigint/operations.rs` for `BigInt` operations.
- Added `builtins/bigint/conversions.rs` for `BigInt` conversions.
- Added` builtins/bigint/equality.rs` for `BigInt` equality checking.
- Added tests.
4 years ago
Jason Williams
32b0741cc8
Profiler using measureme ( #317 )
...
Profiler
4 years ago
Iban Eguia
4beadfc9ad
Execution and Node modularization ( #392 )
4 years ago
HalidOdat
5f4a1f2266
Feature `BigInt` ( #358 )
4 years ago
Yiyu Lin
d4d27296fc
fix `NaN` is lexed as identifier, not as a number ( #397 )
...
close #393
4 years ago
HalidOdat
84b4da545a
Fix #331 "We only get `Const::Num`, never `Const::Int`" ( #338 )
4 years ago
Iban Eguia
bc63b28b6b
Modularized parser ( #304 )
4 years ago
HalidOdat
3e2e241f3e
Added documentation to builtins/json
4 years ago
Jason Williams
af7ad57a04
LexerError
4 years ago
Jason Williams
083412d883
doc for check_after_numeric_literal
4 years ago
Jason Williams
7c74b8a979
removing akward doc test
4 years ago
Jason Williams
63b02cb797
Update boa/src/syntax/lexer/mod.rs
...
Co-Authored-By: HalidOdat <halidodat@gmail.com>
4 years ago
Jason Williams
bd4e814f96
doc on vop, op doctest
4 years ago
Jason Williams
103ab85796
more changes
4 years ago
Jason Williams
1b47b20fc0
more changes
4 years ago
Jason Williams
f2915499a0
lexer updates
4 years ago
Iban Eguia
4ed7122199
Fixed positions in regexes and strict operators. ( #295 )
...
I also removed an unused function in the parser and added a test for #294 , currently ignored.
4 years ago
Jason Williams
48c6e886d4
Parser fixes #225 #240 #273 ( #281 )
...
New parser!
Plus loads of tidy up in various places.
Co-authored-by: Jason Williams <jwilliams720@bloomberg.net>
Co-authored-by: HalidOdat <halidodat@gmail.com>
Co-authored-by: Iban Eguia <iban.eguia@cern.ch>
Co-authored-by: Iban Eguia <razican@protonmail.ch>
4 years ago
Nick Vernij
2d5bf55956
Fix parsing of floats that start with a zero ( #272 )
4 years ago
Iban Eguia
86052d6d75
Moved test modules to their own files ( #258 )
4 years ago
Iban Eguia
12c99e1658
Fixed comments lexing ( #256 )
4 years ago
Nathaniel
fd616c887b
Fixed more Lexer Panics ( #244 )
...
* Fixed more Lexer Panics
4 years ago
Iban Eguia
5f6e4c22c1
Moved to a workspace architecture ( #247 )
...
* Moved to a workspace architecture
4 years ago
Nathaniel
080a3359fd
Fixed parsing of floats with scientific notation ( #245 )
...
* Fixed parsing of scientific notation with floats
* Reorganize tests
4 years ago
Alexandre GOMES
448835295a
fix addition/subtraction with no space ( #235 )
4 years ago
Nathaniel
18523c57f1
Fixed some panics in the lexer ( #242 )
...
* Fixed some panics in the lexer
* Applied Requested Fixes
* Applied Requested Fixes
* Gave `ParseError` a basic `Display` impl
4 years ago
croraf
eaeb299a9e
Fix lexing of "0_" token ( #231 )
...
* Fix lexing of 0_ token
* Fix bugs and return to non-strict
* Extract read_integer_in_base
4 years ago
croraf
dd5ecddc55
Replace error throwing with panic in "Lexer::next()" ( #229 )
4 years ago
croraf
ce9af33620
[lexer: single-line-comment] Fix bug when single line comment is last line of file ( #228 )
4 years ago
Jason Williams
80a9e6a971
updating rest-spread (rebased) ( #213 )
...
* Adding support for rest/spread
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
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
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
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
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
111d232c94
clippy changes, including benchmark updates for more accuracy, fixes #84
5 years ago
Jason Williams
fe42b0c616
adding context into every native function, changing this to be passed… ( #73 )
5 years ago
Iban Eguia
71340e6bec
Fixed a bunch of Clippy issues ( #59 )
...
* Fixed a bunch of Clippy issues
* Fixed bug with numbers
* Added clippy checks in the CI
5 years ago