File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11first = (arr ) -> arr[0 ]
22second = (arr ) -> arr[1 ]
3+ last = (arr ) -> arr[- 1 .. ]
34count = (arr ) -> arr .length
45sequential = (arr ) -> Array .isArray arr
56remove = (pred , arr ) -> (item for item in arr when not pred item)
@@ -8,6 +9,8 @@ isString = (isType "string")
89isNumber = (isType " number" )
910re_pattern = (str ) -> (new RegExp str, " g" ).toString ()
1011re_seq = (regexp , str ) -> str .match regexp
12+ unquote = (str ) -> (isString str) and ((first str) is ' "' and (last str) is ' "' ) and str[1 ... - 1 ] or str
13+ identity = (obj ) -> obj
1114list = (items ... ) -> items
1215cons = (x , arr ) -> new Array x, arr...
1316join = (sep , arr ) -> if arr then arr .join sep else sep .join " "
@@ -80,7 +83,7 @@ ast_regex = (type, terms) ->
8083 [
8184 type
8285 (do -> switch type
83- when " regex" then re_pattern (antlr_ast pattern)
86+ when " regex" then re_pattern (unquote ( antlr_ast pattern) )
8487 when " like" then (antlr_ast pattern))
8588 (antlr_ast string)
8689 ]
You can’t perform that action at this time.
0 commit comments