mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-26 16:58:46 +00:00
basic printers, type printers, some fixes, part of expression printers
This commit is contained in:
parent
3914ff7d8b
commit
3669084f55
14 changed files with 795 additions and 39 deletions
|
|
@ -8,8 +8,8 @@
|
|||
namespace builders {
|
||||
|
||||
namespace utils {
|
||||
std::optional<char> to_escape_symbol(char symbol) {
|
||||
switch (symbol) {
|
||||
std::optional<char> to_escape_symbol(char ch) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
return '\a';
|
||||
case 'b':
|
||||
|
|
@ -41,7 +41,7 @@ nodes::Modifier build_modifier(parser::ParseTree::Node parser_node) {
|
|||
if (modifier == "?") {
|
||||
return nodes::Modifier::OR_FALSE;
|
||||
} else if (modifier == "!") {
|
||||
return nodes::Modifier::OR_PANIC;
|
||||
return nodes::Modifier::OR_RETURN;
|
||||
} else if (modifier == "->" || modifier == "out") {
|
||||
return nodes::Modifier::OUT;
|
||||
} else if (modifier == "<-" || modifier == "in") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue