if (parse_possible_directive(parser, "load")) {
AstInclude* include = make_node(AstInclude, Ast_Kind_Load_File);
include->token = dir_token;
+ include->name_node = parse_expression(parser, 0);
+ /* nocheckin
OnyxToken* str_token = expect_token(parser, Token_Type_Literal_String);
if (str_token != NULL) {
token_toggle_end(str_token);
include->name = bh_strdup(parser->allocator, str_token->text);
token_toggle_end(str_token);
}
+ */
ENTITY_SUBMIT(include);
return;
else if (parse_possible_directive(parser, "load_path")) {
AstInclude* include = make_node(AstInclude, Ast_Kind_Load_Path);
include->token = dir_token;
+ include->name_node = parse_expression(parser, 0);
+ /* nocheckin
OnyxToken* str_token = expect_token(parser, Token_Type_Literal_String);
if (str_token != NULL) {
token_toggle_end(str_token);
include->name = bh_strdup(parser->allocator, str_token->text);
token_toggle_end(str_token);
}
+ */
ENTITY_SUBMIT(include);
return;
else if (parse_possible_directive(parser, "library_path")) {
AstInclude* include = make_node(AstInclude, Ast_Kind_Library_Path);
include->token = dir_token;
-
+ include->name_node = parse_expression(parser, 0);
+
+ /* nocheckin
OnyxToken* str_token = expect_token(parser, Token_Type_Literal_String);
if (str_token != NULL) {
token_toggle_end(str_token);
include->name = bh_strdup(parser->allocator, str_token->text);
token_toggle_end(str_token);
}
+ */
ENTITY_SUBMIT(include);
return;