Yogstation 13 - Modules - TypesDefine Details

yogstation/code/modules/scripting/AST/ast_nodes.dm

OOP_ASSIGNAn abstract syntax tree (AST) is a representation of source code in a computer-friendly format. It is composed of nodes, each of which represents a certain part of the source code. For example, an node represents an if statement in the script's source code. Because it is a representation of the source code in memory, it is independent of any specific scripting language. This allows a script in any language for which a parser exists to be run by the interpreter.
OOP_ORLogical or ||
OOP_ANDLogical and &&
OOP_BITBitwise operations &, |
OOP_EQUALEquality checks ==, !=
OOP_COMPAREGreater than, less than, etc >, <, >=, <=
OOP_ADDAddition and subtraction + -
OOP_MULTIPLYMultiplication and division * / %
OOP_POWExponents ^
OOP_UNARYUnary Operators !
OOP_GROUPParenthesis ()
/datum/nodeNode
/datum/node/expression/value/referenceReference

Define Details

OOP_ADD

Addition and subtraction + -

OOP_AND

Logical and &&

OOP_ASSIGN

An abstract syntax tree (AST) is a representation of source code in a computer-friendly format. It is composed of nodes, each of which represents a certain part of the source code. For example, an node represents an if statement in the script's source code. Because it is a representation of the source code in memory, it is independent of any specific scripting language. This allows a script in any language for which a parser exists to be run by the interpreter.

The AST is produced by an <n_Parser> object. It consists of a with an arbitrary amount of statements. These statements are run in order by an <n_Interpreter> object. A statement may in turn run another block (such as an if statement might if its condition is met).

Articles:

Macros: Operator Precedence The higher the value, the lower the priority in the precedence.

OOP_BIT

Bitwise operations &, |

OOP_COMPARE

Greater than, less than, etc >, <, >=, <=

OOP_EQUAL

Equality checks ==, !=

OOP_GROUP

Parenthesis ()

OOP_MULTIPLY

Multiplication and division * / %

OOP_OR

Logical or ||

OOP_POW

Exponents ^

OOP_UNARY

Unary Operators !