Changeset 38aaacc2 in mainline for uspace/app/sbi/src/stree_t.h


Ignore:
Timestamp:
2010-04-23T21:41:10Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f4f866c
Parents:
074444f
Message:

Update SBI to rev. 207.

File:
1 edited

Legend:

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

    r074444f r38aaacc2  
    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 */
     194typedef struct {
     195        /* Primitive type expression */
     196        struct stree_expr *arg;
     197} stree_box_t;
     198
    188199/** Arithmetic expression class */
    189200typedef enum {
     
    198209        ec_assign,
    199210        ec_index,
    200         ec_as
     211        ec_as,
     212        ec_box
    201213} expr_class_t;
    202214
     
    219231                stree_assign_t *assign;
    220232                stree_as_t *as_op;
     233                stree_box_t *box;
    221234        } u;
    222235} stree_expr_t;
     
    415428} stree_proc_arg_t;
    416429
     430/** Function signature.
     431 *
     432 * Foormal parameters and return type. This is common to function and delegate
     433 * delcarations.
     434 */
     435typedef 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
    417446/** Procedure
    418447 *
     
    432461} stree_proc_t;
    433462
     463/** Delegate declaration */
     464typedef 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
    434478/** Member function declaration */
    435479typedef struct stree_fun {
     
    440484        struct stree_symbol *symbol;
    441485
    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;
     486        /** Signature (arguments and return type) */
     487        stree_fun_sig_t *sig;
    450488
    451489        /** Function implementation */
    452490        stree_proc_t *proc;
     491
     492        /** Type item describing the function */
     493        struct tdata_item *titem;
    453494} stree_fun_t;
    454495
     
    486527typedef enum {
    487528        csimbr_csi,
     529        csimbr_deleg,
    488530        csimbr_fun,
    489531        csimbr_var,
     
    497539        union {
    498540                struct stree_csi *csi;
     541                stree_deleg_t *deleg;
    499542                stree_fun_t *fun;
    500543                stree_var_t *var;
     
    509552} csi_class_t;
    510553
     554/** CSI formal type argument */
     555typedef struct stree_targ {
     556        stree_ident_t *name;
     557        struct stree_symbol *symbol;
     558} stree_targ_t;
     559
    511560/** Class, struct or interface declaration */
    512561typedef struct stree_csi {
     
    517566        stree_ident_t *name;
    518567
    519         /** List of type argument names */
    520         list_t targ_names; /* of stree_ident_t */
     568        /** List of type arguments */
     569        list_t targ; /* of stree_targ_t */
    521570
    522571        /** Symbol for this CSI */
     
    566615} stree_symbol_attr_t;
    567616
    568 
    569 typedef enum {
     617typedef enum {
     618        /** CSI (class, struct or interface) */
    570619        sc_csi,
     620        /** Member delegate */
     621        sc_deleg,
     622        /** Member function */
    571623        sc_fun,
     624        /** Member variable */
    572625        sc_var,
     626        /** Member property */
    573627        sc_prop
    574628} symbol_class_t;
     
    584638        union {
    585639                struct stree_csi *csi;
     640                stree_deleg_t *deleg;
    586641                stree_fun_t *fun;
    587642                stree_var_t *var;
Note: See TracChangeset for help on using the changeset viewer.