@lookup must be first thing; allow for shebang in scripts
This commit is contained in:
parent
9f314ea7fc
commit
5b4fc640de
|
@ -115,7 +115,7 @@ local function process_multiline_markdown(ldoc, txt, F)
|
|||
local indent,code,start_indent
|
||||
local_context = nil
|
||||
while line do
|
||||
local name = line:match '@lookup%s+(%S+)'
|
||||
local name = line:match '^@lookup%s+(%S+)'
|
||||
if name then
|
||||
local_context = name .. '.'
|
||||
line = getline()
|
||||
|
|
|
@ -134,6 +134,13 @@ local function parse_file(fname,lang, package)
|
|||
|
||||
local mod
|
||||
local t,v = tnext(tok)
|
||||
if t == '#' then
|
||||
while t and t ~= 'comment' do t,v = tnext(tok) end
|
||||
if t == nil then
|
||||
F:warning('empty file')
|
||||
return nil
|
||||
end
|
||||
end
|
||||
if lang.parse_module_call and t ~= 'comment'then
|
||||
while t and not (t == 'iden' and v == 'module') do
|
||||
t,v = tnext(tok)
|
||||
|
|
Loading…
Reference in New Issue