code: def p_function_body(p):
      
      if not FUNCTION_LEVEL:
          syntax_error(p.lineno(3), "Unexpected token 'END %s'. No Function or Sub has been defined." % p[2])
          p[0] = None
          return
  
      a = FUNCTION_LEVEL[-1].kind
      if a not in (KIND.sub, KIND.function):  # This function/sub was not correctly declared, so exit now
          p[0] = None
          return
  
      i = 2 if p[1] == 'END' else 3
      b = p[i].lower()
  
      if a != b:
          syntax_error(p.lineno(i), "Unexpected token 'END %s'. Should be 'END %s'" % (b.upper(), a.upper()))
          p[0] = None
      else:
          p[0] = None if p[1] == 'END' else p[1]
docs: function_body : program_co END FUNCTION
                        | program_co END SUB
                        | statements_co END FUNCTION
                        | statements_co END SUB
                        | co_statements_co END FUNCTION
                        | co_statements_co END SUB
                        | END FUNCTION
                        | END SUB