19 lines
385 B
JavaScript
19 lines
385 B
JavaScript
|
'use strict';
|
||
|
|
||
|
class VTpeLTemplate {
|
||
|
constructor(name, content) {
|
||
|
this.name = name;
|
||
|
this.tpl = content;
|
||
|
this.parser = new VTpeLParser(name, content);
|
||
|
this.interpreter = new VTepLInterpreter(this.parser);
|
||
|
}
|
||
|
|
||
|
render(data = {}) {
|
||
|
return this.interpreter.render(data);
|
||
|
}
|
||
|
|
||
|
parseContent() {
|
||
|
this.parser.tokenize();
|
||
|
}
|
||
|
}
|