AOC day 1

This commit is contained in:
2022-12-01 19:03:02 +00:00
parent a3881c0748
commit e74bd134bd
7 changed files with 2303 additions and 0 deletions

View File

@@ -1189,6 +1189,7 @@ class Macros {
return b.callSymbol("haxe.Timer.measure", [b.callSymbol("lambda", [b.list([])].concat(exps))]);
};
// TODO should indexOf and lastIndexOf accept negative starting indices?
function indexOfMacro(last:Bool, wholeExp:ReaderExp, exps:Array<ReaderExp>, k:KissState) {
var funcName = if (last) "lastIndexOf" else "indexOf";
k.doc(funcName, 2, 3, '($funcName <list or string> <element or substring> <?startingIndex>)');