vscode插件Luahelper

LuaHelper is an vscode extension provide something features auxiliary for coding in lua language.

features like Snippet,Intelligence,GotoDefinition,CodeComplete etc.

support lua version 5.1 and 5.3.

Features

  • 符号定义跳转(goto definition)

    GotoDefinition

  • 代码补全(code completion)

    CodeCompletion

  • 语法错误检测(error checking)

    syntaxErrorChecking

  • Lua代码片段提示(code snippets)

    Snippet

Known Issues

don't support chinese language to name file ;

Release Notes

0.0.7

  • Fixed issue : now support parsing expression like 'self./:'

0.0.6

  • Fixed issue : the features haven't applied in the files newly-created;
  • Fixed issue : fixed some bugs in gotoDefinition;

0.0.5

  • Added features symbols completion;
  • Fixed issue that catching excption in parsing empty file;
  • Added features for support statement module;

0.0.4

Initial release version with features: global document analysis and gotoDefinition.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
可以方便的将lua嵌入c++程序<br>能高效的存取lua变量<br>方便使用c++类扩展lua功能<br>支持 c++对象指针参数,返回值等等<br><br>//CreateClass<类型>([是否生成析构函数(默认=true)])<br> //Constructor<参数列表>([可选]构造函数名<lua不支持重载>)<br> //CreateMethod<返回值类型>(函数名,函数指针)<br> //CreateStaticMethod<返回值类型>(函数名,函数指针)<br> //默认生成释放函数Free<br> LContext.CreateClass<test2>()<br> .Constructor();<br> LContext.CreateClass<test>()<br> .Constructor()<br> .Constructor<test2*>("test_ptr")<br> .Constructor<int>()<br> .Constructor<const char*>("test_str")<br> .Constructor<int,int>()<br> .CreateMethod<int>("fn",test::fn)<br> .CreateMethod<int>("fn2",test::fn2)<br> .CreateMethod<void>("fn3",test::fn3)<br> .CreateMethod<void>("fn4",test::fn4)<br> .CreateStaticMethod<void>("test_fn",test_fn);//注册类静态方法<br> LContext.CreateStaticMethod<void>("test_fn",test_fn);<br> LContext.CreateStaticMethod<int>("test_fn2",test_fn2);<br> LContext.CreateStaticMethod<void>("test_fn5",test_fn5);<br> LContext.CreateStaticMethod<int>("test_fn6_with_ret",test_fn6_with_ret);<br> LContext.CreateStaticMethod<void>("test_fn6_with_object_param",test_fn6_with_object_param);<br> LContext.CreateStaticMethod<int>("fn5",test::fn5);<br> LContext.CreateStaticMethod<test2*>("test_return_object",test_return_object);<br>................<br><br>//测试类静态方法<br> LContext.GetVariable("test:test_fn").Invoke();<br><br> LContext.GetVariable("test_fn").Invoke();<br> LContext.GetVariable("test_fn5").Invoke(0,0,0,0,0);<br> LContext.GetVariable("test_fn6_with_object_param").Invoke(&LTest2);<br> int kl = LContext.GetVariable("test_fn6_with_ret").InvokeWithReturn<int>(19201,0,0,0,0);<br>......................<br><br>//返回c++对象到Lua测试<br> test2* pp2 = LContext.GetVariable("test_return_object").InvokeWithReturn<test2*>(&LTest2);<br> if(pp2->i != LTest2.i) throw "Error.";<br> //返回c++对象到Lua测试<br> if(!LContext.DoString("v2 = test2:test2();"))<br> printf("%s",LContext.GetLastError());<br> if(!LContext.DoString("print(v2);vv3 = test_return_object(v2);print(vv3);"))<br> printf("%s",LContext.GetLastError());<br> pp2 = LContext.GetVariable("vv3").ToObject<test2*>();<br> if(pp2->i != LTest2.i) throw "Error";
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值