summaryrefslogtreecommitdiff
path: root/tool/node_name.rb
blob: 5c67d7ccd58cc2614b3f762f113e5173200c4c58 (plain)
1
2
3
4
5
6
7
8
9
10
#! ./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