Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2008, 4:40:43 PM (15 years ago)
Author:
rgrieder
Message:

Cleaned up indentation chaos in tolua. There were tabs and 1 space indentations, even mixed in a single block.
It should now be possible to actually pimp these files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem/src/tolua/lua/define.lua

    r1755 r2229  
    1616--   name = constant name
    1717classDefine = {
    18  name = '',
     18    name = '',
    1919}
    2020classDefine.__index = classDefine
     
    2323-- register define
    2424function classDefine:register (pre)
    25         if not self:check_public_access() then
    26                 return
    27         end
     25    if not self:check_public_access() then
     26        return
     27    end
    2828
    29  pre = pre or ''
    30  output(pre..'tolua_constant(tolua_S,"'..self.lname..'",'..self.name..');')
     29    pre = pre or ''
     30    output(pre..'tolua_constant(tolua_S,"'..self.lname..'",'..self.name..');')
    3131end
    3232
    3333-- Print method
    3434function classDefine:print (ident,close)
    35  print(ident.."Define{")
    36  print(ident.." name = '"..self.name.."',")
    37  print(ident.." lname = '"..self.lname.."',")
    38  print(ident.."}"..close)
     35    print(ident.."Define{")
     36    print(ident.." name = '"..self.name.."',")
     37    print(ident.." lname = '"..self.lname.."',")
     38    print(ident.."}"..close)
    3939end
    4040
     
    4242-- Internal constructor
    4343function _Define (t)
    44  setmetatable(t,classDefine)
    45  t:buildnames()
     44    setmetatable(t,classDefine)
     45    t:buildnames()
    4646
    47  if t.name == '' then
    48   error("#invalid define")
    49  end
     47    if t.name == '' then
     48        error("#invalid define")
     49    end
    5050
    51  append(t)
    52  return t
     51    append(t)
     52    return t
    5353end
    5454
     
    5656-- Expects a string representing the constant name
    5757function Define (n)
    58  return _Define{
    59   name = n
    60  }
     58    return _Define {
     59        name = n
     60    }
    6161end
    6262
Note: See TracChangeset for help on using the changeset viewer.