mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:38:12 +00:00
LibJS: Add some helpers and use them to re-implement Console functions
Also add const overloads for some getters. Also const-qualify Interpreter::join_arguments().
This commit is contained in:
parent
92815f313a
commit
bc7ed4524e
4 changed files with 47 additions and 21 deletions
|
@ -41,8 +41,10 @@ public:
|
|||
Console(Interpreter&);
|
||||
|
||||
Interpreter& interpreter() { return m_interpreter; }
|
||||
const Interpreter& interpreter() const { return m_interpreter; }
|
||||
|
||||
HashMap<String, unsigned>& counters() { return m_counters; }
|
||||
const HashMap<String, unsigned>& counters() const { return m_counters; }
|
||||
|
||||
Value debug();
|
||||
Value error();
|
||||
|
@ -57,6 +59,9 @@ public:
|
|||
Value count();
|
||||
Value count_reset();
|
||||
|
||||
unsigned counter_increment(String label);
|
||||
bool counter_reset(String label);
|
||||
|
||||
private:
|
||||
Interpreter& m_interpreter;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue