lib/webidl/parser/idl.rb in webidl-0.0.9 vs lib/webidl/parser/idl.rb in webidl-0.1.0
- old
+ new
@@ -347,11 +347,11 @@
s0 << r3
if r3
r4 = _nt_ws
s0 << r4
if r4
- r5 = _nt_InterfaceInheritance
+ r5 = _nt_Inheritance
s0 << r5
if r5
r6 = _nt_ws
s0 << r6
if r6
@@ -416,24 +416,24 @@
node_cache[:Interface][start_index] = r0
r0
end
- module InterfaceInheritance0
+ module Inheritance0
def ws
elements[1]
end
def names
elements[2]
end
end
- def _nt_InterfaceInheritance
+ def _nt_Inheritance
start_index = index
- if node_cache[:InterfaceInheritance].has_key?(index)
- cached = node_cache[:InterfaceInheritance][index]
+ if node_cache[:Inheritance].has_key?(index)
+ cached = node_cache[:Inheritance][index]
if cached
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
@index = cached.interval.end
end
return cached
@@ -455,23 +455,23 @@
r4 = _nt_ScopedNameList
s1 << r4
end
end
if s1.last
- r1 = instantiate_node(ParseTree::InterfaceInheritance,input, i1...index, s1)
- r1.extend(InterfaceInheritance0)
+ r1 = instantiate_node(ParseTree::Inheritance,input, i1...index, s1)
+ r1.extend(Inheritance0)
else
@index = i1
r1 = nil
end
if r1
r0 = r1
else
r0 = instantiate_node(SyntaxNode,input, index...index)
end
- node_cache[:InterfaceInheritance][start_index] = r0
+ node_cache[:Inheritance][start_index] = r0
r0
end
module InterfaceMembers0
@@ -593,26 +593,34 @@
def ws2
elements[3]
end
+ def inherits
+ elements[4]
+ end
+
def ws3
elements[5]
end
- def members
- elements[6]
- end
-
def ws4
elements[7]
end
+ def members
+ elements[8]
+ end
+
def ws5
elements[9]
end
+ def ws6
+ elements[11]
+ end
+
end
def _nt_Exception
start_index = index
if node_cache[:Exception].has_key?(index)
@@ -641,47 +649,55 @@
s0 << r3
if r3
r4 = _nt_ws
s0 << r4
if r4
- if has_terminal?("{", false, index)
- r5 = instantiate_node(SyntaxNode,input, index...(index + 1))
- @index += 1
- else
- terminal_parse_failure("{")
- r5 = nil
- end
+ r5 = _nt_Inheritance
s0 << r5
if r5
r6 = _nt_ws
s0 << r6
if r6
- r7 = _nt_ExceptionMembers
+ if has_terminal?("{", false, index)
+ r7 = instantiate_node(SyntaxNode,input, index...(index + 1))
+ @index += 1
+ else
+ terminal_parse_failure("{")
+ r7 = nil
+ end
s0 << r7
if r7
r8 = _nt_ws
s0 << r8
if r8
- if has_terminal?("}", false, index)
- r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
- @index += 1
- else
- terminal_parse_failure("}")
- r9 = nil
- end
+ r9 = _nt_ExceptionMembers
s0 << r9
if r9
r10 = _nt_ws
s0 << r10
if r10
- if has_terminal?(";", false, index)
+ if has_terminal?("}", false, index)
r11 = instantiate_node(SyntaxNode,input, index...(index + 1))
@index += 1
else
- terminal_parse_failure(";")
+ terminal_parse_failure("}")
r11 = nil
end
s0 << r11
+ if r11
+ r12 = _nt_ws
+ s0 << r12
+ if r12
+ if has_terminal?(";", false, index)
+ r13 = instantiate_node(SyntaxNode,input, index...(index + 1))
+ @index += 1
+ else
+ terminal_parse_failure(";")
+ r13 = nil
+ end
+ s0 << r13
+ end
+ end
end
end
end
end
end