module Campaign is
; <- keyword
;      ^ module.definition
;               ^ keyword

  @skos:prefLabel = "Example"
  ; <- property
  ;^ property
  ;               ^ operator
  ;                 ^ string

  entity Campaign is
  ; <- keyword
  ;      ^ type.definition
  ;               ^ keyword

    identity a -> CampaignId
    ; <- keyword
    ;        ^ variable.field
    ;          ^ operator
    ;             ^ type

    b -> string is
    ; <- variable.field
    ; ^ operator
    ;    ^ type.builtin
    ;               ^ keyword

      assert not_null = "self is not null"
      ; <- keyword
      ;      ^ property
      ;               ^ operator
      ;                 ^ embedded

    end
    ; <- keyword

    c -> Target is
    ; <- variable.field
    ; ^ operator
    ;    ^ type
    ;           ^ keyword

      assert tagged_with_foo is
      ; <- keyword
      ;      ^ property
      ;                      ^ keyword

        contains(self.tags "foo")
        ; <- function.call
        ;       ^ punctuation.bracket
        ;        ^ variable.builtin
        ;            ^ operator
        ;             ^ function.call
        ;                   ^ string
        ;                       ^ punctuation.bracket
      end
      ; <- keyword

    end
    ; <- keyword

    d -> Target is
    ; <- variable.field
    ; ^ operator
    ;    ^ type
    ;           ^ keyword

      assert tagged_with_foo_path is
      ; <- keyword
      ;      ^ property
      ;                           ^ keyword

        with
        ; <- keyword

          def foo -> string := "foo"
          ; <- keyword
          ;   ^ function.definition
          ;       ^ operator
          ;          ^ type.builtin
          ;                 ^ operator
          ;                     ^ string

        for
        ; <- keyword

          self.tags∘contains(foo)
          ; <- variable.builtin
          ;   ^ operator
          ;    ^ function.call
          ;        ^ operator
          ;         ^ function.call
          ;                 ^ punctuation.bracket
          ;                  ^ variable
          ;                     ^ punctuation.bracket

        end
        ; <- keyword

      end
      ; <- keyword

    end
    ; <- keyword

    e -> Target is
    ; <- variable.field
    ; ^ operator
    ;    ^ type
    ;           ^ keyword

      assert tagged_with_foo_builder is
      ; <- keyword
      ;      ^ property
      ;                              ^ keyword

          ¬is_empty(
          ; <- operator
          ; ^ function.call
          ;        ^ punctuation.bracket

            {t | forall t in self.tags, t = "foo"}
            ; <- punctuation.bracket
            ;^ variable
            ;  ^ punctuation.separator
            ;    ^ operator
            ;           ^ variable
            ;             ^ operator
            ;                ^ variable.builtin
            ;                    ^ operator
            ;                     ^ function.call
            ;                             ^ operator
            ;                               ^ string
            ;                                    ^ punctuation.bracket
          )
        ; ^ punctuation.bracket
      end
      ; <- keyword
    end
    ; <- keyword

    f -> Target is
    ; <- variable.field
    ; ^ operator
    ;    ^ type
    ;           ^ keyword

      assert tagged_with_parent_tags is
      ; <- keyword
      ;      ^ property
      ;                              ^ keyword

          ∃ tag ∈ self.container.tags,
          ;<- operator
          ; ^ variable
          ;     ^ operator
          ;       ^ variable.builtin
          ;           ^ operator
          ;             ^ function.call
          ;                     ^ operator
          ;                       ^ function.call
          ;                          ^ punctuation.separator

            self.tags.contains(tag)
            ; <- variable.builtin
            ;   ^ operator
            ;    ^ function.call
            ;        ^ operator
            ;         ^ function.call
            ;                 ^ punctuation.bracket
            ;                     ^ punctuation.bracket

      end
      ; <- keyword

    end
    ; <- keyword

  end
  ; <- keyword

end
; <- keyword
