1 --------------------------------------------------------------------------------
2 -- Copyright (c) 2006-2013 Fabien Fleutot and others.
4 -- All rights reserved.
6 -- This program and the accompanying materials are made available
7 -- under the terms of the Eclipse Public License v1.0 which
8 -- accompanies this distribution, and is available at
9 -- http://www.eclipse.org/legal/epl-v10.html
11 -- This program and the accompanying materials are also made available
12 -- under the terms of the MIT public license which accompanies this
13 -- distribution, and is available at http://www.lua.org/license.html
16 -- Fabien Fleutot - API and implementation
18 --------------------------------------------------------------------------------
20 -- Export all public APIs from sub-modules, squashed into a flat spacename
22 local MT = { __type='metalua.compiler.parser' }
24 local MODULE_REL_NAMES = { "annot.grammar", "expr", "meta", "misc",
25 "stat", "table", "ext" }
29 lexer = require "metalua.compiler.parser.lexer" ();
31 for _, rel_name in ipairs(MODULE_REL_NAMES) do
32 local abs_name = "metalua.compiler.parser."..rel_name
33 local extender = require (abs_name)
34 if not M.extensions[abs_name] then
35 if type (extender) == 'function' then extender(M) end
36 M.extensions[abs_name] = extender
39 return setmetatable(M, MT)