def add_scope(self, scope_type, scope_name, scope_start, is_method=False):
if self._curr is not None:<EOL><INDENT>self._curr['<STR_LIT:end>'] = scope_start - <NUM_LIT:1>  <EOL><DEDENT>self._curr = {<EOL>'<STR_LIT:type>': scope_type, '<STR_LIT:name>': scope_name,<EOL>'<STR_LIT:start>': scope_start, '<STR_LIT:end>': scope_start<EOL>}<EOL>if is_method and self._positions:<EOL><INDENT>last = self._positions[-<NUM_LIT:1>]<EOL>if not '<STR_LIT>' in last:<EOL><INDENT>last['<STR_LIT>'] = []<EOL><DEDENT>last['<STR_LIT>'].append(self._curr)<EOL><DEDENT>else:<EOL><INDENT>self._positions.append(self._curr)<EOL><DEDENT>
we identified a scope and add it to positions.