Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/sbi/src/stree_t.h

    r38aaacc2 r074444f  
    186186} stree_as_t;
    187187
    188 /** Boxing of primitive type (pseudo)
    189  *
    190  * This pseudo-node is used internally to box a value of primitive type.
    191  * It is implicitly inserted by stype_convert(). It does not correspond
    192  * to a an explicit program construct.
    193  */
    194 typedef struct {
    195         /* Primitive type expression */
    196         struct stree_expr *arg;
    197 } stree_box_t;
    198 
    199188/** Arithmetic expression class */
    200189typedef enum {
     
    209198        ec_assign,
    210199        ec_index,
    211         ec_as,
    212         ec_box
     200        ec_as
    213201} expr_class_t;
    214202
     
    231219                stree_assign_t *assign;
    232220                stree_as_t *as_op;
    233                 stree_box_t *box;
    234221        } u;
    235222} stree_expr_t;
     
    428415} stree_proc_arg_t;
    429416
    430 /** Function signature.
    431  *
    432  * Foormal parameters and return type. This is common to function and delegate
    433  * delcarations.
    434  */
    435 typedef struct {
    436         /** Formal parameters */
    437         list_t args; /* of stree_proc_arg_t */
    438 
    439         /** Variadic argument or @c NULL if none. */
    440         stree_proc_arg_t *varg;
    441 
    442         /** Return type */
    443         stree_texpr_t *rtype;
    444 } stree_fun_sig_t;
    445 
    446417/** Procedure
    447418 *
     
    461432} stree_proc_t;
    462433
    463 /** Delegate declaration */
    464 typedef struct stree_deleg {
    465         /** Delegate name */
    466         stree_ident_t *name;
    467 
    468         /** Symbol */
    469         struct stree_symbol *symbol;
    470 
    471         /** Signature (arguments and return type) */
    472         stree_fun_sig_t *sig;
    473 
    474         /** Type item describing the delegate */
    475         struct tdata_item *titem;
    476 } stree_deleg_t;
    477 
    478434/** Member function declaration */
    479435typedef struct stree_fun {
     
    484440        struct stree_symbol *symbol;
    485441
    486         /** Signature (arguments and return type) */
    487         stree_fun_sig_t *sig;
     442        /** Formal parameters */
     443        list_t args; /* of stree_proc_arg_t */
     444
     445        /** Variadic argument or @c NULL if none. */
     446        stree_proc_arg_t *varg;
     447
     448        /** Return type */
     449        stree_texpr_t *rtype;
    488450
    489451        /** Function implementation */
    490452        stree_proc_t *proc;
    491 
    492         /** Type item describing the function */
    493         struct tdata_item *titem;
    494453} stree_fun_t;
    495454
     
    527486typedef enum {
    528487        csimbr_csi,
    529         csimbr_deleg,
    530488        csimbr_fun,
    531489        csimbr_var,
     
    539497        union {
    540498                struct stree_csi *csi;
    541                 stree_deleg_t *deleg;
    542499                stree_fun_t *fun;
    543500                stree_var_t *var;
     
    552509} csi_class_t;
    553510
    554 /** CSI formal type argument */
    555 typedef struct stree_targ {
    556         stree_ident_t *name;
    557         struct stree_symbol *symbol;
    558 } stree_targ_t;
    559 
    560511/** Class, struct or interface declaration */
    561512typedef struct stree_csi {
     
    566517        stree_ident_t *name;
    567518
    568         /** List of type arguments */
    569         list_t targ; /* of stree_targ_t */
     519        /** List of type argument names */
     520        list_t targ_names; /* of stree_ident_t */
    570521
    571522        /** Symbol for this CSI */
     
    615566} stree_symbol_attr_t;
    616567
    617 typedef enum {
    618         /** CSI (class, struct or interface) */
     568
     569typedef enum {
    619570        sc_csi,
    620         /** Member delegate */
    621         sc_deleg,
    622         /** Member function */
    623571        sc_fun,
    624         /** Member variable */
    625572        sc_var,
    626         /** Member property */
    627573        sc_prop
    628574} symbol_class_t;
     
    638584        union {
    639585                struct stree_csi *csi;
    640                 stree_deleg_t *deleg;
    641586                stree_fun_t *fun;
    642587                stree_var_t *var;
Note: See TracChangeset for help on using the changeset viewer.