========================================================================
Simple boolean property
========================================================================
table 50100 MyTable
{
    Editable = false;
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (boolean))))

========================================================================
Simple identifier property
========================================================================
page 50100 MyPage
{
    PageType = Card;
}
------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (identifier))))

========================================================================
Simple string property
========================================================================
page 50100 MyPage
{
    Description = 'My page description';
}
------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (string_literal))))

========================================================================
Simple integer property
========================================================================
table 50100 MyTable
{
    DataPerCompany = true;
    MaximumLength = 100;
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (boolean))
    (property
      (property_name)
      (integer))))

========================================================================
Simple quoted identifier property
========================================================================
page 50100 MyPage
{
    SourceTable = "Sales Header";
}
------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (quoted_identifier))))

========================================================================
Decimal property
========================================================================
page 50100 MyPage
{
    Width = 10.5;
}
------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (decimal))))

========================================================================
Caption with Locked and Comment
========================================================================
table 50100 MyTable
{
    Caption = 'My Caption', Locked = true, Comment = 'For translators';
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (caption_value
        (string_literal)
        (property_name)
        (boolean)
        (property_name)
        (string_literal)))))

========================================================================
Caption with MaxLength
========================================================================
table 50100 MyTable
{
    Caption = 'Short', MaxLength = 50;
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (caption_value
        (string_literal)
        (property_name)
        (integer)))))

========================================================================
ML property (CaptionML)
========================================================================
table 50100 MyTable
{
    CaptionML = ENU='English', DEU='German', FRA='French';
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (ml_value_list
        (ml_value_pair
          (identifier)
          (string_literal))
        (ml_value_pair
          (identifier)
          (string_literal))
        (ml_value_pair
          (identifier)
          (string_literal))))))

========================================================================
CalcFormula with sum
========================================================================
table 50100 MyTable
{
    CalcFormula = sum("Ledger Entry".Amount where("No." = field("No.")));
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (aggregate_formula
        (aggregate_function)
        (calc_field_reference
          (quoted_identifier)
          (identifier))
        (where_clause
          (where_conditions
            (where_condition
              (quoted_identifier)
              (quoted_identifier))))))))

========================================================================
CalcFormula with lookup
========================================================================
table 50100 MyTable
{
    CalcFormula = lookup("Customer"."Name" where("No." = field("Customer No.")));
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (lookup_formula
        (calc_field_reference
          (quoted_identifier)
          (quoted_identifier))
        (where_clause
          (where_conditions
            (where_condition
              (quoted_identifier)
              (quoted_identifier))))))))

========================================================================
CalcFormula with count
========================================================================
table 50100 MyTable
{
    CalcFormula = count("Ledger Entry" where("No." = field("No.")));
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (aggregate_formula
        (aggregate_function)
        (calc_field_reference
          (quoted_identifier))
        (where_clause
          (where_conditions
            (where_condition
              (quoted_identifier)
              (quoted_identifier))))))))

========================================================================
TableRelation simple
========================================================================
table 50100 MyTable
{
    TableRelation = Customer;
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (identifier))))

========================================================================
TableRelation with where clause
========================================================================
table 50100 MyTable
{
    TableRelation = Customer where("No." = field("Customer No."));
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (table_relation_value
        (table_relation_expression
          (simple_table_relation
            (identifier)
            (where_clause
              (where_conditions
                (where_condition
                  (quoted_identifier)
                  (quoted_identifier))))))))))

========================================================================
TableRelation with if/else
========================================================================
table 50100 MyTable
{
    TableRelation = if("Type" = const(Item)) Item else Resource;
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (table_relation_value
        (table_relation_expression
          (if_table_relation
            (where_conditions
              (where_condition
                (quoted_identifier)
                (identifier)))
            (simple_table_relation
              (identifier))
            (table_relation_expression
              (simple_table_relation
                (identifier)))))))))

========================================================================
Permissions property
========================================================================
codeunit 50100 MyCodeunit
{
    Permissions = tabledata Customer = R, tabledata "Sales Header" = RIMD;
}
------------------------------------------------------------------------

(source_file
  (codeunit_declaration
    (codeunit_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (tabledata_permission_list
        (tabledata_permission
          (identifier)
          (permission_type))
        (tabledata_permission
          (quoted_identifier)
          (permission_type))))))

========================================================================
OrderBy property
========================================================================
query 50100 MyQuery
{
    OrderBy = ascending("No.", Name);
}
------------------------------------------------------------------------

(source_file
  (query_declaration
    (query_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (order_by_list
        (order_by_item
          (quoted_identifier)
          (identifier))))))

========================================================================
Implementation property
========================================================================
codeunit 50100 MyCodeunit implements MyInterface
{
    Implementation = MyInterface = MyCodeunit;
}
------------------------------------------------------------------------

(source_file
  (codeunit_declaration
    (codeunit_keyword)
    (integer)
    (identifier)
    (implements_clause
      (implements_keyword)
      (identifier))
    (property
      (property_name)
      (property_expression
        (comparison_expression
          (identifier)
          (comparison_operator)
          (identifier))))))

========================================================================
Multiple properties in one object
========================================================================
table 50100 MyTable
{
    DataPerCompany = true;
    Editable = false;
    Caption = 'My Table', Locked = true;
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (boolean))
    (property
      (property_name)
      (boolean))
    (property
      (property_name)
      (caption_value
        (string_literal)
        (property_name)
        (boolean)))))

========================================================================
CalcFormula with const in where
========================================================================
table 50100 MyTable
{
    CalcFormula = sum("Entry".Amount where(Type = const(Sale)));
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (aggregate_formula
        (aggregate_function)
        (calc_field_reference
          (quoted_identifier)
          (identifier))
        (where_clause
          (where_conditions
            (where_condition
              (identifier)
              (identifier))))))))

========================================================================
Property value list (ApplicationArea)
========================================================================
page 50100 MyPage
{
    ApplicationArea = All;
}
------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (identifier))))

========================================================================
OptionMembers property
========================================================================
table 50100 MyTable
{
    OptionMembers = Option1, Option2, 'Option 3';
}
------------------------------------------------------------------------

(source_file
  (table_declaration
    (table_keyword)
    (integer)
    (identifier)
    (property
      (property_name)
      (option_member_list
        (option_member
          (identifier))
        (option_member
          (identifier))
        (option_member
          (string_literal))))))
