Formatted the code but more importantly formatted strings with single quotes so that Prolog would not abruptly cut strings before the end.
Removed identifier prefix 'id_'. Identifier names are now recognised as strings in Prolog.
Changed the function definition syntax from 'functiontype(ps, b)' to 'functionbody(ps, b)' in accordance with the documentation, improved comments for some functions, and added stubs for the remaining syntaxes to implement.
Implemented 'table access' and 'while loop' syntaxes.
Changed the operator syntax format so they don't get mixed up with predefined Prolog predicates. An example is the statement 'div(a, b)' being replaced with the predicate div/2 which, in turn, results in undefined behavior.
Implemented 'repeat-until' loop syntax.
Implemented numerical for loop syntax.
Implemented the syntax for variable arguments. Also, the function that creates the 'functionbody' syntax was modified to add a workaround to a bug in the AST when variable arguments are declared.
Implemented break statement syntax.
Fixed a bug in convert[If] where bfalse was being created in cases when it shouldn't've been. For example, the code 'if (a < b) then a = 1 end' returned 'if(lt(a, b), [assign(a, 1)], [assign(a, 1)])' (simplified for readability) which is wrong, and should be 'if(lt(a, b), [assign(a, 1)], [])'.
Implemented generic for loop syntax.
Implemented syntax for the colon operator.
Implemented syntax for local function definitions.
Added code to unescape characters.