assignment = lvalue "=" expr
768847
def assignment(self, node, children):
        ''
        lvalue, _, expr = children
        self.env[lvalue] = expr
        return expr
796719
def p_expr_require(p):
    ''
    p[0] = ast.Require(p[2], False, lineno=p.lineno(1))
218286
def _Assign(self, t):
        
        self._fill()
        for target in t.nodes:
            self._dispatch(target)
            self._write(" = ")
        self._dispatch(t.expr)
        if not self._do_indent:
            self._write('; ')
1039556
def p_l_expression(self, p):
        '''     
        '''
        _LOGGER.debug("l -> expresion")

        l = TypedList( [ p[1] ] )
        p[0] = l
103209
private LValue constructLVal(Expr expr, CallStack frame) {
		switch (expr.getOpcode()) {
		case EXPR_arrayborrow:
		case EXPR_arrayaccess: {
			Expr.ArrayAccess e = (Expr.ArrayAccess) expr;
			LValue src = constructLVal(e.getFirstOperand(), frame);
			RValue.Int index = executeExpression(INT_T, e.getSecondOperand(), frame);
			return new LValue.Array(src, index);
		}
		case EXPR_dereference: {
			Expr.Dereference e = (Expr.Dereference) expr;
			LValue src = constructLVal(e.getOperand(), frame);
			return new LValue.Dereference(src);
		}
		case EXPR_recordaccess:
		case EXPR_recordborrow: {
			Expr.RecordAccess e = (Expr.RecordAccess) expr;
			LValue src = constructLVal(e.getOperand(), frame);
			return new LValue.Record(src, e.getField());
		}
		case EXPR_variablemove:
		case EXPR_variablecopy: {
			Expr.VariableAccess e = (Expr.VariableAccess) expr;
			Decl.Variable decl = e.getVariableDeclaration();
			return new LValue.Variable(decl.getName());
		}
		}
		deadCode(expr);
		return null; // deadcode
	}
15906
def p_expr1(p):
    
    p[0] = node.expr(op=p[1], args=node.expr_list([p[2]]))
718897
def set_expr(self, ctx):
        
        if self.readonly:
            raise MuvError(
                "Cannot assign value to constant '%s'." % self.varname,
                position=self.position
            )
        if self.declare:
            varname = ctx.declare_variable(self.varname)
            if len(self.indexing) == 0:
                return "var! {var}".format(var=varname)
        else:
            varname = ctx.lookup_variable(self.varname)
            if varname is None:
                raise MuvError(
                    "Undeclared identifier '%s'." % self.varname,
                    position=self.position
                )
        if len(self.indexing) == 0:
            if ctx.assign_level > 1:
                return "dup {var} !".format(var=varname)
            else:
                return "{var} !".format(var=varname)
        if len(self.indexing) == 1:
            if ctx.target in ['fb7']:
                if ctx.assign_level > 1:
                    fmt = "dup {var} @ {idx} ->[] pop"
                else:
                    fmt = "{var} @ {idx} ->[] pop"
            else:
                if ctx.assign_level > 1:
                    fmt = "dup {var} @ {idx} ->[] {var} !"
                else:
                    fmt = "{var} @ {idx} ->[] {var} !"
            return fmt.format(
                var=varname,
                idx=self.indexing[0].generate_code(ctx),
            )
        if ctx.target in ['fb7']:
            if ctx.assign_level > 1:
                fmt = "dup {var} @ {{ {idx} }}list array_nested_set pop"
            else:
                fmt = "{var} @ {{ {idx} }}list array_nested_set pop"
        else:
            if ctx.assign_level > 1:
                fmt = "dup {var} @ {{ {idx} }}list array_nested_set {var} !"
            else:
                fmt = "{var} @ {{ {idx} }}list array_nested_set {var} !"
        return fmt.format(
            var=varname,
            idx=" ".join(x.generate_code(ctx) for x in self.indexing)
        )
199211
private RValue executeConst(Expr.Constant expr, CallStack frame) {
		Value v = expr.getValue();
		switch (v.getOpcode()) {
		case ITEM_null:
			return RValue.Null;
		case ITEM_bool: {
			Value.Bool b = (Value.Bool) v;
			if (b.get()) {
				return RValue.True;
			} else {
				return RValue.False;
			}
		}
		case ITEM_byte: {
			Value.Byte b = (Value.Byte) v;
			return semantics.Byte(b.get());
		}
		case ITEM_int: {
			Value.Int i = (Value.Int) v;
			return semantics.Int(i.get());
		}
		case ITEM_utf8: {
			Value.UTF8 s = (Value.UTF8) v;
			byte[] bytes = s.get();
			RValue[] elements = new RValue[bytes.length];
			for (int i = 0; i != elements.length; ++i) {
				// FIXME: something tells me this is wrong for signed byte
				// values?
				elements[i] = semantics.Int(BigInteger.valueOf(bytes[i]));
			}
			return semantics.Array(elements);
		}
		default:
			throw new RuntimeException("unknown value encountered (" + expr + ")");
		}
	}
