AOC day 1

This commit is contained in:
2022-12-01 19:03:02 +00:00
parent f4172396d3
commit df7b0726c0

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>)');