16 byval tk
as FB_TOKEN, _
17 byval isASM
as integer =
FALSE _
20 dim as integer dtype =
any, op =
any, errmsg =
any
21 dim as ASTNODE
ptr expr =
any
23 dtype = FB_DATATYPE_INVALID
26 select case as const tk
28 dtype = FB_DATATYPE_BYTE
31 dtype = FB_DATATYPE_UBYTE
34 dtype = FB_DATATYPE_SHORT
37 dtype = FB_DATATYPE_USHORT
40 dtype = env.lang.integerkeyworddtype
43 dtype = FB_DATATYPE_UINT
46 dtype = FB_DATATYPE_LONG
49 dtype = FB_DATATYPE_ULONG
52 dtype = FB_DATATYPE_LONGINT
55 dtype = FB_DATATYPE_ULONGINT
58 dtype = FB_DATATYPE_SINGLE
61 dtype = FB_DATATYPE_DOUBLE
67 op = AST_OP_TOUNSIGNED
71 if( dtype = FB_DATATYPE_INVALID )
then
72 if( op = INVALID )
then
79 if( (tk = FB_TK_CINT)
or (tk = FB_TK_CUINT) )
then
82 if(
hMatch( FB_TK_LT ) )
then
103 if( expr = NULL )
then
104 errReport( FB_ERRMSG_EXPECTEDEXPRESSION )
111 case AST_OP_TOUNSIGNED
115 expr =
astNewCONV( dtype, NULL, expr, AST_CONVOPT_CHECKSTR, @errmsg )
116 if( expr = NULL )
then
117 if( errmsg = FB_ERRMSG_OK )
then
118 errmsg = FB_ERRMSG_TYPEMISMATCH
130 if isASM =
FALSE then
141 dim as ASTNODE
ptr initree =
any
142 dim as FBSYMBOL
ptr sym =
any, subtype =
any
143 dim as integer dtype =
any, is_explicit =
any
149 is_explicit =
hMatch( FB_TK_LT )
151 if( is_explicit )
then
158 errReport( FB_ERRMSG_EXPECTEDIDENTIFIER )
160 dtype = FB_DATATYPE_INTEGER
166 subtype = parser.ctxsym
167 dtype = parser.ctx_dtype
169 if( dtype = FB_DATATYPE_INVALID )
then
171 dtype = FB_DATATYPE_INTEGER
175 select case( typeGetDtAndPtrOnly( dtype ) )
176 case FB_DATATYPE_VOID, FB_DATATYPE_FWDREF
178 dtype = FB_DATATYPE_INTEGER
186 if( is_explicit )
then
196 if( typeGetDtAndPtrOnly( dtype ) = FB_DATATYPE_STRUCT )
then
200 if( initree = NULL )
then