lib/parser/abbreviation.js
function(abbr, options) {
			if (!abbr) return '';
			if (typeof options == 'string') {
				throw new Error('Deprecated use of `expand` method: `options` must be object');
			}

			options = options || {};

			if (!options.syntax) {
				options.syntax = utils.defaultSyntax();
			}

			var p = profile.get(options.profile, options.syntax);
			tabStops.resetTabstopIndex();
			
			var data = filters.extract(abbr);
			var outputTree = this.parse(data[0], options);

			var filtersList = filters.composeList(options.syntax, p, data[1]);
			filters.apply(outputTree, filtersList, p);

			return outputTree.valueOf();
		}
function(abbr, options) {
			if (!abbr) return '';
			if (typeof options == 'string') {
				throw new Error('Deprecated use of `expand` method: `options` must be object');
			}

			options = options || {};

			if (!options.syntax) {
				options.syntax = utils.defaultSyntax();
			}

			var p = profile.get(options.profile, options.syntax);
			tabStops.resetTabstopIndex();
			
			var data = filters.extract(abbr);
			var outputTree = this.parse(data[0], options);

			var filtersList = filters.composeList(options.syntax, p, data[1]);
			filters.apply(outputTree, filtersList, p);

			return outputTree.valueOf();
		}
function ( abbr , options ) { if ( ! abbr ) return '' ; if ( typeof options == 'string' ) { throw new Error ( 'Deprecated use of `expand` method: `options` must be object' ) ; } options = options || { } ; if ( ! options . syntax ) { options . syntax = utils . defaultSyntax ( ) ; } var p = profile . get ( options . profile , options . syntax ) ; tabStops . resetTabstopIndex ( ) ; var data = filters . extract ( abbr ) ; var outputTree = this . parse ( data [ 0 ] , options ) ; var filtersList = filters . composeList ( options . syntax , p , data [ 1 ] ) ; filters . apply ( outputTree , filtersList , p ) ; return outputTree . valueOf ( ) ; }
Expands given abbreviation into a formatted code structure.
This is the main method that is used for expanding abbreviation
@param {String} abbr Abbreviation to expand
@param {Options} options Additional options for abbreviation
expanding and transformation: `syntax`, `profile`, `contextNode` etc.
@return {String}
Expands given abbreviation into a formatted code structure . This is the main method that is used for expanding abbreviation