Start of API & tests.

This commit is contained in:
Ian Gulliver
2014-05-20 11:46:57 -07:00
parent a6b6fdf2ea
commit 2bf3c67aa7
5 changed files with 115 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ var mediawiki = {
'i',
'nowiki',
'nowikiword',
rr.MultiLineText(),
rr.MultiLineText()
)],
'wikidoc': [rr.ZeroOrMore('wikichunk')],
};

8
include.yaml Normal file
View File

@@ -0,0 +1,8 @@
handlers:
- url: /recentrunes
static_dir: recentrunes
secure: always
http_headers:
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains

91
recentrunes.js Normal file
View File

@@ -0,0 +1,91 @@
var rr = {};
rr.Literal_ = function(value) {
};
rr.Literal = function(value) {
return (rr.Literal.cache[value] ||
(rr.Literal.cache[value] = new rr.Literal_(value)));
};
rr.Literal.cache = {};
rr.Ref_ = function(key) {
};
rr.Ref = function(key) {
return (rr.Ref.cache[key] ||
(rr.Ref.cache[key] = new rr.Ref_(key)));
};
rr.Ref.cache = {};
rr.EndOfLine_ = function() {
};
rr.EndOfLine = function() {
return rr.EndOfLine.cache;
}
rr.EndOfLine.cache = new rr.EndOfLine_();
rr.MultiLineText_ = function() {
};
rr.MultiLineText = function() {
return rr.MultiLineText.cache;
};
rr.MultiLineText.cache = new rr.MultiLineText_();
rr.Or_ = function(options) {
};
rr.Or = function() {
return new rr.Or_(arguments);
};
rr.SingleLineText_ = function() {
};
rr.SingleLineText = function() {
return rr.SingleLineText.cache;
};
rr.SingleLineText.cache = new rr.SingleLineText_();
rr.StartOfLine_ = function() {
};
rr.StartOfLine = function() {
return rr.StartOfLine.cache;
};
rr.StartOfLine.cache = new rr.StartOfLine_();
rr.WordText_ = function() {
};
rr.WordText = function() {
return rr.WordText.cache;
};
rr.WordText.cache = new rr.WordText_();
rr.ZeroOrMore_ = function(key) {
};
rr.ZeroOrMore = function(key) {
return (rr.ZeroOrMore.cache[key] ||
(rr.ZeroOrMore.cache[key] = new rr.ZeroOrMore_(key)));
};
rr.ZeroOrMore.cache = {};
var RecentRunes = function(dictionary) {
this.dictionary_ = dictionary;
};
RecentRunes.prototype.parse = function(nodeType, input) {
};

15
test.html Normal file
View File

@@ -0,0 +1,15 @@
<html>
<head>
<meta charset="utf-8">
<title>RecentRunes tests</title>
<link rel="stylesheet" href="https://code.jquery.com/qunit/qunit-git.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="https://code.jquery.com/qunit/qunit-git.js"></script>
<script src="/recentrunes/recentrunes.js" charset="UTF-8"></script>
<script src="/recentrunes/grammars/mediawiki.js" charset="UTF-8"></script>
<script src="test.js" charset="UTF-8"></script>
</body>
</html>

0
test.js Normal file
View File