Ruben Ayrapetyan
b5d30de4d7
Rename decode_keyword to lexer_parse_reserved_word and change it so that it doesn't return TOK_NAME, but empty token instead.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-08 15:51:59 +03:00
Andrey Shitov
32318137c3
Switch lexer to utf8 iterators.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-07-08 15:51:24 +03:00
Ruben Ayrapetyan
2a78d24fce
Add preprocessor definitions for various character codes, referenced in ECMA-262, and helpers for checking if a character falls into a ECMA-defined character category; remove lit_char_is_carriage_return and lit_char_is_new_line helpers.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:38:32 +03:00
Ruben Ayrapetyan
c37964f7a9
Move helpers from ecma-helpers-char.cpp to lit-char-helpers.cpp, rename them correspondingly.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-07-02 17:36:48 +03:00
Andrey Shitov
fd9ff8e3bd
Add core unicode functionality.
...
Add utf-8 processing routines.
Change ecma_char_t from char/uint16_t to uint16_t.
Apply all utf-8 processing routines.
Change char to jerry_api_char in API functions' declarations.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
Andrey Shitov
a0c5974ab8
Move char type definitions and magic string processing functions to literal component.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-29 23:27:58 +03:00
László Langó
e027b4d65d
Enable regular expressions.
...
- add regular expressions support to JS parser and interpreter;
- add tests for regular expressions.
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:10 +02:00
László Langó
1f9add4735
Add ecma_char_is_word_char helper (part of IsWordChar abstract operation, ECMA-262 v5, 15.10.2.6); move hex_to_int from lexer to jerry-core/ecma/base/ecma-helpers-char.cpp, renaming it to ecma_char_hex_to_int.
...
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan szledan.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
2015-06-26 13:31:00 +02:00
Ruben Ayrapetyan
d7ecd4a467
Fix raise of syntax errors for unmatched braces.
...
Related issue: #43 , #183
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-25 16:47:45 +03:00
Ruben Ayrapetyan
a4e54e736e
Support syntax error feedback in parser.
...
Now, parser correctly finishes parse procedure if syntax of source code is incorrect (syntax correctness is indicated using return value):
- parser-internal memory management is performed using jsp_mm_alloc / jsp_mm_free;
- upon detection of incorrect syntax, all parser-allocated memory regions are deallocated using jsp_mm_free_all and parse finishes with corresponding return value.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-19 17:05:15 +03:00
Andrey Shitov
3577261261
Add support for eval in parser.
...
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-13 18:01:30 +03:00
Andrey Shitov
53801e3b41
Replace array of literals with literal storage.
...
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin e.gavrin@samsung.com
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
2015-06-10 21:40:10 +03:00
SaeHie Park
723924f36f
New External Magic String API to save heap memory
...
JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
2015-06-09 07:50:43 +09:00
Ruben Ayrapetyan
d99d779486
Support labelled statements.
...
Related issue: #52
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-06-05 19:02:08 +03:00
Ruben Ayrapetyan
8b28cac99e
Implementing escape sequences support with the exception of "\0" ("<NUL>") character and cases that depend on Unicode support.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 14:03:11 +03:00
Ruben Ayrapetyan
7025f97fdd
Adding routine for conversion of any character sequence (not only strings contained in source code buffer) to lexer token.
...
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
2015-05-29 13:46:07 +03:00
Andrey Shitov
0c7d358157
Fix invalid processing of keyword literals.
2015-04-14 14:28:39 +03:00
Ruben Ayrapetyan
88353e93cf
Renaming core -> jerry-core.
2015-02-17 19:08:55 +03:00