AwwCookies / lua-checker

Automatically exported from code.google.com/p/lua-checker
Other
0 stars 0 forks source link

rawset getmetatable keywords are treated as [variable not declared] #8

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
contact:   peter  X  @  X wapeter.com       (remove X)
Variable 'rawset' not declared  
(same for 'getmetatable' )

Under MacOSX  Mountain Lion,   
Lua 5.2.1   

solution fix:
in lua_checker.y  
void Initialize()  {
..
  // peter: add rawset  (after rawget)
  scope_vars.back().vars["rawset"] = VariableInfo(0, 0, true);
...
  // peter: add getmetatable  (after setmetatable)
  scope_vars.back().vars["getmetatable"] = VariableInfo(0, 0, true);
...

fyi:  svn info (i get the lua_checker from the public svn branch)

petermac : ~/Documents/workspace/luachecker/lua-checker-read-only $ svn info
Path: .
Working Copy Root Path: 
/Users/peter/Documents/workspace/luachecker/lua-checker-read-only
URL: http://lua-checker.googlecode.com/svn/trunk
Repository Root: http://lua-checker.googlecode.com/svn
Repository UUID: 3e0f4ab2-c54c-0410-afbc-87f5dd98f5ef
Revision: 7
Node Kind: directory
Schedule: normal
Last Changed Author: russ.ls
Last Changed Rev: 7
Last Changed Date: 2008-07-04 04:32:03 +0800 (Fri, 04 Jul 2008)Please provide 
any additional information below.

Original issue reported on code.google.com by wapeter....@gmail.com on 12 Jul 2013 at 5:54