Implement the lexical scoping (#285)

This patch introduces the let and const keyword and all the related lexical scoping rules.

Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik 2019-07-05 06:38:11 +02:00 committed by Hyukwoo Park
commit ef59096112
32 changed files with 1026 additions and 94 deletions

View file

@ -24,6 +24,8 @@
namespace Escargot {
const char* errorMessage_NotImplemented = "Not implemented";
const char* errorMessage_IsNotDefined = "%s is not defined";
const char* errorMessage_IsNotInitialized = "Cannot access '%s' before initialization";
const char* errorMessage_DuplicatedIdentifier = "Identifier '%s' has already been declared";
const char* errorMessage_AssignmentToConstantVariable = "Assignment to constant variable";
const char* errorMessage_DefineProperty_Default = "Cannot define property '%s'";
const char* errorMessage_DefineProperty_LengthNotWritable = "Cannot modify property '%s': 'length' is not writable";