@lcap/asl
Version:
NetEase Application Specific Language
37 lines (35 loc) • 811 B
text/typescript
import { immutable } from '../../decorators';
import { ExpressionNode, LOGIC_TYPE } from '../LogicItem';
/**
* 标识符
* @TODO: 当前类目前主要用于生成文档
*/
export class Identifier extends ExpressionNode {
/**
* 逻辑节点类型
*/
()
public readonly type: LOGIC_TYPE = LOGIC_TYPE.Identifier;
/**
* 标识符名称
*/
()
public readonly name: string = undefined;
/**
* 标识符代码
* @example ID_c7019c2dfcfb4efba65a5ae98b1c8d8b
*/
()
public readonly code: string = undefined;
/**
* 变量引用
*/
()
public readonly schemaRef: string = undefined;
/**
* 生成 JS 脚本
*/
toScript() {
return this.code || this.name;
}
}