diff --git a/asttokens/mark_tokens.py b/asttokens/mark_tokens.py
index 6ab95e4..82acb55 100644
--- a/asttokens/mark_tokens.py
+++ b/asttokens/mark_tokens.py
@@ -103,22 +103,6 @@ class MarkTokens(object):
       newline = self._code.find_token(start_token, token.ENDMARKER)
     return self._code.prev_token(newline)
 
-  def _iter_non_child_tokens(self, first_token, last_token, node):
-    """
-    Generates all tokens in [first_token, last_token] range that do not belong to any children of
-    node. E.g. `foo(bar)` has children `foo` and `bar`, but we would yield the `(`.
-    """
-    tok = first_token
-    for n in self._iter_children(node):
-      for t in self._code.token_range(tok, self._code.prev_token(n.first_token)):
-        yield t
-      if n.last_token.index >= last_token.index:
-        return
-      tok = self._code.next_token(n.last_token)
-
-    for t in self._code.token_range(tok, last_token):
-      yield t
-
   def _expand_to_matching_pairs(self, first_token, last_token, node):
     """
     Scan tokens in [first_token, last_token] range that are between node's children, and for any
@@ -128,7 +112,7 @@ class MarkTokens(object):
     # child nodes). If we find any closing ones, we match them to the opens.
     to_match_right = []
     to_match_left = []
-    for tok in self._iter_non_child_tokens(first_token, last_token, node):
+    for tok in self._code.token_range(first_token, last_token):
       tok_info = tok[:2]
       if to_match_right and tok_info == to_match_right[-1]:
         to_match_right.pop()

IndexError on f((x)[:, 0])
I've had this for a while but only now found the time to boil down to a minimal reproducing case. :X

Reproducer:

```py
import asttokens
asttokens.ASTTokens('f((x)[:, 0])', parse=True)
```

Running this file gives:

```pytb
Traceback (most recent call last):
  File "/tmp/reproducer.py", line 2, in <module>
    asttokens.ASTTokens('f((x)[:, 0])', parse=True)
  File "asttokens/asttokens.py", line 65, in __init__
    self.mark_tokens(self._tree)
  File "asttokens/asttokens.py", line 76, in mark_tokens
    MarkTokens(self).visit_tree(root_node)
  File "asttokens/mark_tokens.py", line 47, in visit_tree
    util.visit_tree(node, self._visit_before_children, self._visit_after_children)
  File "asttokens/util.py", line 192, in visit_tree
    ret = postvisit(current, par_value, value)
  File "asttokens/mark_tokens.py", line 87, in _visit_after_children
    first, last = self._expand_to_matching_pairs(first, last, node)
  File "asttokens/mark_tokens.py", line 142, in _expand_to_matching_pairs
    last = self._code.next_token(last_token)
  File "asttokens/asttokens.py", line 141, in next_token
    while is_non_coding_token(self._tokens[i].type):
IndexError: list index out of range
```
diff --git a/tests/test_mark_tokens.py b/tests/test_mark_tokens.py
index 58ab323..20dc84d 100644
--- a/tests/test_mark_tokens.py
+++ b/tests/test_mark_tokens.py
@@ -520,3 +520,8 @@ bar = ('x y z'   # comment2
                      {"Call:(obj.attribute.get_callback() or default_callback)()"})
     self.assertIn('BoolOp:obj.attribute.get_callback() or default_callback', m.view_nodes_at(8, 5))
     m.verify_all_nodes(self)
+
+  def test_complex_slice_and_parens(self):
+    source = 'f((x)[:, 0])'
+    m = self.create_mark_checker(source)
+    m.verify_all_nodes(self)

pip install -e .[dev]
parse_log_pytest
requirements.txt
nose coverage pytest
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astroid==1.5.3
-e git+https://github.com/gristlabs/asttokens.git@f207f03b669deb4af3fe9cb4df1ba40982126988#egg=asttokens
attrs==22.2.0
certifi==2021.5.30
coverage==4.2
importlib-metadata==4.8.3
iniconfig==1.1.1
lazy-object-proxy==1.3.1
nose==1.3.7
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
six==1.10.0
tomli==1.2.3
typing_extensions==4.1.1
wrapt==1.10.10
zipp==3.6.0

name: asttokens
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astroid==1.5.3
      - attrs==22.2.0
      - coverage==4.2
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - lazy-object-proxy==1.3.1
      - nose==1.3.7
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - six==1.10.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - wrapt==1.10.10
      - zipp==3.6.0
prefix: /opt/conda/envs/asttokens

tests/test_mark_tokens.py::TestMarkTokens::test_complex_slice_and_parens
tests/test_mark_tokens.py::TestMarkTokens::test_adjacent_joined_strings tests/test_mark_tokens.py::TestMarkTokens::test_adjacent_strings tests/test_mark_tokens.py::TestMarkTokens::test_calling_lambdas tests/test_mark_tokens.py::TestMarkTokens::test_comprehensions tests/test_mark_tokens.py::TestMarkTokens::test_conditional_expr tests/test_mark_tokens.py::TestMarkTokens::test_decorators tests/test_mark_tokens.py::TestMarkTokens::test_deep_recursion tests/test_mark_tokens.py::TestMarkTokens::test_del_dict tests/test_mark_tokens.py::TestMarkTokens::test_dict_order tests/test_mark_tokens.py::TestMarkTokens::test_fixture1 tests/test_mark_tokens.py::TestMarkTokens::test_fixture10 tests/test_mark_tokens.py::TestMarkTokens::test_fixture11 tests/test_mark_tokens.py::TestMarkTokens::test_fixture12 tests/test_mark_tokens.py::TestMarkTokens::test_fixture13 tests/test_mark_tokens.py::TestMarkTokens::test_fixture2 tests/test_mark_tokens.py::TestMarkTokens::test_fixture3 tests/test_mark_tokens.py::TestMarkTokens::test_fixture4 tests/test_mark_tokens.py::TestMarkTokens::test_fixture5 tests/test_mark_tokens.py::TestMarkTokens::test_fixture6 tests/test_mark_tokens.py::TestMarkTokens::test_fixture7 tests/test_mark_tokens.py::TestMarkTokens::test_fixture8 tests/test_mark_tokens.py::TestMarkTokens::test_fixture9 tests/test_mark_tokens.py::TestMarkTokens::test_fstrings tests/test_mark_tokens.py::TestMarkTokens::test_keyword_arg_only tests/test_mark_tokens.py::TestMarkTokens::test_mark_tokens_multiline tests/test_mark_tokens.py::TestMarkTokens::test_mark_tokens_simple tests/test_mark_tokens.py::TestMarkTokens::test_nonascii tests/test_mark_tokens.py::TestMarkTokens::test_paren_attr tests/test_mark_tokens.py::TestMarkTokens::test_parens_around_func tests/test_mark_tokens.py::TestMarkTokens::test_print_function tests/test_mark_tokens.py::TestMarkTokens::test_return_annotation tests/test_mark_tokens.py::TestMarkTokens::test_slices tests/test_mark_tokens.py::TestMarkTokens::test_splat tests/test_mark_tokens.py::TestMarkTokens::test_trailing_commas tests/test_mark_tokens.py::TestMarkTokens::test_with
asttokens/mark_tokens.py
asttokens/mark_tokens.py