/datum/stack replaces /stack, naming scheme redo for procs and linked_element --> linked_node

This commit is contained in:
Remie Richards
2015-08-28 16:52:22 +01:00
parent c39957caa5
commit 5661d05290
8 changed files with 118 additions and 127 deletions
+1 -1
View File
@@ -81,7 +81,7 @@
A basic description as to what went wrong.
*/
message
stack/stack
datum/stack/stack
proc
/*
@@ -21,7 +21,7 @@
node
BlockDefinition/program
statement/FunctionDefinition/curFunction
stack
datum/stack
scopes = new()
functions = new()
+3 -3
View File
@@ -56,7 +56,7 @@
var
token/accessor/A=T
node/expression/value/variable/E//=new(A.member)
stack/S=new()
datum/stack/S = new()
while(istype(A.object, /token/accessor))
S.Push(A)
A=A.object
@@ -130,7 +130,7 @@
Takes the operator on top of the opr stack and assigns its operand(s). Then this proc pushes the value of that operation to the top
of the val stack.
*/
Reduce(stack/opr, stack/val)
Reduce(datum/stack/opr, datum/stack/val)
var/node/expression/operator/O=opr.Pop()
if(!O) return
if(!istype(O))
@@ -181,7 +181,7 @@
- <ParseParamExpression()>
*/
ParseExpression(list/end=list(/token/end), list/ErrChars=list("{", "}"), check_functions = 0)
var/stack
var/datum/stack
opr=new
val=new
src.expecting=VALUE
+1 -1
View File
@@ -37,7 +37,7 @@
The token at <index> in <tokens>.
*/
curToken
stack
datum/stack
blocks=new
node/BlockDefinition
GlobalBlock/global_block=new
-23
View File
@@ -1,23 +0,0 @@
/stack
var/list
contents=new
proc
Push(value)
contents+=value
Pop()
if(!contents.len) return null
. = contents[contents.len]
contents.len--
Top() //returns the item on the top of the stack without removing it
if(!contents.len) return null
return contents[contents.len]
Copy()
var/stack/S=new()
S.contents=src.contents.Copy()
return S
Clear()
contents.Cut()