提交 78791ede 编写于 作者: fxy060608's avatar fxy060608

wip(uts): compiler

上级 ec9cfffb
......@@ -215,9 +215,10 @@ function genInitCode(expr: Expression) {
}
function genVariableDeclarationCode(decl: VariableDeclaration) {
// 目前仅支持boolean,number,string
// 目前仅支持 const 的 boolean,number,string
const lits = ['BooleanLiteral', 'NumericLiteral', 'StringLiteral']
if (
decl.kind === 'const' &&
!decl.declarations.find((d) => {
if (d.id.type !== 'Identifier') {
return true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册