code: def numval(token):
      
      if token.type == 'INTEGER':
          return int(token.value)
      elif token.type == 'FLOAT':
          return float(token.value)
      else:
          return token.value
docs: Return the numerical value of token.value if it is a number