ruby/tool/node_name.rb

7 строки
139 B
Ruby
Executable File

#! ./miniruby
while gets
if ~/enum node_type \{/..~/^\};/
~/(NODE_.+),/ and puts(" case #{$1}:\n\treturn \"#{$1}\";")
end
end