
var Compiler = require ('./compiler');

/**
 * Compiles a string from text node.
 */
module.exports = new Class
({
    Extends: Compiler

	,compile: function (builder, node, tagName)
	{
		if (tagName !== 'string')
			return null;

		return {string: node.firstChild.textContent};
	}
	
	,instantiate: function (doc, context)
	{
		return context.string;
	}
});
