Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

metaprogramming simple declarator

  • Loading branch information...
commit 5b5cd5446731edd0d9861db5a1573caee4e094da 1 parent 1a3f3a4
@tenderlove authored
View
2  lib/yacc.y
@@ -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
1  lib/zomg.rb
@@ -9,7 +9,6 @@
operation
parameter
attribute
- simple_declarator
member
union
typedef
View
2  lib/zomg/idl/nodes/node.rb
@@ -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
View
12 lib/zomg/idl/nodes/simple_declarator.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.