Added support for calling procs via SQDL.

Moved the verb category to "Debug".
Added the verb to the "Debug verbs" button.
This commit is contained in:
Giacomand
2014-01-18 18:59:02 +00:00
parent 1aa4cf3648
commit b9011097a4
3 changed files with 45 additions and 18 deletions
@@ -216,10 +216,12 @@
//call_query: 'CALL' call_function ['ON' select_list [('FROM' | 'IN') from_list] ['WHERE' bool_expression]]
call_query(i, list/node)
var/list/func = list()
i = call_function(i + 1, func)
var/list/arguments = list()
i = call_function(i + 1, func, arguments)
node += "call"
node["call"] = func
node["args"] = arguments
if(tokenl(i) != "on")
return i
@@ -404,11 +406,22 @@
//call_function: <function name> ['(' [arguments] ')']
call_function(i, list/node)
parse_error("Sorry, function calls aren't available yet")
return i
call_function(i, list/node, list/arguments)
if(length(tokenl(i)))
node += token(i++)
if(token(i) != "(")
parse_error("Expected ( but found '[token(i)]'")
else if(token(i + 1) != ")")
do
i = expression(i + 1, arguments)
if(token(i) == ",")
continue
while(token(i) && token(i) != ")")
else
i++
else
parse_error("Expected a function but found nothing")
return i + 1
//select_function: count_function