diff options
| author | Baitinq <[email protected]> | 2025-07-07 23:57:54 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-07-07 23:57:54 +0200 |
| commit | 9a97a4ed18d7814c12448e6a747f81eb03e894cf (patch) | |
| tree | 9c6bf595284b63c6495f50048cff5e1899f74f15 /src/bootstrap/parser.pry | |
| parent | Bootstrap: Codegen: Support bool types (diff) | |
| download | pry-lang-9a97a4ed18d7814c12448e6a747f81eb03e894cf.tar.gz pry-lang-9a97a4ed18d7814c12448e6a747f81eb03e894cf.tar.bz2 pry-lang-9a97a4ed18d7814c12448e6a747f81eb03e894cf.zip | |
Bootstrap: Codegen: Support char types
Diffstat (limited to '')
| -rw-r--r-- | src/bootstrap/parser.pry | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/parser.pry b/src/bootstrap/parser.pry index 63d17c8..be1ffb7 100644 --- a/src/bootstrap/parser.pry +++ b/src/bootstrap/parser.pry @@ -532,6 +532,15 @@ let parser_parse_primary_expression = (p: *parser) => *Node { return create_node(p, n); }; + if (*tok).type == TOKEN_CHAR { + let d = cast(*NODE_PRIMARY_EXPRESSION_CHAR_DATA, arena_alloc((*p).arena, sizeof(NODE_PRIMARY_EXPRESSION_CHAR_DATA))); + (*d).value = *(cast(*i8, (*tok).data)); + let n = Node{}; + n.type = NODE_PRIMARY_EXPRESSION_CHAR; + n.data = cast(*void, d); + return create_node(p, n); + }; + if (*tok).type == TOKEN_STRING { let d = cast(*NODE_PRIMARY_EXPRESSION_STRING_DATA, arena_alloc((*p).arena, sizeof(NODE_PRIMARY_EXPRESSION_STRING_DATA))); (*d).value = cast(*i8, (*tok).data); |