webidl 0.1.8 → 0.1.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f14ae8f706ecedd826e99ad6714b987cb3b15370
4
- data.tar.gz: fc61dac4ccd45fc210cc4bc5d5148a1210c54f40
3
+ metadata.gz: c70923ded9d0a67bde963dcbd83d6bb7b722fff0
4
+ data.tar.gz: 74b5f0816cd714e03427f0b0a613c6a26fd4113b
5
5
  SHA512:
6
- metadata.gz: c57a418abd44297d88c45b029ff010ebea9f94dcae657a04baa52d79262a083ddc529ce317e8849ae84382d86f76188b8b3b416996450c8a90a4578c584f1eb1
7
- data.tar.gz: 94f9fcec25a2b4c314ee0c06db001904fe7ead3111da6a6a45e42517d364836c7982360275633d764a1874f6c25fbc01fa9a0c7cb6b6a1f1e6687a5a5c1aea38
6
+ metadata.gz: a16e4a99ed13e3e6d4d91de2b8828aa64ddbe103fcd571069524c540f4bf50978ef834b3095d539b217309f429e7067da99b9793ecbae54a3ebc9e3daec6ac0a
7
+ data.tar.gz: 365147a478bb983160f9426a66fbc9ad707a91ab66e335c247d50d83f5a4b02b5c724335079d4a24685e4e62b65ac02811ea21f6daabea01e9f0af4f74731a49
@@ -1,7 +1,5 @@
1
1
  rvm:
2
- - 1.9.3
3
- - 2.0.0
4
- - 2.1.0
2
+ - 2.2.5
5
3
  - ruby-head
6
4
  matrix:
7
5
  allow_failures:
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009-2014 Jari Bakken
1
+ Copyright (c) 2009-2015 Jari Bakken
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -42,4 +42,4 @@ Note on Patches/Pull Requests
42
42
  Copyright
43
43
  ---------
44
44
 
45
- Copyright (c) 2009-2014 Jari Bakken. See LICENSE for details.
45
+ Copyright (c) 2009-2015 Jari Bakken. See LICENSE for details.
@@ -74,8 +74,12 @@ module WebIDL
74
74
  (eal:ExtendedAttributeList ws member:DictionaryMember ws members:DictionaryMembers <ParseTree::DictionaryMembers>)?
75
75
  end
76
76
 
77
+ rule Required
78
+ "required"
79
+ end
80
+
77
81
  rule DictionaryMember
78
- type:Type ws name:identifier ws default:Default ws ";" <ParseTree::DictionaryMember>
82
+ required:Required? ws type:Type ws name:identifier ws default:Default ws ";" <ParseTree::DictionaryMember>
79
83
  end
80
84
 
81
85
  rule Default
@@ -442,7 +446,7 @@ module WebIDL
442
446
  end
443
447
 
444
448
  rule PromiseType
445
- "Promise" "<" return_type:ReturnType ">" {
449
+ "Promise" ws "<" ws return_type:ReturnType ws ">" {
446
450
  def build(parent)
447
451
  Ast::PromiseType.new(return_type.text_value)
448
452
  end
@@ -1,3 +1,3 @@
1
1
  module WebIDL
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
@@ -2,6 +2,53 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe WebIDL::Parser::IDLParser do
4
4
 
5
+ #
6
+ # dictionaries
7
+ #
8
+
9
+ it "parses an empty dictionary" do
10
+ str = <<-IDL
11
+ dictionary Foo {};
12
+ IDL
13
+ parse(str).should_not be_nil
14
+ end
15
+
16
+ it "parses dictionary members" do
17
+ str = <<-IDL
18
+ dictionary Foo { DOMString foo; };
19
+ IDL
20
+ parse(str).should_not be_nil
21
+ end
22
+
23
+ it "parses required dictionary members" do
24
+ str = <<-IDL
25
+ dictionary Foo { required DOMString foo; };
26
+ IDL
27
+ parse(str).should_not be_nil
28
+ end
29
+
30
+ #
31
+ # promises
32
+ #
33
+
34
+ it "parses empty promises" do
35
+ str = <<-IDL
36
+ interface Asdf {
37
+ Promise <DOMString> doSomething ();
38
+ };
39
+ IDL
40
+ parse(str).should_not be_nil
41
+ end
42
+
43
+ it "parses promises with ws around return type" do
44
+ str = <<-IDL
45
+ interface Asdf {
46
+ Promise < DOMString > doSomething ();
47
+ };
48
+ IDL
49
+ parse(str).should_not be_nil
50
+ end
51
+
5
52
  #
6
53
  # interfaces
7
54
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webidl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jari Bakken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-24 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: treetop
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  version: '0'
207
207
  requirements: []
208
208
  rubyforge_project: webidl
209
- rubygems_version: 2.2.0
209
+ rubygems_version: 2.4.5
210
210
  signing_key:
211
211
  specification_version: 4
212
212
  summary: Ruby parser for WebIDL
@@ -238,3 +238,4 @@ test_files:
238
238
  - spec/parser_spec.rb
239
239
  - spec/spec.opts
240
240
  - spec/spec_helper.rb
241
+ has_rdoc: