Skip to content

Commit

Permalink
Maybe it's the tabs?
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgiven committed Nov 3, 2024
1 parent 563b1d5 commit 0f80b8c
Showing 1 changed file with 37 additions and 38 deletions.
75 changes: 37 additions & 38 deletions lang/pc/comp/node.xh
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,43 @@
#ifndef NODE_H_
#define NODE_H_

#define Value 0 /* constant */
#define Name 1 /* an identifier */
#define Uoper 2 /* unary operator */
#define Boper 3 /* binary operator */
#define Xset 4 /* a set */
#define Set 5 /* a set constant */
#define Call 6 /* a function call */
#define NameOrCall 7 /* call or name of function */
#define Arrow 8 /* ^ construction */
#define Arrsel 9 /* array selection */
#define Def 10 /* an identified name */
#define Link 11
#define LinkDef 12
#define Cast 13 /* convert integer to real */
#define IntCoerc 14 /* coercion of integers to longs */
#define IntReduc 15 /* reduction of longs to integers */
/* do NOT change the order or the numbers!!! */

struct node {
struct node *nd_left;
struct node *nd_left;
#define nd_next nd_left
struct node *nd_right;
int nd_class; /* kind of node */
struct type *nd_type; /* type of this node */
struct token nd_token;
#define nd_def nd_token.tk_data.tk_def
#define nd_set nd_token.tk_data.tk_set
#define nd_lab nd_token.tk_data.tk_lab
#define nd_symb nd_token.tk_symb
#define nd_lineno nd_token.tk_lineno
#define nd_IDF nd_token.TOK_IDF
#define nd_STR nd_token.TOK_STR
#define nd_SLE nd_token.TOK_SLE
#define nd_SLA nd_token.TOK_SLA
#define nd_INT nd_token.TOK_INT
#define nd_REL nd_token.TOK_REL
#define nd_RLA nd_token.TOK_RLA
#define nd_RIV nd_token.TOK_RIV
struct node *nd_right;
int nd_class; /* kind of node */
#define Value 0 /* constant */
#define Name 1 /* an identifier */
#define Uoper 2 /* unary operator */
#define Boper 3 /* binary operator */
#define Xset 4 /* a set */
#define Set 5 /* a set constant */
#define Call 6 /* a function call */
#define NameOrCall 7 /* call or name of function */
#define Arrow 8 /* ^ construction */
#define Arrsel 9 /* array selection */
#define Def 10 /* an identified name */
#define Link 11
#define LinkDef 12
#define Cast 13 /* convert integer to real */
#define IntCoerc 14 /* coercion of integers to longs */
#define IntReduc 15 /* reduction of longs to integers */
/* do NOT change the order or the numbers!!! */
struct type *nd_type; /* type of this node */
struct token nd_token;
#define nd_def nd_token.tk_data.tk_def
#define nd_set nd_token.tk_data.tk_set
#define nd_lab nd_token.tk_data.tk_lab
#define nd_symb nd_token.tk_symb
#define nd_lineno nd_token.tk_lineno
#define nd_IDF nd_token.TOK_IDF
#define nd_STR nd_token.TOK_STR
#define nd_SLE nd_token.TOK_SLE
#define nd_SLA nd_token.TOK_SLA
#define nd_INT nd_token.TOK_INT
#define nd_REL nd_token.TOK_REL
#define nd_RLA nd_token.TOK_RLA
#define nd_RIV nd_token.TOK_RIV



Expand All @@ -54,8 +53,8 @@ int NodeCrash(struct node *expp);



#define IsProcCall(lnd) ((lnd)->nd_type->tp_fund & T_ROUTINE)
#define IsProcCall(lnd) ((lnd)->nd_type->tp_fund & T_ROUTINE)

#define NULLNODE ((struct node *) 0)
#define NULLNODE ((struct node *) 0)

#endif

0 comments on commit 0f80b8c

Please sign in to comment.