[opt] 优化生成的emmylua注解中的类型信息
parent
f25f91b94d
commit
ad4acf337f
|
|
@ -44,6 +44,7 @@ luban统一了游戏配置开发工作流,极大提升了策划和程序的工
|
||||||
## 文档
|
## 文档
|
||||||
|
|
||||||
- [快速上手](https://focus-creative-games.github.io/luban/start_up/)
|
- [快速上手](https://focus-creative-games.github.io/luban/start_up/)
|
||||||
|
- [技术论坛](https://forum.focus-creative-games.com/topics)
|
||||||
- [Document](https://focus-creative-games.github.io/luban/) ,比较完善,有使用疑问,请先查看此文档。
|
- [Document](https://focus-creative-games.github.io/luban/) ,比较完善,有使用疑问,请先查看此文档。
|
||||||
- **示例项目** ([github](https://github.com/focus-creative-games/luban_examples)) ([gitee](https://gitee.com/focus-creative-games/luban_examples))
|
- **示例项目** ([github](https://github.com/focus-creative-games/luban_examples)) ([gitee](https://gitee.com/focus-creative-games/luban_examples))
|
||||||
- [版本变更记录](https://focus-creative-games.github.io/luban/changelog/)
|
- [版本变更记录](https://focus-creative-games.github.io/luban/changelog/)
|
||||||
|
|
|
||||||
|
|
@ -8,57 +8,57 @@ namespace Luban.Job.Common.TypeVisitors
|
||||||
|
|
||||||
public string Accept(TBool type)
|
public string Accept(TBool type)
|
||||||
{
|
{
|
||||||
return "bool";
|
return "boolean";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TByte type)
|
public string Accept(TByte type)
|
||||||
{
|
{
|
||||||
return "byte";
|
return "integer";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TShort type)
|
public string Accept(TShort type)
|
||||||
{
|
{
|
||||||
return "short";
|
return "integer";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TFshort type)
|
public string Accept(TFshort type)
|
||||||
{
|
{
|
||||||
return "short";
|
return "integer";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TInt type)
|
public string Accept(TInt type)
|
||||||
{
|
{
|
||||||
return "int";
|
return "integer";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TFint type)
|
public string Accept(TFint type)
|
||||||
{
|
{
|
||||||
return "int";
|
return "integer";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TLong type)
|
public string Accept(TLong type)
|
||||||
{
|
{
|
||||||
return "long";
|
return "integer";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TFlong type)
|
public string Accept(TFlong type)
|
||||||
{
|
{
|
||||||
return "long";
|
return "integer";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TFloat type)
|
public string Accept(TFloat type)
|
||||||
{
|
{
|
||||||
return "float";
|
return "number";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TDouble type)
|
public string Accept(TDouble type)
|
||||||
{
|
{
|
||||||
return "double";
|
return "number";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TEnum type)
|
public string Accept(TEnum type)
|
||||||
{
|
{
|
||||||
return type.DefineEnum.FullName;
|
return "integer";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TString type)
|
public string Accept(TString type)
|
||||||
|
|
@ -103,22 +103,22 @@ namespace Luban.Job.Common.TypeVisitors
|
||||||
|
|
||||||
public string Accept(TVector2 type)
|
public string Accept(TVector2 type)
|
||||||
{
|
{
|
||||||
return "vector2";
|
return "{x:number,y:number}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TVector3 type)
|
public string Accept(TVector3 type)
|
||||||
{
|
{
|
||||||
return "vector3";
|
return "{x:number,y:number,z:number}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TVector4 type)
|
public string Accept(TVector4 type)
|
||||||
{
|
{
|
||||||
return "vector4";
|
return "{x:number,y:number,z:number,w:number}";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Accept(TDateTime type)
|
public string Accept(TDateTime type)
|
||||||
{
|
{
|
||||||
return "int";
|
return "integer";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ local enums =
|
||||||
{{~ for c in enums ~}}
|
{{~ for c in enums ~}}
|
||||||
---@class {{c.full_name}}
|
---@class {{c.full_name}}
|
||||||
{{~ for item in c.items ~}}
|
{{~ for item in c.items ~}}
|
||||||
---@field public {{item.name}} int
|
---@field public {{item.name}} integer
|
||||||
{{~end~}}
|
{{~end~}}
|
||||||
['{{c.full_name}}'] = { {{ for item in c.items }} {{item.name}}={{item.int_value}}, {{end}} };
|
['{{c.full_name}}'] = { {{ for item in c.items }} {{item.name}}={{item.int_value}}, {{end}} };
|
||||||
{{~end~}}
|
{{~end~}}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ local enums =
|
||||||
{{~ for c in enums ~}}
|
{{~ for c in enums ~}}
|
||||||
---@class {{c.full_name}}
|
---@class {{c.full_name}}
|
||||||
{{~ for item in c.items ~}}
|
{{~ for item in c.items ~}}
|
||||||
---@field public {{item.name}} int
|
---@field public {{item.name}} integer
|
||||||
{{~end~}}
|
{{~end~}}
|
||||||
['{{c.full_name}}'] = { {{ for item in c.items }} {{item.name}}={{item.int_value}}, {{end}} };
|
['{{c.full_name}}'] = { {{ for item in c.items }} {{item.name}}={{item.int_value}}, {{end}} };
|
||||||
{{~end~}}
|
{{~end~}}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue