All JZoneGamer games are written in a built-in scripting language called Treescript. Treescript is a powerful object-oriented language which is designed with beginner programmers in mind. Pressing the question mark (?) key when in the code editor brings up a popup menu of choices valid in the context of the text cursor position. Optional Structure-Editor mode eases code entry for naïve users. The default operator/operand mode is prefix (operators come before their operands) as opposed to optional infix (binary operators come in between their operands). Treescript is based on Java, and when infix mode is selected, Treescript code strongly resembles Java, with a touch of Object Pascal thrown in for good measure.
Language Features
· Syntax: Treescript is a subset of Java, although the syntax differs radically from Java, in that all operators are, by default, prefix (like Lisp) rather than infix, and parentheses are used for grouping.
· Semicolons: Statements and declarations are semicolon-delimited.
· Case: Treescript is case-sensitive: the convention for identifiers is all lower case, hyphens being used to separate parts of multi-word identifiers. Class names are an exception: the initial letter is upper case.
· Keyboard Aid: When enabled, this feature allows the user to enter a hyphen followed by a lower case letter by typing an upper case letter (but only when the text cursor is in the middle or at the end of an identifier). Alternatively, the user may enter a hyphen by typing a quote (‘). Also, commas and periods are immediately converted into parentheses if desired (if the period key is used to enter ')', then the ')' key may be used to enter a decimal point). The user may toggle Code Menu mode by typing slash (/) instead of question mark (?). Keyboard Aid is always disabled inside comments and string literals.
· Meta-Programming: Treescript programs are lists, which can act as data for other Treescript programs. Structure editor mode lets newbies create simple event handlers without having to know the syntax of the Treescript programming language.