Commit 37c1a76b authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add RETURNS statement to procedure declarations

parent 98a8438a
......@@ -585,8 +585,8 @@ package {process_name} is'''.format(process_name=process_name,
if params:
params_spec = "({})".format("; ".join(params))
ri_header += params_spec
ads_template.append(
u'-- Sync required interface "' + proc.inputString)
ads_template.append(u'-- Sync required interface "{}"'
.format(proc.inputString))
if simu:
# As for async TM, generate a callback mechanism
ads_template.append(u"type {}_T is access procedure{};"
......
......@@ -2,7 +2,7 @@
 
# Resource object code
#
# Created: Sun Nov 22 17:13:10 2015
# Created: Wed Dec 2 15:36:15 2015
# by: The Resource Compiler for PySide (Qt v4.8.6)
#
# WARNING! All changes made in this file will be lost!
This diff is collapsed.
This diff is collapsed.
......@@ -97,6 +97,7 @@ tokens {
RANGE;
RESET;
RETURN;
RETURNS;
ROUTE;
SAVE;
SELECTOR;
......@@ -280,13 +281,21 @@ procedure
: cif?
PROCEDURE procedure_id e1=end
fpar?
res=procedure_result?
(text_area | procedure)*
((processBody? ENDPROCEDURE procedure_id?) | EXTERNAL)
e2=end
-> ^(PROCEDURE cif? procedure_id $e1? $e2? fpar?
-> ^(PROCEDURE cif? procedure_id $e1? $e2? fpar? $res?
text_area* procedure* processBody? EXTERNAL?)
;
// Procedure result / optional return type
procedure_result
: ('->' | RETURNS)
variable_id?
sort
-> ^(RETURNS variable_id? sort)
;
// Procedure formal parameters
fpar
......@@ -1431,6 +1440,7 @@ GEODE : G E O D E;
HYPERLINK : H Y P E R L I N K;
ENDTEXT : E N D T E X T;
RETURN : R E T U R N;
RETURNS : R E T U R N S;
TIMER : T I M E R;
PROCESS : P R O C E S S;
ENDPROCESS : E N D P R O C E S S;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment