lang: ast: implement parsing of subscript operator
This commit is contained in:
@@ -55,6 +55,7 @@ static const struct ivy_operator operators[] = {
|
||||
OP(UNDERSTANDS, IS, LEFT, INFIX, BINARY),
|
||||
OP(SELF_ACCESS, SUBSCRIPT, LEFT, INFIX, BINARY),
|
||||
OP(PKG_ACCESS, SUBSCRIPT, LEFT, INFIX, BINARY),
|
||||
OP(SUBSCRIPT, SUBSCRIPT, LEFT, INFIX, BINARY),
|
||||
|
||||
/* parser-internal pseudo-operators. */
|
||||
OP(MSG, UNARY_MSG, LEFT, POSTFIX, UNARY),
|
||||
@@ -201,6 +202,7 @@ const char *ivy_operator_id_to_string(enum ivy_operator_id op)
|
||||
ENUM_STR(IVY_OP_UNDERSTANDS);
|
||||
ENUM_STR(IVY_OP_SELF_ACCESS);
|
||||
ENUM_STR(IVY_OP_PKG_ACCESS);
|
||||
ENUM_STR(IVY_OP_SUBSCRIPT);
|
||||
ENUM_STR(IVY_OP_MSG);
|
||||
ENUM_STR(IVY_OP_LEFT_PAREN);
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user