lib/packages/parsers.js
function(container_config, x) {

		var i,
			count,
			name;

		if ('event' in x) {

			if (typeof(x.event) != 'object') Lava.t("Malformed x:event attribute");

			container_config.events = {};

			for (name in x.event) {

				container_config.events[name] = Lava.parsers.Common.parseTargets(x.event[name]);

			}

		}

		// Attribute binding. Example: x:bind:src="<any_valid_expression>"
		if ('bind' in x) {

			if (typeof(x.bind) != 'object') Lava.t("Malformed x:bind attribute");

			container_config.property_bindings = this._parseBindingsHash(x.bind);

		}

		if ('style' in x) {

			if (typeof(x.style) != 'object') Lava.t("Malformed x:style attribute");

			container_config.style_bindings = this._parseBindingsHash(x.style);

		}

		if ('classes' in x) {

			var arguments = Lava.ExpressionParser.parse(x.classes, Lava.ExpressionParser.SEPARATORS.SEMICOLON),
				class_bindings = {};

			for (i = 0, count = arguments.length; i < count; i++) {

				class_bindings[i] = arguments[i];

			}

			container_config.class_bindings = class_bindings;

		}

		if ('container_class' in x) {

			container_config['class'] = x.container_class;

		}

	}
function(container_config, x) {

		var i,
			count,
			name;

		if ('event' in x) {

			if (typeof(x.event) != 'object') Lava.t("Malformed x:event attribute");

			container_config.events = {};

			for (name in x.event) {

				container_config.events[name] = Lava.parsers.Common.parseTargets(x.event[name]);

			}

		}

		// Attribute binding. Example: x:bind:src="<any_valid_expression>"
		if ('bind' in x) {

			if (typeof(x.bind) != 'object') Lava.t("Malformed x:bind attribute");

			container_config.property_bindings = this._parseBindingsHash(x.bind);

		}

		if ('style' in x) {

			if (typeof(x.style) != 'object') Lava.t("Malformed x:style attribute");

			container_config.style_bindings = this._parseBindingsHash(x.style);

		}

		if ('classes' in x) {

			var arguments = Lava.ExpressionParser.parse(x.classes, Lava.ExpressionParser.SEPARATORS.SEMICOLON),
				class_bindings = {};

			for (i = 0, count = arguments.length; i < count; i++) {

				class_bindings[i] = arguments[i];

			}

			container_config.class_bindings = class_bindings;

		}

		if ('container_class' in x) {

			container_config['class'] = x.container_class;

		}

	}
function ( container_config , x ) { var i , count , name ; if ( 'event' in x ) { if ( typeof ( x . event ) != 'object' ) Lava . t ( "Malformed x:event attribute" ) ; container_config . events = { } ; for ( name in x . event ) { container_config . events [ name ] = Lava . parsers . Common . parseTargets ( x . event [ name ] ) ; } } // Attribute binding. Example: x:bind:src="<any_valid_expression>" if ( 'bind' in x ) { if ( typeof ( x . bind ) != 'object' ) Lava . t ( "Malformed x:bind attribute" ) ; container_config . property_bindings = this . _parseBindingsHash ( x . bind ) ; } if ( 'style' in x ) { if ( typeof ( x . style ) != 'object' ) Lava . t ( "Malformed x:style attribute" ) ; container_config . style_bindings = this . _parseBindingsHash ( x . style ) ; } if ( 'classes' in x ) { var arguments = Lava . ExpressionParser . parse ( x . classes , Lava . ExpressionParser . SEPARATORS . SEMICOLON ) , class_bindings = { } ; for ( i = 0 , count = arguments . length ; i < count ; i ++ ) { class_bindings [ i ] = arguments [ i ] ; } container_config . class_bindings = class_bindings ; } if ( 'container_class' in x ) { container_config [ 'class' ] = x . container_class ; } }
Take raw control attributes, parse them, and store in `container_config`
@param {_cElementContainer} container_config
@param {_cRawX} x
Take raw control attributes parse them and store in container_config