parameters: (self, const)
return_statement: return index
docstring: Add a constant to the environment, return its index.
docstring_summary: Add a constant to the environment, return its index.
docstring_tokens: Add a constant to the environment return its index .
function: def add_const(self, const):
          """
          Add a constant to the environment, return its index.
          """
          # All constants are frozen inside the environment
          if isinstance(const, str):
              const = utils.intern(const)
          for index, val in enumerate(self.env.consts):
              if val is const:
                  break
          else:
              index = len(self.env.consts)
              self.env.consts.append(const)
          return index
function_tokens: def add_const ( self , const ) : # All constants are frozen inside the environment if isinstance ( const , str ) : const = utils . intern ( const ) for index , val in enumerate ( self . env . consts ) : if val is const : break else : index = len ( self . env . consts ) self . env . consts . append ( const ) return index