Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler+runtime/src/cpp/jank/read/lex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,13 +592,14 @@ namespace jank::read::lex
require_space = false;

auto const ch(peek());
++pos;

if(ch.is_err())
{
pos++;
return ch.expect_err();
}

pos += ch.expect_ok().len;
while(pos <= file.size())
{
auto const pt(peek());
Expand Down
7 changes: 7 additions & 0 deletions compiler+runtime/src/cpp/jank/read/parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,13 @@ namespace jank::read::parse
start_token,
start_token };
}
else if(sv[0] == '\\' && sv.size() >= 3 && sv.size() <= 5)
{
auto const str(sv.substr(1));
return object_source_info{ make_box<obj::character>(str),
start_token,
start_token };
}

return error::parse_invalid_character(start_token);
}
Expand Down
Loading