• 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

75.0
/pol-core/bscript/compiler/ast/SequenceBinding.cpp
1
#include "SequenceBinding.h"
2

3
#include "bscript/compiler/ast/Node.h"
4
#include "bscript/compiler/ast/NodeVisitor.h"
5
#include "clib/clib.h"
6

7
namespace Pol::Bscript::Compiler
8
{
9
SequenceBinding::SequenceBinding( const SourceLocation& loc,
70✔
10
                                  std::vector<std::unique_ptr<Node>> bindings )
70✔
11
    : Node( loc, std::move( bindings ) )
70✔
12
{
13
}
70✔
14
u8 SequenceBinding::binding_count() const
138✔
15
{
16
  return Clib::clamp_convert<u8>( children.size() );
138✔
17
}
18

19
void SequenceBinding::accept( NodeVisitor& visitor )
348✔
20
{
21
  visitor.visit_sequence_binding( *this );
348✔
22
}
348✔
23

NEW
24
void SequenceBinding::describe_to( std::string& w ) const
×
25
{
NEW
26
  w += "sequence-binding";
×
NEW
27
}
×
28

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