Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool replace = false;
- for (int pars = 0, bracks = 1; bracks > 0 and pos < len; ++pos) {
- if (synt[pos] == '(') {
- ++pars;
- } else if (synt[pos] == ')') {
- --pars;
- } else if (synt[pos] == '[') {
- ++bracks;
- } else if (synt[pos] == ']') {
- --bracks;
- } else if (synt[pos] == ',' and pars == 0 and bracks == 1) {
- replace = true;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement