#NEWLINE# def get_local_variable( a_project ) : #NEWLINE# #INDENT# '\n        A list of local variables declared in the previous local section.\n    ' #NEWLINE# do_regex = a_project . get_tools_regex ( 'extract_do_keywork' ) #NEWLINE# deferred_regex = a_project . get_tools_regex ( 'extract_deferred_keywork' ) #NEWLINE# local_regex = a_project . get_tools_regex ( 'extract_local_keywork' ) #NEWLINE# require_regex = a_project . get_tools_regex ( 'extract_require_keywork' ) #NEWLINE# ensure_regex = a_project . get_tools_regex ( 'extract_ensure_keywork' ) #NEWLINE# text_list = environment . text_list ( ) #NEWLINE# i = environment . get_cursor_row ( ) #NEWLINE# is_cancel_syntax_founded = False #NEWLINE# do_row = ( - 1 ) #NEWLINE# l_result = [ ] #NEWLINE# while ( ( not is_cancel_syntax_founded ) and ( do_row < 0 ) and ( i >= 0 ) ) : #NEWLINE# #INDENT# if ( require_regex . search ( text_list [ i ] ) or deferred_regex . search ( text_list [ i ] ) ) : #NEWLINE# #INDENT# is_cancel_syntax_founded = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if do_regex . search ( text_list [ i ] ) : #NEWLINE# #INDENT# do_row = i #NEWLINE# #UNINDENT# #UNINDENT# i = ( i - 1 ) #NEWLINE# #UNINDENT# while ( ( not is_cancel_syntax_founded ) and ( i >= 0 ) and ( not local_regex . search ( text_list [ i ] ) ) ) : #NEWLINE# #INDENT# if ( require_regex . search ( text_list [ local_regex ] ) or do_regex . search ( text_list [ i ] ) or ensure_regex . search ( text_list [ i ] ) ) : #NEWLINE# #INDENT# l_result = [ ] #NEWLINE# is_cancel_syntax_founded = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# l_variables = get_variable_from_line ( a_project , text_list [ i ] ) #NEWLINE# if l_variables : #NEWLINE# #INDENT# l_result . extend ( l_variables ) #NEWLINE# #UNINDENT# #UNINDENT# i = ( i - 1 ) #NEWLINE# #UNINDENT# return l_result