From e73145ca5a121089ef6ce3360ac289d5a61fb2a5 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Mon, 14 Jul 2025 18:21:38 +0100 Subject: [PATCH 1/3] Introduce three new extended attribute grammars These new grammars will be used by the HTML spec for attribute reflection extended attributes. --- index.bs | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 7e164e55..bf19d015 100644 --- a/index.bs +++ b/index.bs @@ -6802,7 +6802,7 @@ grammar symbol matches nearly any sequence of tokens, however the defined in this document only accept a more restricted syntax. Any extended attribute encountered in an [=IDL fragment=] is -matched against the following five grammar symbols to determine +matched against the following eight grammar symbols to determine which form (or forms) it is in: @@ -6855,6 +6855,39 @@ which form (or forms) it is in: [PutForwards=name] + + + + + + + + + + + + + + +
+ ExtendedAttributeString + + takes a string + + [Reflect="popover"] +
+ ExtendedAttributeNumber + + takes an integer or decimal + + [ReflectDefault=2.0] +
+ ExtendedAttributeIntegerList + + takes an integer list + + [ReflectRange=(2, 600)] +
ExtendedAttributeIdentList @@ -6988,6 +7021,17 @@ five forms are allowed. ε +
+    IntegerList :
+        integer Integers
+
+ +
+    Integers :
+        "," integer Integers
+        ε
+
+
     ExtendedAttributeNoArgs :
         identifier
@@ -7003,6 +7047,17 @@ five forms are allowed.
         identifier "=" identifier
 
+
+    ExtendedAttributeString :
+        identifier "=" string
+
+ +
+    ExtendedAttributeNumber :
+        identifier "=" integer
+        identifier "=" decimal
+
+
     ExtendedAttributeWildcard :
         identifier "=" "*"
@@ -7013,6 +7068,11 @@ five forms are allowed.
         identifier "=" "(" IdentifierList ")"
 
+
+    ExtendedAttributeIntegerList :
+        identifier "=" "(" IntegerList ")"
+
+
     ExtendedAttributeNamedArgList :
         identifier "=" identifier "(" ArgumentList ")"

From 65482e84d5190c4275cc547526412c999f14cf79 Mon Sep 17 00:00:00 2001
From: Luke Warlow 
Date: Tue, 15 Jul 2025 11:13:10 +0100
Subject: [PATCH 2/3] Drop eight

---
 index.bs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.bs b/index.bs
index bf19d015..970ff0e0 100644
--- a/index.bs
+++ b/index.bs
@@ -6802,7 +6802,7 @@ grammar symbol matches nearly any sequence of tokens, however the
 defined in this document only accept a more restricted syntax.
 Any extended attribute encountered in an
 [=IDL fragment=] is
-matched against the following eight grammar symbols to determine
+matched against the following grammar symbols to determine
 which form (or forms) it is in:
 
 

From 191ffa79b768a7946d2fc7fe24e093ca6a0204aa Mon Sep 17 00:00:00 2001
From: Luke Warlow 
Date: Wed, 16 Jul 2025 18:41:39 +0100
Subject: [PATCH 3/3] Spit ExtendedAttributeNumber into
 ExtendedAttributeInteger and ExtendedAttributeDecimal

---
 index.bs | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/index.bs b/index.bs
index 970ff0e0..64c8c152 100644
--- a/index.bs
+++ b/index.bs
@@ -6868,10 +6868,21 @@ which form (or forms) it is in:
     
     
+        
+    
+    
+        
+        
- ExtendedAttributeNumber + ExtendedAttributeInteger - takes an integer or decimal + takes an integer + + [ReflectDefault=2] +
+ ExtendedAttributeDecimal + + takes a decimal [ReflectDefault=2.0] @@ -7052,9 +7063,13 @@ five forms are allowed. identifier "=" string -
-    ExtendedAttributeNumber :
+
+    ExtendedAttributeInteger :
         identifier "=" integer
+
+ +
+    ExtendedAttributeDecimal :
         identifier "=" decimal