Update on single tag expression
@this Tag
@param { Object } expr - expression logic
@returns { undefined }
192385
function updateExpression(expr) {
  if (this.root && getAttr(this.root,'virtualized')) { return }

  var dom = expr.dom,
    // remove the riot- prefix
    attrName = normalizeAttrName(expr.attr),
    isToggle = contains([SHOW_DIRECTIVE, HIDE_DIRECTIVE], attrName),
    isVirtual = expr.root && expr.root.tagName === 'VIRTUAL',
    parent = dom && (expr.parent || dom.parentNode),
    // detect the style attributes
    isStyleAttr = attrName === 'style',
    isClassAttr = attrName === 'class',
    hasValue,
    isObj,
    value;

  // if it's a tag we could totally skip the rest
  if (expr._riot_id) {
    if (expr.isMounted) {
      expr.update();
    // if it hasn't been mounted yet, do that now.
    } else {
      expr.mount();
      if (isVirtual) {
        makeReplaceVirtual(expr, expr.root);
      }
    }
    return
  }
  // if this expression has the update method it means it can handle the DOM changes by itself
  if (expr.update) { return expr.update() }

  // ...it seems to be a simple expression so we try to calculat its value
  value = tmpl(expr.expr, isToggle ? extend({}, Object.create(this.parent), this) : this);
  hasValue = !isBlank(value);
  isObj = isObject(value);

  // convert the style/class objects to strings
  if (isObj) {
    isObj = !isClassAttr && !isStyleAttr;
    if (isClassAttr) {
      value = tmpl(JSON.stringify(value), this);
    } else if (isStyleAttr) {
      value = styleObjectToString(value);
    }
  }

  // remove original attribute
  if (expr.attr && (!expr.isAttrRemoved || !hasValue || value === false)) {
    remAttr(dom, expr.attr);
    expr.isAttrRemoved = true;
  }

  // for the boolean attributes we don't need the value
  // we can convert it to checked=true to checked=checked
  if (expr.bool) { value = value ? attrName : false; }
  if (expr.isRtag) { return updateDataIs(expr, this, value) }
  if (expr.wasParsedOnce && expr.value === value) { return }

  // update the expression value
  expr.value = value;
  expr.wasParsedOnce = true;

  // if the value is an object we can not do much more with it
  if (isObj && !isToggle) { return }
  // avoid to render undefined/null values
  if (isBlank(value)) { value = ''; }

  // textarea and text nodes have no attribute name
  if (!attrName) {
    // about #815 w/o replace: the browser converts the value to a string,
    // the comparison by "==" does too, but not in the server
    value += '';
    // test for parent avoids error with invalid assignment to nodeValue
    if (parent) {
      // cache the parent node because somehow it will become null on IE
      // on the next iteration
      expr.parent = parent;
      if (parent.tagName === 'TEXTAREA') {
        parent.value = value;                    // #1113
        if (!IE_VERSION) { dom.nodeValue = value; }  // #1625 IE throws here, nodeValue
      }                                         // will be available on 'updated'
      else { dom.nodeValue = value; }
    }
    return
  }


  // event handler
  if (isFunction(value)) {
    setEventHandler(attrName, value, dom, this);
  // show / hide
  } else if (isToggle) {
    toggleVisibility(dom, attrName === HIDE_DIRECTIVE ? !value : value);
  // handle attributes
  } else {
    if (expr.bool) {
      dom[attrName] = value;
    }

    if (attrName === 'value' && dom.value !== value) {
      dom.value = value;
    }

    if (hasValue && value !== false) {
      setAttr(dom, attrName, value);
    }

    // make sure that in case of style changes
    // the element stays hidden
    if (isStyleAttr && dom.hidden) { toggleVisibility(dom, false); }
  }
}
726458
@Override
    public List<AbstractExpression> bindingToIndexedExpression(AbstractExpression expr) {
        if (m_originalValue == null || ! m_originalValue.equals(expr)) {
            return null;
        }
        // This parameter's value was matched, so return this as one bound parameter.
        List<AbstractExpression> result = new ArrayList<AbstractExpression>();
        result.add(this);
        return result;
    }
118614
function on($expr)
    {
        $lastJoin = $this->getLastJoinSource();

        // Join all given expressions with AND
        if ($lastJoin->right instanceof On) {
            // Merge the new ON Expressions with the 
            // old if there exists an ON Expression
            $lastJoin->right->expression = $expr;
        } else {
            // Otherwise create a new ON Expression
            $lastJoin->right = new On($expr);
        }
        return $this;
    }
