diff options
| author | Baitinq <[email protected]> | 2025-07-05 20:35:31 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-07-05 20:35:31 +0200 |
| commit | 2c15f6dfeaa13fbb35b3d9d1bb9fd1b179625a23 (patch) | |
| tree | 1bffaf06b8a6fa67f8fe83bf013023b502d631b9 /src/bootstrap/parser.pry | |
| parent | Boostrap: Support basic function calls (diff) | |
| download | pry-lang-2c15f6dfeaa13fbb35b3d9d1bb9fd1b179625a23.tar.gz pry-lang-2c15f6dfeaa13fbb35b3d9d1bb9fd1b179625a23.tar.bz2 pry-lang-2c15f6dfeaa13fbb35b3d9d1bb9fd1b179625a23.zip | |
Boostrap: Codegen for strings
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 40ed001..556cc44 100644 --- a/src/bootstrap/parser.pry +++ b/src/bootstrap/parser.pry @@ -521,6 +521,15 @@ let parser_parse_primary_expression = (p: *parser) => *Node { 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); + let n = Node{}; + n.type = NODE_PRIMARY_EXPRESSION_STRING; + n.data = cast(*void, d); + return create_node(p, n); + }; printf("DIFF TYPE: %d\n", (*tok).type); |