@requires_segment_info
def continuation(pl, segment_info, omit_cmdsubst=True, right_align=False, renames={}):
 if (not segment_info.get(u'parser_state')):
  return [{u'contents': u'', u'width': u'auto', u'highlight_groups': [u'continuation:current', u'continuation']}]
 ret = []
 for state in segment_info[u'parser_state'].split():
  state = renames.get(state, state)
  if state:
   ret.append({u'contents': state, u'highlight_groups': [u'continuation'], u'draw_inner_divider': True})
 if (omit_cmdsubst and (ret[(-1)][u'contents'] == u'cmdsubst')):
  ret.pop((-1))
 if (not ret):
  ret.append({u'contents': u''})
 if right_align:
  ret[0].update(width=u'auto', align=u'r')
  ret[(-1)][u'highlight_groups'] = [u'continuation:current', u'continuation']
 else:
  ret[(-1)].update(width=u'auto', align=u'l', highlight_groups=[u'continuation:current', u'continuation'])
 return ret

@ requires_segment_info def continuation ( pl , segment_info , omit_cmdsubst = True , right_align = False , renames = { } ) : if ( not segment_info . get ( u'parser_state' ) ) : return [ { u'contents' : u'' , u'width' : u'auto' , u'highlight_groups' : [ u'continuation:current' , u'continuation' ] } ] ret = [ ] for state in segment_info [ u'parser_state' ] . split ( ) : state = renames . get ( state , state ) if state : ret . append ( { u'contents' : state , u'highlight_groups' : [ u'continuation' ] , u'draw_inner_divider' : True } ) if ( omit_cmdsubst and ( ret [ ( - 1 ) ] [ u'contents' ] == u'cmdsubst' ) ) : ret . pop ( ( - 1 ) ) if ( not ret ) : ret . append ( { u'contents' : u'' } ) if right_align : ret [ 0 ] . update ( width = u'auto' , align = u'r' ) ret [ ( - 1 ) ] [ u'highlight_groups' ] = [ u'continuation:current' , u'continuation' ] else : ret [ ( - 1 ) ] . update ( width = u'auto' , align = u'l' , highlight_groups = [ u'continuation:current' , u'continuation' ] ) return ret
display parser state .