- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
luaL_loadstring
根据文档返回是否存在语法错误(如果有的话)。
有没有办法确定 Lua 首先确定存在语法错误的位置,或者除了返回值表明存在语法错误之外还有其他信息吗?
最佳答案
luaL_loadstring
来电 lua_load
进行实际工作,请参阅手册:
Loads a Lua chunk (without running it). If there are no errors, lua_load pushes the compiled chunk as a Lua function on top of the stack. Otherwise, it pushes an error message.
所以你可以检查luaL_loadstring
的返回值,如果返回错误,请检查堆栈中是否有错误消息。
关于syntax - 是否可以从 luaL_loadstring 等获取有关语法错误发生位置的更多信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18374466/
luaL_loadstring 根据文档返回是否存在语法错误(如果有的话)。 有没有办法确定 Lua 首先确定存在语法错误的位置,或者除了返回值表明存在语法错误之外还有其他信息吗? 最佳答案 luaL
luaL_loadstring 根据文档返回如果有语法错误(如果有的话)。 有没有办法确定 Lua 首先确定存在语法错误的位置,或者除了说明存在语法错误的返回值之外的任何进一步信息? 最佳答案 lua
我是 Lua 的初学者。 我想知道是否可以使用 require('filename') 来要求使用 luaL_loadstring() 加载的脚本。 由于 luaL_loadstring(lua_St
我是一名优秀的程序员,十分优秀!