webidl 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +1 -1
- data/README.rdoc +5 -1
- data/Rakefile +44 -11
- data/VERSION +1 -1
- data/lib/webidl.rb +1 -0
- data/lib/webidl/ast/type.rb +12 -2
- data/lib/webidl/parse_tree/nullable_type.rb +1 -1
- data/lib/webidl/parse_tree/relative_scoped_name.rb +2 -2
- data/lib/webidl/parse_tree/type.rb +18 -0
- data/lib/webidl/parser/idl.rb +582 -194
- data/lib/webidl/parser/idl.treetop +30 -9
- data/spec/ast_spec.rb +13 -2
- data/spec/fixtures/html5.idl +847 -427
- data/spec/fixtures/interface_with_array_member.idl +4 -0
- data/spec/parser_spec.rb +8 -0
- data/spec/spec.opts +1 -0
- data/support/webidl-spec-2010-08-05.html +10013 -0
- metadata +46 -19
- data/.autotest +0 -9
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -10,6 +10,10 @@ The code generation could be improved a lot - a lot of the data in the IDL is ju
|
|
10
10
|
The parser rules for ExtendedAttribute is not exactly like the grammar from the Web IDL spec, since I ran into infinite recursion issues and don't have the Treetop-fu to figure them out.
|
11
11
|
So far this hasn't led to any problems - the parser does parse the IDLs parts of the current HTML5 spec just fine.
|
12
12
|
|
13
|
+
= Development tips
|
14
|
+
|
15
|
+
While working on the grammar, delete the compiled parser (lib/webidl/parser/idl.rb) and make sure you do not have the webidl gem installed. When finished, compile the parser with `rake parser:compile`.
|
16
|
+
|
13
17
|
= See also
|
14
18
|
|
15
19
|
* http://dev.w3.org/2006/webapi/WebIDL/
|
@@ -28,4 +32,4 @@ So far this hasn't led to any problems - the parser does parse the IDLs parts of
|
|
28
32
|
|
29
33
|
== Copyright
|
30
34
|
|
31
|
-
Copyright (c) 2009 Jari Bakken. See LICENSE for details.
|
35
|
+
Copyright (c) 2009-2010 Jari Bakken. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -36,6 +36,8 @@ Spec::Rake::SpecTask.new(:rcov) do |spec|
|
|
36
36
|
end
|
37
37
|
|
38
38
|
namespace :parser do
|
39
|
+
|
40
|
+
desc "Compile the parser"
|
39
41
|
task :compile do
|
40
42
|
require 'treetop'
|
41
43
|
compiler = Treetop::Compiler::GrammarCompiler.new
|
@@ -46,20 +48,51 @@ namespace :parser do
|
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
51
|
+
namespace :webidl do
|
52
|
+
WEBIDL_URL = "http://dev.w3.org/2006/webapi/WebIDL/"
|
53
|
+
HTML5_URL = "http://www.whatwg.org/specs/web-apps/current-work/"
|
54
|
+
|
55
|
+
desc "Download the webidl spec to support/"
|
56
|
+
task :download do
|
57
|
+
require 'open-uri'
|
58
|
+
spec_file = "support/webidl-spec-#{Time.now.strftime "%Y-%m-%d"}.html"
|
59
|
+
size = 0
|
60
|
+
|
61
|
+
File.open(spec_file, "w") do |file|
|
62
|
+
file << data = open(SPEC_URL).read
|
63
|
+
size = data.bytesize
|
64
|
+
end
|
65
|
+
|
66
|
+
puts "#{SPEC_URL} => #{spec_file} (#{size} bytes)"
|
67
|
+
end
|
68
|
+
|
69
|
+
desc "Download and extract HTML5 IDL parts to spec/fixtures"
|
70
|
+
task :html5 do
|
71
|
+
require 'open-uri'
|
72
|
+
require 'nokogiri'
|
73
|
+
|
74
|
+
idl_file = "spec/fixtures/html5.idl"
|
75
|
+
size = 0
|
76
|
+
|
77
|
+
File.open(idl_file, "w") do |file|
|
78
|
+
file << data = Nokogiri.HTML(open(HTML5_URL)).css("pre.idl").map { |e| e.inner_text }.join("\n\n")
|
79
|
+
size = data.bytesize
|
80
|
+
end
|
81
|
+
|
82
|
+
puts "#{HTML5_URL} => #{idl_file} (#{size} bytes)"
|
83
|
+
end
|
84
|
+
|
85
|
+
end
|
86
|
+
|
49
87
|
task :spec => :check_dependencies
|
50
88
|
|
51
89
|
task :default => :spec
|
52
90
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
91
|
+
begin
|
92
|
+
require 'yard'
|
93
|
+
YARD::Rake::YardocTask.new
|
94
|
+
rescue LoadError
|
95
|
+
task :yardoc do
|
96
|
+
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
59
97
|
end
|
60
|
-
|
61
|
-
rdoc.rdoc_dir = 'rdoc'
|
62
|
-
rdoc.title = "webidl #{version}"
|
63
|
-
rdoc.rdoc_files.include('README*')
|
64
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
65
98
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/lib/webidl.rb
CHANGED
@@ -14,6 +14,7 @@ require "webidl/parse_tree/argument_list"
|
|
14
14
|
require "webidl/parse_tree/extended_attributes"
|
15
15
|
require "webidl/parse_tree/relative_scoped_name"
|
16
16
|
require "webidl/parse_tree/absolute_scoped_name"
|
17
|
+
require "webidl/parse_tree/type"
|
17
18
|
require "webidl/parse_tree/nullable_type"
|
18
19
|
require "webidl/parse_tree/interface_members"
|
19
20
|
require "webidl/parse_tree/operation"
|
data/lib/webidl/ast/type.rb
CHANGED
@@ -7,7 +7,7 @@ module WebIDL
|
|
7
7
|
def initialize(parent, name, opts = {})
|
8
8
|
super(parent)
|
9
9
|
|
10
|
-
@name = name.strip.to_sym
|
10
|
+
@name = camel_case_type(name.strip).to_sym
|
11
11
|
@nullable = !!opts[:nullable]
|
12
12
|
end
|
13
13
|
|
@@ -15,6 +15,16 @@ module WebIDL
|
|
15
15
|
@nullable
|
16
16
|
end
|
17
17
|
|
18
|
+
def array!
|
19
|
+
@name = "#{@name}Array".to_sym
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def camel_case_type(name)
|
25
|
+
name.split(/[_ ]/).map { |e| e[0] = e[0].upcase; e }.join
|
26
|
+
end
|
27
|
+
|
18
28
|
end # Type
|
19
29
|
end # Ast
|
20
|
-
end # WebIDL
|
30
|
+
end # WebIDL
|
@@ -7,9 +7,9 @@ module WebIDL
|
|
7
7
|
n << name.text_value
|
8
8
|
n << parts.text_value
|
9
9
|
|
10
|
-
|
10
|
+
Ast::ScopedName.new(parent, n, :relative => true)
|
11
11
|
end
|
12
12
|
|
13
13
|
end # RelativeScopedName
|
14
14
|
end # ParseTree
|
15
|
-
end # WebIDL
|
15
|
+
end # WebIDL
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module WebIDL
|
2
|
+
module ParseTree
|
3
|
+
class Type < Treetop::Runtime::SyntaxNode
|
4
|
+
|
5
|
+
def build(parent)
|
6
|
+
result = type.build(parent)
|
7
|
+
|
8
|
+
if result.kind_of? Ast::ScopedName
|
9
|
+
result = Ast::Type.new parent, result.name # or qualified_name?
|
10
|
+
end
|
11
|
+
|
12
|
+
result.array! if array.any?
|
13
|
+
result
|
14
|
+
end
|
15
|
+
|
16
|
+
end # Type
|
17
|
+
end # ParseTree
|
18
|
+
end # WebIDL
|
data/lib/webidl/parser/idl.rb
CHANGED
@@ -9,7 +9,7 @@ module WebIDL
|
|
9
9
|
include Treetop::Runtime
|
10
10
|
|
11
11
|
def root
|
12
|
-
@root
|
12
|
+
@root ||= :Definitions
|
13
13
|
end
|
14
14
|
|
15
15
|
module Definitions0
|
@@ -52,7 +52,10 @@ module WebIDL
|
|
52
52
|
start_index = index
|
53
53
|
if node_cache[:Definitions].has_key?(index)
|
54
54
|
cached = node_cache[:Definitions][index]
|
55
|
-
|
55
|
+
if cached
|
56
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
57
|
+
@index = cached.interval.end
|
58
|
+
end
|
56
59
|
return cached
|
57
60
|
end
|
58
61
|
|
@@ -114,7 +117,10 @@ module WebIDL
|
|
114
117
|
start_index = index
|
115
118
|
if node_cache[:Definition].has_key?(index)
|
116
119
|
cached = node_cache[:Definition][index]
|
117
|
-
|
120
|
+
if cached
|
121
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
122
|
+
@index = cached.interval.end
|
123
|
+
end
|
118
124
|
return cached
|
119
125
|
end
|
120
126
|
|
@@ -187,7 +193,10 @@ module WebIDL
|
|
187
193
|
start_index = index
|
188
194
|
if node_cache[:Module].has_key?(index)
|
189
195
|
cached = node_cache[:Module][index]
|
190
|
-
|
196
|
+
if cached
|
197
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
198
|
+
@index = cached.interval.end
|
199
|
+
end
|
191
200
|
return cached
|
192
201
|
end
|
193
202
|
|
@@ -314,7 +323,10 @@ module WebIDL
|
|
314
323
|
start_index = index
|
315
324
|
if node_cache[:Interface].has_key?(index)
|
316
325
|
cached = node_cache[:Interface][index]
|
317
|
-
|
326
|
+
if cached
|
327
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
328
|
+
@index = cached.interval.end
|
329
|
+
end
|
318
330
|
return cached
|
319
331
|
end
|
320
332
|
|
@@ -420,7 +432,10 @@ module WebIDL
|
|
420
432
|
start_index = index
|
421
433
|
if node_cache[:InterfaceInheritance].has_key?(index)
|
422
434
|
cached = node_cache[:InterfaceInheritance][index]
|
423
|
-
|
435
|
+
if cached
|
436
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
437
|
+
@index = cached.interval.end
|
438
|
+
end
|
424
439
|
return cached
|
425
440
|
end
|
426
441
|
|
@@ -489,7 +504,10 @@ module WebIDL
|
|
489
504
|
start_index = index
|
490
505
|
if node_cache[:InterfaceMembers].has_key?(index)
|
491
506
|
cached = node_cache[:InterfaceMembers][index]
|
492
|
-
|
507
|
+
if cached
|
508
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
509
|
+
@index = cached.interval.end
|
510
|
+
end
|
493
511
|
return cached
|
494
512
|
end
|
495
513
|
|
@@ -538,7 +556,10 @@ module WebIDL
|
|
538
556
|
start_index = index
|
539
557
|
if node_cache[:InterfaceMember].has_key?(index)
|
540
558
|
cached = node_cache[:InterfaceMember][index]
|
541
|
-
|
559
|
+
if cached
|
560
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
561
|
+
@index = cached.interval.end
|
562
|
+
end
|
542
563
|
return cached
|
543
564
|
end
|
544
565
|
|
@@ -596,7 +617,10 @@ module WebIDL
|
|
596
617
|
start_index = index
|
597
618
|
if node_cache[:Exception].has_key?(index)
|
598
619
|
cached = node_cache[:Exception][index]
|
599
|
-
|
620
|
+
if cached
|
621
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
622
|
+
@index = cached.interval.end
|
623
|
+
end
|
600
624
|
return cached
|
601
625
|
end
|
602
626
|
|
@@ -710,7 +734,10 @@ module WebIDL
|
|
710
734
|
start_index = index
|
711
735
|
if node_cache[:ExceptionMembers].has_key?(index)
|
712
736
|
cached = node_cache[:ExceptionMembers][index]
|
713
|
-
|
737
|
+
if cached
|
738
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
739
|
+
@index = cached.interval.end
|
740
|
+
end
|
714
741
|
return cached
|
715
742
|
end
|
716
743
|
|
@@ -782,7 +809,10 @@ module WebIDL
|
|
782
809
|
start_index = index
|
783
810
|
if node_cache[:TypeDef].has_key?(index)
|
784
811
|
cached = node_cache[:TypeDef][index]
|
785
|
-
|
812
|
+
if cached
|
813
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
814
|
+
@index = cached.interval.end
|
815
|
+
end
|
786
816
|
return cached
|
787
817
|
end
|
788
818
|
|
@@ -865,7 +895,10 @@ module WebIDL
|
|
865
895
|
start_index = index
|
866
896
|
if node_cache[:ImplementsStatement].has_key?(index)
|
867
897
|
cached = node_cache[:ImplementsStatement][index]
|
868
|
-
|
898
|
+
if cached
|
899
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
900
|
+
@index = cached.interval.end
|
901
|
+
end
|
869
902
|
return cached
|
870
903
|
end
|
871
904
|
|
@@ -960,7 +993,10 @@ module WebIDL
|
|
960
993
|
start_index = index
|
961
994
|
if node_cache[:Const].has_key?(index)
|
962
995
|
cached = node_cache[:Const][index]
|
963
|
-
|
996
|
+
if cached
|
997
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
998
|
+
@index = cached.interval.end
|
999
|
+
end
|
964
1000
|
return cached
|
965
1001
|
end
|
966
1002
|
|
@@ -1042,7 +1078,10 @@ module WebIDL
|
|
1042
1078
|
start_index = index
|
1043
1079
|
if node_cache[:ConstExpr].has_key?(index)
|
1044
1080
|
cached = node_cache[:ConstExpr][index]
|
1045
|
-
|
1081
|
+
if cached
|
1082
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1083
|
+
@index = cached.interval.end
|
1084
|
+
end
|
1046
1085
|
return cached
|
1047
1086
|
end
|
1048
1087
|
|
@@ -1078,7 +1117,10 @@ module WebIDL
|
|
1078
1117
|
start_index = index
|
1079
1118
|
if node_cache[:BooleanLiteral].has_key?(index)
|
1080
1119
|
cached = node_cache[:BooleanLiteral][index]
|
1081
|
-
|
1120
|
+
if cached
|
1121
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1122
|
+
@index = cached.interval.end
|
1123
|
+
end
|
1082
1124
|
return cached
|
1083
1125
|
end
|
1084
1126
|
|
@@ -1119,7 +1161,10 @@ module WebIDL
|
|
1119
1161
|
start_index = index
|
1120
1162
|
if node_cache[:AttributeOrOperation].has_key?(index)
|
1121
1163
|
cached = node_cache[:AttributeOrOperation][index]
|
1122
|
-
|
1164
|
+
if cached
|
1165
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1166
|
+
@index = cached.interval.end
|
1167
|
+
end
|
1123
1168
|
return cached
|
1124
1169
|
end
|
1125
1170
|
|
@@ -1161,7 +1206,10 @@ module WebIDL
|
|
1161
1206
|
start_index = index
|
1162
1207
|
if node_cache[:StringifierAttributeOrOperation].has_key?(index)
|
1163
1208
|
cached = node_cache[:StringifierAttributeOrOperation][index]
|
1164
|
-
|
1209
|
+
if cached
|
1210
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1211
|
+
@index = cached.interval.end
|
1212
|
+
end
|
1165
1213
|
return cached
|
1166
1214
|
end
|
1167
1215
|
|
@@ -1269,7 +1317,10 @@ module WebIDL
|
|
1269
1317
|
start_index = index
|
1270
1318
|
if node_cache[:Attribute].has_key?(index)
|
1271
1319
|
cached = node_cache[:Attribute][index]
|
1272
|
-
|
1320
|
+
if cached
|
1321
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1322
|
+
@index = cached.interval.end
|
1323
|
+
end
|
1273
1324
|
return cached
|
1274
1325
|
end
|
1275
1326
|
|
@@ -1353,7 +1404,10 @@ module WebIDL
|
|
1353
1404
|
start_index = index
|
1354
1405
|
if node_cache[:ReadOnly].has_key?(index)
|
1355
1406
|
cached = node_cache[:ReadOnly][index]
|
1356
|
-
|
1407
|
+
if cached
|
1408
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1409
|
+
@index = cached.interval.end
|
1410
|
+
end
|
1357
1411
|
return cached
|
1358
1412
|
end
|
1359
1413
|
|
@@ -1389,7 +1443,10 @@ module WebIDL
|
|
1389
1443
|
start_index = index
|
1390
1444
|
if node_cache[:GetRaises].has_key?(index)
|
1391
1445
|
cached = node_cache[:GetRaises][index]
|
1392
|
-
|
1446
|
+
if cached
|
1447
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1448
|
+
@index = cached.interval.end
|
1449
|
+
end
|
1393
1450
|
return cached
|
1394
1451
|
end
|
1395
1452
|
|
@@ -1442,7 +1499,10 @@ module WebIDL
|
|
1442
1499
|
start_index = index
|
1443
1500
|
if node_cache[:SetRaises].has_key?(index)
|
1444
1501
|
cached = node_cache[:SetRaises][index]
|
1445
|
-
|
1502
|
+
if cached
|
1503
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1504
|
+
@index = cached.interval.end
|
1505
|
+
end
|
1446
1506
|
return cached
|
1447
1507
|
end
|
1448
1508
|
|
@@ -1499,7 +1559,10 @@ module WebIDL
|
|
1499
1559
|
start_index = index
|
1500
1560
|
if node_cache[:Operation].has_key?(index)
|
1501
1561
|
cached = node_cache[:Operation][index]
|
1502
|
-
|
1562
|
+
if cached
|
1563
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1564
|
+
@index = cached.interval.end
|
1565
|
+
end
|
1503
1566
|
return cached
|
1504
1567
|
end
|
1505
1568
|
|
@@ -1557,7 +1620,10 @@ module WebIDL
|
|
1557
1620
|
start_index = index
|
1558
1621
|
if node_cache[:OmittableSpecials].has_key?(index)
|
1559
1622
|
cached = node_cache[:OmittableSpecials][index]
|
1560
|
-
|
1623
|
+
if cached
|
1624
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1625
|
+
@index = cached.interval.end
|
1626
|
+
end
|
1561
1627
|
return cached
|
1562
1628
|
end
|
1563
1629
|
|
@@ -1609,7 +1675,10 @@ module WebIDL
|
|
1609
1675
|
start_index = index
|
1610
1676
|
if node_cache[:Specials].has_key?(index)
|
1611
1677
|
cached = node_cache[:Specials][index]
|
1612
|
-
|
1678
|
+
if cached
|
1679
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1680
|
+
@index = cached.interval.end
|
1681
|
+
end
|
1613
1682
|
return cached
|
1614
1683
|
end
|
1615
1684
|
|
@@ -1646,7 +1715,10 @@ module WebIDL
|
|
1646
1715
|
start_index = index
|
1647
1716
|
if node_cache[:Special].has_key?(index)
|
1648
1717
|
cached = node_cache[:Special][index]
|
1649
|
-
|
1718
|
+
if cached
|
1719
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1720
|
+
@index = cached.interval.end
|
1721
|
+
end
|
1650
1722
|
return cached
|
1651
1723
|
end
|
1652
1724
|
|
@@ -1761,7 +1833,10 @@ module WebIDL
|
|
1761
1833
|
start_index = index
|
1762
1834
|
if node_cache[:OperationRest].has_key?(index)
|
1763
1835
|
cached = node_cache[:OperationRest][index]
|
1764
|
-
|
1836
|
+
if cached
|
1837
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1838
|
+
@index = cached.interval.end
|
1839
|
+
end
|
1765
1840
|
return cached
|
1766
1841
|
end
|
1767
1842
|
|
@@ -1851,7 +1926,10 @@ module WebIDL
|
|
1851
1926
|
start_index = index
|
1852
1927
|
if node_cache[:OptionalIdentifier].has_key?(index)
|
1853
1928
|
cached = node_cache[:OptionalIdentifier][index]
|
1854
|
-
|
1929
|
+
if cached
|
1930
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1931
|
+
@index = cached.interval.end
|
1932
|
+
end
|
1855
1933
|
return cached
|
1856
1934
|
end
|
1857
1935
|
|
@@ -1877,7 +1955,10 @@ module WebIDL
|
|
1877
1955
|
start_index = index
|
1878
1956
|
if node_cache[:Raises].has_key?(index)
|
1879
1957
|
cached = node_cache[:Raises][index]
|
1880
|
-
|
1958
|
+
if cached
|
1959
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
1960
|
+
@index = cached.interval.end
|
1961
|
+
end
|
1881
1962
|
return cached
|
1882
1963
|
end
|
1883
1964
|
|
@@ -1923,7 +2004,10 @@ module WebIDL
|
|
1923
2004
|
start_index = index
|
1924
2005
|
if node_cache[:ExceptionList].has_key?(index)
|
1925
2006
|
cached = node_cache[:ExceptionList][index]
|
1926
|
-
|
2007
|
+
if cached
|
2008
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2009
|
+
@index = cached.interval.end
|
2010
|
+
end
|
1927
2011
|
return cached
|
1928
2012
|
end
|
1929
2013
|
|
@@ -1981,7 +2065,10 @@ module WebIDL
|
|
1981
2065
|
start_index = index
|
1982
2066
|
if node_cache[:ArgumentList].has_key?(index)
|
1983
2067
|
cached = node_cache[:ArgumentList][index]
|
1984
|
-
|
2068
|
+
if cached
|
2069
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2070
|
+
@index = cached.interval.end
|
2071
|
+
end
|
1985
2072
|
return cached
|
1986
2073
|
end
|
1987
2074
|
|
@@ -2036,7 +2123,10 @@ module WebIDL
|
|
2036
2123
|
start_index = index
|
2037
2124
|
if node_cache[:Arguments].has_key?(index)
|
2038
2125
|
cached = node_cache[:Arguments][index]
|
2039
|
-
|
2126
|
+
if cached
|
2127
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2128
|
+
@index = cached.interval.end
|
2129
|
+
end
|
2040
2130
|
return cached
|
2041
2131
|
end
|
2042
2132
|
|
@@ -2133,7 +2223,10 @@ module WebIDL
|
|
2133
2223
|
start_index = index
|
2134
2224
|
if node_cache[:Argument].has_key?(index)
|
2135
2225
|
cached = node_cache[:Argument][index]
|
2136
|
-
|
2226
|
+
if cached
|
2227
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2228
|
+
@index = cached.interval.end
|
2229
|
+
end
|
2137
2230
|
return cached
|
2138
2231
|
end
|
2139
2232
|
|
@@ -2197,7 +2290,10 @@ module WebIDL
|
|
2197
2290
|
start_index = index
|
2198
2291
|
if node_cache[:In].has_key?(index)
|
2199
2292
|
cached = node_cache[:In][index]
|
2200
|
-
|
2293
|
+
if cached
|
2294
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2295
|
+
@index = cached.interval.end
|
2296
|
+
end
|
2201
2297
|
return cached
|
2202
2298
|
end
|
2203
2299
|
|
@@ -2223,7 +2319,10 @@ module WebIDL
|
|
2223
2319
|
start_index = index
|
2224
2320
|
if node_cache[:Optional].has_key?(index)
|
2225
2321
|
cached = node_cache[:Optional][index]
|
2226
|
-
|
2322
|
+
if cached
|
2323
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2324
|
+
@index = cached.interval.end
|
2325
|
+
end
|
2227
2326
|
return cached
|
2228
2327
|
end
|
2229
2328
|
|
@@ -2249,7 +2348,10 @@ module WebIDL
|
|
2249
2348
|
start_index = index
|
2250
2349
|
if node_cache[:Ellipsis].has_key?(index)
|
2251
2350
|
cached = node_cache[:Ellipsis][index]
|
2252
|
-
|
2351
|
+
if cached
|
2352
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2353
|
+
@index = cached.interval.end
|
2354
|
+
end
|
2253
2355
|
return cached
|
2254
2356
|
end
|
2255
2357
|
|
@@ -2275,7 +2377,10 @@ module WebIDL
|
|
2275
2377
|
start_index = index
|
2276
2378
|
if node_cache[:ExceptionMember].has_key?(index)
|
2277
2379
|
cached = node_cache[:ExceptionMember][index]
|
2278
|
-
|
2380
|
+
if cached
|
2381
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2382
|
+
@index = cached.interval.end
|
2383
|
+
end
|
2279
2384
|
return cached
|
2280
2385
|
end
|
2281
2386
|
|
@@ -2321,7 +2426,10 @@ module WebIDL
|
|
2321
2426
|
start_index = index
|
2322
2427
|
if node_cache[:ExceptionField].has_key?(index)
|
2323
2428
|
cached = node_cache[:ExceptionField][index]
|
2324
|
-
|
2429
|
+
if cached
|
2430
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2431
|
+
@index = cached.interval.end
|
2432
|
+
end
|
2325
2433
|
return cached
|
2326
2434
|
end
|
2327
2435
|
|
@@ -2390,7 +2498,10 @@ module WebIDL
|
|
2390
2498
|
start_index = index
|
2391
2499
|
if node_cache[:ExtendedAttributeList].has_key?(index)
|
2392
2500
|
cached = node_cache[:ExtendedAttributeList][index]
|
2393
|
-
|
2501
|
+
if cached
|
2502
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2503
|
+
@index = cached.interval.end
|
2504
|
+
end
|
2394
2505
|
return cached
|
2395
2506
|
end
|
2396
2507
|
|
@@ -2473,7 +2584,10 @@ module WebIDL
|
|
2473
2584
|
start_index = index
|
2474
2585
|
if node_cache[:ExtendedAttributes].has_key?(index)
|
2475
2586
|
cached = node_cache[:ExtendedAttributes][index]
|
2476
|
-
|
2587
|
+
if cached
|
2588
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2589
|
+
@index = cached.interval.end
|
2590
|
+
end
|
2477
2591
|
return cached
|
2478
2592
|
end
|
2479
2593
|
|
@@ -2524,7 +2638,10 @@ module WebIDL
|
|
2524
2638
|
start_index = index
|
2525
2639
|
if node_cache[:ExtendedAttribute].has_key?(index)
|
2526
2640
|
cached = node_cache[:ExtendedAttribute][index]
|
2527
|
-
|
2641
|
+
if cached
|
2642
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2643
|
+
@index = cached.interval.end
|
2644
|
+
end
|
2528
2645
|
return cached
|
2529
2646
|
end
|
2530
2647
|
|
@@ -2572,7 +2689,10 @@ module WebIDL
|
|
2572
2689
|
start_index = index
|
2573
2690
|
if node_cache[:ExtendedAttributeNoArg].has_key?(index)
|
2574
2691
|
cached = node_cache[:ExtendedAttributeNoArg][index]
|
2575
|
-
|
2692
|
+
if cached
|
2693
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2694
|
+
@index = cached.interval.end
|
2695
|
+
end
|
2576
2696
|
return cached
|
2577
2697
|
end
|
2578
2698
|
|
@@ -2607,7 +2727,10 @@ module WebIDL
|
|
2607
2727
|
start_index = index
|
2608
2728
|
if node_cache[:ExtendedAttributeArgList].has_key?(index)
|
2609
2729
|
cached = node_cache[:ExtendedAttributeArgList][index]
|
2610
|
-
|
2730
|
+
if cached
|
2731
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2732
|
+
@index = cached.interval.end
|
2733
|
+
end
|
2611
2734
|
return cached
|
2612
2735
|
end
|
2613
2736
|
|
@@ -2673,7 +2796,10 @@ module WebIDL
|
|
2673
2796
|
start_index = index
|
2674
2797
|
if node_cache[:ExtendedAttributeScopedName].has_key?(index)
|
2675
2798
|
cached = node_cache[:ExtendedAttributeScopedName][index]
|
2676
|
-
|
2799
|
+
if cached
|
2800
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2801
|
+
@index = cached.interval.end
|
2802
|
+
end
|
2677
2803
|
return cached
|
2678
2804
|
end
|
2679
2805
|
|
@@ -2722,7 +2848,10 @@ module WebIDL
|
|
2722
2848
|
start_index = index
|
2723
2849
|
if node_cache[:ExtendedAttributeIdent].has_key?(index)
|
2724
2850
|
cached = node_cache[:ExtendedAttributeIdent][index]
|
2725
|
-
|
2851
|
+
if cached
|
2852
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2853
|
+
@index = cached.interval.end
|
2854
|
+
end
|
2726
2855
|
return cached
|
2727
2856
|
end
|
2728
2857
|
|
@@ -2806,7 +2935,10 @@ module WebIDL
|
|
2806
2935
|
start_index = index
|
2807
2936
|
if node_cache[:ExtendedAttributeNamedArgList].has_key?(index)
|
2808
2937
|
cached = node_cache[:ExtendedAttributeNamedArgList][index]
|
2809
|
-
|
2938
|
+
if cached
|
2939
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
2940
|
+
@index = cached.interval.end
|
2941
|
+
end
|
2810
2942
|
return cached
|
2811
2943
|
end
|
2812
2944
|
|
@@ -2885,7 +3017,10 @@ module WebIDL
|
|
2885
3017
|
start_index = index
|
2886
3018
|
if node_cache[:Other].has_key?(index)
|
2887
3019
|
cached = node_cache[:Other][index]
|
2888
|
-
|
3020
|
+
if cached
|
3021
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
3022
|
+
@index = cached.interval.end
|
3023
|
+
end
|
2889
3024
|
return cached
|
2890
3025
|
end
|
2891
3026
|
|
@@ -2910,298 +3045,430 @@ module WebIDL
|
|
2910
3045
|
if r5
|
2911
3046
|
r0 = r5
|
2912
3047
|
else
|
2913
|
-
if has_terminal?("
|
2914
|
-
r6 = instantiate_node(SyntaxNode,input, index...(index +
|
2915
|
-
@index +=
|
3048
|
+
if has_terminal?("...", false, index)
|
3049
|
+
r6 = instantiate_node(SyntaxNode,input, index...(index + 3))
|
3050
|
+
@index += 3
|
2916
3051
|
else
|
2917
|
-
terminal_parse_failure("
|
3052
|
+
terminal_parse_failure("...")
|
2918
3053
|
r6 = nil
|
2919
3054
|
end
|
2920
3055
|
if r6
|
2921
3056
|
r0 = r6
|
2922
3057
|
else
|
2923
|
-
if has_terminal?("
|
2924
|
-
r7 = instantiate_node(SyntaxNode,input, index...(index +
|
2925
|
-
@index +=
|
3058
|
+
if has_terminal?(":", false, index)
|
3059
|
+
r7 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
3060
|
+
@index += 1
|
2926
3061
|
else
|
2927
|
-
terminal_parse_failure("
|
3062
|
+
terminal_parse_failure(":")
|
2928
3063
|
r7 = nil
|
2929
3064
|
end
|
2930
3065
|
if r7
|
2931
3066
|
r0 = r7
|
2932
3067
|
else
|
2933
|
-
if has_terminal?("
|
2934
|
-
r8 = instantiate_node(SyntaxNode,input, index...(index +
|
2935
|
-
@index +=
|
3068
|
+
if has_terminal?("::", false, index)
|
3069
|
+
r8 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
3070
|
+
@index += 2
|
2936
3071
|
else
|
2937
|
-
terminal_parse_failure("
|
3072
|
+
terminal_parse_failure("::")
|
2938
3073
|
r8 = nil
|
2939
3074
|
end
|
2940
3075
|
if r8
|
2941
3076
|
r0 = r8
|
2942
3077
|
else
|
2943
|
-
if has_terminal?("
|
3078
|
+
if has_terminal?(";", false, index)
|
2944
3079
|
r9 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
2945
3080
|
@index += 1
|
2946
3081
|
else
|
2947
|
-
terminal_parse_failure("
|
3082
|
+
terminal_parse_failure(";")
|
2948
3083
|
r9 = nil
|
2949
3084
|
end
|
2950
3085
|
if r9
|
2951
3086
|
r0 = r9
|
2952
3087
|
else
|
2953
|
-
if has_terminal?("
|
3088
|
+
if has_terminal?("<", false, index)
|
2954
3089
|
r10 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
2955
3090
|
@index += 1
|
2956
3091
|
else
|
2957
|
-
terminal_parse_failure("
|
3092
|
+
terminal_parse_failure("<")
|
2958
3093
|
r10 = nil
|
2959
3094
|
end
|
2960
3095
|
if r10
|
2961
3096
|
r0 = r10
|
2962
3097
|
else
|
2963
|
-
if has_terminal?("
|
3098
|
+
if has_terminal?("=", false, index)
|
2964
3099
|
r11 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
2965
3100
|
@index += 1
|
2966
3101
|
else
|
2967
|
-
terminal_parse_failure("
|
3102
|
+
terminal_parse_failure("=")
|
2968
3103
|
r11 = nil
|
2969
3104
|
end
|
2970
3105
|
if r11
|
2971
3106
|
r0 = r11
|
2972
3107
|
else
|
2973
|
-
if has_terminal?("
|
2974
|
-
r12 = instantiate_node(SyntaxNode,input, index...(index +
|
2975
|
-
@index +=
|
3108
|
+
if has_terminal?(">", false, index)
|
3109
|
+
r12 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
3110
|
+
@index += 1
|
2976
3111
|
else
|
2977
|
-
terminal_parse_failure("
|
3112
|
+
terminal_parse_failure(">")
|
2978
3113
|
r12 = nil
|
2979
3114
|
end
|
2980
3115
|
if r12
|
2981
3116
|
r0 = r12
|
2982
3117
|
else
|
2983
|
-
if has_terminal?("
|
2984
|
-
r13 = instantiate_node(SyntaxNode,input, index...(index +
|
2985
|
-
@index +=
|
3118
|
+
if has_terminal?("?", false, index)
|
3119
|
+
r13 = instantiate_node(SyntaxNode,input, index...(index + 1))
|
3120
|
+
@index += 1
|
2986
3121
|
else
|
2987
|
-
terminal_parse_failure("
|
3122
|
+
terminal_parse_failure("?")
|
2988
3123
|
r13 = nil
|
2989
3124
|
end
|
2990
3125
|
if r13
|
2991
3126
|
r0 = r13
|
2992
3127
|
else
|
2993
|
-
if has_terminal?("
|
2994
|
-
r14 = instantiate_node(SyntaxNode,input, index...(index +
|
2995
|
-
@index +=
|
3128
|
+
if has_terminal?("false", false, index)
|
3129
|
+
r14 = instantiate_node(SyntaxNode,input, index...(index + 5))
|
3130
|
+
@index += 5
|
2996
3131
|
else
|
2997
|
-
terminal_parse_failure("
|
3132
|
+
terminal_parse_failure("false")
|
2998
3133
|
r14 = nil
|
2999
3134
|
end
|
3000
3135
|
if r14
|
3001
3136
|
r0 = r14
|
3002
3137
|
else
|
3003
|
-
if has_terminal?("
|
3004
|
-
r15 = instantiate_node(SyntaxNode,input, index...(index +
|
3005
|
-
@index +=
|
3138
|
+
if has_terminal?("object", false, index)
|
3139
|
+
r15 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
3140
|
+
@index += 6
|
3006
3141
|
else
|
3007
|
-
terminal_parse_failure("
|
3142
|
+
terminal_parse_failure("object")
|
3008
3143
|
r15 = nil
|
3009
3144
|
end
|
3010
3145
|
if r15
|
3011
3146
|
r0 = r15
|
3012
3147
|
else
|
3013
|
-
if has_terminal?("
|
3014
|
-
r16 = instantiate_node(SyntaxNode,input, index...(index +
|
3015
|
-
@index +=
|
3148
|
+
if has_terminal?("true", false, index)
|
3149
|
+
r16 = instantiate_node(SyntaxNode,input, index...(index + 4))
|
3150
|
+
@index += 4
|
3016
3151
|
else
|
3017
|
-
terminal_parse_failure("
|
3152
|
+
terminal_parse_failure("true")
|
3018
3153
|
r16 = nil
|
3019
3154
|
end
|
3020
3155
|
if r16
|
3021
3156
|
r0 = r16
|
3022
3157
|
else
|
3023
|
-
if has_terminal?("
|
3024
|
-
r17 = instantiate_node(SyntaxNode,input, index...(index +
|
3025
|
-
@index +=
|
3158
|
+
if has_terminal?("any", false, index)
|
3159
|
+
r17 = instantiate_node(SyntaxNode,input, index...(index + 3))
|
3160
|
+
@index += 3
|
3026
3161
|
else
|
3027
|
-
terminal_parse_failure("
|
3162
|
+
terminal_parse_failure("any")
|
3028
3163
|
r17 = nil
|
3029
3164
|
end
|
3030
3165
|
if r17
|
3031
3166
|
r0 = r17
|
3032
3167
|
else
|
3033
|
-
if has_terminal?("
|
3034
|
-
r18 = instantiate_node(SyntaxNode,input, index...(index +
|
3035
|
-
@index +=
|
3168
|
+
if has_terminal?("attribute", false, index)
|
3169
|
+
r18 = instantiate_node(SyntaxNode,input, index...(index + 9))
|
3170
|
+
@index += 9
|
3036
3171
|
else
|
3037
|
-
terminal_parse_failure("
|
3172
|
+
terminal_parse_failure("attribute")
|
3038
3173
|
r18 = nil
|
3039
3174
|
end
|
3040
3175
|
if r18
|
3041
3176
|
r0 = r18
|
3042
3177
|
else
|
3043
|
-
if has_terminal?("
|
3044
|
-
r19 = instantiate_node(SyntaxNode,input, index...(index +
|
3045
|
-
@index +=
|
3178
|
+
if has_terminal?("boolean", false, index)
|
3179
|
+
r19 = instantiate_node(SyntaxNode,input, index...(index + 7))
|
3180
|
+
@index += 7
|
3046
3181
|
else
|
3047
|
-
terminal_parse_failure("
|
3182
|
+
terminal_parse_failure("boolean")
|
3048
3183
|
r19 = nil
|
3049
3184
|
end
|
3050
3185
|
if r19
|
3051
3186
|
r0 = r19
|
3052
3187
|
else
|
3053
|
-
if has_terminal?("
|
3054
|
-
r20 = instantiate_node(SyntaxNode,input, index...(index +
|
3055
|
-
@index +=
|
3188
|
+
if has_terminal?("caller", false, index)
|
3189
|
+
r20 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
3190
|
+
@index += 6
|
3056
3191
|
else
|
3057
|
-
terminal_parse_failure("
|
3192
|
+
terminal_parse_failure("caller")
|
3058
3193
|
r20 = nil
|
3059
3194
|
end
|
3060
3195
|
if r20
|
3061
3196
|
r0 = r20
|
3062
3197
|
else
|
3063
|
-
if has_terminal?("
|
3198
|
+
if has_terminal?("const", false, index)
|
3064
3199
|
r21 = instantiate_node(SyntaxNode,input, index...(index + 5))
|
3065
3200
|
@index += 5
|
3066
3201
|
else
|
3067
|
-
terminal_parse_failure("
|
3202
|
+
terminal_parse_failure("const")
|
3068
3203
|
r21 = nil
|
3069
3204
|
end
|
3070
3205
|
if r21
|
3071
3206
|
r0 = r21
|
3072
3207
|
else
|
3073
|
-
if has_terminal?("
|
3074
|
-
r22 = instantiate_node(SyntaxNode,input, index...(index +
|
3075
|
-
@index +=
|
3208
|
+
if has_terminal?("creator", false, index)
|
3209
|
+
r22 = instantiate_node(SyntaxNode,input, index...(index + 7))
|
3210
|
+
@index += 7
|
3076
3211
|
else
|
3077
|
-
terminal_parse_failure("
|
3212
|
+
terminal_parse_failure("creator")
|
3078
3213
|
r22 = nil
|
3079
3214
|
end
|
3080
3215
|
if r22
|
3081
3216
|
r0 = r22
|
3082
3217
|
else
|
3083
|
-
if has_terminal?("
|
3084
|
-
r23 = instantiate_node(SyntaxNode,input, index...(index +
|
3085
|
-
@index +=
|
3218
|
+
if has_terminal?("deleter", false, index)
|
3219
|
+
r23 = instantiate_node(SyntaxNode,input, index...(index + 7))
|
3220
|
+
@index += 7
|
3086
3221
|
else
|
3087
|
-
terminal_parse_failure("
|
3222
|
+
terminal_parse_failure("deleter")
|
3088
3223
|
r23 = nil
|
3089
3224
|
end
|
3090
3225
|
if r23
|
3091
3226
|
r0 = r23
|
3092
3227
|
else
|
3093
|
-
if has_terminal?("
|
3094
|
-
r24 = instantiate_node(SyntaxNode,input, index...(index +
|
3095
|
-
@index +=
|
3228
|
+
if has_terminal?("double", false, index)
|
3229
|
+
r24 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
3230
|
+
@index += 6
|
3096
3231
|
else
|
3097
|
-
terminal_parse_failure("
|
3232
|
+
terminal_parse_failure("double")
|
3098
3233
|
r24 = nil
|
3099
3234
|
end
|
3100
3235
|
if r24
|
3101
3236
|
r0 = r24
|
3102
3237
|
else
|
3103
|
-
if has_terminal?("
|
3104
|
-
r25 = instantiate_node(SyntaxNode,input, index...(index +
|
3105
|
-
@index +=
|
3238
|
+
if has_terminal?("exception", false, index)
|
3239
|
+
r25 = instantiate_node(SyntaxNode,input, index...(index + 9))
|
3240
|
+
@index += 9
|
3106
3241
|
else
|
3107
|
-
terminal_parse_failure("
|
3242
|
+
terminal_parse_failure("exception")
|
3108
3243
|
r25 = nil
|
3109
3244
|
end
|
3110
3245
|
if r25
|
3111
3246
|
r0 = r25
|
3112
3247
|
else
|
3113
|
-
if has_terminal?("
|
3114
|
-
r26 = instantiate_node(SyntaxNode,input, index...(index +
|
3115
|
-
@index +=
|
3248
|
+
if has_terminal?("float", false, index)
|
3249
|
+
r26 = instantiate_node(SyntaxNode,input, index...(index + 5))
|
3250
|
+
@index += 5
|
3116
3251
|
else
|
3117
|
-
terminal_parse_failure("
|
3252
|
+
terminal_parse_failure("float")
|
3118
3253
|
r26 = nil
|
3119
3254
|
end
|
3120
3255
|
if r26
|
3121
3256
|
r0 = r26
|
3122
3257
|
else
|
3123
|
-
if has_terminal?("
|
3124
|
-
r27 = instantiate_node(SyntaxNode,input, index...(index +
|
3125
|
-
@index +=
|
3258
|
+
if has_terminal?("getraises", false, index)
|
3259
|
+
r27 = instantiate_node(SyntaxNode,input, index...(index + 9))
|
3260
|
+
@index += 9
|
3126
3261
|
else
|
3127
|
-
terminal_parse_failure("
|
3262
|
+
terminal_parse_failure("getraises")
|
3128
3263
|
r27 = nil
|
3129
3264
|
end
|
3130
3265
|
if r27
|
3131
3266
|
r0 = r27
|
3132
3267
|
else
|
3133
|
-
if has_terminal?("
|
3268
|
+
if has_terminal?("getter", false, index)
|
3134
3269
|
r28 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
3135
3270
|
@index += 6
|
3136
3271
|
else
|
3137
|
-
terminal_parse_failure("
|
3272
|
+
terminal_parse_failure("getter")
|
3138
3273
|
r28 = nil
|
3139
3274
|
end
|
3140
3275
|
if r28
|
3141
3276
|
r0 = r28
|
3142
3277
|
else
|
3143
|
-
if has_terminal?("
|
3144
|
-
r29 = instantiate_node(SyntaxNode,input, index...(index +
|
3145
|
-
@index +=
|
3278
|
+
if has_terminal?("implements", false, index)
|
3279
|
+
r29 = instantiate_node(SyntaxNode,input, index...(index + 10))
|
3280
|
+
@index += 10
|
3146
3281
|
else
|
3147
|
-
terminal_parse_failure("
|
3282
|
+
terminal_parse_failure("implements")
|
3148
3283
|
r29 = nil
|
3149
3284
|
end
|
3150
3285
|
if r29
|
3151
3286
|
r0 = r29
|
3152
3287
|
else
|
3153
|
-
if has_terminal?("
|
3154
|
-
r30 = instantiate_node(SyntaxNode,input, index...(index +
|
3155
|
-
@index +=
|
3288
|
+
if has_terminal?("in", false, index)
|
3289
|
+
r30 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
3290
|
+
@index += 2
|
3156
3291
|
else
|
3157
|
-
terminal_parse_failure("
|
3292
|
+
terminal_parse_failure("in")
|
3158
3293
|
r30 = nil
|
3159
3294
|
end
|
3160
3295
|
if r30
|
3161
3296
|
r0 = r30
|
3162
3297
|
else
|
3163
|
-
if has_terminal?("
|
3164
|
-
r31 = instantiate_node(SyntaxNode,input, index...(index +
|
3165
|
-
@index +=
|
3298
|
+
if has_terminal?("interface", false, index)
|
3299
|
+
r31 = instantiate_node(SyntaxNode,input, index...(index + 9))
|
3300
|
+
@index += 9
|
3166
3301
|
else
|
3167
|
-
terminal_parse_failure("
|
3302
|
+
terminal_parse_failure("interface")
|
3168
3303
|
r31 = nil
|
3169
3304
|
end
|
3170
3305
|
if r31
|
3171
3306
|
r0 = r31
|
3172
3307
|
else
|
3173
|
-
if has_terminal?("
|
3174
|
-
r32 = instantiate_node(SyntaxNode,input, index...(index +
|
3175
|
-
@index +=
|
3308
|
+
if has_terminal?("long", false, index)
|
3309
|
+
r32 = instantiate_node(SyntaxNode,input, index...(index + 4))
|
3310
|
+
@index += 4
|
3176
3311
|
else
|
3177
|
-
terminal_parse_failure("
|
3312
|
+
terminal_parse_failure("long")
|
3178
3313
|
r32 = nil
|
3179
3314
|
end
|
3180
3315
|
if r32
|
3181
3316
|
r0 = r32
|
3182
3317
|
else
|
3183
|
-
if has_terminal?("
|
3184
|
-
r33 = instantiate_node(SyntaxNode,input, index...(index +
|
3185
|
-
@index +=
|
3318
|
+
if has_terminal?("module", false, index)
|
3319
|
+
r33 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
3320
|
+
@index += 6
|
3186
3321
|
else
|
3187
|
-
terminal_parse_failure("
|
3322
|
+
terminal_parse_failure("module")
|
3188
3323
|
r33 = nil
|
3189
3324
|
end
|
3190
3325
|
if r33
|
3191
3326
|
r0 = r33
|
3192
3327
|
else
|
3193
|
-
if has_terminal?("
|
3194
|
-
r34 = instantiate_node(SyntaxNode,input, index...(index +
|
3195
|
-
@index +=
|
3328
|
+
if has_terminal?("octet", false, index)
|
3329
|
+
r34 = instantiate_node(SyntaxNode,input, index...(index + 5))
|
3330
|
+
@index += 5
|
3196
3331
|
else
|
3197
|
-
terminal_parse_failure("
|
3332
|
+
terminal_parse_failure("octet")
|
3198
3333
|
r34 = nil
|
3199
3334
|
end
|
3200
3335
|
if r34
|
3201
3336
|
r0 = r34
|
3202
3337
|
else
|
3203
|
-
|
3204
|
-
|
3338
|
+
if has_terminal?("omittable", false, index)
|
3339
|
+
r35 = instantiate_node(SyntaxNode,input, index...(index + 9))
|
3340
|
+
@index += 9
|
3341
|
+
else
|
3342
|
+
terminal_parse_failure("omittable")
|
3343
|
+
r35 = nil
|
3344
|
+
end
|
3345
|
+
if r35
|
3346
|
+
r0 = r35
|
3347
|
+
else
|
3348
|
+
if has_terminal?("optional", false, index)
|
3349
|
+
r36 = instantiate_node(SyntaxNode,input, index...(index + 8))
|
3350
|
+
@index += 8
|
3351
|
+
else
|
3352
|
+
terminal_parse_failure("optional")
|
3353
|
+
r36 = nil
|
3354
|
+
end
|
3355
|
+
if r36
|
3356
|
+
r0 = r36
|
3357
|
+
else
|
3358
|
+
if has_terminal?("raises", false, index)
|
3359
|
+
r37 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
3360
|
+
@index += 6
|
3361
|
+
else
|
3362
|
+
terminal_parse_failure("raises")
|
3363
|
+
r37 = nil
|
3364
|
+
end
|
3365
|
+
if r37
|
3366
|
+
r0 = r37
|
3367
|
+
else
|
3368
|
+
if has_terminal?("sequence", false, index)
|
3369
|
+
r38 = instantiate_node(SyntaxNode,input, index...(index + 8))
|
3370
|
+
@index += 8
|
3371
|
+
else
|
3372
|
+
terminal_parse_failure("sequence")
|
3373
|
+
r38 = nil
|
3374
|
+
end
|
3375
|
+
if r38
|
3376
|
+
r0 = r38
|
3377
|
+
else
|
3378
|
+
if has_terminal?("setraises", false, index)
|
3379
|
+
r39 = instantiate_node(SyntaxNode,input, index...(index + 9))
|
3380
|
+
@index += 9
|
3381
|
+
else
|
3382
|
+
terminal_parse_failure("setraises")
|
3383
|
+
r39 = nil
|
3384
|
+
end
|
3385
|
+
if r39
|
3386
|
+
r0 = r39
|
3387
|
+
else
|
3388
|
+
if has_terminal?("setter", false, index)
|
3389
|
+
r40 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
3390
|
+
@index += 6
|
3391
|
+
else
|
3392
|
+
terminal_parse_failure("setter")
|
3393
|
+
r40 = nil
|
3394
|
+
end
|
3395
|
+
if r40
|
3396
|
+
r0 = r40
|
3397
|
+
else
|
3398
|
+
if has_terminal?("short", false, index)
|
3399
|
+
r41 = instantiate_node(SyntaxNode,input, index...(index + 5))
|
3400
|
+
@index += 5
|
3401
|
+
else
|
3402
|
+
terminal_parse_failure("short")
|
3403
|
+
r41 = nil
|
3404
|
+
end
|
3405
|
+
if r41
|
3406
|
+
r0 = r41
|
3407
|
+
else
|
3408
|
+
if has_terminal?("DOMString", false, index)
|
3409
|
+
r42 = instantiate_node(SyntaxNode,input, index...(index + 9))
|
3410
|
+
@index += 9
|
3411
|
+
else
|
3412
|
+
terminal_parse_failure("DOMString")
|
3413
|
+
r42 = nil
|
3414
|
+
end
|
3415
|
+
if r42
|
3416
|
+
r0 = r42
|
3417
|
+
else
|
3418
|
+
if has_terminal?("stringifier", false, index)
|
3419
|
+
r43 = instantiate_node(SyntaxNode,input, index...(index + 11))
|
3420
|
+
@index += 11
|
3421
|
+
else
|
3422
|
+
terminal_parse_failure("stringifier")
|
3423
|
+
r43 = nil
|
3424
|
+
end
|
3425
|
+
if r43
|
3426
|
+
r0 = r43
|
3427
|
+
else
|
3428
|
+
if has_terminal?("typedef", false, index)
|
3429
|
+
r44 = instantiate_node(SyntaxNode,input, index...(index + 7))
|
3430
|
+
@index += 7
|
3431
|
+
else
|
3432
|
+
terminal_parse_failure("typedef")
|
3433
|
+
r44 = nil
|
3434
|
+
end
|
3435
|
+
if r44
|
3436
|
+
r0 = r44
|
3437
|
+
else
|
3438
|
+
if has_terminal?("unsigned", false, index)
|
3439
|
+
r45 = instantiate_node(SyntaxNode,input, index...(index + 8))
|
3440
|
+
@index += 8
|
3441
|
+
else
|
3442
|
+
terminal_parse_failure("unsigned")
|
3443
|
+
r45 = nil
|
3444
|
+
end
|
3445
|
+
if r45
|
3446
|
+
r0 = r45
|
3447
|
+
else
|
3448
|
+
if has_terminal?("void", false, index)
|
3449
|
+
r46 = instantiate_node(SyntaxNode,input, index...(index + 4))
|
3450
|
+
@index += 4
|
3451
|
+
else
|
3452
|
+
terminal_parse_failure("void")
|
3453
|
+
r46 = nil
|
3454
|
+
end
|
3455
|
+
if r46
|
3456
|
+
r0 = r46
|
3457
|
+
else
|
3458
|
+
@index = i0
|
3459
|
+
r0 = nil
|
3460
|
+
end
|
3461
|
+
end
|
3462
|
+
end
|
3463
|
+
end
|
3464
|
+
end
|
3465
|
+
end
|
3466
|
+
end
|
3467
|
+
end
|
3468
|
+
end
|
3469
|
+
end
|
3470
|
+
end
|
3471
|
+
end
|
3205
3472
|
end
|
3206
3473
|
end
|
3207
3474
|
end
|
@@ -3246,7 +3513,10 @@ module WebIDL
|
|
3246
3513
|
start_index = index
|
3247
3514
|
if node_cache[:OtherOrComma].has_key?(index)
|
3248
3515
|
cached = node_cache[:OtherOrComma][index]
|
3249
|
-
|
3516
|
+
if cached
|
3517
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
3518
|
+
@index = cached.interval.end
|
3519
|
+
end
|
3250
3520
|
return cached
|
3251
3521
|
end
|
3252
3522
|
|
@@ -3275,49 +3545,75 @@ module WebIDL
|
|
3275
3545
|
r0
|
3276
3546
|
end
|
3277
3547
|
|
3548
|
+
module Type0
|
3549
|
+
def type
|
3550
|
+
elements[0]
|
3551
|
+
end
|
3552
|
+
|
3553
|
+
def array
|
3554
|
+
elements[1]
|
3555
|
+
end
|
3556
|
+
end
|
3557
|
+
|
3278
3558
|
def _nt_Type
|
3279
3559
|
start_index = index
|
3280
3560
|
if node_cache[:Type].has_key?(index)
|
3281
3561
|
cached = node_cache[:Type][index]
|
3282
|
-
|
3562
|
+
if cached
|
3563
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
3564
|
+
@index = cached.interval.end
|
3565
|
+
end
|
3283
3566
|
return cached
|
3284
3567
|
end
|
3285
3568
|
|
3286
|
-
i0 = index
|
3287
|
-
|
3288
|
-
|
3289
|
-
|
3569
|
+
i0, s0 = index, []
|
3570
|
+
i1 = index
|
3571
|
+
r2 = _nt_NullableType
|
3572
|
+
if r2
|
3573
|
+
r1 = r2
|
3290
3574
|
else
|
3291
|
-
|
3292
|
-
if
|
3293
|
-
|
3575
|
+
r3 = _nt_ScopedName
|
3576
|
+
if r3
|
3577
|
+
r1 = r3
|
3294
3578
|
else
|
3295
3579
|
if has_terminal?("any", false, index)
|
3296
|
-
|
3580
|
+
r4 = instantiate_node(SyntaxNode,input, index...(index + 3))
|
3297
3581
|
@index += 3
|
3298
3582
|
else
|
3299
3583
|
terminal_parse_failure("any")
|
3300
|
-
|
3584
|
+
r4 = nil
|
3301
3585
|
end
|
3302
|
-
if
|
3303
|
-
|
3586
|
+
if r4
|
3587
|
+
r1 = r4
|
3304
3588
|
else
|
3305
3589
|
if has_terminal?("object", false, index)
|
3306
|
-
|
3590
|
+
r5 = instantiate_node(SyntaxNode,input, index...(index + 6))
|
3307
3591
|
@index += 6
|
3308
3592
|
else
|
3309
3593
|
terminal_parse_failure("object")
|
3310
|
-
|
3594
|
+
r5 = nil
|
3311
3595
|
end
|
3312
|
-
if
|
3313
|
-
|
3596
|
+
if r5
|
3597
|
+
r1 = r5
|
3314
3598
|
else
|
3315
|
-
@index =
|
3316
|
-
|
3599
|
+
@index = i1
|
3600
|
+
r1 = nil
|
3317
3601
|
end
|
3318
3602
|
end
|
3319
3603
|
end
|
3320
3604
|
end
|
3605
|
+
s0 << r1
|
3606
|
+
if r1
|
3607
|
+
r6 = _nt_OptionalArray
|
3608
|
+
s0 << r6
|
3609
|
+
end
|
3610
|
+
if s0.last
|
3611
|
+
r0 = instantiate_node(ParseTree::Type,input, i0...index, s0)
|
3612
|
+
r0.extend(Type0)
|
3613
|
+
else
|
3614
|
+
@index = i0
|
3615
|
+
r0 = nil
|
3616
|
+
end
|
3321
3617
|
|
3322
3618
|
node_cache[:Type][start_index] = r0
|
3323
3619
|
|
@@ -3420,7 +3716,10 @@ module WebIDL
|
|
3420
3716
|
start_index = index
|
3421
3717
|
if node_cache[:NullableType].has_key?(index)
|
3422
3718
|
cached = node_cache[:NullableType][index]
|
3423
|
-
|
3719
|
+
if cached
|
3720
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
3721
|
+
@index = cached.interval.end
|
3722
|
+
end
|
3424
3723
|
return cached
|
3425
3724
|
end
|
3426
3725
|
|
@@ -3711,7 +4010,10 @@ module WebIDL
|
|
3711
4010
|
start_index = index
|
3712
4011
|
if node_cache[:UnsignedIntegerType].has_key?(index)
|
3713
4012
|
cached = node_cache[:UnsignedIntegerType][index]
|
3714
|
-
|
4013
|
+
if cached
|
4014
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4015
|
+
@index = cached.interval.end
|
4016
|
+
end
|
3715
4017
|
return cached
|
3716
4018
|
end
|
3717
4019
|
|
@@ -3771,7 +4073,10 @@ module WebIDL
|
|
3771
4073
|
start_index = index
|
3772
4074
|
if node_cache[:IntegerType].has_key?(index)
|
3773
4075
|
cached = node_cache[:IntegerType][index]
|
3774
|
-
|
4076
|
+
if cached
|
4077
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4078
|
+
@index = cached.interval.end
|
4079
|
+
end
|
3775
4080
|
return cached
|
3776
4081
|
end
|
3777
4082
|
|
@@ -3827,7 +4132,10 @@ module WebIDL
|
|
3827
4132
|
start_index = index
|
3828
4133
|
if node_cache[:OptionalLong].has_key?(index)
|
3829
4134
|
cached = node_cache[:OptionalLong][index]
|
3830
|
-
|
4135
|
+
if cached
|
4136
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4137
|
+
@index = cached.interval.end
|
4138
|
+
end
|
3831
4139
|
return cached
|
3832
4140
|
end
|
3833
4141
|
|
@@ -3853,7 +4161,10 @@ module WebIDL
|
|
3853
4161
|
start_index = index
|
3854
4162
|
if node_cache[:Nullable].has_key?(index)
|
3855
4163
|
cached = node_cache[:Nullable][index]
|
3856
|
-
|
4164
|
+
if cached
|
4165
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4166
|
+
@index = cached.interval.end
|
4167
|
+
end
|
3857
4168
|
return cached
|
3858
4169
|
end
|
3859
4170
|
|
@@ -3875,6 +4186,35 @@ module WebIDL
|
|
3875
4186
|
r0
|
3876
4187
|
end
|
3877
4188
|
|
4189
|
+
def _nt_OptionalArray
|
4190
|
+
start_index = index
|
4191
|
+
if node_cache[:OptionalArray].has_key?(index)
|
4192
|
+
cached = node_cache[:OptionalArray][index]
|
4193
|
+
if cached
|
4194
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4195
|
+
@index = cached.interval.end
|
4196
|
+
end
|
4197
|
+
return cached
|
4198
|
+
end
|
4199
|
+
|
4200
|
+
if has_terminal?("[]", false, index)
|
4201
|
+
r1 = instantiate_node(SyntaxNode,input, index...(index + 2))
|
4202
|
+
@index += 2
|
4203
|
+
else
|
4204
|
+
terminal_parse_failure("[]")
|
4205
|
+
r1 = nil
|
4206
|
+
end
|
4207
|
+
if r1
|
4208
|
+
r0 = r1
|
4209
|
+
else
|
4210
|
+
r0 = instantiate_node(SyntaxNode,input, index...index)
|
4211
|
+
end
|
4212
|
+
|
4213
|
+
node_cache[:OptionalArray][start_index] = r0
|
4214
|
+
|
4215
|
+
r0
|
4216
|
+
end
|
4217
|
+
|
3878
4218
|
module NonSpace0
|
3879
4219
|
end
|
3880
4220
|
|
@@ -3882,7 +4222,10 @@ module WebIDL
|
|
3882
4222
|
start_index = index
|
3883
4223
|
if node_cache[:NonSpace].has_key?(index)
|
3884
4224
|
cached = node_cache[:NonSpace][index]
|
3885
|
-
|
4225
|
+
if cached
|
4226
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4227
|
+
@index = cached.interval.end
|
4228
|
+
end
|
3886
4229
|
return cached
|
3887
4230
|
end
|
3888
4231
|
|
@@ -3929,7 +4272,10 @@ module WebIDL
|
|
3929
4272
|
start_index = index
|
3930
4273
|
if node_cache[:ReturnType].has_key?(index)
|
3931
4274
|
cached = node_cache[:ReturnType][index]
|
3932
|
-
|
4275
|
+
if cached
|
4276
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4277
|
+
@index = cached.interval.end
|
4278
|
+
end
|
3933
4279
|
return cached
|
3934
4280
|
end
|
3935
4281
|
|
@@ -3976,7 +4322,10 @@ module WebIDL
|
|
3976
4322
|
start_index = index
|
3977
4323
|
if node_cache[:ScopedNameList].has_key?(index)
|
3978
4324
|
cached = node_cache[:ScopedNameList][index]
|
3979
|
-
|
4325
|
+
if cached
|
4326
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4327
|
+
@index = cached.interval.end
|
4328
|
+
end
|
3980
4329
|
return cached
|
3981
4330
|
end
|
3982
4331
|
|
@@ -4022,7 +4371,10 @@ module WebIDL
|
|
4022
4371
|
start_index = index
|
4023
4372
|
if node_cache[:ScopedNames].has_key?(index)
|
4024
4373
|
cached = node_cache[:ScopedNames][index]
|
4025
|
-
|
4374
|
+
if cached
|
4375
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4376
|
+
@index = cached.interval.end
|
4377
|
+
end
|
4026
4378
|
return cached
|
4027
4379
|
end
|
4028
4380
|
|
@@ -4069,7 +4421,10 @@ module WebIDL
|
|
4069
4421
|
start_index = index
|
4070
4422
|
if node_cache[:ScopedName].has_key?(index)
|
4071
4423
|
cached = node_cache[:ScopedName][index]
|
4072
|
-
|
4424
|
+
if cached
|
4425
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4426
|
+
@index = cached.interval.end
|
4427
|
+
end
|
4073
4428
|
return cached
|
4074
4429
|
end
|
4075
4430
|
|
@@ -4106,7 +4461,10 @@ module WebIDL
|
|
4106
4461
|
start_index = index
|
4107
4462
|
if node_cache[:AbsoluteScopedName].has_key?(index)
|
4108
4463
|
cached = node_cache[:AbsoluteScopedName][index]
|
4109
|
-
|
4464
|
+
if cached
|
4465
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4466
|
+
@index = cached.interval.end
|
4467
|
+
end
|
4110
4468
|
return cached
|
4111
4469
|
end
|
4112
4470
|
|
@@ -4154,7 +4512,10 @@ module WebIDL
|
|
4154
4512
|
start_index = index
|
4155
4513
|
if node_cache[:RelativeScopedName].has_key?(index)
|
4156
4514
|
cached = node_cache[:RelativeScopedName][index]
|
4157
|
-
|
4515
|
+
if cached
|
4516
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4517
|
+
@index = cached.interval.end
|
4518
|
+
end
|
4158
4519
|
return cached
|
4159
4520
|
end
|
4160
4521
|
|
@@ -4196,7 +4557,10 @@ module WebIDL
|
|
4196
4557
|
start_index = index
|
4197
4558
|
if node_cache[:ScopedNameParts].has_key?(index)
|
4198
4559
|
cached = node_cache[:ScopedNameParts][index]
|
4199
|
-
|
4560
|
+
if cached
|
4561
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4562
|
+
@index = cached.interval.end
|
4563
|
+
end
|
4200
4564
|
return cached
|
4201
4565
|
end
|
4202
4566
|
|
@@ -4256,7 +4620,10 @@ module WebIDL
|
|
4256
4620
|
start_index = index
|
4257
4621
|
if node_cache[:integer].has_key?(index)
|
4258
4622
|
cached = node_cache[:integer][index]
|
4259
|
-
|
4623
|
+
if cached
|
4624
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4625
|
+
@index = cached.interval.end
|
4626
|
+
end
|
4260
4627
|
return cached
|
4261
4628
|
end
|
4262
4629
|
|
@@ -4433,7 +4800,10 @@ module WebIDL
|
|
4433
4800
|
start_index = index
|
4434
4801
|
if node_cache[:float].has_key?(index)
|
4435
4802
|
cached = node_cache[:float][index]
|
4436
|
-
|
4803
|
+
if cached
|
4804
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
4805
|
+
@index = cached.interval.end
|
4806
|
+
end
|
4437
4807
|
return cached
|
4438
4808
|
end
|
4439
4809
|
|
@@ -4751,7 +5121,10 @@ module WebIDL
|
|
4751
5121
|
start_index = index
|
4752
5122
|
if node_cache[:identifier].has_key?(index)
|
4753
5123
|
cached = node_cache[:identifier][index]
|
4754
|
-
|
5124
|
+
if cached
|
5125
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
5126
|
+
@index = cached.interval.end
|
5127
|
+
end
|
4755
5128
|
return cached
|
4756
5129
|
end
|
4757
5130
|
|
@@ -4802,7 +5175,10 @@ module WebIDL
|
|
4802
5175
|
start_index = index
|
4803
5176
|
if node_cache[:string].has_key?(index)
|
4804
5177
|
cached = node_cache[:string][index]
|
4805
|
-
|
5178
|
+
if cached
|
5179
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
5180
|
+
@index = cached.interval.end
|
5181
|
+
end
|
4806
5182
|
return cached
|
4807
5183
|
end
|
4808
5184
|
|
@@ -4866,7 +5242,10 @@ module WebIDL
|
|
4866
5242
|
start_index = index
|
4867
5243
|
if node_cache[:ws].has_key?(index)
|
4868
5244
|
cached = node_cache[:ws][index]
|
4869
|
-
|
5245
|
+
if cached
|
5246
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
5247
|
+
@index = cached.interval.end
|
5248
|
+
end
|
4870
5249
|
return cached
|
4871
5250
|
end
|
4872
5251
|
|
@@ -4997,7 +5376,10 @@ module WebIDL
|
|
4997
5376
|
start_index = index
|
4998
5377
|
if node_cache[:other].has_key?(index)
|
4999
5378
|
cached = node_cache[:other][index]
|
5000
|
-
|
5379
|
+
if cached
|
5380
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
5381
|
+
@index = cached.interval.end
|
5382
|
+
end
|
5001
5383
|
return cached
|
5002
5384
|
end
|
5003
5385
|
|
@@ -5023,7 +5405,10 @@ module WebIDL
|
|
5023
5405
|
start_index = index
|
5024
5406
|
if node_cache[:line_comment].has_key?(index)
|
5025
5407
|
cached = node_cache[:line_comment][index]
|
5026
|
-
|
5408
|
+
if cached
|
5409
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
5410
|
+
@index = cached.interval.end
|
5411
|
+
end
|
5027
5412
|
return cached
|
5028
5413
|
end
|
5029
5414
|
|
@@ -5103,7 +5488,10 @@ module WebIDL
|
|
5103
5488
|
start_index = index
|
5104
5489
|
if node_cache[:block_comment].has_key?(index)
|
5105
5490
|
cached = node_cache[:block_comment][index]
|
5106
|
-
|
5491
|
+
if cached
|
5492
|
+
cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
5493
|
+
@index = cached.interval.end
|
5494
|
+
end
|
5107
5495
|
return cached
|
5108
5496
|
end
|
5109
5497
|
|