Add regex to reef #1

Merged
defunkt merged 11 commits from regex into main 2025-10-16 21:15:42 +00:00
Showing only changes of commit f630d7934a - Show all commits

View File

@ -17,7 +17,7 @@ export type Value =
variadic: boolean, variadic: boolean,
named: boolean, named: boolean,
value: '<function>' value: '<function>'
} }
export type Dict = Map<string, Value> export type Dict = Map<string, Value>
@ -141,7 +141,7 @@ export function isEqual(a: Value, b: Value): boolean {
return true return true
} }
case 'regex': { case 'regex': {
if (!(b instanceof RegExp)) return false if (!(b.value instanceof RegExp)) return false
return String(a.value) === String(b.value) return String(a.value) === String(b.value)
} }
case 'function': case 'function':