set salit.size to 0 forcibly in get_symbol_array_literal()
This commit is contained in:
		| @ -48,9 +48,9 @@ A HCL program is composed of more expressions. | |||||||
| * nqk? | * nqk? | ||||||
| * sprintf | * sprintf | ||||||
| * printf | * printf | ||||||
| * + | * _+_ | ||||||
| * - | * _-_ | ||||||
| * * | * _*_ | ||||||
| * mlt | * mlt | ||||||
| * / | * / | ||||||
| * quo | * quo | ||||||
| @ -61,3 +61,15 @@ A HCL program is composed of more expressions. | |||||||
| * bit-xor | * bit-xor | ||||||
| * bit-not | * bit-not | ||||||
| * bit-shift | * bit-shift | ||||||
|  |  | ||||||
|  | ## Defining a function | ||||||
|  |  | ||||||
|  | (defun function-name (arguments) | ||||||
|  | 	| local variables | | ||||||
|  | 	function body | ||||||
|  | ) | ||||||
|  |  | ||||||
|  | (set function-name (lambda (arguments) | ||||||
|  | 	| local variables | | ||||||
|  | 	function body | ||||||
|  | ) | ||||||
|  | |||||||
| @ -1753,7 +1753,9 @@ static int get_symbol_array_literal (hcl_t* hcl, hcl_oop_t* xlit) | |||||||
| 	hcl_oop_t sa, sym; | 	hcl_oop_t sa, sym; | ||||||
| 	hcl_oow_t i; | 	hcl_oow_t i; | ||||||
|  |  | ||||||
| 	HCL_ASSERT (hcl, hcl->c->r.salit.size == 0); | 	/* if the program is not buggy, salit.size must be 0 here. */ | ||||||
|  | 	HCL_ASSERT (hcl, hcl->c->r.salit.size == 0);  | ||||||
|  | 	hcl->c->r.salit.size = 0; /* i want to set it to 0 in case it's buggy */ | ||||||
|  |  | ||||||
| 	HCL_ASSERT (hcl, TOKEN_TYPE(hcl) == HCL_IOTOK_VBAR); | 	HCL_ASSERT (hcl, TOKEN_TYPE(hcl) == HCL_IOTOK_VBAR); | ||||||
| 	GET_TOKEN_WITH_GOTO(hcl, oops); | 	GET_TOKEN_WITH_GOTO(hcl, oops); | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user