Renamed "source" to "file" to avoid confusion.
This commit is contained in:
parent
31e1bfa58f
commit
eda80cf575
@ -93,7 +93,7 @@ make_parser = function(peg, make_tree)
|
||||
return setmetatable(t, tree_mt)
|
||||
end),
|
||||
filename = filename,
|
||||
source = input
|
||||
file = input
|
||||
}
|
||||
local tree = peg:match(input, nil, userdata)
|
||||
if not tree then
|
||||
|
@ -71,7 +71,7 @@ make_parser = (peg, make_tree=nil)->
|
||||
tree_mt = {__index: {source:input, filename:filename}}
|
||||
userdata = {
|
||||
make_tree: make_tree or ((t)->setmetatable(t, tree_mt))
|
||||
:filename, source:input
|
||||
:filename, file:input
|
||||
}
|
||||
tree = peg\match(input, nil, userdata)
|
||||
if not tree
|
||||
|
Loading…
Reference in New Issue
Block a user