mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibJS: run clang-format on all the files
This commit is contained in:
parent
30519c22f6
commit
8bd9f7e50e
Notes:
sideshowbarker
2024-07-19 06:58:55 +09:00
Author: https://github.com/emanuele6 Commit: https://github.com/SerenityOS/serenity/commit/8bd9f7e50ee Pull-request: https://github.com/SerenityOS/serenity/pull/2098 Reviewed-by: https://github.com/awesomekling
8 changed files with 25 additions and 25 deletions
|
@ -50,7 +50,7 @@ create_ast_node(Args&&... args)
|
|||
|
||||
class ASTNode : public RefCounted<ASTNode> {
|
||||
public:
|
||||
virtual ~ASTNode() {}
|
||||
virtual ~ASTNode() { }
|
||||
virtual const char* class_name() const = 0;
|
||||
virtual Value execute(Interpreter&) const = 0;
|
||||
virtual void dump(int indent) const;
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
virtual bool is_new_expression() const { return false; }
|
||||
|
||||
protected:
|
||||
ASTNode() {}
|
||||
ASTNode() { }
|
||||
|
||||
private:
|
||||
};
|
||||
|
@ -120,7 +120,7 @@ public:
|
|||
const NonnullRefPtrVector<VariableDeclaration>& variables() const { return m_variables; }
|
||||
|
||||
protected:
|
||||
ScopeNode() {}
|
||||
ScopeNode() { }
|
||||
|
||||
private:
|
||||
virtual bool is_scope_node() const final { return true; }
|
||||
|
@ -130,7 +130,7 @@ private:
|
|||
|
||||
class Program : public ScopeNode {
|
||||
public:
|
||||
Program() {}
|
||||
Program() { }
|
||||
|
||||
private:
|
||||
virtual bool is_program() const override { return true; }
|
||||
|
@ -139,7 +139,7 @@ private:
|
|||
|
||||
class BlockStatement : public ScopeNode {
|
||||
public:
|
||||
BlockStatement() {}
|
||||
BlockStatement() { }
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "BlockStatement"; }
|
||||
|
@ -454,7 +454,7 @@ private:
|
|||
|
||||
class Literal : public Expression {
|
||||
protected:
|
||||
explicit Literal() {}
|
||||
explicit Literal() { }
|
||||
};
|
||||
|
||||
class BooleanLiteral final : public Literal {
|
||||
|
@ -507,7 +507,7 @@ private:
|
|||
|
||||
class NullLiteral final : public Literal {
|
||||
public:
|
||||
explicit NullLiteral() {}
|
||||
explicit NullLiteral() { }
|
||||
|
||||
virtual Value execute(Interpreter&) const override;
|
||||
virtual void dump(int indent) const override;
|
||||
|
@ -935,7 +935,7 @@ private:
|
|||
|
||||
class BreakStatement final : public Statement {
|
||||
public:
|
||||
BreakStatement() {}
|
||||
BreakStatement() { }
|
||||
|
||||
virtual Value execute(Interpreter&) const override;
|
||||
|
||||
|
@ -945,7 +945,7 @@ private:
|
|||
|
||||
class ContinueStatement final : public Statement {
|
||||
public:
|
||||
ContinueStatement() {}
|
||||
ContinueStatement() { }
|
||||
|
||||
virtual Value execute(Interpreter&) const override;
|
||||
|
||||
|
@ -955,7 +955,7 @@ private:
|
|||
|
||||
class DebuggerStatement final : public Statement {
|
||||
public:
|
||||
DebuggerStatement() {}
|
||||
DebuggerStatement() { }
|
||||
|
||||
virtual Value execute(Interpreter&) const override;
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ Cell* Heap::cell_from_possible_pointer(FlatPtr pointer)
|
|||
|
||||
class MarkingVisitor final : public Cell::Visitor {
|
||||
public:
|
||||
MarkingVisitor() {}
|
||||
MarkingVisitor() { }
|
||||
|
||||
virtual void visit_impl(Cell* cell)
|
||||
{
|
||||
|
|
|
@ -39,7 +39,7 @@ BooleanPrototype::BooleanPrototype()
|
|||
put_native_function("valueOf", value_of, 0, Attribute::Writable | Attribute::Configurable);
|
||||
}
|
||||
|
||||
BooleanPrototype::~BooleanPrototype() {}
|
||||
BooleanPrototype::~BooleanPrototype() { }
|
||||
|
||||
Value BooleanPrototype::to_string(Interpreter& interpreter)
|
||||
{
|
||||
|
|
|
@ -48,16 +48,16 @@ Error::~Error()
|
|||
{
|
||||
}
|
||||
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
|
||||
ClassName* ClassName::create(GlobalObject& global_object, const String& message) \
|
||||
{ \
|
||||
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \
|
||||
ClassName* ClassName::create(GlobalObject& global_object, const String& message) \
|
||||
{ \
|
||||
return global_object.heap().allocate<ClassName>(message, *global_object.snake_name##_prototype()); \
|
||||
} \
|
||||
ClassName::ClassName(const String& message, Object& prototype) \
|
||||
: Error(#ClassName, message, prototype) \
|
||||
{ \
|
||||
} \
|
||||
ClassName::~ClassName() {} \
|
||||
} \
|
||||
ClassName::ClassName(const String& message, Object& prototype) \
|
||||
: Error(#ClassName, message, prototype) \
|
||||
{ \
|
||||
} \
|
||||
ClassName::~ClassName() { } \
|
||||
const char* ClassName::class_name() const { return #ClassName; }
|
||||
|
||||
JS_ENUMERATE_ERROR_SUBCLASSES
|
||||
|
|
|
@ -62,7 +62,7 @@ Value ErrorConstructor::construct(Interpreter& interpreter)
|
|||
put("prototype", interpreter().global_object().snake_name##_prototype(), 0); \
|
||||
put("length", Value(1), Attribute::Configurable); \
|
||||
} \
|
||||
ConstructorName::~ConstructorName() {} \
|
||||
ConstructorName::~ConstructorName() { } \
|
||||
Value ConstructorName::call(Interpreter& interpreter) \
|
||||
{ \
|
||||
return construct(interpreter); \
|
||||
|
|
|
@ -109,7 +109,7 @@ Value ErrorPrototype::to_string(Interpreter& interpreter)
|
|||
: Object(interpreter().global_object().error_prototype()) \
|
||||
{ \
|
||||
} \
|
||||
PrototypeName::~PrototypeName() {} \
|
||||
PrototypeName::~PrototypeName() { } \
|
||||
const char* PrototypeName::class_name() const { return #PrototypeName; }
|
||||
|
||||
JS_ENUMERATE_ERROR_SUBCLASSES
|
||||
|
|
|
@ -35,7 +35,7 @@ MarkedValueList::MarkedValueList(Heap& heap)
|
|||
m_heap.did_create_marked_value_list({}, *this);
|
||||
}
|
||||
|
||||
MarkedValueList:: MarkedValueList(MarkedValueList&& other)
|
||||
MarkedValueList::MarkedValueList(MarkedValueList&& other)
|
||||
: m_heap(other.m_heap)
|
||||
, m_values(move(other.m_values))
|
||||
{
|
||||
|
|
|
@ -435,7 +435,7 @@ bool Object::has_own_property(const FlyString& property_name) const
|
|||
i32 property_index = property_name.to_int(ok);
|
||||
if (ok && property_index >= 0) {
|
||||
if (is_string_object())
|
||||
return property_index < (i32)static_cast<const StringObject*>(this)->primitive_string().string().length();
|
||||
return property_index < (i32) static_cast<const StringObject*>(this)->primitive_string().string().length();
|
||||
if (static_cast<size_t>(property_index) >= m_elements.size())
|
||||
return false;
|
||||
return !m_elements[property_index].is_empty();
|
||||
|
|
Loading…
Reference in a new issue