Skip to content

Commit

Permalink
issue #35 add _ENV as a stored string in the compiler state
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyendumajumdar committed Sep 30, 2020
1 parent 898dc2e commit 7df1ebf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,7 @@ struct compiler_state *raviX_init_compiler()
container->main_function = NULL;
container->killed = false;
container->linearizer = NULL;
container->_ENV = raviX_create_string(container, "_ENV", 4);
return container;
}

Expand Down
1 change: 1 addition & 0 deletions src/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct compiler_state {
jmp_buf env; /* For error handling */
buffer_t error_message; /* For error handling, error message is saved here */
bool killed; /* flag to check if this is already destroyed */
const struct string_object *_ENV; /* name of the env variable */
};

/* number of reserved words */
Expand Down

0 comments on commit 7df1ebf

Please sign in to comment.