@@ -82,6 +82,7 @@ type Pattern struct {
8282 Contains * Contains `json:"Contains,omitempty"`
8383 Optional * Optional `json:"Optional,omitempty"`
8484 Interleave * Interleave `json:"Interleave,omitempty"`
85+ Extension * Extension `json:"Extension,omitempty"`
8586}
8687
8788func (m * Pattern ) GetEmpty () * Empty {
@@ -215,6 +216,9 @@ func (this *Pattern) GetValue() interface{} {
215216 if this .Interleave != nil {
216217 return this .Interleave
217218 }
219+ if this .Extension != nil {
220+ return this .Extension
221+ }
218222 return nil
219223}
220224
@@ -426,6 +430,32 @@ func (m *Interleave) GetRightPattern() *Pattern {
426430 return nil
427431}
428432
433+ // Extension is the ast node for the Extension pattern.
434+ type Extension struct {
435+ Dollar * Keyword `json:"Dollar,omitempty"`
436+ Name string `json:"Name"`
437+ OpenParen * Keyword `json:"OpenParen,omitempty"`
438+ LeftPattern * Pattern `json:"LeftPattern,omitempty"`
439+ Comma * Keyword `json:"Comma,omitempty"`
440+ RightPattern * Pattern `json:"RightPattern,omitempty"`
441+ ExtraComma * Keyword `json:"ExtraComma,omitempty"`
442+ CloseParen * Keyword `json:"CloseParen,omitempty"`
443+ }
444+
445+ func (m * Extension ) GetLeftPattern () * Pattern {
446+ if m != nil {
447+ return m .LeftPattern
448+ }
449+ return nil
450+ }
451+
452+ func (m * Extension ) GetRightPattern () * Pattern {
453+ if m != nil {
454+ return m .RightPattern
455+ }
456+ return nil
457+ }
458+
429459// Expr is a union of all possible expression types, terminal, list, function and builtin function.
430460type Expr struct {
431461 RightArrow * Keyword `json:"RightArrow,omitempty"`
0 commit comments