aboutsummaryrefslogtreecommitdiffstats
path: root/hardregex.txt
diff options
context:
space:
mode:
Diffstat (limited to 'hardregex.txt')
-rw-r--r--hardregex.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/hardregex.txt b/hardregex.txt
new file mode 100644
index 00000000..557548c8
--- /dev/null
+++ b/hardregex.txt
@@ -0,0 +1,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