==================
Concept declaration
==================

concept BakedGood

---

(source_file
  (declaration
    (concept_declaration
      name: (identifier))))

==================
Sub-concept enum declaration
==================

sub_concept BakedGood.Category {
    Bread,
    Pastry,
    Cake
}

---

(source_file
  (declaration
    (sub_concept
      parent: (identifier)
      name: (identifier)
      body: (sub_concept_enum_body
        (identifier)
        (identifier)
        (identifier)))))

==================
Sub-concept record declaration with values
==================

sub_concept BakedGood.Quality {
    freshness: 1.0,
    taste: 0.8
}

---

(source_file
  (declaration
    (sub_concept
      parent: (identifier)
      name: (identifier)
      body: (sub_concept_record_body
        (sub_concept_field
          name: (identifier)
          value: (float))
        (sub_concept_field
          name: (identifier)
          value: (float))))))

==================
Definition
==================

definition SkillLevel {
    Apprentice: { freshness: any },
    Master: { freshness: Tier is Master }
}

---

(source_file
  (declaration
    (definition
      name: (identifier)
      (variant_pattern
        name: (identifier)
        (field_condition
          name: (identifier)
          condition: (any_type)))
      (variant_pattern
        name: (identifier)
        (field_condition
          name: (identifier)
          condition: (is_condition
            (is_value
              field: (identifier)
              value: (identifier))))))))

==================
Species declaration
==================

species Human {
    age: 25
    energy: 0.75
}

---

(source_file
  (declaration
    (species_declaration
      name: (identifier)
      body: (species_body
        (species_field
          name: (identifier)
          value: (integer))
        (species_field
          name: (identifier)
          value: (float))))))

==================
Template with species base
==================

template Person: Human {
    name: "Unknown"
}

---

(source_file
  (declaration
    (template_declaration
      name: (identifier)
      species: (identifier)
      body: (template_body
        (field
          name: (dotted_path
            (identifier))
          value: (value
            (string)))))))
