1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibJS: Add function default arguments

Adds the ability for function arguments to have default values. This
works for standard functions as well as arrow functions. Default values
are not printed in a <function>.toString() call, as nodes cannot print
their source string representation.
This commit is contained in:
Matthew Olsson 2020-05-02 11:46:39 -07:00 committed by Andreas Kling
parent 751f813f6a
commit 5e66f1900b
8 changed files with 184 additions and 35 deletions

View file

@ -108,6 +108,6 @@ private:
};
ParserState m_parser_state;
Optional<ParserState> m_saved_state;
Vector<ParserState> m_saved_state;
};
}