File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ Synopsis 5: Regexes and Rules
17
17
18
18
Created: 24 Jun 2002
19
19
20
- Last Modified: 27 Jan 2014
21
- Version: 172
20
+ Last Modified: 31 Jan 2014
21
+ Version: 173
22
22
23
23
This document summarizes Apocalypse 5, which is about the new regex
24
24
syntax. We now try to call them I<regex> rather than "regular
@@ -2983,6 +2983,25 @@ may be of any type.
2983
2983
This makes it convenient to build up an abstract syntax tree of
2984
2984
arbitrary node types.
2985
2985
2986
+ The C<make> function does not impose any item or list context onto its argument,
2987
+ so if you say something ambiguously listy like
2988
+
2989
+ make ()
2990
+ make @array
2991
+ make foo()
2992
+
2993
+ the value returned from C<.ast> will interpolate into a list. To suppress this, use
2994
+ one of these:
2995
+
2996
+ make ().item
2997
+ make []
2998
+ make $@array
2999
+ make [@array]
3000
+ make foo().item
3001
+ make $(foo())
3002
+
3003
+ or use C<.ast.item> or a C<$> variable on the receiving end.
3004
+
2986
3005
=item *
2987
3006
2988
3007
You may also capture a subset of the match using the C<< <(...)> >> construct:
You can’t perform that action at this time.
0 commit comments