===
Single inline comment
===

$x = 3

# This is a comment

Get-ChildItem .

---

(program
  (statement_list
    (pipeline
      (assignment_expression
        (left_assignment_expression
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (variable)))))))))))
        (assignement_operator)
        (pipeline
          (pipeline_chain
            (logical_expression
              (bitwise_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (integer_literal
                                (decimal_integer_literal)))))))))))))))
    (comment)
    (pipeline
      (pipeline_chain
        (command
          (command_name)
          (command_elements
            (command_argument_sep)
            (generic_token)))))))


===
Single line block comment
===

$x = 3

<# Block comment #>

Get-ChildItem .

---

(program
  (statement_list
    (pipeline
      (assignment_expression
        (left_assignment_expression
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (variable)))))))))))
        (assignement_operator)
        (pipeline
          (pipeline_chain
            (logical_expression
              (bitwise_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (integer_literal
                                (decimal_integer_literal)))))))))))))))
    (comment)
    (pipeline
      (pipeline_chain
        (command
          (command_name)
          (command_elements
            (command_argument_sep)
            (generic_token)))))))

===
Multi-line block comment
===

$x = 3

<#

Here

is a

longer

comment           #>

Get-ChildItem .

---

(program
  (statement_list
    (pipeline
      (assignment_expression
        (left_assignment_expression
          (logical_expression
            (bitwise_expression
              (comparison_expression
                (additive_expression
                  (multiplicative_expression
                    (format_expression
                      (range_expression
                        (array_literal_expression
                          (unary_expression
                            (variable)))))))))))
        (assignement_operator)
        (pipeline
          (pipeline_chain
            (logical_expression
              (bitwise_expression
                (comparison_expression
                  (additive_expression
                    (multiplicative_expression
                      (format_expression
                        (range_expression
                          (array_literal_expression
                            (unary_expression
                              (integer_literal
                                (decimal_integer_literal)))))))))))))))
    (comment)
    (pipeline
      (pipeline_chain
        (command
          (command_name)
          (command_elements
            (command_argument_sep)
            (generic_token)))))))

===
Pathological block comment #1
===

<##>
$a

---

(program
  (comment)
  (statement_list
    (pipeline
      (pipeline_chain
        (logical_expression
          (bitwise_expression
            (comparison_expression
              (additive_expression
                (multiplicative_expression
                  (format_expression
                    (range_expression
                      (array_literal_expression
                        (unary_expression
                          (variable))))))))))))))

===
Pathological block comment #2
===

<###>
$a


---

(program
  (comment)
  (statement_list
    (pipeline
      (pipeline_chain
        (logical_expression
          (bitwise_expression
            (comparison_expression
              (additive_expression
                (multiplicative_expression
                  (format_expression
                    (range_expression
                      (array_literal_expression
                        (unary_expression
                          (variable))))))))))))))
