lib/packages/parsers.js
function(config, raw_tag, config_property_name) {

		if (Lava.schema.DEBUG && !('attributes' in raw_tag)) Lava.t("option: missing attributes");
		if (Lava.schema.DEBUG && (!raw_tag.content || raw_tag.content.length != 1)) Lava.t("Malformed option: " + raw_tag.attributes.name);

		var option_type = raw_tag.attributes.type,
			result;

		if (option_type) {

			if (option_type == 'targets') {

				result = Lava.parsers.Common.parseTargets(raw_tag.content[0]);

			} else if (option_type == 'expressions') {

				result = Lava.ExpressionParser.parse(raw_tag.content[0], Lava.ExpressionParser.SEPARATORS.SEMICOLON);

			} else {

				Lava.t("Unknown option type: " + option_type);

			}

		} else {

			result = Lava.parseOptions(raw_tag.content[0]);

		}

		Lava.store(config, config_property_name, raw_tag.attributes.name, result);

	}
function(config, raw_tag, config_property_name) {

		if (Lava.schema.DEBUG && !('attributes' in raw_tag)) Lava.t("option: missing attributes");
		if (Lava.schema.DEBUG && (!raw_tag.content || raw_tag.content.length != 1)) Lava.t("Malformed option: " + raw_tag.attributes.name);

		var option_type = raw_tag.attributes.type,
			result;

		if (option_type) {

			if (option_type == 'targets') {

				result = Lava.parsers.Common.parseTargets(raw_tag.content[0]);

			} else if (option_type == 'expressions') {

				result = Lava.ExpressionParser.parse(raw_tag.content[0], Lava.ExpressionParser.SEPARATORS.SEMICOLON);

			} else {

				Lava.t("Unknown option type: " + option_type);

			}

		} else {

			result = Lava.parseOptions(raw_tag.content[0]);

		}

		Lava.store(config, config_property_name, raw_tag.attributes.name, result);

	}
function ( config , raw_tag , config_property_name ) { if ( Lava . schema . DEBUG && ! ( 'attributes' in raw_tag ) ) Lava . t ( "option: missing attributes" ) ; if ( Lava . schema . DEBUG && ( ! raw_tag . content || raw_tag . content . length != 1 ) ) Lava . t ( "Malformed option: " + raw_tag . attributes . name ) ; var option_type = raw_tag . attributes . type , result ; if ( option_type ) { if ( option_type == 'targets' ) { result = Lava . parsers . Common . parseTargets ( raw_tag . content [ 0 ] ) ; } else if ( option_type == 'expressions' ) { result = Lava . ExpressionParser . parse ( raw_tag . content [ 0 ] , Lava . ExpressionParser . SEPARATORS . SEMICOLON ) ; } else { Lava . t ( "Unknown option type: " + option_type ) ; } } else { result = Lava . parseOptions ( raw_tag . content [ 0 ] ) ; } Lava . store ( config , config_property_name , raw_tag . attributes . name , result ) ; }
Perform parsing of a tag with serialized JavaScript object inside it
@param {(_cView|_cWidget)} config
@param {(_cRawDirective|_cRawTag)} raw_tag
@param {string} config_property_name Name of the config member, which holds target JavaScript object
Perform parsing of a tag with serialized JavaScript object inside it