mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
22 lines
418 B
JavaScript
22 lines
418 B
JavaScript
'use strict';
|
|
|
|
var Node = require('./Node');
|
|
var ok = require('assert').ok;
|
|
|
|
class Expression extends Node {
|
|
constructor(def) {
|
|
super('Expression');
|
|
this.value = def.value;
|
|
ok(this.value != null, 'Invalid expression');
|
|
}
|
|
|
|
generateCode(codegen) {
|
|
codegen.generateCode(this.value);
|
|
}
|
|
|
|
isCompoundExpression() {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
module.exports = Expression; |