set salit.size to 0 forcibly in get_symbol_array_literal()
This commit is contained in:
parent
bec9600463
commit
3d344fc649
18
README.md
18
README.md
@ -48,9 +48,9 @@ A HCL program is composed of more expressions.
|
||||
* nqk?
|
||||
* sprintf
|
||||
* printf
|
||||
* +
|
||||
* -
|
||||
* *
|
||||
* _+_
|
||||
* _-_
|
||||
* _*_
|
||||
* mlt
|
||||
* /
|
||||
* quo
|
||||
@ -61,3 +61,15 @@ A HCL program is composed of more expressions.
|
||||
* bit-xor
|
||||
* bit-not
|
||||
* 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_oow_t i;
|
||||
|
||||
/* 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);
|
||||
GET_TOKEN_WITH_GOTO(hcl, oops);
|
||||
|
Loading…
Reference in New Issue
Block a user