Files
Paradise/code/modules/scripting/AST/Blocks.dm
Tigercat2000 c244a0fe15 Telecomms Refactor & CodeMirror
This commit does the following:
 - A lot of shit I am really too tired to fucking write about
 - Absolute pathed telecomms scripting
 - Browser Datum traffic control
  - Absolutely lovely replacement for the fucking skin TCS window, using
    codemirror
 - CodeMirror integration for nanoUI
  - Sorta, I didn't work on this as much as I wanted to, because IT TOOK
    11 FUCKING HOURS TO GET THE BROWSER DATUM TO WORK
2015-10-28 17:23:22 -07:00

45 lines
1.3 KiB
Plaintext

/*
File: Block Types
*/
/*
Class: BlockDefinition
An object representing a set of actions to perform independently from the rest of the script. Blocks are basically just
lists of statements to execute which also contain some local variables and methods. Note that since functions are local to a block,
it is possible to have a function definition inside of any type of block (such as in an if statement or another function),
and not just in the global scope as in many languages.
*/
/datum/node/BlockDefinition
var/list/statements = new
var/list/functions = new
var/list/initial_variables = new
/*
Proc: SetVar
Defines a permanent variable. The variable will not be deleted when it goes out of scope.
Notes:
Since all pre-existing temporary variables are deleted, it is not generally desirable to use this proc after the interpreter has been instantiated.
Instead, use <n_Interpreter.SetVar()>.
See Also:
- <n_Interpreter.SetVar()>
*/
/datum/node/BlockDefinition/proc/SetVar(name, value)
initial_variables[name] = value
/*
Class: GlobalBlock
A block object representing the global scope.
*/
//
/datum/node/BlockDefinition/GlobalBlock/New()
initial_variables["null"] = null
return ..()
/*
Class: FunctionBlock
A block representing a function body.
*/
//
/datum/node/BlockDefinition/FunctionBlock