ruby/tool/node_name.rb

11 строки
221 B
Ruby
Executable File

#! ./miniruby
# Used when making Ruby to generate node_name.inc.
# See common.mk for details.
while gets
if ~/enum node_type \{/..~/^\};/
~/(NODE_.+),/ and puts(" case #{$1}:\n\treturn \"#{$1}\";")
end
end