17 byval symbol
as zstring ptr, _
18 byval options
as FB_SYMBOPT _
21 dim as zstring ptr id =
any, id_alias =
any
22 dim as FBSYMBOL
ptr l =
any
23 dim as FBSYMBOLTB
ptr symtb =
any
24 dim as FBHASHTB
ptr hashtb =
any
25 dim as integer isglobal =
any
29 if( symbol <> NULL )
then
36 if( (options
and FB_SYMBOPT_DECLARING) <> 0 )
then
38 if( l->lbl.declared )
then
43 l->lbl.declared = TRUE
44 l->lbl.parent = parser.currblock
45 l->lbl.stmtnum = parser.stmt.cnt
46 l->
scope = parser.
scope
55 if( (options
and FB_SYMBOPT_CREATEALIAS) = 0 )
then
67 if( (options
and FB_SYMBOPT_MOVETOGLOB) <> 0 )
then
70 symtb = @symbGetGlobalTb( )
71 hashtb = @symbGetGlobalHashTb( )
75 if( fbIsModLevel( ) )
then
79 if( symbIsGlobalNamespc() = FALSE )
then
83 symtb = @symbGetGlobalTb( )
84 hashtb = @symbGetGlobalHashTb( )
93 symtb = @parser.currproc->proc.symtb
98 l =
symbNewSymbol(
iif( symbol = NULL, FB_SYMBOPT_NONE, FB_SYMBOPT_DOHASH ), _
101 FB_SYMBCLASS_LABEL, _
103 FB_DATATYPE_INVALID, NULL, _
104 iif( isglobal, FB_SYMBATTRIB_NONE, FB_SYMBATTRIB_LOCAL ) )
109 if( (options
and FB_SYMBOPT_DECLARING) <> 0 )
then
112 l->lbl.parent = parser.currblock
113 l->lbl.stmtnum = parser.stmt.cnt
115 l->lbl.declared = TRUE
117 l->lbl.declared = FALSE
127 byval sym
as FBSYMBOL
ptr _
137 byval s
as FBSYMBOL
ptr _
150 byval symtbhead
as FBSYMBOL
ptr _
153 dim as integer count = 0
156 dim as FBSYMBOL
ptr s = symtbhead
158 if (s->
class = FB_SYMBCLASS_LABEL)
then
159 if (s->lbl.declared = FALSE)
then
160 if (symbGetName(s))
then
161 errReportEx(FB_ERRMSG_UNDEFINEDLABEL, *symbGetName(s), -1)