Permalink
Browse files

metaprogramming array declarator

  • Loading branch information...
1 parent e32912a commit 1a3f3a42ab1b9cff721a713568f221e59d6be0d3 @tenderlove committed Aug 13, 2008
Showing with 2 additions and 16 deletions.
  1. +1 −1 lib/yacc.y
  2. +0 −1 lib/zomg.rb
  3. +0 −13 lib/zomg/idl/nodes/array_declarator.rb
  4. +1 −1 lib/zomg/idl/nodes/node.rb
View
@@ -717,7 +717,7 @@ wide_string_type
/*83*/
array_declarator
: T_IDENTIFIER fixed_array_sizes {
- result = ArrayDeclarator.new(val[0], val[1])
+ result = ArrayDeclarator.new(val[1], :name => val[0])
}
;
View
@@ -12,7 +12,6 @@
simple_declarator
member
union
- array_declarator
typedef
interface_header
constant
@@ -1,13 +0,0 @@
-module ZOMG
- module IDL
- module Nodes
- class ArrayDeclarator < Node
- attr_accessor :name
- def initialize(name, children)
- @name = name
- super(children)
- end
- end
- end
- end
-end
@@ -39,7 +39,7 @@ def to_ruby
FloatingPointLiteral BooleanLiteral Context StringLiteral
WideStringLiteral WideCharacterLiteral UnaryMinus Object
UnaryPlus WString String Case Enum Exception ValueBoxDcl
- Struct ScopedName Module
+ Struct ScopedName Module ArrayDeclarator
}.each { |type| const_set(type.to_sym, Class.new(Node)) }
end
end

0 comments on commit 1a3f3a4

Please sign in to comment.