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 fa7589293a - Show all commits

View File

@ -507,7 +507,7 @@ function toBytecodeFromString(str: string): Bytecode /* throws */ {
} catch (e) { } catch (e) {
throw new Error(`Invalid regex literal: ${operand}`) throw new Error(`Invalid regex literal: ${operand}`)
} }
}else { } else {
// Assume it's a variable name if it doesn't match any other pattern // Assume it's a variable name if it doesn't match any other pattern
// This allows emoji, Unicode, and other creative identifiers // This allows emoji, Unicode, and other creative identifiers
// (already checked that it doesn't start with . # or match other patterns) // (already checked that it doesn't start with . # or match other patterns)