aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/awk.h b/awk.h
index b53674ee..bb129549 100644
--- a/awk.h
+++ b/awk.h
@@ -296,6 +296,12 @@ typedef union bucket_item {
} hi;
} BUCKET;
+enum commenttype {
+ EOL_COMMENT = 1,
+ BLOCK_COMMENT,
+ FOR_COMMENT // special case
+};
+
/* string hash table */
#define ahnext hs.next
#define ahname hs.name /* a string index node */
@@ -368,6 +374,7 @@ typedef struct exp_node {
wchar_t *wsp;
size_t wslen;
struct exp_node *typre;
+ enum commenttype comtype;
} val;
} sub;
NODETYPE type;
@@ -565,9 +572,7 @@ typedef struct exp_node {
#define alevel sub.nodep.x.xl
/* Op_comment */
-#define comment_type sub.val.idx
-#define EOL_COMMENT 1
-#define FULL_COMMENT 2
+#define comment_type sub.val.comtype
/* --------------------------------lint warning types----------------------------*/
typedef enum lintvals {
@@ -764,6 +769,7 @@ typedef struct exp_instruction {
awk_ext_func_t *exf;
} x;
+ struct exp_instruction *comment;
short source_line;
short pool_size; // memory management in symbol.c
OPCODE opcode;
@@ -1009,6 +1015,7 @@ typedef struct srcfile {
char *lexeme;
char *lexptr_begin;
int lasttok;
+ INSTRUCTION *comment; /* comment on @load line */
} SRCFILE;
// structure for INSTRUCTION pool, needed mainly for debugger