hedera-web/js/vn/compiler-string.js

24 lines
359 B
JavaScript

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;
}
});