summaryrefslogtreecommitdiff
path: root/hardregex.txt
blob: 557548c8ebc2869ca49680203367d7aa3f7ac6ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
New variable type: "regexp", --> Node_hardregexp. (Need a better name).

Syntax:		@/.../

Use:
	a = @/.../	# a now has type regexp
	a = foo(1, "bar", @/.../)	# pass a regex to user defined function

New function:
	t = typeof(exp)		# "array", "regexp", "scalar"
			# Open: "scalar" vs. "scalar_s" / "scalar_n"

Obsolete function:
	isarray(exp)

Conversions:
	r = @/.../
	s = r ""	# what happens?  becomes regex string?
	s = r + 0	# what happens? treat as numeric 0?

Why?
	Allows passing regexes through user defined functions
	Allows passing regexes through indirect funtion calls
	In general, this is a gap in the language