plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


plum-tooling/tree-sitter-plum/test/corpus/test.txt
a271f34 1
================================================================================
a271f34 2
test
a271f34 3
================================================================================
a271f34 4
a271f34 5
test "add works"
a9a0147 6
  assert add(1, 2) == 3
a271f34 7
  assert true
a271f34 8
a271f34 9
--------------------------------------------------------------------------------
a271f34 10
a271f34 11
(source
a271f34 12
  (test
a271f34 13
    (string
a271f34 14
      (string_start)
a271f34 15
      (string_content)
a271f34 16
      (string_end))
a271f34 17
    (body
a9a0147 18
      (assert
a271f34 19
        (expression
a271f34 20
          (comparison_operator
a271f34 21
            (primary_expression
a271f34 22
              (fn_call
a271f34 23
                (var_identifier)
a271f34 24
                (fn_argument_list
a271f34 25
                  (expression
a271f34 26
                    (primary_expression
a271f34 27
                      (integer)))
a271f34 28
                  (expression
a271f34 29
                    (primary_expression
a271f34 30
                      (integer))))))
a271f34 31
            (primary_expression
a271f34 32
              (integer)))))
a271f34 33
      (assert
a271f34 34
        (expression
a271f34 35
          (primary_expression
a271f34 36
            (var_identifier)))))))