term_structures.go 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package node
  2. func (impl Array) Term() {}
  3. type Array struct {
  4. Node `part:"array"`
  5. Items [] Expr `list_more:"exprlist" item:"expr"`
  6. }
  7. func (impl Tuple) Term() {}
  8. type Tuple struct {
  9. Node `part:"tuple"`
  10. Elements [] Expr `list_more:"exprlist" item:"expr"`
  11. }
  12. func (impl Bundle) Term() {}
  13. type Bundle struct {
  14. Node `part:"bundle"`
  15. Update MaybeUpdate `part_opt:"update"`
  16. Values [] FieldValue `list_more:"pairlist" item:"pair"`
  17. }
  18. type FieldValue struct {
  19. Node `part:"pair"`
  20. Key Identifier `part:"name"`
  21. Value MaybeExpr `part_opt:"expr"`
  22. }
  23. type MaybeUpdate interface { MaybeUpdate() }
  24. func (impl Update) MaybeUpdate() {}
  25. type Update struct {
  26. Node `part:"update"`
  27. Base Expr `part:"expr"`
  28. }
  29. func (impl Get) Term() {}
  30. type Get struct {
  31. Node `part:"get"`
  32. Base Expr `part:"expr"`
  33. Path [] Member `list_more:"" item:"member"`
  34. }
  35. type Member struct {
  36. Node `part:"member"`
  37. Name Identifier `part:"name"`
  38. }