Similar to the above. But declares a Constant.
329952
def declare_const(self, id_, lineno, type_, default_value):
        
        if not self.check_is_undeclared(id_, lineno, scope=self.current_scope, show_error=False):
            entry = self.get_entry(id_)
            if entry.scope == SCOPE.parameter:
                syntax_error(lineno,
                             "Constant '%s' already declared as a parameter "
                             "at %s:%i" % (id_, entry.filename, entry.lineno))
            else:
                syntax_error(lineno, "Constant '%s' already declared at "
                                     "%s:%i" % (id_, entry.filename, entry.lineno))
            return None

        entry = self.declare_variable(id_, lineno, type_, default_value)
        if entry is None:
            return None

        entry.class_ = CLASS.const
        return entry
12280
def _on_constants_updated(self):
        
        # update attrs
        self.attrs["constants"] = [a.identity.encode() for a in self._constants]
1098059
def lazy_constant(fn):
    """"""

    class NewLazyConstant(LazyConstant):
        @functools.wraps(fn)
        def __call__(self):
            return self.get_value()

    return NewLazyConstant(fn)
1094468
def mark(self, value=1):
    """"""

    self['count'] += value
    for m in self._meters:
      m.update(value)
341586
def constant(X, n, mu, hyper_deriv=None):
    
    if (n == 0).all():
        if hyper_deriv is not None:
            return scipy.ones(X.shape[0])
        else:
            return mu * scipy.ones(X.shape[0])
    else:
        return scipy.zeros(X.shape[0])
1234360
def resolve_constant(constant)
      current = Object
      final   = nil

      constant.split('::').each do |segment|
        if current.const_defined?(segment)
          current = final = current.const_get(segment)
        else
          raise(
            ArgumentError,
            "Constant #{segment} does not exist in #{constant}"
          )
        end
      end

      return final
    end
253094
static ConstantFloatInfo make(ConstantPool cp, float value) {
        ConstantInfo ci = new ConstantFloatInfo(value);
        return (ConstantFloatInfo)cp.addConstant(ci);
    }
1250071
protected function defineConstants()
    {
        if (! empty($this->constants)) {
            foreach ($this->constants as $key => $value) {
                defined($key) || define($key, $value);
            }
        }

        return $this;
    }
13759
static ConstantLongInfo make(ConstantPool cp, long value) {
        ConstantInfo ci = new ConstantLongInfo(value);
        return (ConstantLongInfo)cp.addConstant(ci);
    }
925170
def p_declare_statement(p):
    ''''''
    if len(p) == 2:
        p[0] = p[1]
    else:
        p[0] = ast.Block(p[2], lineno=p.lineno(1))
1353224
public final int resolveConstantIndex(String constant)
    {
        int size = 0;
        int index = 0;
        int nameIndex = resolveNameIndex(constant);
        constantReadLock.lock();
        try
        {
            size = getConstantPoolSize();
            index = getConstantIndex(constant);
        }
        finally
        {
            constantReadLock.unlock();
        }
        if (index != -1)
        {
            return index;
        }
        return addConstantInfo(new ConstantString(nameIndex), size);
    }
105693
def path_constant(self, name, value):
        """"""
        assert is_iterable_typed(name, basestring)
        assert is_iterable_typed(value, basestring)
        if len(value) > 1:
            self.registry.manager.errors()("path constant should have one element")
        self.registry.current().add_constant(name[0], value, path=1)
1354985
public void setExpansion(double expansion) 
    {
        if(expansion <= 1 || Double.isNaN(expansion) || Double.isInfinite(expansion) )
            throw new ArithmeticException("Expansion constant must be > 1, not " + expansion);
        else if(expansion <= reflection)
            throw new ArithmeticException("Expansion constant must be less than the reflection constant");
        this.expansion = expansion;
    }
755227
static boolean isConstantDeclaration(
      CodingConvention convention, JSDocInfo info, Node node) {
    // TODO(b/77597706): Update this method to handle destructured declarations.
    if (node.isName() && node.getParent().isConst()) {
      return true;
    } else if (node.isName()
        && isLhsByDestructuring(node)
        && getRootTarget(node).getGrandparent().isConst()) {
      return true;
    }

    if (info != null && info.isConstant()) {
      return true;
    }

    if (node.getBooleanProp(Node.IS_CONSTANT_VAR)) {
      return true;
    }

    switch (node.getToken()) {
      case NAME:
        return NodeUtil.isConstantByConvention(convention, node);
      case GETPROP:
        return node.isQualifiedName()
            && NodeUtil.isConstantByConvention(convention, node.getLastChild());
      default:
        break;
    }
    return false;
  }
547435
static ConstantClassInfo make(ConstantPool cp, String className, int dim) {
        ConstantInfo ci = new ConstantClassInfo(cp, className, dim);
        return (ConstantClassInfo)cp.addConstant(ci);
    }
426616
void multiply_constant(double x)
    {
        for (Map.Entry<Integer, Double> entry : entrySet())
        {
            entry.setValue(entry.getValue() * x);
        }
    }
341400
def p_variable_declaration_noin(self, p):
        
        if len(p) == 2:
            p[0] = self.asttypes.VarDecl(p[1])
            p[0].setpos(p)  # require yacc_tracking
        else:
            p[0] = self.asttypes.VarDecl(p[1], p[2])
            p[0].setpos(p, additional=(('=', 2),))