mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Optimize ScriptParser & redesign String classes (#68)
Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
6dec1e3f86
commit
b3f8e0105a
20 changed files with 433 additions and 2525 deletions
|
|
@ -275,10 +275,10 @@ ScriptParser::ScriptParserResult ScriptParser::parse(StringView scriptSource, St
|
|||
return result;
|
||||
}
|
||||
|
||||
std::tuple<RefPtr<Node>, ASTScopeContext*, std::unique_ptr<LiteralValueRooterVector>> ScriptParser::parseFunction(InterpretedCodeBlock* codeBlock, size_t stackSizeRemain, ExecutionState* state)
|
||||
std::tuple<RefPtr<Node>, ASTScopeContext*> ScriptParser::parseFunction(InterpretedCodeBlock* codeBlock, size_t stackSizeRemain, ExecutionState* state)
|
||||
{
|
||||
try {
|
||||
std::tuple<RefPtr<Node>, ASTScopeContext*, std::unique_ptr<LiteralValueRooterVector>> body = esprima::parseSingleFunction(m_context, codeBlock, stackSizeRemain);
|
||||
std::tuple<RefPtr<Node>, ASTScopeContext*> body = esprima::parseSingleFunction(m_context, codeBlock, stackSizeRemain);
|
||||
return body;
|
||||
} catch (esprima::Error* orgError) {
|
||||
ErrorObject::throwBuiltinError(*state, ErrorObject::SyntaxError, orgError->message->toUTF8StringData().data());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue