summaryrefslogtreecommitdiff
path: root/tool/mk_builtin_loader.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-06-20 17:13:03 -0700
committerGitHub <noreply@github.com>2020-06-20 17:13:03 -0700
commit7561db8c009bb79a75024fa4ed0350bfb3d0626c (patch)
treee11e51b98e795e09d51b3062d7f71987d7225187 /tool/mk_builtin_loader.rb
parentd95249ade34626dc3ae82f8bfc84e1668b1b8d01 (diff)
downloadruby-7561db8c009bb79a75024fa4ed0350bfb3d0626c.tar.gz
Introduce Primitive.attr! to annotate 'inline' (#3242)
[Feature #15589]
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 01551592bf..9d4b6405a1 100644
--- a/tool/mk_builtin_loader.rb
+++ b/tool/mk_builtin_loader.rb
@@ -135,6 +135,12 @@ def collect_builtin base, tree, name, bs, inlines, params = nil
if /(.+)\!\z/ =~ func_name
case $1
+ when 'attr'
+ text = inline_text(argc, args.first)
+ if text != 'inline'
+ raise "Only 'inline' is allowed to be annotated (but got: '#{text}')"
+ end
+ break
when 'cstmt'
text = inline_text argc, args.first