@@ -180,34 +180,31 @@ interface LiteralExpression {
180180 type: " expression" ;
181181 arg: Literal ;
182182 annotation? : FunctionAnnotation | UnsupportedAnnotation ;
183- attributes: Attribute [] ;
183+ attributes: Attributes ;
184184}
185185
186186interface VariableExpression {
187187 type: " expression" ;
188188 arg: VariableRef ;
189189 annotation? : FunctionAnnotation | UnsupportedAnnotation ;
190- attributes: Attribute [] ;
190+ attributes: Attributes ;
191191}
192192
193193interface FunctionExpression {
194194 type: " expression" ;
195195 arg? : never ;
196196 annotation: FunctionAnnotation ;
197- attributes: Attribute [] ;
197+ attributes: Attributes ;
198198}
199199
200200interface UnsupportedExpression {
201201 type: " expression" ;
202202 arg? : never ;
203203 annotation: UnsupportedAnnotation ;
204- attributes: Attribute [] ;
204+ attributes: Attributes ;
205205}
206206
207- interface Attribute {
208- name: string ;
209- value? : Literal | VariableRef ;
210- }
207+ type Attributes = Map <string , Literal | VariableRef | true >;
211208```
212209
213210## Expressions
@@ -237,19 +234,17 @@ interface VariableRef {
237234A ` FunctionAnnotation ` represents a _ function_ _ annotation_ .
238235The ` name ` does not include the ` : ` starting sigil.
239236
240- Each _ option_ is represented by an ` Option ` .
237+ ` Options ` is a key-value mapping containing options,
238+ and is used to represent the _ annotation_ and _ markup_ _ options_ .
241239
242240``` ts
243241interface FunctionAnnotation {
244242 type: " function" ;
245243 name: string ;
246- options: Option [] ;
244+ options: Options ;
247245}
248246
249- interface Option {
250- name: string ;
251- value: Literal | VariableRef ;
252- }
247+ type Options = Map <string , Literal | VariableRef >;
253248```
254249
255250An ` UnsupportedAnnotation ` represents a
@@ -276,15 +271,15 @@ A `Markup` object has a `kind` of either `"open"`, `"standalone"`, or `"close"`,
276271each corresponding to _ open_ , _ standalone_ , and _ close_ _ markup_ .
277272The ` name ` in these does not include the starting sigils ` # ` and ` / `
278273or the ending sigil ` / ` .
279- The optional ` options ` for markup use the same ` Option ` as ` FunctionAnnotation ` .
274+ The ` options ` for markup use the same key-value mapping as ` FunctionAnnotation ` .
280275
281276``` ts
282277interface Markup {
283278 type: " markup" ;
284279 kind: " open" | " standalone" | " close" ;
285280 name: string ;
286- options: Option [] ;
287- attributes: Attribute [] ;
281+ options: Options ;
282+ attributes: Attributes ;
288283}
289284```
290285
0 commit comments