Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2008, 8:59:48 PM (16 years ago)
Author:
rgrieder
Message:

Merged revisions 1875-2278 of the buildsystem branch to buildsystem2.

Location:
code/branches/buildsystem2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2

  • code/branches/buildsystem2/src/tolua/lua/namespace.lua

    r2087 r2509  
    1717--    {i}  = list of members
    1818classNamespace = {
    19  classtype = 'namespace',
    20  name = '',
     19    classtype = 'namespace',
     20    name = '',
    2121}
    2222classNamespace.__index = classNamespace
     
    2525-- Print method
    2626function classNamespace:print (ident,close)
    27  print(ident.."Namespace{")
    28  print(ident.." name = '"..self.name.."',")
    29  local i=1
    30  while self[i] do
    31   self[i]:print(ident.." ",",")
    32   i = i+1
    33  end
    34  print(ident.."}"..close)
     27    print(ident.."Namespace{")
     28    print(ident.." name = '"..self.name.."',")
     29    local i=1
     30    while self[i] do
     31        self[i]:print(ident.." ",",")
     32        i = i+1
     33    end
     34    print(ident.."}"..close)
    3535end
    3636
    3737-- Internal constructor
    3838function _Namespace (t)
    39  setmetatable(t,classNamespace)
    40  append(t)
    41  return t
     39    setmetatable(t,classNamespace)
     40    append(t)
     41    return t
    4242end
    4343
     
    4545-- Expects the name and the body of the namespace.
    4646function Namespace (n,b)
    47  local c = _Namespace(_Container{name=n})
    48  push(c)
    49  c:parse(strsub(b,2,strlen(b)-1)) -- eliminate braces
    50  pop()
     47    local c = _Namespace(_Container{name=n})
     48    push(c)
     49    c:parse(strsub(b,2,strlen(b)-1)) -- eliminate braces
     50    pop()
    5151end
    5252
Note: See TracChangeset for help on using the changeset viewer.