411720
function restoreExpr(html, pcex) {
  if (pcex.length) {
    html = html
      .replace(/\u0001(\d+)/g, function (_, d) {
        var expr = pcex[d]
        if (expr[0] === '=') {
          expr = expr.replace(brackets.R_STRINGS, function (qs) {
            return qs //.replace(/&/g, '&amp;') // I don't know if this make sense
              .replace(/</g, '&lt;')
              .replace(/>/g, '&gt;')
          })
        }
        return pcex._bp[0] + expr.replace(/"/g, '\u2057')
      })
  }
  return html
}
1015777
function compileExpression(expr, filter, dependencies) {
	// console.log('xpr parse : ', expr);
	var total = expr + filter;
	if (cacheXpr[total]) {
		dependencies.push.apply(dependencies, cacheXpr[total].dependencies);
		return cacheXpr[total].func;
	}
	var dep = [],
		exprReplaced = expr.replace(replacementRegExp, function(whole) {
			if (whole == 'true' || whole == 'false' ||  whole == 'null')
				return whole;
			switch (whole[0]) {
				case '"':
				case "'":
					return whole;
				case '$':
					if (whole[1] === '.')
						return '__global' + whole.substring(1);
				default:
					if (whole[whole.length - 1] === '(') { // function call
						dep.push(whole.substring(0, whole.length - 1));
						return '__context.data.' + whole;
					} else { // simple path to var
						dep.push(whole);
						// we use indirect value retrieval to avoid throw if path provides null or undefined somewhere
						return '__context.get(["' + whole.split('.').join('","') + '"])';
					}
			}
		});
	// console.log('xpr parsing res : ', expr);
	dependencies.push.apply(dependencies, dep);

	var func = new Function("__context", "__global", "return " + exprReplaced + ";");
	if (!filter) {
		cacheXpr[total] = {
			func: func,
			dependencies: dep
		};
		if (Interpolable.debug)
			func.expression = expr;
		return func;
	}
	// produce filter 
	var fltr = new Function('Filter', 'return new Filter().' + filter)(Filter);
	// wrap expr func with filter
	var f = function(context, global) {
		return fltr.call(context, func.call(this, context, global));
	};
	if (Interpolable.debug)
		f.expression = expr;
	cacheXpr[total] = {
		func: f,
		dependencies: dep
	};
	return f;
}
1001084
public function addNotExistsToQueryCondition(Expr $expr)
    {
        $expr->attr($this->getHashKey()->getPropertyMetadata()->name)->exists(false);
    }
517354
function unmountAll(expressions) {
  each(expressions, function(expr) {
    if (expr instanceof Tag$1) { expr.unmount(true); }
    else if (expr.tagName) { expr.tag.unmount(true); }
    else if (expr.unmount) { expr.unmount(); }
  });
}
549628
function executeExpr_(expr,context){
	var value=null;
	if(typeof expr=='string'){
		if(context.params[expr]){
			value=context.params[expr];
		}else{
			value=expr;
		}
	}else if(typeof expr[0]=='string'){
		switch(expr[0]){
		case 'defined':
			for(var k=1;k<expr.length;k++){
				if(typeof expr[k]!='string'){
					console.log("error: invalid format in defined expression");
					return null;
				}else if(context.params[expr[k]]==null){
					return false;
				}else{
					//nothing to do
				}
			}
			value=true;
			break;
		case 'append':{
			if(expr.length<3){
				console.log("error: append expression needs 2 arguments or more");
				return null;
			}
			value='';
			var v;
			for(var k=1;k<expr.length;k++){
				if(!(v=executeExpr(expr[k],context))){
					return false;
				}
				value+=v;
			}
			break;}
		case '&&':
			if(expr.length<3){
				console.log("error: && expression needs 2 arguments or more");
				return null;
			}
			for(var k=1;k<expr.length;k++){
				if(!executeExpr(expr[k],context)){
					return false;
				}
			}
			value=true;
			break;
		case '||':
			if(expr.length<3){
				console.log("error: && expression needs 2 arguments or more");
				return null;
			}
			for(var k=1;k<expr.length;k++){
				if(executeExpr(expr[k],context)){
					return true;
				}
			}
			value=false;
			break;
		case '==':
			if(expr.length!=3){
				console.log("error: == expression needs 2 arguments");
				return null;
			}
			return (executeExpr(expr[1],context)==executeExpr(expr[2],context));
		case '!=':
			if(expr.length!=3){
				console.log("error: != expression needs 2 arguments");
				return null;
			}
			return (executeExpr(expr[1],context)!=executeExpr(expr[2],context));
		case '!':
			if(expr.length!=2){
				console.log("error: == expression needs only 1 argument");
				return null;
			}
			return !executeExpr(expr[1],context);
			break;
		default:
			break;
		}
	}else if(expr[0] instanceof Array){
		if(expr.length==1){
			value=executeExpr(expr[0], context);
		}else{
			console.log("error: () expression needs only 1 argument");
		}
	}else{
		console.log("error: unknown expression");
	}
	return value;
}
1161593
private void fixupInStatementExpressions(VoltXMLElement expr) throws HSQLParseException {
        if (doesExpressionReallyMeanIn(expr)) {
            inFixup(expr);
            // can't return because in with subquery can be nested
        }

        // recursive hunt
        for (VoltXMLElement child : expr.children) {
            fixupInStatementExpressions(child);
        }
    }
922580
function findAllExpressions(parentBlockStatement, expn, text) {
        var doc   = session.editor.document,
            obj   = {},
            expns = [];

        // find all references of the expression
        obj[expn.type] = function(node) {
            if (text === doc.getText().substr(node.start, node.end - node.start)) {
                expns.push(node);
            }
        };
        ASTWalker.simple(parentBlockStatement, obj);

        return expns;
    }
736188
private boolean validTypeTransformationExpression(Node expr) {
    if (!isValidExpression(expr)) {
      warnInvalidExpression("type transformation", expr);
      return false;
    }
    if (isTypeVar(expr) || isTypeName(expr)) {
      return true;
    }
    // Check for valid keyword
    String name = getCallName(expr);
    if (!isValidKeyword(name)) {
      warnInvalidExpression("type transformation", expr);
      return false;
    }
    Keywords keyword = nameToKeyword(name);
    // Check the rest of the expression depending on the kind
    switch (keyword.kind) {
      case TYPE_CONSTRUCTOR:
        return validTypeExpression(expr);
      case OPERATION:
        return validOperationExpression(expr);
      default:
        throw new IllegalStateException("Invalid type transformation expression");
    }
  }
613118
function(expr, options) {
                    var fn = options.fn;
                    options.fn = options.inverse;
                    options.inverse = fn;
                    return Mustache._helpers['if'].fn.apply(this, arguments);
                }
1272716
public void notifyBeforeEvaluation(String expr) {
        if (getEvaluationListeners() == null)
            return;
        for (EvaluationListener listener: getEvaluationListeners()) {
            listener.beforeEvaluation(this, expr);
        }
    }
1244789
def replace_expression(self, expr, replacement):
        

        for k in self.__slots__:
            v = getattr(self, k)
            if v is expr:
                setattr(self, k, replacement)
            elif type(v) is list:
                # Replace the instance in the list
                for i, expr_ in enumerate(v):
                    if expr_ is expr:
                        v[i] = replacement
            elif type(v) is tuple:
                # Rebuild the tuple
                _lst = [ ]
                replaced = False
                for i, expr_ in enumerate(v):
                    if expr_ is expr:
                        _lst.append(replacement)
                        replaced = True
                    else:
                        _lst.append(expr_)
                if replaced:
                    setattr(self, k, tuple(_lst))
            elif isinstance(v, IRExpr):
                v.replace_expression(expr, replacement)
1034758
function updateDataIs(expr, parent, tagName) {
      var tag = expr.tag || expr.dom._tag;
      var ref;

      var ref$1 = tag ? tag.__ : {};
      var head = ref$1.head;
      var isVirtual = expr.dom.tagName === 'VIRTUAL';

      if (tag && expr.tagName === tagName) {
        tag.update();
        return
      }

      // sync _parent to accommodate changing tagnames
      if (tag) {
        // need placeholder before unmount
        if(isVirtual) {
          ref = createDOMPlaceholder();
          head.parentNode.insertBefore(ref, head);
        }

        tag.unmount(true);
      }

      // unable to get the tag name
      if (!isString(tagName)) { return }

      expr.impl = __TAG_IMPL[tagName];

      // unknown implementation
      if (!expr.impl) { return }

      expr.tag = tag = initChild(
        expr.impl, {
          root: expr.dom,
          parent: parent,
          tagName: tagName
        },
        expr.dom.innerHTML,
        parent
      );

      each(expr.attrs, function (a) { return setAttribute(tag.root, a.name, a.value); });
      expr.tagName = tagName;
      tag.mount();

      // root exist first time, after use placeholder
      if (isVirtual) { makeReplaceVirtual(tag, ref || tag.root); }

      // parent is the placeholder tag, not the dynamic tag so clean up
      parent.__.onUnmount = function () {
        var delName = tag.opts.dataIs;
        arrayishRemove(tag.parent.tags, delName, tag);
        arrayishRemove(tag.__.parent.tags, delName, tag);
        tag.unmount();
      };
    }
842117
protected ElemTemplateElement getElemFromExpression(Expression expr)
  {
  	ExpressionNode parent = expr.exprGetParent();
  	while(null != parent)
  	{
  		if(parent instanceof ElemTemplateElement)
  			return (ElemTemplateElement)parent;
  		parent = parent.exprGetParent();
  	}
  	throw new RuntimeException(XSLMessages.createMessage(XSLTErrorResources.ER_ASSERT_NO_TEMPLATE_PARENT, null));
  	// "Programmer's error! expr has no ElemTemplateElement parent!");
  }
1047057
public void updateExpression(String expr, Object value, PageContext pageContext)
            throws ExpressionUpdateException, JspException
    {
        if (isExpression(expr)) {

            VariableResolver vr = ImplicitObjectUtil.getUpdateVariableResolver(pageContext.getRequest(), pageContext.getResponse(), false);
            ExpressionEvaluatorFactory.getInstance().update(expr, value, vr, false);
        }
        else {
            String s = Bundle.getString("Tags_BindingUpdateExpressionError", new Object[]{expr});
            _tag.registerTagError(s, null);
        }
    }