summaryrefslogtreecommitdiff
path: root/tool/node_name.rb
blob: dc0584e82188600820b88153daf360e74d261982 (plain)
1
2
3
4
5
6
7
8
#! ./miniruby -n

# Used when making Ruby to generate node_name.inc.
# See common.mk for details.

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