not yet used. but added :< and :>
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
c2928615a4
commit
b20d6b14d8
@ -86,9 +86,14 @@ hcl_cnode_t* hcl_makecnodetrpcolons (hcl_t* hcl, int flags, const hcl_loc_t* loc
|
|||||||
return make_cnode(hcl, HCL_CNODE_TRPCOLONS, flags, loc, tok);
|
return make_cnode(hcl, HCL_CNODE_TRPCOLONS, flags, loc, tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
hcl_cnode_t* hcl_makecnodecolonplus (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok)
|
hcl_cnode_t* hcl_makecnodecolongt (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok)
|
||||||
{
|
{
|
||||||
return make_cnode(hcl, HCL_CNODE_COLONPLUS, flags, loc, tok);
|
return make_cnode(hcl, HCL_CNODE_COLONGT, flags, loc, tok);
|
||||||
|
}
|
||||||
|
|
||||||
|
hcl_cnode_t* hcl_makecnodecolonlt (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok)
|
||||||
|
{
|
||||||
|
return make_cnode(hcl, HCL_CNODE_COLONLT, flags, loc, tok);
|
||||||
}
|
}
|
||||||
|
|
||||||
hcl_cnode_t* hcl_makecnodecolonstar (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok)
|
hcl_cnode_t* hcl_makecnodecolonstar (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok)
|
||||||
|
@ -188,7 +188,8 @@ enum hcl_tok_type_t
|
|||||||
HCL_TOK_DBLCOLONS, /* :: */
|
HCL_TOK_DBLCOLONS, /* :: */
|
||||||
HCL_TOK_TRPCOLONS, /* ::: */
|
HCL_TOK_TRPCOLONS, /* ::: */
|
||||||
HCL_TOK_COLONEQ, /* := */
|
HCL_TOK_COLONEQ, /* := */
|
||||||
HCL_TOK_COLONPLUS, /* :+ */
|
HCL_TOK_COLONGT, /* :+ */
|
||||||
|
HCL_TOK_COLONLT, /* :+ */
|
||||||
HCL_TOK_COLONSTAR, /* :* */
|
HCL_TOK_COLONSTAR, /* :* */
|
||||||
HCL_TOK_SEMICOLON, /* ; */
|
HCL_TOK_SEMICOLON, /* ; */
|
||||||
HCL_TOK_COMMA, /* , */
|
HCL_TOK_COMMA, /* , */
|
||||||
@ -257,7 +258,8 @@ enum hcl_cnode_type_t
|
|||||||
HCL_CNODE_SUPER,
|
HCL_CNODE_SUPER,
|
||||||
HCL_CNODE_ELLIPSIS,
|
HCL_CNODE_ELLIPSIS,
|
||||||
HCL_CNODE_TRPCOLONS,
|
HCL_CNODE_TRPCOLONS,
|
||||||
HCL_CNODE_COLONPLUS, /* :+ */
|
HCL_CNODE_COLONGT, /* :> */
|
||||||
|
HCL_CNODE_COLONLT, /* :< */
|
||||||
HCL_CNODE_COLONSTAR, /* :* */
|
HCL_CNODE_COLONSTAR, /* :* */
|
||||||
|
|
||||||
HCL_CNODE_CONS,
|
HCL_CNODE_CONS,
|
||||||
@ -281,7 +283,8 @@ typedef enum hcl_cnode_flagt hcl_cnode_flag_t;
|
|||||||
|
|
||||||
#define HCL_CNODE_IS_ELLIPSIS(x) ((x)->cn_type == HCL_CNODE_ELLIPSIS)
|
#define HCL_CNODE_IS_ELLIPSIS(x) ((x)->cn_type == HCL_CNODE_ELLIPSIS)
|
||||||
#define HCL_CNODE_IS_TRPCOLONS(x) ((x)->cn_type == HCL_CNODE_TRPCOLONS)
|
#define HCL_CNODE_IS_TRPCOLONS(x) ((x)->cn_type == HCL_CNODE_TRPCOLONS)
|
||||||
#define HCL_CNODE_IS_COLONPLUS(x) ((x)->cn_type == HCL_CNODE_COLONPLUS)
|
#define HCL_CNODE_IS_COLONGT(x) ((x)->cn_type == HCL_CNODE_COLONGT)
|
||||||
|
#define HCL_CNODE_IS_COLONLT(x) ((x)->cn_type == HCL_CNODE_COLONLT)
|
||||||
#define HCL_CNODE_IS_COLONSTAR(x) ((x)->cn_type == HCL_CNODE_COLONSTAR)
|
#define HCL_CNODE_IS_COLONSTAR(x) ((x)->cn_type == HCL_CNODE_COLONSTAR)
|
||||||
|
|
||||||
#define HCL_CNODE_IS_SYMBOL(x) ((x)->cn_type == HCL_CNODE_SYMBOL)
|
#define HCL_CNODE_IS_SYMBOL(x) ((x)->cn_type == HCL_CNODE_SYMBOL)
|
||||||
@ -1780,7 +1783,8 @@ hcl_cnode_t* hcl_makecnodeself (hcl_t* hcl, int flags, const hcl_loc_t* loc, con
|
|||||||
hcl_cnode_t* hcl_makecnodesuper (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
hcl_cnode_t* hcl_makecnodesuper (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
||||||
hcl_cnode_t* hcl_makecnodeellipsis (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
hcl_cnode_t* hcl_makecnodeellipsis (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
||||||
hcl_cnode_t* hcl_makecnodetrpcolons (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
hcl_cnode_t* hcl_makecnodetrpcolons (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
||||||
hcl_cnode_t* hcl_makecnodecolonplus (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
hcl_cnode_t* hcl_makecnodecolongt (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
||||||
|
hcl_cnode_t* hcl_makecnodecolonlt (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
||||||
hcl_cnode_t* hcl_makecnodecolonstar (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
hcl_cnode_t* hcl_makecnodecolonstar (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok);
|
||||||
hcl_cnode_t* hcl_makecnodecharlit (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok, hcl_ooch_t v);
|
hcl_cnode_t* hcl_makecnodecharlit (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok, hcl_ooch_t v);
|
||||||
hcl_cnode_t* hcl_makecnodebchrlit (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok, hcl_oob_t v);
|
hcl_cnode_t* hcl_makecnodebchrlit (hcl_t* hcl, int flags, const hcl_loc_t* loc, const hcl_oocs_t* tok, hcl_oob_t v);
|
||||||
|
@ -817,8 +817,9 @@ void hcl_dumpcnode (hcl_t* hcl, hcl_cnode_t* cnode, int newline)
|
|||||||
case HCL_CNODE_SUPER:
|
case HCL_CNODE_SUPER:
|
||||||
case HCL_CNODE_ELLIPSIS:
|
case HCL_CNODE_ELLIPSIS:
|
||||||
case HCL_CNODE_TRPCOLONS:
|
case HCL_CNODE_TRPCOLONS:
|
||||||
|
case HCL_CNODE_COLONGT:
|
||||||
|
case HCL_CNODE_COLONLT:
|
||||||
case HCL_CNODE_COLONSTAR:
|
case HCL_CNODE_COLONSTAR:
|
||||||
case HCL_CNODE_COLONPLUS:
|
|
||||||
hcl_logbfmt (hcl, HCL_LOG_FATAL, " %.*js ", HCL_CNODE_GET_TOKLEN(cnode), HCL_CNODE_GET_TOKPTR(cnode));
|
hcl_logbfmt (hcl, HCL_LOG_FATAL, " %.*js ", HCL_CNODE_GET_TOKLEN(cnode), HCL_CNODE_GET_TOKPTR(cnode));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
11
lib/read.c
11
lib/read.c
@ -1432,8 +1432,12 @@ static int feed_process_token (hcl_t* hcl)
|
|||||||
frd->obj = hcl_makecnodetrpcolons(hcl, 0, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
|
frd->obj = hcl_makecnodetrpcolons(hcl, 0, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
|
||||||
goto auto_xlist;
|
goto auto_xlist;
|
||||||
|
|
||||||
case HCL_TOK_COLONPLUS:
|
case HCL_TOK_COLONGT:
|
||||||
frd->obj = hcl_makecnodecolonplus(hcl, 0, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
|
frd->obj = hcl_makecnodecolongt(hcl, 0, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
|
||||||
|
goto auto_xlist;
|
||||||
|
|
||||||
|
case HCL_TOK_COLONLT:
|
||||||
|
frd->obj = hcl_makecnodecolonlt(hcl, 0, TOKEN_LOC(hcl), TOKEN_NAME(hcl));
|
||||||
goto auto_xlist;
|
goto auto_xlist;
|
||||||
|
|
||||||
case HCL_TOK_COLONSTAR:
|
case HCL_TOK_COLONSTAR:
|
||||||
@ -1656,7 +1660,8 @@ static delim_token_t delim_token_tab[] =
|
|||||||
|
|
||||||
{ ":", 1, HCL_TOK_COLON }, /* key-value separator in dictionary */
|
{ ":", 1, HCL_TOK_COLON }, /* key-value separator in dictionary */
|
||||||
{ ":=", 2, HCL_TOK_COLONEQ }, /* assignment */
|
{ ":=", 2, HCL_TOK_COLONEQ }, /* assignment */
|
||||||
{ ":+", 2, HCL_TOK_COLONPLUS },
|
{ ":>", 2, HCL_TOK_COLONGT },
|
||||||
|
{ ":<", 2, HCL_TOK_COLONLT },
|
||||||
{ ":*", 2, HCL_TOK_COLONSTAR }, /* class instantiation method */
|
{ ":*", 2, HCL_TOK_COLONSTAR }, /* class instantiation method */
|
||||||
{ "::", 2, HCL_TOK_DBLCOLONS },
|
{ "::", 2, HCL_TOK_DBLCOLONS },
|
||||||
{ ":::", 3, HCL_TOK_TRPCOLONS }, /* superclass, class variables, class methods */
|
{ ":::", 3, HCL_TOK_TRPCOLONS }, /* superclass, class variables, class methods */
|
||||||
|
Loading…
Reference in New Issue
Block a user