Builds an expression object.  Adds an error if expression creation has errors.
343305
def build_expression(self, attribute: str) -> Optional[Expression]:
        

        expression_string = self._spec.get(attribute, None)
        if expression_string:
            try:
                return Expression(str(expression_string))
            except Exception as err:
                self.add_errors(
                    InvalidExpressionError(self.fully_qualified_name, self._spec, attribute, err))

        return None
458368
public boolean validate() {
		try {
			BooleanExpression built = expression.getExpression();

			if (built == null) {
				// nothing to evaluate.
				return false;
			}

			// First check the nesting (an expression must not contain itself)
			checkNesting(built, new ArrayList<BooleanExpression>());

			// If the expression evaluates correctly, the syntax is correct.
			built.evaluate();
		} catch (Exception e) {
			LogFactory.getLog(getClass()).warn("Invalid expression: " + e.getMessage());
			return false;
		}

		return true;
	}
421312
function buildErrorHandler(path) {
    return function(node, text) {
        throw path.hub.file.buildCodeFrameError(node, text);
    }
}
313041
public String ensureValidExpression(String dataSource, String attrName, String errorId)
            throws JspException
    {
        try {
            boolean isExpr = isExpression(dataSource);

            // @perf: if the isExpr call fails, this is an error condition, and the containsExpression
            // call cost is irrelevant
            if (!isExpr && containsExpression(dataSource)) {
                String s = Bundle.getString(errorId, new Object[]{dataSource});
                _tag.registerTagError(s, null);
                return null;
            }

            if (!isExpr) {
                String s = Bundle.getString(errorId, new Object[]{dataSource});
                _tag.registerTagError(s, null);
                return null;
            }
        }
        catch (Exception e) {
            // pass throw JspExceptions
            if (e instanceof JspException)
                throw (JspException) e;

            String s = Bundle.getString(errorId, new Object[]{dataSource});
            _tag.registerTagError(s, e);
            return null;
        }
        return dataSource;
    }
273075
function(expression) {
			var pastedExpression = new Expression();
			var key = this._getKey();

			pastedExpression.fromJson(json.parse(localStorage[key]));
			var newExpression;
			if (expression) {
				var expressionClone = new Expression({
					operator : 'and',
					expressionList : [expression, pastedExpression]
				}).toJson();
				//converting the same instance
				expression.fromJson(expressionClone);
				newExpression = expression;
			} else {
				newExpression = pastedExpression;
			}

			var parentBuilder = this.get('filterBuilder');

			parentBuilder.set('expression', newExpression, true /* preventChange Undo State
			 * */);
		}
553275
function create(context) {
    return {
        CallExpression(node) {
            if (isAmdDefine(node)) {
                context.report(node, message);
            }
        }
    };
}
3669
function addGuard(guard, expr) {
      let safeExpr = null;
      if (!isWellFormed(expr)) {
        expr = '{/*Malformed Expression*/}';
      }
      needsRuntime = true;
      safeExpr = ` rt_${ unpredictableSuffix }.${ guard }(${ expr }) `;
      return safeExpr;
    }
902994
def addExpression(self, datafields):
        
        self._expressionValueList.append(datafields)
        if len(self._expressionValueList) >= self._batchSize:
            self.batchAddExpression()
522660
public static <E> RegularExpression<E> compile(List<Expression<E>> expressions) {
        return new RegularExpression<E>(expressions);
    }
853552
def _update_expression(self):
        ''''''
        self._expression = re.compile(
            '^{0}(?P<index>(?P<padding>0*)\d+?){1}$'
            .format(re.escape(self.head), re.escape(self.tail))
        )
419330
public static ExpressionConstructor constructor(Class<?> type, Expression... fields) {
		return new ExpressionConstructor(type, asList(fields));
	}
396120
public static void assertTrueOfInvalidConstructor(boolean expression, ModelClass<?> entity) {
		if (!expression) {
			String msg = String.format(
					"Class '%s' has no constructor without parameters (to be a mutable class) or with all parameters (to be an immutable class).",
					entity.getElement().getQualifiedName());
			throw (new InvalidDefinition(msg));
		}

	}
1183472
function build(validatorName, validatorOptions) {

    if (typeof validatorBuildersRepository[validatorName] !== 'function') {
        throw validatorName + ' does not exists. use addValidatorBuilder to add a new validation rule';
    }

    return validatorBuildersRepository[validatorName](ValidationState, stateEnum, validatorOptions);
}
492400
public function buildExpressions()
	{
		$this->expressions	= array();
		$values	= array_keys( $this->data );
		for( $i=0; $i<count( $values ); $i++ )
		{
			$this->expressions[$i]	= "";
			for( $k=0; $k<count( $values ) ;$k++ )
			{
				if( $k == $i )
					continue;
				$expression	= "(x-".$values[$k].")/(".$values[$i]."-".$values[$k].")";
				if( strlen( $this->expressions[$i] ) )
					$this->expressions[$i]	.= "*".$expression;
				else
					$this->expressions[$i]	= $expression;
			}
		}
	}
1264762
private ModelAndView buildBizErrors(TypeMismatchException e, ModelAndView model) {
        Throwable t = e.getCause();
        if (t instanceof ConversionFailedException) {
            ConversionFailedException x = (ConversionFailedException) t;
            TypeDescriptor type = x.getTargetType();
            Annotation[] annotations = type != null ? type.getAnnotations() : new Annotation[0];
            Map<String, Object> errors = new HashMap<String, Object>();
            for (Annotation a : annotations) {
                if (a instanceof RequestParam) {
                    errors.put(((RequestParam) a).value(), GlobalResponseStatusMsg.PARAM_TYPE_ERROR
                            .getMessage().getMessage());
                }
            }
            if (errors.size() > 0) {
                return buildBizError(model, errors);
            }
        }

        return buildError(model, GlobalResponseStatusMsg.PARAM_TYPE_ERROR);
    }
1362669
@NonNull
    public Expression add(@NonNull Expression expression) {
        if (expression == null) {
            throw new IllegalArgumentException("expression cannot be null.");
        }
        return new BinaryExpression(this, expression, BinaryExpression.OpType.Add);
    }
214263
@Nonnull
    private Expression buildExpression( String str ) {
        switch( str.charAt( 0 ) ) {
            case '@':
                return new VariableExpression( reader, str );
            case '-':
                if( str.startsWith( "-@" ) ) {
                    return new FunctionExpression( reader, "-", new Operation( reader, buildExpression( str.substring( 1 ) ), (char)0 ) );
                }
                //$FALL-THROUGH$
            default:
                return new ValueExpression( reader, str );
        }
    }