We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 164a93c commit 5af7cdaCopy full SHA for 5af7cda
tool/node_name.rb
@@ -1,10 +1,8 @@
1
-#! ./miniruby
+#! ./miniruby -n
2
3
# Used when making Ruby to generate node_name.inc.
4
# See common.mk for details.
5
6
-while gets
7
- if ~/enum node_type \{/..~/^\};/
8
- ~/(NODE_.+),/ and puts(" case #{$1}:\n\treturn \"#{$1}\";")
9
- end
+if (t ||= /^enum node_type \{/ =~ $_) and (t = /^\};/ !~ $_)
+ /(NODE_.+),/ =~ $_ and puts(" case #{$1}:\n\treturn \"#{$1}\";")
10
end
0 commit comments