• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

polserver / polserver / 25918451630

15 May 2026 12:43PM UTC coverage: 60.929% (+2.1%) from 58.859%
25918451630

push

github

turleypol
added dynamic property which returns a pointer of the object instead of
a copy like the current imp.
needed to be able to eg store a vector

43 of 61 new or added lines in 2 files covered. (70.49%)

14455 existing lines in 345 files now uncovered.

44695 of 73356 relevant lines covered (60.93%)

449621.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.88
/pol-core/bscript/compiler/ast/FunctionParameterDeclaration.cpp
1
#include "FunctionParameterDeclaration.h"
2

3
#include <utility>
4

5
#include "bscript/compiler/ast/Expression.h"
6
#include "bscript/compiler/ast/NodeVisitor.h"
7
#include "clib/logfacility.h"
8

9
namespace Pol::Bscript::Compiler
10
{
11
FunctionParameterDeclaration::FunctionParameterDeclaration(
81,427✔
12
    const SourceLocation& source_location, ScopableName name, bool byref, bool unused,
13
    bool uninit_default, bool rest, std::unique_ptr<Expression> default_value )
81,427✔
14
    : Node( source_location, std::move( default_value ) ),
81,427✔
15
      name( std::move( name ) ),
81,427✔
16
      byref( byref ),
81,427✔
17
      unused( unused ),
81,427✔
18
      uninit_default( uninit_default ),
81,427✔
19
      rest( rest )
81,427✔
20
{
21
}
81,427✔
22

23
FunctionParameterDeclaration::FunctionParameterDeclaration( const SourceLocation& source_location,
217,981✔
24
                                                            ScopableName name, bool byref,
25
                                                            bool unused, bool uninit_default,
26
                                                            bool rest )
217,981✔
27
    : Node( source_location ),
28
      name( std::move( name ) ),
217,981✔
29
      byref( byref ),
217,981✔
30
      unused( unused ),
217,981✔
31
      uninit_default( uninit_default ),
217,981✔
32
      rest( rest )
217,981✔
33
{
34
}
217,981✔
35

36
void FunctionParameterDeclaration::accept( NodeVisitor& visitor )
304,781✔
37
{
38
  visitor.visit_function_parameter_declaration( *this );
304,781✔
39
}
304,781✔
40

41
void FunctionParameterDeclaration::describe_to( std::string& w ) const
369✔
42
{
43
  fmt::format_to( std::back_inserter( w ), "function-parameter-declaration({}", name.string() );
738✔
44
  if ( rest )
369✔
45
    w += "...";
6✔
46
  if ( byref )
369✔
47
    w += ", byref";
179✔
48
  if ( unused )
369✔
UNCOV
49
    w += ", unused";
×
50
  w += ")";
369✔
51
}
369✔
52

53
Expression* FunctionParameterDeclaration::default_value()
17,850✔
54
{
55
  return children.empty() ? nullptr : &child<Expression>( 0 );
17,850✔
56
}
57

58
}  // namespace Pol::Bscript::Compiler
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc