(opening, closing, body)
return scope
Constructs a parser for (possibly nested) scopes.
Constructs a parser for (possibly nested) scopes.
Constructs a parser for ( possibly nested ) scopes .
def _nested_scopes(opening, closing, body):
  """Constructs a parser for (possibly nested) scopes."""
  scope = pp.Forward()
  scope << pp.Group(  # pylint: disable=expression-not-assigned
      opening +
      pp.ZeroOrMore(body | scope)("members") +
      closing)
  return scope
def _nested_scopes ( opening , closing , body ) : scope = pp . Forward ( ) scope << pp . Group ( # pylint: disable=expression-not-assigned opening + pp . ZeroOrMore ( body | scope ) ( "members" ) + closing ) return scope