mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
24 lines
440 B
JavaScript
24 lines
440 B
JavaScript
'use strict';
|
|
var Node = require('./Node');
|
|
|
|
class Program extends Node {
|
|
constructor(def) {
|
|
super('Program');
|
|
this.body = def.body;
|
|
}
|
|
|
|
generateCode(codegen) {
|
|
this.body = codegen.generateCode(this.body);
|
|
return this;
|
|
}
|
|
|
|
writeCode(writer) {
|
|
writer.writeStatements(this.body);
|
|
}
|
|
|
|
walk(walker) {
|
|
this.body = walker.walk(this.body);
|
|
}
|
|
}
|
|
|
|
module.exports = Program; |