Report abuse
Syntax for Harbour
==================
Constants
---------
Concrete:
42
Abstract:
(constant 42)
Variable usages
---------------
Concrete:
moo
Abstract:
(variable moo)
Variable declaration
--------------------
Concrete:
var moo
Abstract:
(defvar moo)
Assignments
-----------
Concrete:
moo = 42
Abstract:
(assign moo
(constant 42))
Function calls
--------------
Concrete:
meh(42)
Abstract:
(call meh
(constant 42))
Sequences
---------
Concrete:
42
43
44
Abstract:
(seq
(constant 42)
(constant 42)
(constant 42))
Returns
-------
Concrete:
return 42
Abstract:
(return
(constant 42))
Function definitions
--------------------
TODO add support for arguments
Concrete:
fun moo
foo
bar
return 42
end
Abstract:
(deffun moo
(seq
(variable foo)
(variable bar)
(return
(constant 42))))
Conditionals
------------
TODO write me
Loops
-----
TODO write me
Example
-------
fun other_function
return 19
end
fun main
var i
i = 4
other_function()
return 42
end