summaryrefslogtreecommitdiff
path: root/tool/mk_builtin_loader.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/mk_builtin_loader.rb')
-rw-r--r--tool/mk_builtin_loader.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/tool/mk_builtin_loader.rb b/tool/mk_builtin_loader.rb
index 17f0d99a50..4b8e1ed1d1 100644
--- a/tool/mk_builtin_loader.rb
+++ b/tool/mk_builtin_loader.rb
@@ -156,6 +156,12 @@ def collect_builtin base, tree, name, bs, inlines, locals = nil
func_name = nil # required
inlines[inlines.size] = [lineno, text, nil, nil]
argc -= 1
+ when 'arg'
+ argc == 1 or raise "unexpected argument number #{argc}"
+ (arg = args.first)[0] == :symbol_literal or raise "symbol literal expected #{args}"
+ (arg = arg[1])[0] == :symbol or raise "symbol expected #{arg}"
+ (var = arg[1] and var = var[1]) or raise "argument name expected #{arg}"
+ func_name = nil
end
end