Skip to content

Commit

Permalink
Fixed conditional G-code int(...), which did not accept an expression,
Browse files Browse the repository at this point in the history
just a variable, constant or an expression enclosed in double braces (())
Mentioned for example in #3472
  • Loading branch information
bubnikv committed Oct 29, 2021
1 parent 23ab9fb commit 0f14592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libslic3r/PlaceholderParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ namespace client
[ px::bind(&expr<Iterator>::max, _val, _2) ]
| (kw["random"] > '(' > conditional_expression(_r1) [_val = _1] > ',' > conditional_expression(_r1) > ')')
[ px::bind(&MyContext::random<Iterator>, _r1, _val, _2) ]
| (kw["int"] > '(' > unary_expression(_r1) > ')') [ px::bind(&FactorActions::to_int, _1, _val) ]
| (kw["int"] > '(' > conditional_expression(_r1) > ')') [ px::bind(&FactorActions::to_int, _1, _val) ]
| (strict_double > iter_pos) [ px::bind(&FactorActions::double_, _1, _2, _val) ]
| (int_ > iter_pos) [ px::bind(&FactorActions::int_, _1, _2, _val) ]
| (kw[bool_] > iter_pos) [ px::bind(&FactorActions::bool_, _1, _2, _val) ]
Expand Down

0 comments on commit 0f14592

Please sign in to comment.