@lcap/asl
Version:
NetEase Application Specific Language
31 lines (29 loc) • 708 B
text/typescript
import { immutable } from '../../decorators';
import { ExpressionNode, LogicItem, LOGIC_TYPE } from '../LogicItem';
/**
* 赋值
* @TODO: 当前类目前主要用于生成文档
*/
export class AssignmentExpression extends ExpressionNode {
/**
* 逻辑节点类型
*/
()
public readonly type: LOGIC_TYPE = LOGIC_TYPE.AssignmentExpression;
/**
* 左边项
*/
()
public readonly left: LogicItem = undefined;
/**
* 右边项
*/
()
public readonly right: LogicItem = undefined;
/**
* 生成 JS 脚本
*/
toScript() {
return `${this.left.toScript()} = ${this.right.toScript()}`;
}
}