From 4b0ca55eb79e963523eb6c8197825e9e8ae904e2 Mon Sep 17 00:00:00 2001
From: Wu Cheng-Han
Date: Mon, 4 May 2015 15:53:29 +0800
Subject: First commit, version 0.2.7
---
public/vendor/codemirror/mode/xquery/index.html | 210 +++++++++++
public/vendor/codemirror/mode/xquery/test.js | 67 ++++
public/vendor/codemirror/mode/xquery/xquery.js | 447 ++++++++++++++++++++++++
3 files changed, 724 insertions(+)
create mode 100755 public/vendor/codemirror/mode/xquery/index.html
create mode 100755 public/vendor/codemirror/mode/xquery/test.js
create mode 100755 public/vendor/codemirror/mode/xquery/xquery.js
(limited to 'public/vendor/codemirror/mode/xquery')
diff --git a/public/vendor/codemirror/mode/xquery/index.html b/public/vendor/codemirror/mode/xquery/index.html
new file mode 100755
index 00000000..7ac5aaef
--- /dev/null
+++ b/public/vendor/codemirror/mode/xquery/index.html
@@ -0,0 +1,210 @@
+
+
+
+XQuery mode
+
+
+
+
+
+
+
+
+ MIME types defined: application/xquery
.
+
+ Development of the CodeMirror XQuery mode was sponsored by
+ MarkLogic and developed by
+ Mike Brevoort.
+
+
+
diff --git a/public/vendor/codemirror/mode/xquery/test.js b/public/vendor/codemirror/mode/xquery/test.js
new file mode 100755
index 00000000..1f148cdb
--- /dev/null
+++ b/public/vendor/codemirror/mode/xquery/test.js
@@ -0,0 +1,67 @@
+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
+// Don't take these too seriously -- the expected results appear to be
+// based on the results of actual runs without any serious manual
+// verification. If a change you made causes them to fail, the test is
+// as likely to wrong as the code.
+
+(function() {
+ var mode = CodeMirror.getMode({tabSize: 4}, "xquery");
+ function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
+
+ MT("eviltest",
+ "[keyword xquery] [keyword version] [variable "1][keyword .][atom 0][keyword -][variable ml"][def&variable ;] [comment (: this is : a \"comment\" :)]",
+ " [keyword let] [variable $let] [keyword :=] [variable <x] [variable attr][keyword =][variable "value">"test"<func>][def&variable ;function]() [variable $var] {[keyword function]()} {[variable $var]}[variable <][keyword /][variable func><][keyword /][variable x>]",
+ " [keyword let] [variable $joe][keyword :=][atom 1]",
+ " [keyword return] [keyword element] [variable element] {",
+ " [keyword attribute] [variable attribute] { [atom 1] },",
+ " [keyword element] [variable test] { [variable 'a'] }, [keyword attribute] [variable foo] { [variable "bar"] },",
+ " [def&variable fn:doc]()[[ [variable foo][keyword /][variable @bar] [keyword eq] [variable $let] ]],",
+ " [keyword //][variable x] } [comment (: a more 'evil' test :)]",
+ " [comment (: Modified Blakeley example (: with nested comment :) ... :)]",
+ " [keyword declare] [keyword private] [keyword function] [def&variable local:declare]() {()}[variable ;]",
+ " [keyword declare] [keyword private] [keyword function] [def&variable local:private]() {()}[variable ;]",
+ " [keyword declare] [keyword private] [keyword function] [def&variable local:function]() {()}[variable ;]",
+ " [keyword declare] [keyword private] [keyword function] [def&variable local:local]() {()}[variable ;]",
+ " [keyword let] [variable $let] [keyword :=] [variable <let>let] [variable $let] [keyword :=] [variable "let"<][keyword /let][variable >]",
+ " [keyword return] [keyword element] [variable element] {",
+ " [keyword attribute] [variable attribute] { [keyword try] { [def&variable xdmp:version]() } [keyword catch]([variable $e]) { [def&variable xdmp:log]([variable $e]) } },",
+ " [keyword attribute] [variable fn:doc] { [variable "bar"] [variable castable] [keyword as] [atom xs:string] },",
+ " [keyword element] [variable text] { [keyword text] { [variable "text"] } },",
+ " [def&variable fn:doc]()[[ [qualifier child::][variable eq][keyword /]([variable @bar] [keyword |] [qualifier attribute::][variable attribute]) [keyword eq] [variable $let] ]],",
+ " [keyword //][variable fn:doc]",
+ " }");
+
+ MT("testEmptySequenceKeyword",
+ "[string \"foo\"] [keyword instance] [keyword of] [keyword empty-sequence]()");
+
+ MT("testMultiAttr",
+ "[tag