Skip to content

Commit

Permalink
print: Support printing bools
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Sep 2, 2024
1 parent f324aab commit b1678bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flamingo/grammar/print.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ static int parse_print(flamingo_t* flamingo, TSNode node) {
case FLAMINGO_VAL_KIND_NONE:
printf("<none>\n");
break;
case FLAMINGO_VAL_KIND_BOOL:
printf("%s\n", val->boolean.val ? "true" : "false");
break;
case FLAMINGO_VAL_KIND_STR:
printf("%.*s\n", (int) val->str.size, val->str.str);
break;
Expand Down

0 comments on commit b1678bd

Please sign in to comment.