lib/webidl/parser/idl.treetop in webidl-0.2.1 vs lib/webidl/parser/idl.treetop in webidl-0.2.2

- old
+ new

@@ -15,10 +15,11 @@ / Partial / Dictionary / Exception / Enum / TypeDef + / IncludesStatement / ImplementsStatement end rule CallbackOrInterface "callback" ws obj:CallbackRestOrInterface { def build(parent) obj.build(parent) end } @@ -27,11 +28,11 @@ rule CallbackRestOrInterface CallbackRest / Interface end rule Interface - "interface" ws name:identifier ws inherits:Inheritance ws "{" ws members:InterfaceMembers ws "}" ws ";" <ParseTree::Interface> + "interface" ws (mixin:"mixin" ws)? name:identifier ws inherits:Inheritance ws "{" ws members:InterfaceMembers ws "}" ws ";" <ParseTree::Interface> end rule Partial "partial" ws defn:PartialDefinition { def build(parent) defn.build(parent) end } end @@ -109,10 +110,14 @@ rule ImplementsStatement implementor:ScopedName ws "implements" ws implementee:ScopedName ws ";" <ParseTree::ImplementsStatement> end + rule IncludesStatement + includer:ScopedName ws "includes" ws includee:ScopedName ws ";" <ParseTree::IncludesStatement> + end + rule Const "const" ws type:Type ws name:identifier ws "=" ws const_expr:ConstValue ws ";" <ParseTree::Const> end rule ConstValue @@ -253,10 +258,11 @@ / "dictionary" / "enum" / "exception" / "getter" / "implements" + / "includes" / "inherit" / "interface" / "legacycaller" / "partial" / "setter" @@ -385,9 +391,10 @@ / "exception" / "float" / "getraises" / "getter" / "implements" + / "includes" / "in" / "interface" / "long" / "module" / "octet"