mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-02 20:58:14 +00:00
[examples] write expressions intro example
This commit is contained in:
@@ -160,9 +160,11 @@ static void parenthesize_exclude_outer(MD_Arena *arena, OperatorDescription *des
|
||||
MD_S8Match(op_s, MD_S8Lit("{}"), 0) || MD_S8Match(op_s, MD_S8Lit("[)"), 0) ||
|
||||
MD_S8Match(op_s, MD_S8Lit("(]"), 0))
|
||||
{
|
||||
MD_S8ListPush(arena, l, MD_S8Substring(op_s, 0, 1));
|
||||
MD_S8ListPush(arena, l, MD_S8Lit("..."));
|
||||
MD_S8ListPush(arena, l, MD_S8Substring(op_s, 1, 2));
|
||||
MD_u8 buf[5];
|
||||
buf[0] = op_s.str[0];
|
||||
buf[1] = buf[2] = buf[3] = '.';
|
||||
buf[4] = op_s.str[1];
|
||||
MD_S8ListPush(arena, l, MD_S8(buf, sizeof(buf)));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user