578146
def p_conditional_expr(self, p):
        
        if len(p) == 2:
            p[0] = p[1]
        else:
            p[0] = self.asttypes.Conditional(
                predicate=p[1], consequent=p[3], alternative=p[5])
            p[0].setpos(p, 2)
997118
def assignment(self):
        
        node = self.logical_or_expr()
        if self.token.nature == Nature.ASSIGN:
            token = self.token
            self._process(Nature.ASSIGN)
            right = self.logical_or_expr()
            return Assignment(left=node, op=token, right=right)
        else:
            return node
978717
def _handle_assignment(self, node, scope, ctxt, stream):
        
        def add_op(x,y): x += y
        def sub_op(x,y): x -= y
        def div_op(x,y): x /= y
        def mod_op(x,y): x %= y
        def mul_op(x,y): x *= y
        def xor_op(x,y): x ^= y
        def and_op(x,y): x &= y
        def or_op(x,y): x |= y
        def lshift_op(x,y): x <<= y
        def rshift_op(x,y): x >>= y
        def assign_op(x,y): x._pfp__set_value(y)

        switch = {
            "+="    : add_op,
            "-="    : sub_op,
            "/="    : div_op,
            "%="    : mod_op,
            "*="    : mul_op,
            "^="    : xor_op,
            "&="    : and_op,
            "|="    : or_op,
            "<<="    : lshift_op,
            ">>="    : rshift_op,
            "="        : assign_op
        }

        self._dlog("handling assignment")
        field = self._handle_node(node.lvalue, scope, ctxt, stream)
        self._dlog("field = {}".format(field))
        value = self._handle_node(node.rvalue, scope, ctxt, stream)

        if node.op is None:
            self._dlog("value = {}".format(value))
            field._pfp__set_value(value)
        else:
            self._dlog("value {}= {}".format(node.op, value))
            if node.op not in switch:
                raise errors.UnsupportedAssignmentOperator(node.coord, node.op)
            switch[node.op](field, value)
384380
def assign_value(self, comp_def, value, src_ref):
        
        super().assign_value(comp_def, value, src_ref)
        if "rclr" in comp_def.properties:
            del comp_def.properties["rclr"]
        if "rset" in comp_def.properties:
            del comp_def.properties["rset"]
1230448
def p_arr_assignment(p):
    
    i = 2 if p[1].upper() == 'LET' else 1
    id_ = p[i]
    arg_list = p[i + 1]
    expr = p[i + 3]

    p[0] = None
    if arg_list is None or expr is None:
        return  # There were errors

    entry = SYMBOL_TABLE.access_call(id_, p.lineno(i))
    if entry is None:
        return

    if entry.type_ == TYPE.string:
        variable = gl.SYMBOL_TABLE.access_array(id_, p.lineno(i))
        if len(variable.bounds) + 1 == len(arg_list):
            ss = arg_list.children.pop().value
            p[0] = make_array_substr_assign(p.lineno(i), id_, arg_list, (ss, ss), expr)
            return

    arr = make_array_access(id_, p.lineno(i), arg_list)
    if arr is None:
        return

    expr = make_typecast(arr.type_, expr, p.lineno(i))
    if entry is None:
        return

    p[0] = make_sentence('LETARRAY', arr, expr)
512610
Expr assign() {
		Tok idTok = peek();
		if (idTok.sym != Sym.ID) {
			return ternary();
		}
		
		int begin = forward;
		// ID = expr
		if (move().sym == Sym.ASSIGN) {
			move();
			return new Assign(idTok.value(), expr(), location);
		}
		
		// array、map 赋值：ID [ expr ] = expr
		if (peek().sym == Sym.LBRACK) {
			move();
			Expr index = expr();
			match(Sym.RBRACK);
			if (peek().sym == Sym.ASSIGN) {
				move();
				return new Assign(idTok.value(), index, expr(), location);	// 右结合无限连
			}
		}
		
		resetForward(begin);
		return ternary();
	}
165300
function makeVar(id, expr) {
  return assignmentExpression('=',
    memberExpression(identifier('vars'), literal(id), true),
    expr);
}
712624
def visit_Expr(self, node: AST, dfltChaining: bool = True) -> str:
        """"""
        return self.visit(node.value)
1128181
function AssignmentExpression(node, parent, scope, remaps) {
    var ids = this.getBindingIdentifiers();
    for (var name in ids) {
      replace(ids[name], node, scope, remaps);
    }
  }