Implement ES2015 class feature (part I.) (#2404)
This patch is the first milestone of the implementation of this new language element. Currently supported: - Class statement - Class expression - Static methods JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -920,6 +920,20 @@ parser_error_to_string (parser_error_t error) /**< error code */
|
||||
return "Expected '}' token.";
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_TEMPLATE_STRINGS */
|
||||
#ifndef CONFIG_DISABLE_ES2015_CLASS
|
||||
case PARSER_ERR_MULTIPLE_CLASS_CONSTRUCTOR:
|
||||
{
|
||||
return "Multiple constructors are not allowed.";
|
||||
}
|
||||
case PARSER_ERR_CLASS_CONSTRUCTOR_AS_ACCESSOR:
|
||||
{
|
||||
return "Class constructor may not be an accessor.";
|
||||
}
|
||||
case PARSER_ERR_CLASS_STATIC_PROPERTY_NAME_PROTOTYPE:
|
||||
{
|
||||
return "Classes may not have a static property called 'prototype'.";
|
||||
}
|
||||
#endif /* !CONFIG_DISABLE_ES2015_CLASS */
|
||||
case PARSER_ERR_COLON_EXPECTED:
|
||||
{
|
||||
return "Expected ':' token.";
|
||||
|
||||
Reference in New Issue
Block a user