<< Back to previous view

[MATCH-81] large pattern problematic for ClojureScript Created: 16/Jul/13  Updated: 28/Jul/13  Resolved: 16/Jul/13

Status: Closed
Project: core.match
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Defect Priority: Major
Reporter: David Nolen Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None


 Description   
(ns test
  (:use-macros [clojure.core.match.js :only [match]])
  (:require [clojure.core.match]))

(defn get-meaning
        [paragraph line blank mode theme annotation]
                (match
                        [paragraph  line    (> blank 0) mode    theme   annotation  ]
                        [_          _       true        _       _       _           ] "monaco-enter"
                        [_          _       _           _       true    _           ] "monaco-theme"
                        [_          _       _           _       false   true        ] "monaco-annotation"
                        [_          _       false       :theme  _       false       ] "monaco-note"
                        [0          0       false       _       false   false       ] "monaco-outcome"
                        [0          _       false       _       false   false       ] "monaco-perex"
                        [1          _       false       _       false   false       ] "monaco-next-action"
                        [2          _       false       _       false   false       ] "monaco-following-action"
                        [_          _       false       nil     false   false       ] "monaco-supplemental"
                        :else "monaco-generic"
                        )
        )


 Comments   
Comment by David Nolen [ 16/Jul/13 6:26 PM ]

When addressing this patch we should do several things - reorg the namespaces, allow CLJS user to pick their compilation strategy explicitly - if the backtrack solution is chosen we should throw if recur is present.

Comment by David Nolen [ 16/Jul/13 8:57 PM ]

fixed http://github.com/clojure/core.match/commit/f19bfef48ed13f396fd0140cc1a90b2218f26579

Generated at Fri Oct 24 03:10:17 CDT 2014 using JIRA 4.4#649-r158309.