You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throwMacroProcessingError(fmt::format("Interpreting a `and' chain with {} arguments, expected at least 2.", argcount), node);
363
+
throwMacroProcessingError(fmt::format("Interpreting a `{}' chain with {} arguments, expected at least 2.", Language::And, argcount), node);
371
364
372
365
for (std::size_t i = 1, end = node.list().size(); i < end; ++i)
373
366
{
@@ -376,10 +369,10 @@ namespace Ark::internal
376
369
}
377
370
returngetTrueNode();
378
371
}
379
-
elseif (name == "or" && is_not_body)
372
+
elseif (name == Language::Or && is_not_body)
380
373
{
381
374
if (node.list().size() < 3)
382
-
throwMacroProcessingError(fmt::format("Interpreting an `or' chain with {} arguments, expected at least 2.", argcount), node);
375
+
throwMacroProcessingError(fmt::format("Interpreting an `{}' chain with {} arguments, expected at least 2.", Language::Or, argcount), node);
383
376
384
377
for (std::size_t i = 1, end = node.list().size(); i < end; ++i)
385
378
{
@@ -507,12 +500,12 @@ namespace Ark::internal
507
500
}
508
501
}
509
502
}
510
-
elseif (name == "symcat")
503
+
elseif (name == Language::Symcat)
511
504
{
512
505
if (node.list().size() <= 2)
513
-
throwMacroProcessingError(fmt::format("When expanding `symcat', expected at least 2 arguments, got {} arguments", argcount), node);
506
+
throwMacroProcessingError(fmt::format("When expanding `{}', expected at least 2 arguments, got {} arguments", Language::Symcat, argcount), node);
514
507
if (node.list()[1].nodeType() != NodeType::Symbol)
515
-
throwMacroProcessingError(fmt::format("When expanding `symcat', expected the first argument to be a Symbol, got a {}", typeToString(node.list()[1])), node);
508
+
throwMacroProcessingError(fmt::format("When expanding `{}', expected the first argument to be a Symbol, got a {}", Language::Symcat, typeToString(node.list()[1])), node);
516
509
517
510
std::string sym = node.list()[1].string();
518
511
@@ -533,37 +526,37 @@ namespace Ark::internal
533
526
break;
534
527
535
528
default:
536
-
throwMacroProcessingError(fmt::format("When expanding `symcat', expected either a Number, String or Symbol, got a {}", typeToString(ev)), ev);
529
+
throwMacroProcessingError(fmt::format("When expanding `{}', expected either a Number, String or Symbol, got a {}", Language::Symcat, typeToString(ev)), ev);
537
530
}
538
531
}
539
532
540
533
node.setNodeType(NodeType::Symbol);
541
534
node.setString(sym);
542
535
}
543
-
elseif (name == "argcount")
536
+
elseif (name == Language::Argcount)
544
537
{
545
538
Node sym = node.constList()[1];
546
539
if (sym.nodeType() == NodeType::Symbol)
547
540
{
548
541
if (constauto it = m_defined_functions.find(sym.string()); it != m_defined_functions.end())
throwMacroProcessingError(fmt::format("When expanding `argcount', expected a known function name, got unbound variable {}", sym.string()), sym);
544
+
throwMacroProcessingError(fmt::format("When expanding `{}', expected a known function name, got unbound variable {}", Language::Argcount, sym.string()), sym);
throwMacroProcessingError(fmt::format("When trying to apply `argcount', got a {} instead of a Symbol or Function", typeToString(sym)), sym);
549
+
throwMacroProcessingError(fmt::format("When trying to apply `{}', got a {} instead of a Symbol or Function", Language::Argcount, typeToString(sym)), sym);
0 commit comments