Permalink
Browse files

metaprogramming simple declarator

  • Loading branch information...
1 parent 1a3f3a4 commit 5b5cd5446731edd0d9861db5a1573caee4e094da @tenderlove committed Aug 13, 2008
Showing with 2 additions and 15 deletions.
  1. +1 −1 lib/yacc.y
  2. +0 −1 lib/zomg.rb
  3. +1 −1 lib/zomg/idl/nodes/node.rb
  4. +0 −12 lib/zomg/idl/nodes/simple_declarator.rb
View
@@ -517,7 +517,7 @@ declarator
/*51*/
simple_declarator
- : T_IDENTIFIER { result = SimpleDeclarator.new(val[0]) }
+ : T_IDENTIFIER { result = SimpleDeclarator.new([], :name => val[0]) }
;
/*52*/
View
@@ -9,7 +9,6 @@
operation
parameter
attribute
- simple_declarator
member
union
typedef
@@ -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 ArrayDeclarator
+ Struct ScopedName Module ArrayDeclarator SimpleDeclarator
}.each { |type| const_set(type.to_sym, Class.new(Node)) }
end
end
@@ -1,12 +0,0 @@
-module ZOMG
- module IDL
- module Nodes
- class SimpleDeclarator < Node
- attr_accessor :name
- def initialize(name)
- @name = name
- end
- end
- end
- end
-end

0 comments on commit 5b5cd54

Please sign in to comment.