зеркало из https://github.com/github/ruby.git
id.def: attrset
* defs/id.def: add attrset IDs, which no longer shares serial numbers with local name IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b2acfab288
Коммит
ab1576704f
|
@ -73,6 +73,7 @@ instance_ids = []
|
||||||
global_ids = []
|
global_ids = []
|
||||||
const_ids = []
|
const_ids = []
|
||||||
class_ids = []
|
class_ids = []
|
||||||
|
attrset_ids = []
|
||||||
names = {}
|
names = {}
|
||||||
predefined.split(/^/).each_with_index do |line, num|
|
predefined.split(/^/).each_with_index do |line, num|
|
||||||
next if /^#/ =~ line
|
next if /^#/ =~ line
|
||||||
|
@ -102,8 +103,7 @@ predefined.split(/^/).each_with_index do |line, num|
|
||||||
when /\A\$(?:\d+|(?!\d)\w+)\z/; global_ids
|
when /\A\$(?:\d+|(?!\d)\w+)\z/; global_ids
|
||||||
when /\A@@(?!\d)\w+\z/; class_ids
|
when /\A@@(?!\d)\w+\z/; class_ids
|
||||||
when /\A@(?!\d)\w+\z/; instance_ids
|
when /\A@(?!\d)\w+\z/; instance_ids
|
||||||
when /\A((?!\d)\w+)=\z/
|
when /\A((?!\d)\w+)=\z/; attrset_ids
|
||||||
KeywordError.raise("use ID2ATTRSET(#{$1}) instead of ATTRSET #{name}", firstline+num)
|
|
||||||
else preserved_ids
|
else preserved_ids
|
||||||
end << token
|
end << token
|
||||||
predefined_ids[token] = name
|
predefined_ids[token] = name
|
||||||
|
@ -114,6 +114,7 @@ end
|
||||||
"GLOBAL" => global_ids,
|
"GLOBAL" => global_ids,
|
||||||
"CONST" => const_ids,
|
"CONST" => const_ids,
|
||||||
"CLASS" => class_ids,
|
"CLASS" => class_ids,
|
||||||
|
"ATTRSET" => attrset_ids,
|
||||||
:preserved => preserved_ids,
|
:preserved => preserved_ids,
|
||||||
:predefined => predefined_ids,
|
:predefined => predefined_ids,
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче