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

polserver / polserver / 13378462461

17 Feb 2025 08:59PM UTC coverage: 58.754% (+0.3%) from 58.475%
13378462461

push

github

web-flow
Add support for sequence and index bindings (#760)

* update grammar

* add ast nodes; ast building

* Rename to unpacking

* semantic analysis

* executor work part 1, unpacking indices

* renamings; implement index binding

* small cleanup

* use multi_index; more tests

* use multi_index only for rest, otherwise list

* initial formatting

* add missing token decoding

* address self-review comments

* formatting tweaks

* add test for var binding in classes

* add StringIterator

* fix spread tests

* add cfgfile iterator; add cfgelem opersubscript; tests

* add iterator for SQLResultSet and SQLRow; tests

* Copy value in take global/local

* Allow any iterable can index rest unpacking
Always use dictionary as rest object in index unpacking

* add docs, core-changes, doc tests

* formatting changes...

* address self-review comments

* update formatter, format all binding test srcs

* address review comments
- unset var scope

* add cfgfile/cfgelem docs

* reformat objref svg

501 of 550 new or added lines in 19 files covered. (91.09%)

14 existing lines in 3 files now uncovered.

42235 of 71885 relevant lines covered (58.75%)

377989.47 hits per line

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

76.92
/pol-core/bscript/compiler/ast/BindingStatement.cpp
1
#include "BindingStatement.h"
2

3
#include "bscript/compiler/ast/Expression.h"
4
#include "bscript/compiler/ast/NodeVisitor.h"
5

6
namespace Pol::Bscript::Compiler
7
{
8
BindingStatement::BindingStatement( const SourceLocation& source_location,
96✔
9
                                    std::unique_ptr<Node> bindings,
10
                                    std::unique_ptr<Expression> initializer )
96✔
11
    : Statement( source_location )
96✔
12
{
13
  children.reserve( 2 );
96✔
14
  children.push_back( std::move( initializer ) );
96✔
15
  children.push_back( std::move( bindings ) );
96✔
16
}
96✔
17
void BindingStatement::accept( NodeVisitor& visitor )
474✔
18
{
19
  visitor.visit_binding_statement( *this );
474✔
20
}
474✔
21

NEW
22
void BindingStatement::describe_to( std::string& w ) const
×
23
{
NEW
24
  w += "binding-statement";
×
NEW
25
}
×
26

27
}  // 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