From 49e9d078f1d9c536fb300a5c0ea536ff5ddcb180 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 20:05:06 -0700
Subject: [PATCH 01/11] fix angular.js typo
closes #1287
---
seed/challenges/angularjs.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/seed/challenges/angularjs.json b/seed/challenges/angularjs.json
index ba6071a1fd..304e86ed3c 100644
--- a/seed/challenges/angularjs.json
+++ b/seed/challenges/angularjs.json
@@ -32,7 +32,7 @@
"difficulty": 0.35,
"challengeSeed": ["114684727"],
"description": [
- "Directives serve as markers in your HTML. When Angular.js compiles your HTML, it will can alter the behavior of DOM elements based on the directives you've used.",
+ "Directives serve as markers in your HTML. When Angular.js compiles your HTML, it will alter the behavior of DOM elements based on the directives you've used.",
"Let's learn how these powerful directives work, and how to use them to make your web apps more dynamic",
"Go to http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/2/section/1/video/1 and complete the section."
],
From a4e220e2bc77a7fd3233cb8443fded52a3ae11d1 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 12:15:19 -0700
Subject: [PATCH 02/11] Move auth functions to central location
---
common/models/User-Identity.js | 47 ++++------------------------------
server/server.js | 40 ++---------------------------
server/utils/auth.js | 42 ++++++++++++++++++++++++++++++
3 files changed, 49 insertions(+), 80 deletions(-)
create mode 100644 server/utils/auth.js
diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js
index 779ad2f48f..fe9f135b91 100644
--- a/common/models/User-Identity.js
+++ b/common/models/User-Identity.js
@@ -1,51 +1,14 @@
-import assign from 'object.assign';
import debugFactory from 'debug';
+import {
+ setProfileFromGithub,
+ getFirstImageFromProfile
+} from '../../server/utils/auth';
+
const debug = debugFactory('freecc:models:userIdent');
const { defaultProfileImage } = require('../utils/constantStrings.json');
-function getFirstImageFromProfile(profile) {
- return profile && profile.photos && profile.photos[0] ?
- profile.photos[0].value :
- null;
-}
-
-// using es6 argument destructing
-function setProfileFromGithub(
- user,
- {
- profileUrl: githubURL,
- username
- },
- {
- id: githubId,
- 'avatar_url': picture,
- email: githubEmail,
- 'created_at': joinedGithubOn,
- blog: website,
- location,
- name
- }
-) {
- return assign(
- user,
- { isGithubCool: true, isMigrationGrandfathered: false },
- {
- name,
- username: username.toLowerCase(),
- location,
- joinedGithubOn,
- website,
- picture,
- githubId,
- githubURL,
- githubEmail,
- githubProfile: githubURL
- }
- );
-}
-
export default function(UserIdent) {
UserIdent.observe('before save', function(ctx, next) {
var userIdent = ctx.currentInstance || ctx.instance;
diff --git a/server/server.js b/server/server.js
index bf0cb8c396..012c5ffd3f 100755
--- a/server/server.js
+++ b/server/server.js
@@ -10,11 +10,10 @@ var uuid = require('node-uuid'),
path = require('path'),
passportProviders = require('./passport-providers');
+var setProfileFromGithub = require('./utils/auth').setProfileFromGithub;
var generateKey =
require('loopback-component-passport/lib/models/utils').generateKey;
-/**
- * Create Express server.
- */
+
var app = loopback();
expressState.extend(app);
@@ -44,41 +43,6 @@ passportConfigurator.setupModels({
userCredentialModel: app.models.userCredential
});
-// using es6 argument destructing
-function setProfileFromGithub(
- user,
- {
- profileUrl: githubURL,
- username
- },
- {
- id: githubId,
- 'avatar_url': picture,
- email: githubEmail,
- 'created_at': joinedGithubOn,
- blog: website,
- location,
- name
- }
-) {
- return assign(
- user,
- { isGithubCool: true, isMigrationGrandfathered: false },
- {
- name,
- username: username.toLowerCase(),
- location,
- joinedGithubOn,
- website,
- picture,
- githubId,
- githubURL,
- githubEmail,
- githubProfile: githubURL
- }
- );
-}
-
var passportOptions = {
emailOptional: true,
profileToUser: function(provider, profile) {
diff --git a/server/utils/auth.js b/server/utils/auth.js
new file mode 100644
index 0000000000..fcbf198098
--- /dev/null
+++ b/server/utils/auth.js
@@ -0,0 +1,42 @@
+import assign from 'object.assign';
+
+// using es6 argument destructing
+export function setProfileFromGithub(
+ user,
+ {
+ profileUrl: githubURL,
+ username
+ },
+ {
+ id: githubId,
+ 'avatar_url': picture,
+ email: githubEmail,
+ 'created_at': joinedGithubOn,
+ blog: website,
+ location,
+ name
+ }
+) {
+ return assign(
+ user,
+ { isGithubCool: true, isMigrationGrandfathered: false },
+ {
+ name,
+ username: username.toLowerCase(),
+ location,
+ joinedGithubOn,
+ website,
+ picture,
+ githubId,
+ githubURL,
+ githubEmail,
+ githubProfile: githubURL
+ }
+ );
+}
+
+export function getFirstImageFromProfile(profile) {
+ return profile && profile.photos && profile.photos[0] ?
+ profile.photos[0].value :
+ null;
+}
From fc29c1fd9b11a2ac2116f8af88e13c7711f4b97b Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 16:25:52 -0700
Subject: [PATCH 03/11] linking accounts now works.
bug, need to change how loopback generates provider string.
---
common/models/User-Identity.js | 8 +++--
server/boot/a-extendUser.js | 10 +++---
server/boot/a-extendUserIdent.js | 59 +++++++++++++++++++++++++++++++
server/passport-providers.js | 3 ++
server/server.js | 4 +++
server/utils/rx.js | 2 +-
server/views/account/account.jade | 2 +-
7 files changed, 80 insertions(+), 8 deletions(-)
create mode 100644 server/boot/a-extendUserIdent.js
diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js
index fe9f135b91..b622b84d94 100644
--- a/common/models/User-Identity.js
+++ b/common/models/User-Identity.js
@@ -24,7 +24,7 @@ export default function(UserIdent) {
return next();
}
- const { profile } = userIdent;
+ const { profile, provider } = userIdent;
const picture = getFirstImageFromProfile(profile);
debug('picture', picture, user.picture);
@@ -41,8 +41,12 @@ export default function(UserIdent) {
userChanged = true;
}
+ if (!(/github/).test(provider)) {
+ user[provider.split('-')[0]] = profile.username;
+ }
+
// if user signed in with github refresh their info
- if (/github/.test(userIdent.provider)) {
+ if (/github/.test(provider)) {
debug("user isn't github cool or username from github is different");
setProfileFromGithub(user, profile, profile._json);
userChanged = true;
diff --git a/server/boot/a-extendUser.js b/server/boot/a-extendUser.js
index 3b0ced4cca..abeefcf728 100644
--- a/server/boot/a-extendUser.js
+++ b/server/boot/a-extendUser.js
@@ -1,8 +1,10 @@
-var Rx = require('rx');
-var debug = require('debug')('freecc:user:remote');
+import { Observable } from 'rx';
+import debugFactory from 'debug';
+
+const debug = debugFactory('freecc:user:remote');
function destroyAllRelated(id, Model) {
- return Rx.Observable.fromNodeCallback(
+ return Observable.fromNodeCallback(
Model.destroyAll,
Model
)({ userId: id });
@@ -19,7 +21,7 @@ module.exports = function(app) {
if (!id) {
return next();
}
- Rx.Observable.combineLatest(
+ Observable.combineLatest(
destroyAllRelated(id, UserIdentity),
destroyAllRelated(id, UserCredential),
function(identData, credData) {
diff --git a/server/boot/a-extendUserIdent.js b/server/boot/a-extendUserIdent.js
new file mode 100644
index 0000000000..940672cb2f
--- /dev/null
+++ b/server/boot/a-extendUserIdent.js
@@ -0,0 +1,59 @@
+import { observeMethod, observeQuery } from '../utils/rx';
+
+export default function({ models }) {
+ const { User, UserIdentity, UserCredential } = models;
+ const findUserById = observeMethod(User, 'findById');
+ const findIdent = observeMethod(UserIdentity, 'findOne');
+
+ UserIdentity.link = function(
+ userId,
+ provider,
+ authScheme,
+ profile,
+ credentials,
+ options = {},
+ cb
+ ) {
+ if (typeof options === 'function' && !cb) {
+ cb = options;
+ options = {};
+ }
+ const user$ = findUserById(userId);
+ console.log('provider', provider);
+ console.log('id', profile.id);
+ findIdent({
+ provider: provider,
+ externalId: profile.id
+ })
+ .flatMap(identity => {
+ const modified = new Date();
+ if (!identity || identity.externalId !== profile.id) {
+ return observeQuery(UserIdentity, 'create', {
+ provider,
+ externalId: profile.id,
+ authScheme,
+ profile,
+ credentials,
+ userId,
+ created: modified,
+ modified
+ });
+ }
+ identity.credentials = credentials;
+ return observeQuery(identity, 'updateAttributes', {
+ profile,
+ credentials,
+ modified
+ });
+ })
+ .withLatestFrom(user$, (identity, user) => ({ identity, user }))
+ .subscribe(
+ ({ identity, user }) => {
+ cb(null, user, identity);
+ },
+ cb
+ );
+ };
+
+ UserCredential.link = UserIdentity.link.bind(UserIdentity);
+}
diff --git a/server/passport-providers.js b/server/passport-providers.js
index 5ffcbf1a09..fc71a1e705 100644
--- a/server/passport-providers.js
+++ b/server/passport-providers.js
@@ -92,6 +92,7 @@ module.exports = {
failureRedirect: failureRedirect,
consumerKey: process.env.TWITTER_KEY,
consumerSecret: process.env.TWITTER_SECRET,
+ link: true,
failureFlash: true
},
'linkedin-login': {
@@ -126,6 +127,7 @@ module.exports = {
authOptions: {
state: process.env.LINKEDIN_STATE
},
+ link: true,
failureFlash: true
},
'github-login': {
@@ -154,6 +156,7 @@ module.exports = {
clientID: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET,
scope: ['email'],
+ link: true,
failureFlash: true
}
};
diff --git a/server/server.js b/server/server.js
index 012c5ffd3f..d9f2028dfb 100755
--- a/server/server.js
+++ b/server/server.js
@@ -66,6 +66,10 @@ var passportOptions = {
userObj.email = email;
}
+ if (!(/github/).test(provider)) {
+ userObj[provider.split('-')[0]] = profile.username;
+ }
+
if (/github/.test(provider)) {
setProfileFromGithub(userObj, profile, profile._json);
}
diff --git a/server/utils/rx.js b/server/utils/rx.js
index 7f0bac0704..d3b1ac41b0 100644
--- a/server/utils/rx.js
+++ b/server/utils/rx.js
@@ -22,7 +22,7 @@ exports.saveInstance = function saveInstance(instance) {
// alias saveInstance
exports.saveUser = exports.saveInstance;
-exports.observableQueryFromModel =
+exports.observeQuery = exports.observableQueryFromModel =
function observableQueryFromModel(Model, method, query) {
return Rx.Observable.fromNodeCallback(Model[method], Model)(query);
};
diff --git a/server/views/account/account.jade b/server/views/account/account.jade
index 22ad1b9975..9dd664849c 100644
--- a/server/views/account/account.jade
+++ b/server/views/account/account.jade
@@ -8,7 +8,7 @@ block content
.row
.col-xs-12
if (!user.isGithubCool)
- a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/auth/github')
+ a.btn.btn-lg.btn-block.btn-github.btn-link-social(href='/link/github')
i.fa.fa-github
| Link my GitHub to unlock this profile
else
From eb07cbfea6697b9dbc7ed7035c4a48ac976df484 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 19:08:05 -0700
Subject: [PATCH 04/11] fix override user identity login to reformat provider
---
common/models/User-Identity.js | 131 +++++++++++++++++++++++++++++--
server/boot/a-extendUserIdent.js | 7 +-
server/utils/auth.js | 4 +
3 files changed, 132 insertions(+), 10 deletions(-)
diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js
index b622b84d94..58ac7ed380 100644
--- a/common/models/User-Identity.js
+++ b/common/models/User-Identity.js
@@ -1,20 +1,137 @@
+import loopback from 'loopback';
import debugFactory from 'debug';
import {
setProfileFromGithub,
- getFirstImageFromProfile
+ getFirstImageFromProfile,
+ getSocialProvider
} from '../../server/utils/auth';
const debug = debugFactory('freecc:models:userIdent');
const { defaultProfileImage } = require('../utils/constantStrings.json');
+function createAccessToken(user, ttl, cb) {
+ if (arguments.length === 2 && typeof ttl === 'function') {
+ cb = ttl;
+ ttl = 0;
+ }
+ user.accessTokens.create({
+ created: new Date(),
+ ttl: Math.min(ttl || user.constructor.settings.ttl,
+ user.constructor.settings.maxTTL)
+ }, cb);
+}
+
export default function(UserIdent) {
- UserIdent.observe('before save', function(ctx, next) {
- var userIdent = ctx.currentInstance || ctx.instance;
- if (!userIdent) {
- debug('no user identity instance found');
- return next();
+ // original source
+ // github.com/strongloop/loopback-component-passport
+ UserIdent.login = function(
+ provider,
+ authScheme,
+ profile,
+ credentials,
+ options,
+ cb
+ ) {
+ options = options || {};
+ if (typeof options === 'function' && !cb) {
+ cb = options;
+ options = {};
+ }
+ var autoLogin = options.autoLogin || !options.autoLogin;
+ var userIdentityModel = UserIdent;
+ profile.id = profile.id || profile.openid;
+ userIdentityModel.findOne({
+ where: {
+ provider: getSocialProvider(provider),
+ externalId: profile.id
+ }
+ }, function(err, identity) {
+ if (err) {
+ return cb(err);
+ }
+ if (identity) {
+ identity.credentials = credentials;
+ return identity.updateAttributes({
+ profile: profile,
+ credentials: credentials,
+ modified: new Date()
+ }, function(err) {
+ if (err) {
+ return cb(err);
+ }
+ // Find the user for the given identity
+ return identity.user(function(err, user) {
+ // Create access token if the autoLogin flag is set to true
+ if (!err && user && autoLogin) {
+ return (options.createAccessToken || createAccessToken)(
+ user,
+ function(err, token) {
+ cb(err, user, identity, token);
+ }
+ );
+ }
+ cb(err, user, identity);
+ });
+ });
+ }
+ // Find the user model
+ var userModel = userIdentityModel.relations.user &&
+ userIdentityModel.relations.user.modelTo ||
+ loopback.getModelByType(loopback.User);
+
+ var userObj = options.profileToUser(provider, profile, options);
+
+ if (!userObj.email && !options.emailOptional) {
+ process.nextTick(function() {
+ return cb('email is missing from the user profile');
+ });
+ }
+
+ var query;
+ if (userObj.email) {
+ query = { or: [
+ { username: userObj.username },
+ { email: userObj.email }
+ ]};
+ } else {
+ query = { username: userObj.username };
+ }
+ userModel.findOrCreate({ where: query }, userObj, function(err, user) {
+ if (err) {
+ return cb(err);
+ }
+ var date = new Date();
+ userIdentityModel.create({
+ provider: getSocialProvider(provider),
+ externalId: profile.id,
+ authScheme: authScheme,
+ profile: profile,
+ credentials: credentials,
+ userId: user.id,
+ created: date,
+ modified: date
+ }, function(err, identity) {
+ if (!err && user && autoLogin) {
+ return (options.createAccessToken || createAccessToken)(
+ user,
+ function(err, token) {
+ cb(err, user, identity, token);
+ }
+ );
+ }
+ cb(err, user, identity);
+ });
+ });
+ });
+ };
+
+ UserIdent.observe('before save', function(ctx, next) {
+ var userIdent = ctx.currentInstance || ctx.instance;
+ if (!userIdent) {
+ debug('no user identity instance found');
+ return next();
}
userIdent.user(function(err, user) {
let userChanged = false;
@@ -42,7 +159,7 @@ export default function(UserIdent) {
}
if (!(/github/).test(provider)) {
- user[provider.split('-')[0]] = profile.username;
+ user[getSocialProvider(provider)] = profile.username;
}
// if user signed in with github refresh their info
diff --git a/server/boot/a-extendUserIdent.js b/server/boot/a-extendUserIdent.js
index 940672cb2f..1d504b5b4e 100644
--- a/server/boot/a-extendUserIdent.js
+++ b/server/boot/a-extendUserIdent.js
@@ -1,4 +1,5 @@
import { observeMethod, observeQuery } from '../utils/rx';
+import { getSocialProvider } from '../utils/auth';
export default function({ models }) {
const { User, UserIdentity, UserCredential } = models;
@@ -22,14 +23,14 @@ export default function({ models }) {
console.log('provider', provider);
console.log('id', profile.id);
findIdent({
- provider: provider,
+ provider: getSocialProvider(provider),
externalId: profile.id
})
.flatMap(identity => {
const modified = new Date();
if (!identity || identity.externalId !== profile.id) {
return observeQuery(UserIdentity, 'create', {
- provider,
+ provider: getSocialProvider(provider),
externalId: profile.id,
authScheme,
profile,
@@ -41,7 +42,7 @@ export default function({ models }) {
}
identity.credentials = credentials;
return observeQuery(identity, 'updateAttributes', {
- profile,
+ profile: getSocialProvider(provider),
credentials,
modified
});
diff --git a/server/utils/auth.js b/server/utils/auth.js
index fcbf198098..fd7905027d 100644
--- a/server/utils/auth.js
+++ b/server/utils/auth.js
@@ -40,3 +40,7 @@ export function getFirstImageFromProfile(profile) {
profile.photos[0].value :
null;
}
+
+export function getSocialProvider(provider) {
+ return provider.split('-')[0];
+}
From 4b0a9bef0a67f641a14c085613799279337333bb Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 20:09:15 -0700
Subject: [PATCH 05/11] fix social auth scheme
closes #1734
---
common/models/User-Identity.js | 80 +++++++++++++++++-----------------
common/models/user.json | 25 +++++------
server/server.js | 3 +-
3 files changed, 53 insertions(+), 55 deletions(-)
diff --git a/common/models/User-Identity.js b/common/models/User-Identity.js
index 58ac7ed380..7aa88b295e 100644
--- a/common/models/User-Identity.js
+++ b/common/models/User-Identity.js
@@ -132,52 +132,54 @@ export default function(UserIdent) {
if (!userIdent) {
debug('no user identity instance found');
return next();
- }
- userIdent.user(function(err, user) {
- let userChanged = false;
- if (err) { return next(err); }
- if (!user) {
- debug('no user attached to identity!');
- return next();
}
+ userIdent.user(function(err, user) {
+ let userChanged = false;
+ if (err) { return next(err); }
+ if (!user) {
+ debug('no user attached to identity!');
+ return next();
+ }
- const { profile, provider } = userIdent;
- const picture = getFirstImageFromProfile(profile);
+ const { profile, provider } = userIdent;
+ const picture = getFirstImageFromProfile(profile);
- debug('picture', picture, user.picture);
- // check if picture was found
- // check if user has no picture
- // check if user has default picture
- // set user.picture from oauth provider
- if (
- picture &&
- (!user.picture || user.picture === defaultProfileImage)
- ) {
- debug('setting user picture');
- user.picture = picture;
- userChanged = true;
- }
+ debug('picture', picture, user.picture);
+ // check if picture was found
+ // check if user has no picture
+ // check if user has default picture
+ // set user.picture from oauth provider
+ if (
+ picture &&
+ (!user.picture || user.picture === defaultProfileImage)
+ ) {
+ debug('setting user picture');
+ user.picture = picture;
+ userChanged = true;
+ }
- if (!(/github/).test(provider)) {
- user[getSocialProvider(provider)] = profile.username;
- }
+ if (!(/github/).test(provider)) {
+ debug('setting social', provider, (/github/g).test(provider));
+ debug('profile username', profile.username);
+ user[provider] = profile.username;
+ }
- // if user signed in with github refresh their info
- if (/github/.test(provider)) {
- debug("user isn't github cool or username from github is different");
- setProfileFromGithub(user, profile, profile._json);
- userChanged = true;
- }
+ // if user signed in with github refresh their info
+ if (/github/.test(provider)) {
+ debug("user isn't github cool or username from github is different");
+ setProfileFromGithub(user, profile, profile._json);
+ userChanged = true;
+ }
- if (userChanged) {
- return user.save(function(err) {
- if (err) { return next(err); }
- next();
- });
- }
- debug('exiting after user identity before save');
- next();
+ if (userChanged) {
+ return user.save(function(err) {
+ if (err) { return next(err); }
+ next();
+ });
+ }
+ debug('exiting after user identity before save');
+ next();
});
});
}
diff --git a/common/models/user.json b/common/models/user.json
index 871cd2db46..aaaf610d07 100644
--- a/common/models/user.json
+++ b/common/models/user.json
@@ -72,25 +72,20 @@
"type": "string",
"default": ""
},
- "linkedinProfile": {
- "type": "string",
- "default": ""
+ "linkedin": {
+ "type": "string"
},
- "githubProfile": {
- "type": "string",
- "default": ""
+ "codepen": {
+ "type": "string"
},
- "codepenProfile": {
- "type": "string",
- "default": ""
+ "twitter": {
+ "type": "string"
},
- "twitterHandle": {
- "type": "string",
- "default": ""
+ "facebook": {
+ "type": "string"
},
- "facebookProfile": {
- "type": "string",
- "default": ""
+ "google": {
+ "type": "string"
},
"completedBonfires": {
"type": [
diff --git a/server/server.js b/server/server.js
index d9f2028dfb..6c16c224ab 100755
--- a/server/server.js
+++ b/server/server.js
@@ -11,6 +11,7 @@ var uuid = require('node-uuid'),
passportProviders = require('./passport-providers');
var setProfileFromGithub = require('./utils/auth').setProfileFromGithub;
+var getSocialProvider = require('./utils/auth').getSocialProvider;
var generateKey =
require('loopback-component-passport/lib/models/utils').generateKey;
@@ -67,7 +68,7 @@ var passportOptions = {
}
if (!(/github/).test(provider)) {
- userObj[provider.split('-')[0]] = profile.username;
+ userObj[getSocialProvider(provider)] = profile.username;
}
if (/github/.test(provider)) {
From cc2e7a69f981f675ab66ef70ce44db176eca2be9 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 20:30:08 -0700
Subject: [PATCH 06/11] fix loopback migration to new auth scheme
closes #1735
---
seed/loopbackMigration.js | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/seed/loopbackMigration.js b/seed/loopbackMigration.js
index d167ccec8b..e300bd217b 100644
--- a/seed/loopbackMigration.js
+++ b/seed/loopbackMigration.js
@@ -86,15 +86,19 @@ var users = dbObservable
.map(function(user) {
// flatten user
assign(user, user.portfolio, user.profile);
- if (user.username) {
- return user;
+ if (!user.username) {
+ user.username = 'fcc' + uuid.v4().slice(0, 8);
}
- user.username = 'fcc' + uuid.v4().slice(0, 8);
if (user.github) {
user.isGithubCool = true;
} else {
user.isMigrationGrandfathered = true;
}
+ providers.forEach(function(provider) {
+ user[provider + 'id'] = user[provider];
+ user[provider] = null;
+ });
+
return user;
})
.shareReplay();
@@ -123,7 +127,7 @@ var userIdentityCount = users
.map(function(provider) {
return {
provider: provider,
- externalId: user[provider],
+ externalId: user[provider + 'id'],
userId: user._id || user.id
};
})
From cd9dcc6953624f294dda95ef68db17f246668d69 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 20:32:27 -0700
Subject: [PATCH 07/11] hide react routes
---
server/boot/a-react.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/server/boot/a-react.js b/server/boot/a-react.js
index a723b805ad..68613da705 100644
--- a/server/boot/a-react.js
+++ b/server/boot/a-react.js
@@ -11,9 +11,9 @@ const debug = debugFactory('freecc:react-server');
// add routes here as they slowly get reactified
// remove their individual controllers
const routes = [
- '/hikes',
- '/hikes/*',
- '/jobs'
+ // '/hikes',
+ // '/hikes/*',
+ // '/jobs'
];
export default function reactSubRouter(app) {
From 7eaccffd15c29faab720ef352e94630c67e74e32 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 20:39:40 -0700
Subject: [PATCH 08/11] remove hikes from map
closes #1682
---
server/boot/challenge.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/server/boot/challenge.js b/server/boot/challenge.js
index 055cc6747f..02d9ff92c5 100644
--- a/server/boot/challenge.js
+++ b/server/boot/challenge.js
@@ -77,7 +77,11 @@ module.exports = function(app) {
name: blockArray[0].block,
dashedName: dasherize(blockArray[0].block),
challenges: blockArray
- }));
+ }))
+ .filter(({ name })=> {
+ return name !== 'Hikes';
+ })
+ .shareReplay();
const User = app.models.User;
const userCount$ = observeMethod(User, 'count');
@@ -135,6 +139,7 @@ module.exports = function(app) {
const challengeId = req.user.currentChallenge.challengeId;
// find challenge
return challenge$
+ .filter(({ block }) => block !== 'Hikes')
.filter(({ id }) => id === challengeId)
// now lets find the block it belongs to
.flatMap(challenge => {
@@ -537,6 +542,7 @@ module.exports = function(app) {
completed: completedCount / blockArray.length * 100
};
})
+ .filter(({ name }) => name !== 'Hikes')
// turn stream of blocks into a stream of an array
.toArray();
From ac5f8b9d9abc90b2e701a5aa81afb4acb3befec5 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 20:42:37 -0700
Subject: [PATCH 09/11] remove unneccassry demo dir from codemirror
closes #1730
---
public/js/lib/codemirror/demo/activeline.html | 78 --------
.../js/lib/codemirror/demo/anywordhint.html | 79 --------
public/js/lib/codemirror/demo/bidi.html | 74 -------
public/js/lib/codemirror/demo/btree.html | 85 --------
public/js/lib/codemirror/demo/buffers.html | 109 -----------
public/js/lib/codemirror/demo/changemode.html | 58 ------
.../js/lib/codemirror/demo/closebrackets.html | 52 -----
public/js/lib/codemirror/demo/closetag.html | 41 ----
public/js/lib/codemirror/demo/complete.html | 79 --------
public/js/lib/codemirror/demo/emacs.html | 75 --------
public/js/lib/codemirror/demo/folding.html | 95 ---------
public/js/lib/codemirror/demo/fullscreen.html | 83 --------
public/js/lib/codemirror/demo/hardwrap.html | 72 -------
.../js/lib/codemirror/demo/html5complete.html | 56 ------
public/js/lib/codemirror/demo/indentwrap.html | 59 ------
public/js/lib/codemirror/demo/lint.html | 171 -----------------
public/js/lib/codemirror/demo/loadmode.html | 72 -------
public/js/lib/codemirror/demo/marker.html | 52 -----
.../js/lib/codemirror/demo/markselection.html | 52 -----
.../lib/codemirror/demo/matchhighlighter.html | 47 -----
public/js/lib/codemirror/demo/matchtags.html | 48 -----
public/js/lib/codemirror/demo/merge.html | 115 -----------
public/js/lib/codemirror/demo/multiplex.html | 75 --------
public/js/lib/codemirror/demo/mustache.html | 69 -------
public/js/lib/codemirror/demo/panel.html | 64 -------
.../js/lib/codemirror/demo/placeholder.html | 45 -----
public/js/lib/codemirror/demo/preview.html | 87 ---------
public/js/lib/codemirror/demo/requirejs.html | 52 -----
public/js/lib/codemirror/demo/resize.html | 51 -----
public/js/lib/codemirror/demo/rulers.html | 49 -----
public/js/lib/codemirror/demo/runmode.html | 62 ------
public/js/lib/codemirror/demo/search.html | 93 ---------
public/js/lib/codemirror/demo/simplemode.html | 181 ------------------
.../lib/codemirror/demo/simplescrollbars.html | 82 --------
.../demo/spanaffectswrapping_shim.html | 85 --------
public/js/lib/codemirror/demo/sublime.html | 76 --------
public/js/lib/codemirror/demo/tern.html | 133 -------------
public/js/lib/codemirror/demo/theme.html | 130 -------------
.../js/lib/codemirror/demo/trailingspace.html | 48 -----
.../lib/codemirror/demo/variableheight.html | 67 -------
public/js/lib/codemirror/demo/vim.html | 99 ----------
.../js/lib/codemirror/demo/visibletabs.html | 62 ------
public/js/lib/codemirror/demo/widget.html | 85 --------
.../js/lib/codemirror/demo/xmlcomplete.html | 119 ------------
44 files changed, 3466 deletions(-)
delete mode 100644 public/js/lib/codemirror/demo/activeline.html
delete mode 100644 public/js/lib/codemirror/demo/anywordhint.html
delete mode 100644 public/js/lib/codemirror/demo/bidi.html
delete mode 100644 public/js/lib/codemirror/demo/btree.html
delete mode 100644 public/js/lib/codemirror/demo/buffers.html
delete mode 100644 public/js/lib/codemirror/demo/changemode.html
delete mode 100644 public/js/lib/codemirror/demo/closebrackets.html
delete mode 100644 public/js/lib/codemirror/demo/closetag.html
delete mode 100644 public/js/lib/codemirror/demo/complete.html
delete mode 100644 public/js/lib/codemirror/demo/emacs.html
delete mode 100644 public/js/lib/codemirror/demo/folding.html
delete mode 100644 public/js/lib/codemirror/demo/fullscreen.html
delete mode 100644 public/js/lib/codemirror/demo/hardwrap.html
delete mode 100644 public/js/lib/codemirror/demo/html5complete.html
delete mode 100644 public/js/lib/codemirror/demo/indentwrap.html
delete mode 100644 public/js/lib/codemirror/demo/lint.html
delete mode 100644 public/js/lib/codemirror/demo/loadmode.html
delete mode 100644 public/js/lib/codemirror/demo/marker.html
delete mode 100644 public/js/lib/codemirror/demo/markselection.html
delete mode 100644 public/js/lib/codemirror/demo/matchhighlighter.html
delete mode 100644 public/js/lib/codemirror/demo/matchtags.html
delete mode 100644 public/js/lib/codemirror/demo/merge.html
delete mode 100644 public/js/lib/codemirror/demo/multiplex.html
delete mode 100644 public/js/lib/codemirror/demo/mustache.html
delete mode 100644 public/js/lib/codemirror/demo/panel.html
delete mode 100644 public/js/lib/codemirror/demo/placeholder.html
delete mode 100644 public/js/lib/codemirror/demo/preview.html
delete mode 100644 public/js/lib/codemirror/demo/requirejs.html
delete mode 100644 public/js/lib/codemirror/demo/resize.html
delete mode 100644 public/js/lib/codemirror/demo/rulers.html
delete mode 100644 public/js/lib/codemirror/demo/runmode.html
delete mode 100644 public/js/lib/codemirror/demo/search.html
delete mode 100644 public/js/lib/codemirror/demo/simplemode.html
delete mode 100644 public/js/lib/codemirror/demo/simplescrollbars.html
delete mode 100644 public/js/lib/codemirror/demo/spanaffectswrapping_shim.html
delete mode 100644 public/js/lib/codemirror/demo/sublime.html
delete mode 100644 public/js/lib/codemirror/demo/tern.html
delete mode 100644 public/js/lib/codemirror/demo/theme.html
delete mode 100644 public/js/lib/codemirror/demo/trailingspace.html
delete mode 100644 public/js/lib/codemirror/demo/variableheight.html
delete mode 100644 public/js/lib/codemirror/demo/vim.html
delete mode 100644 public/js/lib/codemirror/demo/visibletabs.html
delete mode 100644 public/js/lib/codemirror/demo/widget.html
delete mode 100644 public/js/lib/codemirror/demo/xmlcomplete.html
diff --git a/public/js/lib/codemirror/demo/activeline.html b/public/js/lib/codemirror/demo/activeline.html
deleted file mode 100644
index 741f6c45a4..0000000000
--- a/public/js/lib/codemirror/demo/activeline.html
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-CodeMirror: Active Line Demo
-
-
-
-
-
-
-
-
-
-
-
-Active Line Demo
-
-
-
-
- Styling the current cursor line.
-
-
diff --git a/public/js/lib/codemirror/demo/anywordhint.html b/public/js/lib/codemirror/demo/anywordhint.html
deleted file mode 100644
index 0a7caece24..0000000000
--- a/public/js/lib/codemirror/demo/anywordhint.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-CodeMirror: Any Word Completion Demo
-
-
-
-
-
-
-
-
-
-
-
-
-Any Word Completion Demo
-
-(function() {
- "use strict";
-
- var WORD = /[\w$]+/g, RANGE = 500;
-
- CodeMirror.registerHelper("hint", "anyword", function(editor, options) {
- var word = options && options.word || WORD;
- var range = options && options.range || RANGE;
- var cur = editor.getCursor(), curLine = editor.getLine(cur.line);
- var start = cur.ch, end = start;
- while (end < curLine.length && word.test(curLine.charAt(end))) ++end;
- while (start && word.test(curLine.charAt(start - 1))) --start;
- var curWord = start != end && curLine.slice(start, end);
-
- var list = [], seen = {};
- function scan(dir) {
- var line = cur.line, end = Math.min(Math.max(line + dir * range, editor.firstLine()), editor.lastLine()) + dir;
- for (; line != end; line += dir) {
- var text = editor.getLine(line), m;
- word.lastIndex = 0;
- while (m = word.exec(text)) {
- if ((!curWord || m[0].indexOf(curWord) == 0) && !seen.hasOwnProperty(m[0])) {
- seen[m[0]] = true;
- list.push(m[0]);
- }
- }
- }
- }
- scan(-1);
- scan(1);
- return {list: list, from: CodeMirror.Pos(cur.line, start), to: CodeMirror.Pos(cur.line, end)};
- });
-})();
-
-
-Press ctrl-space to activate autocompletion. The
-completion uses
-the anyword-hint.js
-module, which simply looks at nearby words in the buffer and completes
-to those.
-
-
-
diff --git a/public/js/lib/codemirror/demo/bidi.html b/public/js/lib/codemirror/demo/bidi.html
deleted file mode 100644
index 6dd73bec3a..0000000000
--- a/public/js/lib/codemirror/demo/bidi.html
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-CodeMirror: Bi-directional Text Demo
-
-
-
-
-
-
-
-
-
-
-Bi-directional Text Demo
-
-
-
- value (string or Doc)
- قيمة البداية المحرر. يمكن أن تكون سلسلة، أو. كائن مستند.
- mode (string or object)
- وضع الاستخدام. عندما لا تعطى، وهذا الافتراضي إلى الطريقة الاولى
- التي تم تحميلها. قد يكون من سلسلة، والتي إما أسماء أو ببساطة هو وضع
- MIME نوع المرتبطة اسطة. بدلا من ذلك، قد يكون من كائن يحتوي على
- خيارات التكوين لواسطة، مع name
الخاصية التي وضع أسماء
- (على سبيل المثال {name: "javascript", json: true}
).
- صفحات التجريبي لكل وضع تحتوي على معلومات حول ما معلمات تكوين وضع
- يدعمها. يمكنك أن تطلب CodeMirror التي تم تعريفها طرق وأنواع MIME
- الكشف على CodeMirror.modes
- و CodeMirror.mimeModes
الكائنات. وضع خرائط الأسماء
- الأولى لمنشئات الخاصة بهم، وخرائط لأنواع MIME 2 المواصفات
- واسطة.
- theme (string)
- موضوع لنمط المحرر مع. يجب عليك التأكد من الملف CSS تحديد
- المقابلة .cm-s-[name]
يتم تحميل أنماط (انظر
- theme
الدليل في التوزيع).
- الافتراضي هو "default"
، والتي تم تضمينها في
- الألوان codemirror.css
. فمن الممكن استخدام فئات متعددة
- في تطبيق السمات مرة واحدة على سبيل المثال "foo bar"
- سيتم تعيين كل من cm-s-foo
و cm-s-bar
- الطبقات إلى المحرر.
-
-
-
-
-
- Demonstration of bi-directional text support. See
- the related
- blog post for more background.
-
- Note: There is
- a known
- bug with cursor motion and mouse clicks in bi-directional lines
- that are line wrapped.
-
-
diff --git a/public/js/lib/codemirror/demo/btree.html b/public/js/lib/codemirror/demo/btree.html
deleted file mode 100644
index fc4997f4f5..0000000000
--- a/public/js/lib/codemirror/demo/btree.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-CodeMirror: B-Tree visualization
-
-
-
-
-
-
-
-
-
-B-Tree visualization
-type here, see a summary of the document b-tree below
-
-
-
-
-
-
-Add a lot of content
-
-
diff --git a/public/js/lib/codemirror/demo/buffers.html b/public/js/lib/codemirror/demo/buffers.html
deleted file mode 100644
index 16ffc7dfe9..0000000000
--- a/public/js/lib/codemirror/demo/buffers.html
+++ /dev/null
@@ -1,109 +0,0 @@
-
-
-CodeMirror: Multiple Buffer & Split View Demo
-
-
-
-
-
-
-
-
-
-
-
-Multiple Buffer & Split View Demo
-
-
-
-
- Select buffer:
- New buffer
-
-
-
- Select buffer:
- New buffer
-
-
-
-
- Demonstration of
- using linked documents
- to provide a split view on a document, and
- using swapDoc
- to use a single editor to display multiple documents.
-
-
diff --git a/public/js/lib/codemirror/demo/changemode.html b/public/js/lib/codemirror/demo/changemode.html
deleted file mode 100644
index 9405932abe..0000000000
--- a/public/js/lib/codemirror/demo/changemode.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-CodeMirror: Mode-Changing Demo
-
-
-
-
-
-
-
-
-
-
-
-Mode-Changing Demo
-
-;; If there is Scheme code in here, the editor will be in Scheme mode.
-;; If you put in JS instead, it'll switch to JS mode.
-
-(define (double x)
- (* x x))
-
-
-On changes to the content of the above editor, a (crude) script
-tries to auto-detect the language used, and switches the editor to
-either JavaScript or Scheme mode based on that.
-
-
-
diff --git a/public/js/lib/codemirror/demo/closebrackets.html b/public/js/lib/codemirror/demo/closebrackets.html
deleted file mode 100644
index d702f52696..0000000000
--- a/public/js/lib/codemirror/demo/closebrackets.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-CodeMirror: Closebrackets Demo
-
-
-
-
-
-
-
-
-
-
-
-Closebrackets Demo
-function Grid(width, height) {
- this.width = width;
- this.height = height;
- this.cells = new Array(width * height);
-}
-Grid.prototype.valueAt = function(point) {
- return this.cells[point.y * this.width + point.x];
-};
-Grid.prototype.setValueAt = function(point, value) {
- this.cells[point.y * this.width + point.x] = value;
-};
-Grid.prototype.isInside = function(point) {
- return point.x >= 0 && point.y >= 0 &&
- point.x < this.width && point.y < this.height;
-};
-Grid.prototype.moveValue = function(from, to) {
- this.setValueAt(to, this.valueAt(from));
- this.setValueAt(from, undefined);
-};
-
-
-
diff --git a/public/js/lib/codemirror/demo/closetag.html b/public/js/lib/codemirror/demo/closetag.html
deleted file mode 100644
index 79959d2c4d..0000000000
--- a/public/js/lib/codemirror/demo/closetag.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-CodeMirror: Close-Tag Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Close-Tag Demo
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/complete.html b/public/js/lib/codemirror/demo/complete.html
deleted file mode 100644
index cdf49dbeb9..0000000000
--- a/public/js/lib/codemirror/demo/complete.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-CodeMirror: Autocomplete Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-Autocomplete Demo
-
-function getCompletions(token, context) {
- var found = [], start = token.string;
- function maybeAdd(str) {
- if (str.indexOf(start) == 0) found.push(str);
- }
- function gatherCompletions(obj) {
- if (typeof obj == "string") forEach(stringProps, maybeAdd);
- else if (obj instanceof Array) forEach(arrayProps, maybeAdd);
- else if (obj instanceof Function) forEach(funcProps, maybeAdd);
- for (var name in obj) maybeAdd(name);
- }
-
- if (context) {
- // If this is a property, see if it belongs to some object we can
- // find in the current environment.
- var obj = context.pop(), base;
- if (obj.className == "js-variable")
- base = window[obj.string];
- else if (obj.className == "js-string")
- base = "";
- else if (obj.className == "js-atom")
- base = 1;
- while (base != null && context.length)
- base = base[context.pop().string];
- if (base != null) gatherCompletions(base);
- }
- else {
- // If not, just look in the window object and any local scope
- // (reading into JS mode internals to get at the local variables)
- for (var v = token.state.localVars; v; v = v.next) maybeAdd(v.name);
- gatherCompletions(window);
- forEach(keywords, maybeAdd);
- }
- return found;
-}
-
-
-Press ctrl-space to activate autocompletion. Built
-on top of the show-hint
-and javascript-hint
-addons.
-
-
-
diff --git a/public/js/lib/codemirror/demo/emacs.html b/public/js/lib/codemirror/demo/emacs.html
deleted file mode 100644
index c626b8d408..0000000000
--- a/public/js/lib/codemirror/demo/emacs.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-CodeMirror: Emacs bindings demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Emacs bindings demo
-
-#include "syscalls.h"
-/* getchar: simple buffered version */
-int getchar(void)
-{
- static char buf[BUFSIZ];
- static char *bufp = buf;
- static int n = 0;
- if (n == 0) { /* buffer is empty */
- n = read(0, buf, sizeof buf);
- bufp = buf;
- }
- return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
-}
-
-
-The emacs keybindings are enabled by
-including keymap/emacs.js and setting
-the keyMap
option to "emacs"
. Because
-CodeMirror's internal API is quite different from Emacs, they are only
-a loose approximation of actual emacs bindings, though.
-
-Also note that a lot of browsers disallow certain keys from being
-captured. For example, Chrome blocks both Ctrl-W and Ctrl-N, with the
-result that idiomatic use of Emacs keys will constantly close your tab
-or open a new window.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/folding.html b/public/js/lib/codemirror/demo/folding.html
deleted file mode 100644
index 81cbf9894b..0000000000
--- a/public/js/lib/codemirror/demo/folding.html
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-
- CodeMirror: Code Folding Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Code Folding Demo
-
- JavaScript:
-
- HTML:
-
- Markdown:
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/fullscreen.html b/public/js/lib/codemirror/demo/fullscreen.html
deleted file mode 100644
index 1fbdc488e1..0000000000
--- a/public/js/lib/codemirror/demo/fullscreen.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-CodeMirror: Full Screen Editing
-
-
-
-
-
-
-
-
-
-
-
-
-
-Full Screen Editing
-
-
- indentWithTabs : boolean
- Whether, when indenting, the first N*tabSize
- spaces should be replaced by N tabs. Default is false.
-
- electricChars : boolean
- Configures whether the editor should re-indent the current
- line when a character is typed that might change its proper
- indentation (only works if the mode supports indentation).
- Default is true.
-
- specialChars : RegExp
- A regular expression used to determine which characters
- should be replaced by a
- special placeholder .
- Mostly useful for non-printing special characters. The default
- is /[\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/
.
- specialCharPlaceholder : function(char) → Element
- A function that, given a special character identified by
- the specialChars
- option, produces a DOM node that is used to represent the
- character. By default, a red dot (• )
- is shown, with a title tooltip to indicate the character code.
-
- rtlMoveVisually : boolean
- Determines whether horizontal cursor movement through
- right-to-left (Arabic, Hebrew) text is visual (pressing the left
- arrow moves the cursor left) or logical (pressing the left arrow
- moves to the next lower index in the string, which is visually
- right in right-to-left text). The default is false
- on Windows, and true
on other platforms.
-
-
-
-
- Demonstration of
- the fullscreen
- addon. Press F11 when cursor is in the editor to
- toggle full screen editing. Esc can also be used
- to exit full screen editing.
-
diff --git a/public/js/lib/codemirror/demo/hardwrap.html b/public/js/lib/codemirror/demo/hardwrap.html
deleted file mode 100644
index f1a870b41c..0000000000
--- a/public/js/lib/codemirror/demo/hardwrap.html
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-CodeMirror: Hard-wrapping Demo
-
-
-
-
-
-
-
-
-
-
-
-Hard-wrapping Demo
-Lorem ipsum dolor sit amet, vim augue dictas constituto ex,
-sit falli simul viderer te. Graeco scaevola maluisset sit
-ut, in idque viris praesent sea. Ea sea eirmod indoctum
-repudiare. Vel noluisse suscipit pericula ut. In ius nulla
-alienum molestie. Mei essent discere democritum id.
-
-Equidem ponderum expetendis ius in, mea an erroribus
-constituto, congue timeam perfecto ad est. Ius ut primis
-timeam, per in ullum mediocrem. An case vero labitur pri,
-vel dicit laoreet et. An qui prompta conclusionemque, eam
-timeam sapientem in, cum dictas epicurei eu.
-
-Usu cu vide dictas deseruisse, eum choro graece adipiscing
-ut. Cibo qualisque ius ad, et dicat scripta mea, eam nihil
-mentitum aliquando cu. Debet aperiam splendide at quo, ad
-paulo nostro commodo duo. Sea adhuc utinam conclusionemque
-id, quas doming malorum nec ad. Tollit eruditi vivendum ad
-ius, eos soleat ignota ad.
-
-
-Demonstration of
-the hardwrap addon.
-The above editor has its change event hooked up to
-the wrapParagraphsInRange
method, so that the paragraphs
-are reflown as you are typing.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/html5complete.html b/public/js/lib/codemirror/demo/html5complete.html
deleted file mode 100644
index 411baae3ed..0000000000
--- a/public/js/lib/codemirror/demo/html5complete.html
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
- CodeMirror: HTML completion demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HTML completion demo
-
- Shows the XML completer
- parameterized with information about the tags in HTML.
- Press ctrl-space to activate completion.
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/indentwrap.html b/public/js/lib/codemirror/demo/indentwrap.html
deleted file mode 100644
index 3d3d0af6ab..0000000000
--- a/public/js/lib/codemirror/demo/indentwrap.html
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-CodeMirror: Indented wrapped line demo
-
-
-
-
-
-
-
-
-
-
-Indented wrapped line demo
-
-
-
- Overview
-
- CodeMirror is a code-editor component that can be embedded in Web pages. The core library provides only the editor component, no accompanying buttons, auto-completion, or other IDE functionality. It does provide a rich API on top of which such functionality can be straightforwardly implemented. See the add-ons included in the distribution, and the CodeMirror UI project, for reusable implementations of extra features.
-
- CodeMirror works with language-specific modes. Modes are JavaScript programs that help color (and optionally indent) text written in a given language. The distribution comes with a number of modes (see the mode/
directory), and it isn't hard to write new ones for other languages.
-
-
-
- This page uses a hack on top of the "renderLine"
- event to make wrapped text line up with the base indentation of
- the line.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/lint.html b/public/js/lib/codemirror/demo/lint.html
deleted file mode 100644
index 29936a8d96..0000000000
--- a/public/js/lib/codemirror/demo/lint.html
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-CodeMirror: Linter Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Linter Demo
-
-
- var widgets = []
-function updateHints() {
- editor.operation(function(){
- for (var i = 0; i < widgets.length; ++i)
- editor.removeLineWidget(widgets[i]);
- widgets.length = 0;
-
- JSHINT(editor.getValue());
- for (var i = 0; i < JSHINT.errors.length; ++i) {
- var err = JSHINT.errors[i];
- if (!err) continue;
- var msg = document.createElement("div");
- var icon = msg.appendChild(document.createElement("span"));
- icon.innerHTML = "!!";
- icon.className = "lint-error-icon";
- msg.appendChild(document.createTextNode(err.reason));
- msg.className = "lint-error";
- widgets.push(editor.addLineWidget(err.line - 1, msg, {coverGutter: false, noHScroll: true}));
- }
- });
- var info = editor.getScrollInfo();
- var after = editor.charCoords({line: editor.getCursor().line + 1, ch: 0}, "local").top;
- if (info.top + info.clientHeight < after)
- editor.scrollTo(null, after - info.clientHeight + 3);
-}
-
-
- [
- {
- _id: "post 1",
- "author": "Bob",
- "content": "...",
- "page_views": 5
- },
- {
- "_id": "post 2",
- "author": "Bob",
- "content": "...",
- "page_views": 9
- },
- {
- "_id": "post 3",
- "author": "Bob",
- "content": "...",
- "page_views": 8
- }
-]
-
-
- @charset "UTF-8";
-
-@import url("booya.css") print, screen;
-@import "whatup.css" screen;
-@import "wicked.css";
-
-/*Error*/
-@charset "UTF-8";
-
-
-@namespace "http://www.w3.org/1999/xhtml";
-@namespace svg "http://www.w3.org/2000/svg";
-
-/*Warning: empty ruleset */
-.foo {
-}
-
-h1 {
- font-weight: bold;
-}
-
-/*Warning: qualified heading */
-.foo h1 {
- font-weight: bold;
-}
-
-/*Warning: adjoining classes */
-.foo.bar {
- zoom: 1;
-}
-
-li.inline {
- width: 100%; /*Warning: 100% can be problematic*/
-}
-
-li.last {
- display: inline;
- padding-left: 3px !important;
- padding-right: 3px;
- border-right: 0px;
-}
-
-@media print {
- li.inline {
- color: black;
- }
-}
-
-@page {
- margin: 10%;
- counter-increment: page;
-
- @top-center {
- font-family: sans-serif;
- font-weight: bold;
- font-size: 2em;
- content: counter(page);
- }
-}
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/loadmode.html b/public/js/lib/codemirror/demo/loadmode.html
deleted file mode 100644
index 809cd90225..0000000000
--- a/public/js/lib/codemirror/demo/loadmode.html
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-CodeMirror: Lazy Mode Loading Demo
-
-
-
-
-
-
-
-
-
-
-
-Lazy Mode Loading Demo
-Current mode: text/plain
-This is the editor.
-// It starts out in plain text mode,
-# use the control below to load and apply a mode
- "you'll see the highlighting of" this text /*change*/.
-
-Filename, mime, or mode name: change mode
-
-
-
diff --git a/public/js/lib/codemirror/demo/marker.html b/public/js/lib/codemirror/demo/marker.html
deleted file mode 100644
index 3a8b850009..0000000000
--- a/public/js/lib/codemirror/demo/marker.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-CodeMirror: Breakpoint Demo
-
-
-
-
-
-
-
-
-
-
-Breakpoint Demo
-
-var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
- lineNumbers: true,
- gutters: ["CodeMirror-linenumbers", "breakpoints"]
-});
-editor.on("gutterClick", function(cm, n) {
- var info = cm.lineInfo(n);
- cm.setGutterMarker(n, "breakpoints", info.gutterMarkers ? null : makeMarker());
-});
-
-function makeMarker() {
- var marker = document.createElement("div");
- marker.style.color = "#822";
- marker.innerHTML = "●";
- return marker;
-}
-
-
-Click the line-number gutter to add or remove 'breakpoints'.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/markselection.html b/public/js/lib/codemirror/demo/markselection.html
deleted file mode 100644
index d4c8a7a0d1..0000000000
--- a/public/js/lib/codemirror/demo/markselection.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-CodeMirror: Selection Marking Demo
-
-
-
-
-
-
-
-
-
-
-
-Selection Marking Demo
-
-Select something from here. You'll see that the selection's foreground
-color changes to white! Since, by default, CodeMirror only puts an
-independent "marker" layer behind the text, you'll need something like
-this to change its colour.
-
-Also notice that turning this addon on (with the default style) allows
-you to safely give text a background color without screwing up the
-visibility of the selection.
-
-
-
- Simple addon to easily mark (and style) selected text. Docs .
-
-
diff --git a/public/js/lib/codemirror/demo/matchhighlighter.html b/public/js/lib/codemirror/demo/matchhighlighter.html
deleted file mode 100644
index c60109009e..0000000000
--- a/public/js/lib/codemirror/demo/matchhighlighter.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-CodeMirror: Match Highlighter Demo
-
-
-
-
-
-
-
-
-
-
-
-Match Highlighter Demo
-Select this text: hardToSpotVar
- And everywhere else in your code where hardToSpotVar appears will automatically illuminate.
-Give it a try! No more hardToSpotVars.
-
-
-
- Search and highlight occurences of the selected text.
-
-
diff --git a/public/js/lib/codemirror/demo/matchtags.html b/public/js/lib/codemirror/demo/matchtags.html
deleted file mode 100644
index 175639a396..0000000000
--- a/public/js/lib/codemirror/demo/matchtags.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-CodeMirror: Tag Matcher Demo
-
-
-
-
-
-
-
-
-
-
-
-
-Tag Matcher Demo
-
-
-
-
-
-
- Put the cursor on or inside a pair of tags to highlight them.
- Press Ctrl-J to jump to the tag that matches the one under the
- cursor.
-
diff --git a/public/js/lib/codemirror/demo/merge.html b/public/js/lib/codemirror/demo/merge.html
deleted file mode 100644
index dad1952757..0000000000
--- a/public/js/lib/codemirror/demo/merge.html
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-CodeMirror: merge view demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-merge view demo
-
-
-
-
-The merge
-addon provides an interface for displaying and merging diffs,
-either two-way
-or three-way .
-The left (or center) pane is editable, and the differences with the
-other pane(s) are optionally shown live as you edit
-it. In the two-way configuration, there are also options to pad changed
-sections to align them, and to collapse unchanged
-stretches of text.
-
-This addon depends on
-the google-diff-match-patch
-library to compute the diffs.
-
-
-
diff --git a/public/js/lib/codemirror/demo/multiplex.html b/public/js/lib/codemirror/demo/multiplex.html
deleted file mode 100644
index ca8c80aedc..0000000000
--- a/public/js/lib/codemirror/demo/multiplex.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-CodeMirror: Multiplexing Parser Demo
-
-
-
-
-
-
-
-
-
-
-
-Multiplexing Parser Demo
-
-
-
- << this is not >
- <<
- multiline
- not html
- at all : &
- >>
- this is html again
-
-
-
-
-
-
- Demonstration of a multiplexing mode, which, at certain
- boundary strings, switches to one or more inner modes. The out
- (HTML) mode does not get fed the content of the <<
- >>
blocks. See
- the manual and
- the source for more
- information.
-
-
- Parsing/Highlighting Tests:
- normal ,
- verbose .
-
-
-
diff --git a/public/js/lib/codemirror/demo/mustache.html b/public/js/lib/codemirror/demo/mustache.html
deleted file mode 100644
index ae4e6a891b..0000000000
--- a/public/js/lib/codemirror/demo/mustache.html
+++ /dev/null
@@ -1,69 +0,0 @@
-
-
-CodeMirror: Overlay Parser Demo
-
-
-
-
-
-
-
-
-
-
-
-Overlay Parser Demo
-
-
-
- {{title}}
- These are links to {{things}}:
-
-
-
-
-
-
-
- Demonstration of a mode that parses HTML, highlighting
- the Mustache templating
- directives inside of it by using the code
- in overlay.js
. View
- source to see the 15 lines of code needed to accomplish this.
-
-
diff --git a/public/js/lib/codemirror/demo/panel.html b/public/js/lib/codemirror/demo/panel.html
deleted file mode 100644
index 7f4bbefca6..0000000000
--- a/public/js/lib/codemirror/demo/panel.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-CodeMirror: Panel Demo
-
-
-
-
-
-
-
-
-
-
-
-
-Panel Demo
-
-
-
-
-The panel
-addon allows you to display panels above or below an editor. Click the
-links in the previous paragraph to add panels to the editor.
-
-
diff --git a/public/js/lib/codemirror/demo/placeholder.html b/public/js/lib/codemirror/demo/placeholder.html
deleted file mode 100644
index 432331a486..0000000000
--- a/public/js/lib/codemirror/demo/placeholder.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-CodeMirror: Placeholder demo
-
-
-
-
-
-
-
-
-
-
-Placeholder demo
-
-
- The placeholder
- plug-in adds an option placeholder
that can be set to
- make text appear in the editor when it is empty and not focused.
- If the source textarea has a placeholder
attribute,
- it will automatically be inherited.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/preview.html b/public/js/lib/codemirror/demo/preview.html
deleted file mode 100644
index 19e1530b80..0000000000
--- a/public/js/lib/codemirror/demo/preview.html
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-CodeMirror: HTML5 preview
-
-
-
-
-
-
-
-
-
-
-
-
-
-HTML5 preview
-
-
-
-
-
-
- HTML5 canvas demo
-
-
-
- Canvas pane goes here:
-
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/requirejs.html b/public/js/lib/codemirror/demo/requirejs.html
deleted file mode 100644
index f99b77945a..0000000000
--- a/public/js/lib/codemirror/demo/requirejs.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
- CodeMirror: HTML completion demo
-
-
-
-
-
-
-
-
-
-
-
-
-
- RequireJS module loading demo
-
- This demo does the same thing as
- the HTML5 completion demo , but
- loads its dependencies
- with Require.js , rather than
- explicitly. Press ctrl-space to activate
- completion.
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/resize.html b/public/js/lib/codemirror/demo/resize.html
deleted file mode 100644
index 1c1ef390ab..0000000000
--- a/public/js/lib/codemirror/demo/resize.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-CodeMirror: Autoresize Demo
-
-
-
-
-
-
-
-
-
-
-Autoresize Demo
-
-.CodeMirror {
- border: 1px solid #eee;
- height: auto;
-}
-
-
-By setting an editor's height
style
-to auto
and giving
-the viewportMargin
-a value of Infinity
, CodeMirror can be made to
-automatically resize to fit its content.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/rulers.html b/public/js/lib/codemirror/demo/rulers.html
deleted file mode 100644
index 2ac4111582..0000000000
--- a/public/js/lib/codemirror/demo/rulers.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-CodeMirror: Ruler Demo
-
-
-
-
-
-
-
-
-
-
-Ruler Demo
-
-
-
-Demonstration of
-the rulers addon, which
-displays vertical lines at given column offsets.
-
-
diff --git a/public/js/lib/codemirror/demo/runmode.html b/public/js/lib/codemirror/demo/runmode.html
deleted file mode 100644
index 257f03d6b6..0000000000
--- a/public/js/lib/codemirror/demo/runmode.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-CodeMirror: Mode Runner Demo
-
-
-
-
-
-
-
-
-
-
-Mode Runner Demo
-
-
-
-
- Enter your xml here and press the button below to display
- it as highlighted by the CodeMirror XML mode
-
-
- Highlight!
-
-
-
-
- Running a CodeMirror mode outside of the editor.
- The CodeMirror.runMode
function, defined
- in lib/runmode.js
takes the following arguments:
-
-
- text (string)
- The document to run through the highlighter.
- mode (mode spec )
- The mode to use (must be loaded as normal).
- output (function or DOM node)
- If this is a function, it will be called for each token with
- two arguments, the token's text and the token's style class (may
- be null
for unstyled tokens). If it is a DOM node,
- the tokens will be converted to span
elements as in
- an editor, and inserted into the node
- (through innerHTML
).
-
-
-
diff --git a/public/js/lib/codemirror/demo/search.html b/public/js/lib/codemirror/demo/search.html
deleted file mode 100644
index 04ba7ac09a..0000000000
--- a/public/js/lib/codemirror/demo/search.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-CodeMirror: Search/Replace Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Search/Replace Demo
-
-
- indentWithTabs : boolean
- Whether, when indenting, the first N*tabSize
- spaces should be replaced by N tabs. Default is false.
-
- electricChars : boolean
- Configures whether the editor should re-indent the current
- line when a character is typed that might change its proper
- indentation (only works if the mode supports indentation).
- Default is true.
-
- specialChars : RegExp
- A regular expression used to determine which characters
- should be replaced by a
- special placeholder .
- Mostly useful for non-printing special characters. The default
- is /[\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/
.
- specialCharPlaceholder : function(char) → Element
- A function that, given a special character identified by
- the specialChars
- option, produces a DOM node that is used to represent the
- character. By default, a red dot (• )
- is shown, with a title tooltip to indicate the character code.
-
- rtlMoveVisually : boolean
- Determines whether horizontal cursor movement through
- right-to-left (Arabic, Hebrew) text is visual (pressing the left
- arrow moves the cursor left) or logical (pressing the left arrow
- moves to the next lower index in the string, which is visually
- right in right-to-left text). The default is false
- on Windows, and true
on other platforms.
-
-
-
-
-
- Demonstration of primitive search/replace functionality. The
- keybindings (which can be overridden by custom keymaps) are:
-
- Ctrl-F / Cmd-F Start searching
- Ctrl-G / Cmd-G Find next
- Shift-Ctrl-G / Shift-Cmd-G Find previous
- Shift-Ctrl-F / Cmd-Option-F Replace
- Shift-Ctrl-R / Shift-Cmd-Option-F Replace all
-
- Searching is enabled by
- including addon/search/search.js
- and addon/search/searchcursor.js .
- For good-looking input dialogs, you also want to include
- addon/dialog/dialog.js
- and addon/dialog/dialog.css .
-
diff --git a/public/js/lib/codemirror/demo/simplemode.html b/public/js/lib/codemirror/demo/simplemode.html
deleted file mode 100644
index ad8baf0b50..0000000000
--- a/public/js/lib/codemirror/demo/simplemode.html
+++ /dev/null
@@ -1,181 +0,0 @@
-
-
-CodeMirror: Simple Mode Demo
-
-
-
-
-
-
-
-
-
-
-
-
-Simple Mode Demo
-
-The mode/simple
-addon allows CodeMirror modes to be specified using a relatively simple
-declarative format. This format is not as powerful as writing code
-directly against the mode
-interface , but is a lot easier to get started with, and
-sufficiently expressive for many simple language modes.
-
-This interface is still in flux. It is unlikely to be scrapped or
-overhauled completely, so do start writing code against it, but
-details might change as it stabilizes, and you might have to tweak
-your code when upgrading.
-
-Simple modes (loosely based on
-the Common
-JavaScript Syntax Highlighting Specification , which never took
-off), are state machines, where each state has a number of rules that
-match tokens. A rule describes a type of token that may occur in the
-current state, and possibly a transition to another state caused by
-that token.
-
-The CodeMirror.defineSimpleMode(name, states)
method
-takes a mode name and an object that describes the mode's states. The
-editor below shows an example of such a mode (and is itself
-highlighted by the mode shown in it).
-
-
-
-Each state is an array of rules. A rule may have the following properties:
-
-
- regex : string | RegExp
- The regular expression that matches the token. May be a string
- or a regex object. When a regex, the ignoreCase
flag
- will be taken into account when matching the token. This regex
- should only capture groups when the token
property is
- an array.
- token
: string | null
- An optional token style. Multiple styles can be specified by
- separating them with dots or spaces. When the regex
for
- this rule captures groups, it must capture all of the
- string (since JS provides no way to find out where a group matched),
- and this property must hold an array of token styles that has one
- style for each matched group.
- next : string
- When a next
property is present, the mode will
- transfer to the state named by the property when the token is
- encountered.
- push : string
- Like next
, but instead replacing the current state
- by the new state, the current state is kept on a stack, and can be
- returned to with the pop
directive.
- pop : bool
- When true, and there is another state on the state stack, will
- cause the mode to pop that state off the stack and transition to
- it.
- mode : {spec, end, persistent}
- Can be used to embed another mode inside a mode. When present,
- must hold an object with a spec
property that describes
- the embedded mode, and an optional end
end property
- that specifies the regexp that will end the extent of the mode. When
- a persistent
property is set (and true), the nested
- mode's state will be preserved between occurrences of the mode.
- indent : bool
- When true, this token changes the indentation to be one unit
- more than the current line's indentation.
- dedent : bool
- When true, this token will pop one scope off the indentation
- stack.
- dedentIfLineStart : bool
- If a token has its dedent
property set, it will, by
- default, cause lines where it appears at the start to be dedented.
- Set this property to false to prevent that behavior.
-
-
-The meta
property of the states object is special, and
-will not be interpreted as a state. Instead, properties set on it will
-be set on the mode, which is useful for properties
-like lineComment
,
-which sets the comment style for a mode. The simple mode addon also
-recognizes a few such properties:
-
-
- dontIndentStates : array<string>
- An array of states in which the mode's auto-indentation should
- not take effect. Usually used for multi-line comment and string
- states.
-
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/simplescrollbars.html b/public/js/lib/codemirror/demo/simplescrollbars.html
deleted file mode 100644
index 9d40932649..0000000000
--- a/public/js/lib/codemirror/demo/simplescrollbars.html
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-CodeMirror: Simple Scrollbar Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-Simple Scrollbar Demo
-# Custom Scrollbars
-
-This is a piece of text that creates scrollbars
-
-Lorem ipsum dolor sit amet, turpis nec facilisis neque vestibulum adipiscing, magna nunc est luctus orci a,
-aliquam duis ad volutpat nostra. Vestibulum ultricies suspendisse commodo volutpat pede sed. Bibendum odio
-dignissim, ad vitae mollis ac sed nibh quis, suspendisse diam, risus quas blandit phasellus luctus nec,
-integer nunc vitae posuere scelerisque. Lobortis quam porta conubia nulla. Et nisl ac, imperdiet vitae ac.
-Parturient sit. Et vestibulum euismod, rutrum nunc libero mauris purus convallis. Cum id adipiscing et eget
-pretium rutrum, ultrices sapien magnis fringilla sit lorem, eu vitae scelerisque ipsum aliquet, magna sed
-fusce vel.
-
-Lectus ultricies libero dolor convallis, sed etiam vel hendrerit egestas viverra, at urna mauris, eget
-vulputate dolor voluptatem, nulla eget sollicitudin. Sed tincidunt, elit sociis. Mattis mi tortor dui id
-sodales mi, maecenas nam fringilla risus turpis mauris praesent, imperdiet maecenas ultrices nonummy tellus
-quis est. Scelerisque nec pharetra quis varius fringilla. Varius vestibulum non dictum pharetra, tincidunt in
-vestibulum iaculis molestie, id condimentum blandit elit urna magna pulvinar, quam suspendisse pellentesque
-donec. Vel amet ad ac. Nec aut viverra, morbi mi neque massa, turpis enim proin. Tellus eu, fermentum velit
-est convallis aliquam velit, rutrum in diam lacus, praesent tempor pellentesque dictum semper augue. Felis
-explicabo massa amet lectus phasellus dolor. Ut lorem quis arcu neque felis ultricies, senectus vitae
-curabitur sed pellentesque et, id sed risus in sed ac accumsan, blandit arcu quam duis nunc.
-
-Sed leo sollicitudin odio vitae, purus sit egestas, justo eros inceptos auctor fermentum lectus. Ligula luctus
-turpis, quod massa vitae elementum orci, nullam fringilla elit tortor. Justo ante tempor amet quam posuere
-volutpat. Facilisis pede erat ut hac ultrices ipsum, wisi duis sit metus. Dolor vitae est sed sed vitae. Sed
-eu ligula, morbi vestibulum nunc nibh velit ut taciti, ligula elit semper sagittis in, auctor arcu vel eget.
-Mauris at vitae nec suspendisse et, aenean proin blandit suscipit. Morbi quam, dolor ultricies. Viverra
-tempus. Suspendisse sit dapibus, ac fuga aenean, magna nisl nonummy augue posuere, dictum ut fuga velit
-parturient augue interdum, mattis sit tellus.
-
-Vehicula commodo tempus curabitur eros, lacinia erat vulputate lorem vel fermentum donec, lectus sed conubia
-id pellentesque. Vel senectus donec pede aliquet dolor sit, nec vivamus justo placerat interdum maecenas,
-sodales euismod. Quis netus sapien amet, vestibulum quam nec amet lacinia, quis aliquet, tempor vivamus tellus
-enim, suscipit quis eleifend. Amet class phasellus orci pretium, risus in nulla. Neque sit ullamcorper,
-ultricies platea id nec suspendisse ac. Et elementum. Dictum nam, ut dui fermentum egestas facilisis elit
-augue, adipiscing donec ipsum erat nam pellentesque convallis, vestibulum vestibulum risus id nulla ut mauris,
-curabitur aute aptent. Ultrices orci wisi dui ipsum praesent, pharetra felis eu quis. Est fringilla etiam,
-maxime sem dapibus et eget, mi enim dignissim nec pretium, augue vehicula, volutpat proin. Et occaecati
-lobortis viverra, cum in sed, vivamus tellus. Libero at malesuada est vivamus leo tortor.
-
-
-The simplescrollbars
addon defines two
-styles of non-native scrollbars: "simple"
and "overlay"
(click to try), which can be passed to
-the scrollbarStyle
option. These implement
-the scrollbar using DOM elements, allowing more control over
-its appearance .
-
-
-
diff --git a/public/js/lib/codemirror/demo/spanaffectswrapping_shim.html b/public/js/lib/codemirror/demo/spanaffectswrapping_shim.html
deleted file mode 100644
index 879d99b606..0000000000
--- a/public/js/lib/codemirror/demo/spanaffectswrapping_shim.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-CodeMirror: Automatically derive odd wrapping behavior for your browser
-
-
-
-
-
-
-Automatically derive odd wrapping behavior for your browser
-
-
- This is a hack to automatically derive
- a spanAffectsWrapping
regexp for a browser. See the
- comments above that variable
- in lib/codemirror.js
- for some more details.
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/sublime.html b/public/js/lib/codemirror/demo/sublime.html
deleted file mode 100644
index b3b5342c97..0000000000
--- a/public/js/lib/codemirror/demo/sublime.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-CodeMirror: Sublime Text bindings demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Sublime Text bindings demo
-
-The sublime
keymap defines many Sublime Text-specific
-bindings for CodeMirror. See the code below for an overview.
-
-Enable the keymap by
-loading keymap/sublime.js
-and setting
-the keyMap
-option to "sublime"
.
-
-(A lot of the search functionality is still missing.)
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/tern.html b/public/js/lib/codemirror/demo/tern.html
deleted file mode 100644
index 19135faf7f..0000000000
--- a/public/js/lib/codemirror/demo/tern.html
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-CodeMirror: Tern Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Tern Demo
-// Use ctrl-space to complete something
-// Put the cursor in or after an expression, press ctrl-o to
-// find its type
-
-var foo = ["array", "of", "strings"];
-var bar = foo.slice(0, 2).join("").split("a")[0];
-
-// Works for locally defined types too.
-
-function CTor() { this.size = 10; }
-CTor.prototype.hallo = "hallo";
-
-var baz = new CTor;
-baz.
-
-// You can press ctrl-q when the cursor is on a variable name to
-// rename it. Try it with CTor...
-
-// When the cursor is in an argument list, the arguments are
-// shown below the editor.
-
-[1].reduce( );
-
-// And a little more advanced code...
-
-(function(exports) {
- exports.randomElt = function(arr) {
- return arr[Math.floor(arr.length * Math.random())];
- };
- exports.strList = "foo".split("");
- exports.intList = exports.strList.map(function(s) { return s.charCodeAt(0); });
-})(window.myMod = {});
-
-var randomStr = myMod.randomElt(myMod.strList);
-var randomInt = myMod.randomElt(myMod.intList);
-
-
-Demonstrates integration of Tern
-and CodeMirror. The following keys are bound:
-
-
- Ctrl-Space Autocomplete
- Ctrl-O Find docs for the expression at the cursor
- Ctrl-I Find type at cursor
- Alt-. Jump to definition (Alt-, to jump back)
- Ctrl-Q Rename variable
- Ctrl-. Select all occurrences of a variable
-
-
-Documentation is sparse for now. See the top of
-the script for a rough API
-overview.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/theme.html b/public/js/lib/codemirror/demo/theme.html
deleted file mode 100644
index e951c84c36..0000000000
--- a/public/js/lib/codemirror/demo/theme.html
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-CodeMirror: Theme Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Theme Demo
-
-function findSequence(goal) {
- function find(start, history) {
- if (start == goal)
- return history;
- else if (start > goal)
- return null;
- else
- return find(start + 5, "(" + history + " + 5)") ||
- find(start * 3, "(" + history + " * 3)");
- }
- return find(1, "1");
-}
-
-Select a theme:
- default
- 3024-day
- 3024-night
- ambiance
- base16-dark
- base16-light
- blackboard
- cobalt
- eclipse
- elegant
- erlang-dark
- lesser-dark
- mbo
- mdn-like
- midnight
- monokai
- neat
- neo
- night
- paraiso-dark
- paraiso-light
- pastel-on-dark
- rubyblue
- solarized dark
- solarized light
- the-matrix
- tomorrow-night-bright
- tomorrow-night-eighties
- twilight
- vibrant-ink
- xq-dark
- xq-light
- zenburn
-
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/trailingspace.html b/public/js/lib/codemirror/demo/trailingspace.html
deleted file mode 100644
index 1992ba3ff9..0000000000
--- a/public/js/lib/codemirror/demo/trailingspace.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-CodeMirror: Trailing Whitespace Demo
-
-
-
-
-
-
-
-
-
-
-Trailing Whitespace Demo
-This text
- has some
-trailing whitespace!
-
-
-
-Uses
-the trailingspace
-addon to highlight trailing whitespace.
-
-
diff --git a/public/js/lib/codemirror/demo/variableheight.html b/public/js/lib/codemirror/demo/variableheight.html
deleted file mode 100644
index d49942864b..0000000000
--- a/public/js/lib/codemirror/demo/variableheight.html
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-CodeMirror: Variable Height Demo
-
-
-
-
-
-
-
-
-
-
-
-Variable Height Demo
-# A First Level Header
-
-**Bold** text in a normal-size paragraph.
-
-And a very long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long long, wrapped line with a piece of **big** text inside of it.
-
-## A Second Level Header
-
-Now is the time for all good men to come to
-the aid of their country. This is just a
-regular paragraph.
-
-The quick brown fox jumped over the lazy
-dog's back.
-
-### Header 3
-
-> This is a blockquote.
->
-> This is the second paragraph in the blockquote.
->
-> ## This is an H2 in a blockquote
-
-
-
diff --git a/public/js/lib/codemirror/demo/vim.html b/public/js/lib/codemirror/demo/vim.html
deleted file mode 100644
index 6a33a6c075..0000000000
--- a/public/js/lib/codemirror/demo/vim.html
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-CodeMirror: Vim bindings demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Vim bindings demo
-
-#include "syscalls.h"
-/* getchar: simple buffered version */
-int getchar(void)
-{
- static char buf[BUFSIZ];
- static char *bufp = buf;
- static int n = 0;
- if (n == 0) { /* buffer is empty */
- n = read(0, buf, sizeof buf);
- bufp = buf;
- }
- return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
-}
-
-Key buffer:
-
-The vim keybindings are enabled by
-including keymap/vim.js and setting
-the vimMode
option to true
. This will also
-automatically change the keyMap
option to "vim"
.
-
-Features
-
-
- All common motions and operators, including text objects
- Operator motion orthogonality
- Visual mode - characterwise, linewise, partial support for blockwise
- Full macro support (q, @)
- Incremental highlighted search (/, ?, #, *, g#, g*)
- Search/replace with confirm (:substitute, :%s)
- Search history
- Jump lists (Ctrl-o, Ctrl-i)
- Key/command mapping with API (:map, :nmap, :vmap)
- Sort (:sort)
- Marks (`, ')
- :global
- Insert mode behaves identical to base CodeMirror
- Cross-buffer yank/paste
-
-
-Note that while the vim mode tries to emulate the most useful features of
-vim as faithfully as possible, it does not strive to become a complete vim
-implementation
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/visibletabs.html b/public/js/lib/codemirror/demo/visibletabs.html
deleted file mode 100644
index 2eec337ed3..0000000000
--- a/public/js/lib/codemirror/demo/visibletabs.html
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-CodeMirror: Visible tabs demo
-
-
-
-
-
-
-
-
-
-
-Visible tabs demo
-
-#include "syscalls.h"
-/* getchar: simple buffered version */
-int getchar(void)
-{
- static char buf[BUFSIZ];
- static char *bufp = buf;
- static int n = 0;
- if (n == 0) { /* buffer is empty */
- n = read(0, buf, sizeof buf);
- bufp = buf;
- }
- return (--n >= 0) ? (unsigned char) *bufp++ : EOF;
-}
-
-
-Tabs inside the editor are spans with the
-class cm-tab
, and can be styled.
-
-
-
-
diff --git a/public/js/lib/codemirror/demo/widget.html b/public/js/lib/codemirror/demo/widget.html
deleted file mode 100644
index da39a9297a..0000000000
--- a/public/js/lib/codemirror/demo/widget.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-CodeMirror: Inline Widget Demo
-
-
-
-
-
-
-
-
-
-
-
-Inline Widget Demo
-
-
-
-
-This demo runs JSHint over the code
-in the editor (which is the script used on this page), and
-inserts line widgets to
-display the warnings that JSHint comes up with.
-
diff --git a/public/js/lib/codemirror/demo/xmlcomplete.html b/public/js/lib/codemirror/demo/xmlcomplete.html
deleted file mode 100644
index bd452e6f6e..0000000000
--- a/public/js/lib/codemirror/demo/xmlcomplete.html
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-CodeMirror: XML Autocomplete Demo
-
-
-
-
-
-
-
-
-
-
-
-
-
-XML Autocomplete Demo
-
-
-
- Press ctrl-space , or type a '<' character to
- activate autocompletion. This demo defines a simple schema that
- guides completion. The schema can be customized—see
- the manual .
-
- Development of the xml-hint
addon was kindly
- sponsored
- by www.xperiment.mobi .
-
-
-
From 3196824b61425e0b6facc039f6d8f579d8e36ca5 Mon Sep 17 00:00:00 2001
From: Berkeley Martinez
Date: Wed, 12 Aug 2015 20:49:44 -0700
Subject: [PATCH 10/11] remove unnecessary codemirror modes
---
public/js/lib/codemirror/mode/apl/apl.js | 175 ----
public/js/lib/codemirror/mode/apl/index.html | 72 --
.../lib/codemirror/mode/asterisk/asterisk.js | 198 -----
.../lib/codemirror/mode/asterisk/index.html | 154 ----
public/js/lib/codemirror/mode/clike/clike.js | 489 ----------
.../js/lib/codemirror/mode/clike/index.html | 251 ------
.../js/lib/codemirror/mode/clike/scala.html | 767 ----------------
.../js/lib/codemirror/mode/clojure/clojure.js | 243 -----
.../js/lib/codemirror/mode/clojure/index.html | 88 --
public/js/lib/codemirror/mode/cobol/cobol.js | 255 ------
.../js/lib/codemirror/mode/cobol/index.html | 210 -----
.../mode/coffeescript/coffeescript.js | 369 --------
.../codemirror/mode/coffeescript/index.html | 740 ----------------
.../codemirror/mode/commonlisp/commonlisp.js | 122 ---
.../lib/codemirror/mode/commonlisp/index.html | 177 ----
.../js/lib/codemirror/mode/cypher/cypher.js | 146 ---
.../js/lib/codemirror/mode/cypher/index.html | 63 --
public/js/lib/codemirror/mode/d/d.js | 218 -----
public/js/lib/codemirror/mode/d/index.html | 273 ------
public/js/lib/codemirror/mode/dart/dart.js | 50 --
public/js/lib/codemirror/mode/dart/index.html | 71 --
public/js/lib/codemirror/mode/diff/diff.js | 47 -
public/js/lib/codemirror/mode/diff/index.html | 117 ---
.../js/lib/codemirror/mode/django/django.js | 67 --
.../js/lib/codemirror/mode/django/index.html | 63 --
.../codemirror/mode/dockerfile/dockerfile.js | 76 --
.../lib/codemirror/mode/dockerfile/index.html | 73 --
public/js/lib/codemirror/mode/dtd/dtd.js | 142 ---
public/js/lib/codemirror/mode/dtd/index.html | 89 --
public/js/lib/codemirror/mode/dylan/dylan.js | 299 -------
.../js/lib/codemirror/mode/dylan/index.html | 407 ---------
public/js/lib/codemirror/mode/ebnf/ebnf.js | 195 ----
public/js/lib/codemirror/mode/ebnf/index.html | 102 ---
public/js/lib/codemirror/mode/ecl/ecl.js | 207 -----
public/js/lib/codemirror/mode/ecl/index.html | 52 --
.../js/lib/codemirror/mode/eiffel/eiffel.js | 162 ----
.../js/lib/codemirror/mode/eiffel/index.html | 429 ---------
.../js/lib/codemirror/mode/erlang/erlang.js | 622 -------------
.../js/lib/codemirror/mode/erlang/index.html | 76 --
.../js/lib/codemirror/mode/fortran/fortran.js | 188 ----
.../js/lib/codemirror/mode/fortran/index.html | 81 --
public/js/lib/codemirror/mode/gas/gas.js | 345 --------
public/js/lib/codemirror/mode/gas/index.html | 68 --
public/js/lib/codemirror/mode/gfm/gfm.js | 123 ---
public/js/lib/codemirror/mode/gfm/index.html | 93 --
public/js/lib/codemirror/mode/gfm/test.js | 213 -----
.../js/lib/codemirror/mode/gherkin/gherkin.js | 178 ----
.../js/lib/codemirror/mode/gherkin/index.html | 48 -
public/js/lib/codemirror/mode/go/go.js | 184 ----
public/js/lib/codemirror/mode/go/index.html | 85 --
.../js/lib/codemirror/mode/groovy/groovy.js | 226 -----
.../js/lib/codemirror/mode/groovy/index.html | 84 --
public/js/lib/codemirror/mode/haml/haml.js | 159 ----
public/js/lib/codemirror/mode/haml/index.html | 79 --
public/js/lib/codemirror/mode/haml/test.js | 97 --
.../js/lib/codemirror/mode/haskell/haskell.js | 267 ------
.../js/lib/codemirror/mode/haskell/index.html | 73 --
public/js/lib/codemirror/mode/haxe/haxe.js | 518 -----------
public/js/lib/codemirror/mode/haxe/index.html | 124 ---
public/js/lib/codemirror/mode/http/http.js | 113 ---
public/js/lib/codemirror/mode/http/index.html | 45 -
public/js/lib/codemirror/mode/index.html | 132 ---
.../js/lib/codemirror/mode/jinja2/index.html | 54 --
.../js/lib/codemirror/mode/jinja2/jinja2.js | 142 ---
.../js/lib/codemirror/mode/julia/index.html | 195 ----
public/js/lib/codemirror/mode/julia/julia.js | 301 -------
.../js/lib/codemirror/mode/kotlin/index.html | 89 --
.../js/lib/codemirror/mode/kotlin/kotlin.js | 280 ------
.../lib/codemirror/mode/livescript/index.html | 459 ----------
.../codemirror/mode/livescript/livescript.js | 280 ------
public/js/lib/codemirror/mode/lua/index.html | 85 --
public/js/lib/codemirror/mode/lua/lua.js | 159 ----
public/js/lib/codemirror/mode/mirc/index.html | 160 ----
public/js/lib/codemirror/mode/mirc/mirc.js | 193 ----
.../js/lib/codemirror/mode/mllike/index.html | 179 ----
.../js/lib/codemirror/mode/mllike/mllike.js | 205 -----
.../lib/codemirror/mode/modelica/index.html | 67 --
.../lib/codemirror/mode/modelica/modelica.js | 245 ------
.../js/lib/codemirror/mode/nginx/index.html | 181 ----
public/js/lib/codemirror/mode/nginx/nginx.js | 178 ----
.../lib/codemirror/mode/ntriples/index.html | 45 -
.../lib/codemirror/mode/ntriples/ntriples.js | 186 ----
.../js/lib/codemirror/mode/octave/index.html | 83 --
.../js/lib/codemirror/mode/octave/octave.js | 135 ---
.../js/lib/codemirror/mode/pascal/index.html | 61 --
.../js/lib/codemirror/mode/pascal/pascal.js | 109 ---
.../js/lib/codemirror/mode/pegjs/index.html | 66 --
public/js/lib/codemirror/mode/pegjs/pegjs.js | 114 ---
public/js/lib/codemirror/mode/perl/index.html | 75 --
public/js/lib/codemirror/mode/perl/perl.js | 832 ------------------
public/js/lib/codemirror/mode/php/index.html | 64 --
public/js/lib/codemirror/mode/php/php.js | 226 -----
public/js/lib/codemirror/mode/php/test.js | 154 ----
public/js/lib/codemirror/mode/pig/index.html | 55 --
public/js/lib/codemirror/mode/pig/pig.js | 188 ----
.../lib/codemirror/mode/properties/index.html | 53 --
.../codemirror/mode/properties/properties.js | 78 --
.../js/lib/codemirror/mode/puppet/index.html | 121 ---
.../js/lib/codemirror/mode/puppet/puppet.js | 220 -----
.../js/lib/codemirror/mode/python/index.html | 198 -----
.../js/lib/codemirror/mode/python/python.js | 359 --------
public/js/lib/codemirror/mode/q/index.html | 144 ---
public/js/lib/codemirror/mode/q/q.js | 139 ---
public/js/lib/codemirror/mode/r/index.html | 85 --
public/js/lib/codemirror/mode/r/r.js | 162 ----
.../codemirror/mode/rpm/changes/index.html | 66 --
public/js/lib/codemirror/mode/rpm/index.html | 149 ----
public/js/lib/codemirror/mode/rpm/rpm.js | 101 ---
public/js/lib/codemirror/mode/rst/index.html | 535 -----------
public/js/lib/codemirror/mode/rst/rst.js | 557 ------------
public/js/lib/codemirror/mode/ruby/index.html | 183 ----
public/js/lib/codemirror/mode/ruby/ruby.js | 285 ------
public/js/lib/codemirror/mode/ruby/test.js | 14 -
public/js/lib/codemirror/mode/rust/index.html | 60 --
public/js/lib/codemirror/mode/rust/rust.js | 451 ----------
public/js/lib/codemirror/mode/sass/index.html | 66 --
public/js/lib/codemirror/mode/sass/sass.js | 327 -------
.../js/lib/codemirror/mode/scheme/index.html | 77 --
.../js/lib/codemirror/mode/scheme/scheme.js | 248 ------
.../js/lib/codemirror/mode/shell/index.html | 66 --
public/js/lib/codemirror/mode/shell/shell.js | 139 ---
public/js/lib/codemirror/mode/shell/test.js | 58 --
.../js/lib/codemirror/mode/sieve/index.html | 93 --
public/js/lib/codemirror/mode/sieve/sieve.js | 193 ----
public/js/lib/codemirror/mode/slim/index.html | 96 --
public/js/lib/codemirror/mode/slim/slim.js | 575 ------------
public/js/lib/codemirror/mode/slim/test.js | 96 --
.../lib/codemirror/mode/smalltalk/index.html | 68 --
.../codemirror/mode/smalltalk/smalltalk.js | 168 ----
.../js/lib/codemirror/mode/smarty/index.html | 136 ---
.../js/lib/codemirror/mode/smarty/smarty.js | 221 -----
.../codemirror/mode/smartymixed/index.html | 114 ---
.../mode/smartymixed/smartymixed.js | 197 -----
public/js/lib/codemirror/mode/solr/index.html | 57 --
public/js/lib/codemirror/mode/solr/solr.js | 104 ---
public/js/lib/codemirror/mode/soy/index.html | 68 --
public/js/lib/codemirror/mode/soy/soy.js | 198 -----
.../js/lib/codemirror/mode/sparql/index.html | 61 --
.../js/lib/codemirror/mode/sparql/sparql.js | 174 ----
.../codemirror/mode/spreadsheet/index.html | 42 -
.../mode/spreadsheet/spreadsheet.js | 109 ---
public/js/lib/codemirror/mode/sql/index.html | 84 --
public/js/lib/codemirror/mode/sql/sql.js | 391 --------
public/js/lib/codemirror/mode/stex/index.html | 110 ---
public/js/lib/codemirror/mode/stex/stex.js | 251 ------
public/js/lib/codemirror/mode/stex/test.js | 123 ---
public/js/lib/codemirror/mode/tcl/index.html | 142 ---
public/js/lib/codemirror/mode/tcl/tcl.js | 147 ----
.../js/lib/codemirror/mode/textile/index.html | 191 ----
public/js/lib/codemirror/mode/textile/test.js | 417 ---------
.../js/lib/codemirror/mode/textile/textile.js | 469 ----------
.../lib/codemirror/mode/tiddlywiki/index.html | 154 ----
.../codemirror/mode/tiddlywiki/tiddlywiki.css | 14 -
.../codemirror/mode/tiddlywiki/tiddlywiki.js | 369 --------
public/js/lib/codemirror/mode/tiki/index.html | 95 --
public/js/lib/codemirror/mode/tiki/tiki.css | 26 -
public/js/lib/codemirror/mode/tiki/tiki.js | 323 -------
public/js/lib/codemirror/mode/toml/index.html | 73 --
public/js/lib/codemirror/mode/toml/toml.js | 88 --
.../js/lib/codemirror/mode/tornado/index.html | 63 --
.../js/lib/codemirror/mode/tornado/tornado.js | 68 --
.../js/lib/codemirror/mode/turtle/index.html | 50 --
.../js/lib/codemirror/mode/turtle/turtle.js | 162 ----
public/js/lib/codemirror/mode/vb/index.html | 102 ---
public/js/lib/codemirror/mode/vb/vb.js | 274 ------
.../lib/codemirror/mode/vbscript/index.html | 55 --
.../lib/codemirror/mode/vbscript/vbscript.js | 350 --------
.../lib/codemirror/mode/velocity/index.html | 118 ---
.../lib/codemirror/mode/velocity/velocity.js | 201 -----
.../js/lib/codemirror/mode/verilog/index.html | 120 ---
public/js/lib/codemirror/mode/verilog/test.js | 273 ------
.../js/lib/codemirror/mode/verilog/verilog.js | 364 --------
.../js/lib/codemirror/mode/xquery/index.html | 210 -----
public/js/lib/codemirror/mode/xquery/test.js | 67 --
.../js/lib/codemirror/mode/xquery/xquery.js | 447 ----------
public/js/lib/codemirror/mode/z80/index.html | 52 --
public/js/lib/codemirror/mode/z80/z80.js | 100 ---
177 files changed, 31978 deletions(-)
delete mode 100644 public/js/lib/codemirror/mode/apl/apl.js
delete mode 100644 public/js/lib/codemirror/mode/apl/index.html
delete mode 100644 public/js/lib/codemirror/mode/asterisk/asterisk.js
delete mode 100644 public/js/lib/codemirror/mode/asterisk/index.html
delete mode 100644 public/js/lib/codemirror/mode/clike/clike.js
delete mode 100644 public/js/lib/codemirror/mode/clike/index.html
delete mode 100644 public/js/lib/codemirror/mode/clike/scala.html
delete mode 100644 public/js/lib/codemirror/mode/clojure/clojure.js
delete mode 100644 public/js/lib/codemirror/mode/clojure/index.html
delete mode 100644 public/js/lib/codemirror/mode/cobol/cobol.js
delete mode 100644 public/js/lib/codemirror/mode/cobol/index.html
delete mode 100644 public/js/lib/codemirror/mode/coffeescript/coffeescript.js
delete mode 100644 public/js/lib/codemirror/mode/coffeescript/index.html
delete mode 100644 public/js/lib/codemirror/mode/commonlisp/commonlisp.js
delete mode 100644 public/js/lib/codemirror/mode/commonlisp/index.html
delete mode 100644 public/js/lib/codemirror/mode/cypher/cypher.js
delete mode 100644 public/js/lib/codemirror/mode/cypher/index.html
delete mode 100644 public/js/lib/codemirror/mode/d/d.js
delete mode 100644 public/js/lib/codemirror/mode/d/index.html
delete mode 100644 public/js/lib/codemirror/mode/dart/dart.js
delete mode 100644 public/js/lib/codemirror/mode/dart/index.html
delete mode 100644 public/js/lib/codemirror/mode/diff/diff.js
delete mode 100644 public/js/lib/codemirror/mode/diff/index.html
delete mode 100644 public/js/lib/codemirror/mode/django/django.js
delete mode 100644 public/js/lib/codemirror/mode/django/index.html
delete mode 100644 public/js/lib/codemirror/mode/dockerfile/dockerfile.js
delete mode 100644 public/js/lib/codemirror/mode/dockerfile/index.html
delete mode 100644 public/js/lib/codemirror/mode/dtd/dtd.js
delete mode 100644 public/js/lib/codemirror/mode/dtd/index.html
delete mode 100644 public/js/lib/codemirror/mode/dylan/dylan.js
delete mode 100644 public/js/lib/codemirror/mode/dylan/index.html
delete mode 100644 public/js/lib/codemirror/mode/ebnf/ebnf.js
delete mode 100644 public/js/lib/codemirror/mode/ebnf/index.html
delete mode 100644 public/js/lib/codemirror/mode/ecl/ecl.js
delete mode 100644 public/js/lib/codemirror/mode/ecl/index.html
delete mode 100644 public/js/lib/codemirror/mode/eiffel/eiffel.js
delete mode 100644 public/js/lib/codemirror/mode/eiffel/index.html
delete mode 100644 public/js/lib/codemirror/mode/erlang/erlang.js
delete mode 100644 public/js/lib/codemirror/mode/erlang/index.html
delete mode 100644 public/js/lib/codemirror/mode/fortran/fortran.js
delete mode 100644 public/js/lib/codemirror/mode/fortran/index.html
delete mode 100644 public/js/lib/codemirror/mode/gas/gas.js
delete mode 100644 public/js/lib/codemirror/mode/gas/index.html
delete mode 100644 public/js/lib/codemirror/mode/gfm/gfm.js
delete mode 100644 public/js/lib/codemirror/mode/gfm/index.html
delete mode 100644 public/js/lib/codemirror/mode/gfm/test.js
delete mode 100644 public/js/lib/codemirror/mode/gherkin/gherkin.js
delete mode 100644 public/js/lib/codemirror/mode/gherkin/index.html
delete mode 100644 public/js/lib/codemirror/mode/go/go.js
delete mode 100644 public/js/lib/codemirror/mode/go/index.html
delete mode 100644 public/js/lib/codemirror/mode/groovy/groovy.js
delete mode 100644 public/js/lib/codemirror/mode/groovy/index.html
delete mode 100644 public/js/lib/codemirror/mode/haml/haml.js
delete mode 100644 public/js/lib/codemirror/mode/haml/index.html
delete mode 100644 public/js/lib/codemirror/mode/haml/test.js
delete mode 100644 public/js/lib/codemirror/mode/haskell/haskell.js
delete mode 100644 public/js/lib/codemirror/mode/haskell/index.html
delete mode 100644 public/js/lib/codemirror/mode/haxe/haxe.js
delete mode 100644 public/js/lib/codemirror/mode/haxe/index.html
delete mode 100644 public/js/lib/codemirror/mode/http/http.js
delete mode 100644 public/js/lib/codemirror/mode/http/index.html
delete mode 100644 public/js/lib/codemirror/mode/index.html
delete mode 100644 public/js/lib/codemirror/mode/jinja2/index.html
delete mode 100644 public/js/lib/codemirror/mode/jinja2/jinja2.js
delete mode 100644 public/js/lib/codemirror/mode/julia/index.html
delete mode 100644 public/js/lib/codemirror/mode/julia/julia.js
delete mode 100644 public/js/lib/codemirror/mode/kotlin/index.html
delete mode 100644 public/js/lib/codemirror/mode/kotlin/kotlin.js
delete mode 100644 public/js/lib/codemirror/mode/livescript/index.html
delete mode 100644 public/js/lib/codemirror/mode/livescript/livescript.js
delete mode 100644 public/js/lib/codemirror/mode/lua/index.html
delete mode 100644 public/js/lib/codemirror/mode/lua/lua.js
delete mode 100644 public/js/lib/codemirror/mode/mirc/index.html
delete mode 100644 public/js/lib/codemirror/mode/mirc/mirc.js
delete mode 100644 public/js/lib/codemirror/mode/mllike/index.html
delete mode 100644 public/js/lib/codemirror/mode/mllike/mllike.js
delete mode 100644 public/js/lib/codemirror/mode/modelica/index.html
delete mode 100644 public/js/lib/codemirror/mode/modelica/modelica.js
delete mode 100644 public/js/lib/codemirror/mode/nginx/index.html
delete mode 100644 public/js/lib/codemirror/mode/nginx/nginx.js
delete mode 100644 public/js/lib/codemirror/mode/ntriples/index.html
delete mode 100644 public/js/lib/codemirror/mode/ntriples/ntriples.js
delete mode 100644 public/js/lib/codemirror/mode/octave/index.html
delete mode 100644 public/js/lib/codemirror/mode/octave/octave.js
delete mode 100644 public/js/lib/codemirror/mode/pascal/index.html
delete mode 100644 public/js/lib/codemirror/mode/pascal/pascal.js
delete mode 100644 public/js/lib/codemirror/mode/pegjs/index.html
delete mode 100644 public/js/lib/codemirror/mode/pegjs/pegjs.js
delete mode 100644 public/js/lib/codemirror/mode/perl/index.html
delete mode 100644 public/js/lib/codemirror/mode/perl/perl.js
delete mode 100644 public/js/lib/codemirror/mode/php/index.html
delete mode 100644 public/js/lib/codemirror/mode/php/php.js
delete mode 100644 public/js/lib/codemirror/mode/php/test.js
delete mode 100644 public/js/lib/codemirror/mode/pig/index.html
delete mode 100644 public/js/lib/codemirror/mode/pig/pig.js
delete mode 100644 public/js/lib/codemirror/mode/properties/index.html
delete mode 100644 public/js/lib/codemirror/mode/properties/properties.js
delete mode 100644 public/js/lib/codemirror/mode/puppet/index.html
delete mode 100644 public/js/lib/codemirror/mode/puppet/puppet.js
delete mode 100644 public/js/lib/codemirror/mode/python/index.html
delete mode 100644 public/js/lib/codemirror/mode/python/python.js
delete mode 100644 public/js/lib/codemirror/mode/q/index.html
delete mode 100644 public/js/lib/codemirror/mode/q/q.js
delete mode 100644 public/js/lib/codemirror/mode/r/index.html
delete mode 100644 public/js/lib/codemirror/mode/r/r.js
delete mode 100644 public/js/lib/codemirror/mode/rpm/changes/index.html
delete mode 100644 public/js/lib/codemirror/mode/rpm/index.html
delete mode 100644 public/js/lib/codemirror/mode/rpm/rpm.js
delete mode 100644 public/js/lib/codemirror/mode/rst/index.html
delete mode 100644 public/js/lib/codemirror/mode/rst/rst.js
delete mode 100644 public/js/lib/codemirror/mode/ruby/index.html
delete mode 100644 public/js/lib/codemirror/mode/ruby/ruby.js
delete mode 100644 public/js/lib/codemirror/mode/ruby/test.js
delete mode 100644 public/js/lib/codemirror/mode/rust/index.html
delete mode 100644 public/js/lib/codemirror/mode/rust/rust.js
delete mode 100644 public/js/lib/codemirror/mode/sass/index.html
delete mode 100644 public/js/lib/codemirror/mode/sass/sass.js
delete mode 100644 public/js/lib/codemirror/mode/scheme/index.html
delete mode 100644 public/js/lib/codemirror/mode/scheme/scheme.js
delete mode 100644 public/js/lib/codemirror/mode/shell/index.html
delete mode 100644 public/js/lib/codemirror/mode/shell/shell.js
delete mode 100644 public/js/lib/codemirror/mode/shell/test.js
delete mode 100644 public/js/lib/codemirror/mode/sieve/index.html
delete mode 100644 public/js/lib/codemirror/mode/sieve/sieve.js
delete mode 100644 public/js/lib/codemirror/mode/slim/index.html
delete mode 100644 public/js/lib/codemirror/mode/slim/slim.js
delete mode 100644 public/js/lib/codemirror/mode/slim/test.js
delete mode 100644 public/js/lib/codemirror/mode/smalltalk/index.html
delete mode 100644 public/js/lib/codemirror/mode/smalltalk/smalltalk.js
delete mode 100644 public/js/lib/codemirror/mode/smarty/index.html
delete mode 100644 public/js/lib/codemirror/mode/smarty/smarty.js
delete mode 100644 public/js/lib/codemirror/mode/smartymixed/index.html
delete mode 100644 public/js/lib/codemirror/mode/smartymixed/smartymixed.js
delete mode 100644 public/js/lib/codemirror/mode/solr/index.html
delete mode 100644 public/js/lib/codemirror/mode/solr/solr.js
delete mode 100644 public/js/lib/codemirror/mode/soy/index.html
delete mode 100644 public/js/lib/codemirror/mode/soy/soy.js
delete mode 100644 public/js/lib/codemirror/mode/sparql/index.html
delete mode 100644 public/js/lib/codemirror/mode/sparql/sparql.js
delete mode 100644 public/js/lib/codemirror/mode/spreadsheet/index.html
delete mode 100644 public/js/lib/codemirror/mode/spreadsheet/spreadsheet.js
delete mode 100644 public/js/lib/codemirror/mode/sql/index.html
delete mode 100644 public/js/lib/codemirror/mode/sql/sql.js
delete mode 100644 public/js/lib/codemirror/mode/stex/index.html
delete mode 100644 public/js/lib/codemirror/mode/stex/stex.js
delete mode 100644 public/js/lib/codemirror/mode/stex/test.js
delete mode 100644 public/js/lib/codemirror/mode/tcl/index.html
delete mode 100644 public/js/lib/codemirror/mode/tcl/tcl.js
delete mode 100644 public/js/lib/codemirror/mode/textile/index.html
delete mode 100644 public/js/lib/codemirror/mode/textile/test.js
delete mode 100644 public/js/lib/codemirror/mode/textile/textile.js
delete mode 100644 public/js/lib/codemirror/mode/tiddlywiki/index.html
delete mode 100644 public/js/lib/codemirror/mode/tiddlywiki/tiddlywiki.css
delete mode 100644 public/js/lib/codemirror/mode/tiddlywiki/tiddlywiki.js
delete mode 100644 public/js/lib/codemirror/mode/tiki/index.html
delete mode 100644 public/js/lib/codemirror/mode/tiki/tiki.css
delete mode 100644 public/js/lib/codemirror/mode/tiki/tiki.js
delete mode 100644 public/js/lib/codemirror/mode/toml/index.html
delete mode 100644 public/js/lib/codemirror/mode/toml/toml.js
delete mode 100644 public/js/lib/codemirror/mode/tornado/index.html
delete mode 100644 public/js/lib/codemirror/mode/tornado/tornado.js
delete mode 100644 public/js/lib/codemirror/mode/turtle/index.html
delete mode 100644 public/js/lib/codemirror/mode/turtle/turtle.js
delete mode 100644 public/js/lib/codemirror/mode/vb/index.html
delete mode 100644 public/js/lib/codemirror/mode/vb/vb.js
delete mode 100644 public/js/lib/codemirror/mode/vbscript/index.html
delete mode 100644 public/js/lib/codemirror/mode/vbscript/vbscript.js
delete mode 100644 public/js/lib/codemirror/mode/velocity/index.html
delete mode 100644 public/js/lib/codemirror/mode/velocity/velocity.js
delete mode 100644 public/js/lib/codemirror/mode/verilog/index.html
delete mode 100644 public/js/lib/codemirror/mode/verilog/test.js
delete mode 100644 public/js/lib/codemirror/mode/verilog/verilog.js
delete mode 100644 public/js/lib/codemirror/mode/xquery/index.html
delete mode 100644 public/js/lib/codemirror/mode/xquery/test.js
delete mode 100644 public/js/lib/codemirror/mode/xquery/xquery.js
delete mode 100644 public/js/lib/codemirror/mode/z80/index.html
delete mode 100644 public/js/lib/codemirror/mode/z80/z80.js
diff --git a/public/js/lib/codemirror/mode/apl/apl.js b/public/js/lib/codemirror/mode/apl/apl.js
deleted file mode 100644
index 4357bed475..0000000000
--- a/public/js/lib/codemirror/mode/apl/apl.js
+++ /dev/null
@@ -1,175 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("apl", function() {
- var builtInOps = {
- ".": "innerProduct",
- "\\": "scan",
- "/": "reduce",
- "⌿": "reduce1Axis",
- "⍀": "scan1Axis",
- "¨": "each",
- "⍣": "power"
- };
- var builtInFuncs = {
- "+": ["conjugate", "add"],
- "−": ["negate", "subtract"],
- "×": ["signOf", "multiply"],
- "÷": ["reciprocal", "divide"],
- "⌈": ["ceiling", "greaterOf"],
- "⌊": ["floor", "lesserOf"],
- "∣": ["absolute", "residue"],
- "⍳": ["indexGenerate", "indexOf"],
- "?": ["roll", "deal"],
- "⋆": ["exponentiate", "toThePowerOf"],
- "⍟": ["naturalLog", "logToTheBase"],
- "○": ["piTimes", "circularFuncs"],
- "!": ["factorial", "binomial"],
- "⌹": ["matrixInverse", "matrixDivide"],
- "<": [null, "lessThan"],
- "≤": [null, "lessThanOrEqual"],
- "=": [null, "equals"],
- ">": [null, "greaterThan"],
- "≥": [null, "greaterThanOrEqual"],
- "≠": [null, "notEqual"],
- "≡": ["depth", "match"],
- "≢": [null, "notMatch"],
- "∈": ["enlist", "membership"],
- "⍷": [null, "find"],
- "∪": ["unique", "union"],
- "∩": [null, "intersection"],
- "∼": ["not", "without"],
- "∨": [null, "or"],
- "∧": [null, "and"],
- "⍱": [null, "nor"],
- "⍲": [null, "nand"],
- "⍴": ["shapeOf", "reshape"],
- ",": ["ravel", "catenate"],
- "⍪": [null, "firstAxisCatenate"],
- "⌽": ["reverse", "rotate"],
- "⊖": ["axis1Reverse", "axis1Rotate"],
- "⍉": ["transpose", null],
- "↑": ["first", "take"],
- "↓": [null, "drop"],
- "⊂": ["enclose", "partitionWithAxis"],
- "⊃": ["diclose", "pick"],
- "⌷": [null, "index"],
- "⍋": ["gradeUp", null],
- "⍒": ["gradeDown", null],
- "⊤": ["encode", null],
- "⊥": ["decode", null],
- "⍕": ["format", "formatByExample"],
- "⍎": ["execute", null],
- "⊣": ["stop", "left"],
- "⊢": ["pass", "right"]
- };
-
- var isOperator = /[\.\/⌿⍀¨⍣]/;
- var isNiladic = /⍬/;
- var isFunction = /[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/;
- var isArrow = /←/;
- var isComment = /[⍝#].*$/;
-
- var stringEater = function(type) {
- var prev;
- prev = false;
- return function(c) {
- prev = c;
- if (c === type) {
- return prev === "\\";
- }
- return true;
- };
- };
- return {
- startState: function() {
- return {
- prev: false,
- func: false,
- op: false,
- string: false,
- escape: false
- };
- },
- token: function(stream, state) {
- var ch, funcName, word;
- if (stream.eatSpace()) {
- return null;
- }
- ch = stream.next();
- if (ch === '"' || ch === "'") {
- stream.eatWhile(stringEater(ch));
- stream.next();
- state.prev = true;
- return "string";
- }
- if (/[\[{\(]/.test(ch)) {
- state.prev = false;
- return null;
- }
- if (/[\]}\)]/.test(ch)) {
- state.prev = true;
- return null;
- }
- if (isNiladic.test(ch)) {
- state.prev = false;
- return "niladic";
- }
- if (/[¯\d]/.test(ch)) {
- if (state.func) {
- state.func = false;
- state.prev = false;
- } else {
- state.prev = true;
- }
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (isOperator.test(ch)) {
- return "operator apl-" + builtInOps[ch];
- }
- if (isArrow.test(ch)) {
- return "apl-arrow";
- }
- if (isFunction.test(ch)) {
- funcName = "apl-";
- if (builtInFuncs[ch] != null) {
- if (state.prev) {
- funcName += builtInFuncs[ch][1];
- } else {
- funcName += builtInFuncs[ch][0];
- }
- }
- state.func = true;
- state.prev = false;
- return "function " + funcName;
- }
- if (isComment.test(ch)) {
- stream.skipToEnd();
- return "comment";
- }
- if (ch === "∘" && stream.peek() === ".") {
- stream.next();
- return "function jot-dot";
- }
- stream.eatWhile(/[\w\$_]/);
- word = stream.current();
- state.prev = true;
- return "keyword";
- }
- };
-});
-
-CodeMirror.defineMIME("text/apl", "apl");
-
-});
diff --git a/public/js/lib/codemirror/mode/apl/index.html b/public/js/lib/codemirror/mode/apl/index.html
deleted file mode 100644
index 53dda6b586..0000000000
--- a/public/js/lib/codemirror/mode/apl/index.html
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-CodeMirror: APL mode
-
-
-
-
-
-
-
-
-
-
-
-APL mode
-
-⍝ Conway's game of life
-
-⍝ This example was inspired by the impressive demo at
-⍝ http://www.youtube.com/watch?v=a9xAKttWgP4
-
-⍝ Create a matrix:
-⍝ 0 1 1
-⍝ 1 1 0
-⍝ 0 1 0
-creature ← (3 3 ⍴ ⍳ 9) ∈ 1 2 3 4 7 ⍝ Original creature from demo
-creature ← (3 3 ⍴ ⍳ 9) ∈ 1 3 6 7 8 ⍝ Glider
-
-⍝ Place the creature on a larger board, near the centre
-board ← ¯1 ⊖ ¯2 ⌽ 5 7 ↑ creature
-
-⍝ A function to move from one generation to the next
-life ← {∨/ 1 ⍵ ∧ 3 4 = ⊂+/ +⌿ 1 0 ¯1 ∘.⊖ 1 0 ¯1 ⌽¨ ⊂⍵}
-
-⍝ Compute n-th generation and format it as a
-⍝ character matrix
-gen ← {' #'[(life ⍣ ⍵) board]}
-
-⍝ Show first three generations
-(gen 1) (gen 2) (gen 3)
-
-
-
-
- Simple mode that tries to handle APL as well as it can.
- It attempts to label functions/operators based upon
- monadic/dyadic usage (but this is far from fully fleshed out).
- This means there are meaningful classnames so hover states can
- have popups etc.
-
- MIME types defined: text/apl
(APL code)
-
diff --git a/public/js/lib/codemirror/mode/asterisk/asterisk.js b/public/js/lib/codemirror/mode/asterisk/asterisk.js
deleted file mode 100644
index a1ead1157a..0000000000
--- a/public/js/lib/codemirror/mode/asterisk/asterisk.js
+++ /dev/null
@@ -1,198 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/*
- * =====================================================================================
- *
- * Filename: mode/asterisk/asterisk.js
- *
- * Description: CodeMirror mode for Asterisk dialplan
- *
- * Created: 05/17/2012 09:20:25 PM
- * Revision: none
- *
- * Author: Stas Kobzar (stas@modulis.ca),
- * Company: Modulis.ca Inc.
- *
- * =====================================================================================
- */
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("asterisk", function() {
- var atoms = ["exten", "same", "include","ignorepat","switch"],
- dpcmd = ["#include","#exec"],
- apps = [
- "addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi",
- "alarmreceiver","amd","answer","authenticate","background","backgrounddetect",
- "bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent",
- "changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge",
- "congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge",
- "dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility",
- "datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa",
- "dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy",
- "externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif",
- "goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete",
- "ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus",
- "jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme",
- "meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete",
- "minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode",
- "mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish",
- "originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce",
- "parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones",
- "privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten",
- "readfile","receivefax","receivefax","receivefax","record","removequeuemember",
- "resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun",
- "saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax",
- "sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags",
- "setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel",
- "slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground",
- "speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound",
- "speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor",
- "stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec",
- "trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate",
- "vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring",
- "waitforsilence","waitmusiconhold","waituntil","while","zapateller"
- ];
-
- function basicToken(stream,state){
- var cur = '';
- var ch = '';
- ch = stream.next();
- // comment
- if(ch == ";") {
- stream.skipToEnd();
- return "comment";
- }
- // context
- if(ch == '[') {
- stream.skipTo(']');
- stream.eat(']');
- return "header";
- }
- // string
- if(ch == '"') {
- stream.skipTo('"');
- return "string";
- }
- if(ch == "'") {
- stream.skipTo("'");
- return "string-2";
- }
- // dialplan commands
- if(ch == '#') {
- stream.eatWhile(/\w/);
- cur = stream.current();
- if(dpcmd.indexOf(cur) !== -1) {
- stream.skipToEnd();
- return "strong";
- }
- }
- // application args
- if(ch == '$'){
- var ch1 = stream.peek();
- if(ch1 == '{'){
- stream.skipTo('}');
- stream.eat('}');
- return "variable-3";
- }
- }
- // extension
- stream.eatWhile(/\w/);
- cur = stream.current();
- if(atoms.indexOf(cur) !== -1) {
- state.extenStart = true;
- switch(cur) {
- case 'same': state.extenSame = true; break;
- case 'include':
- case 'switch':
- case 'ignorepat':
- state.extenInclude = true;break;
- default:break;
- }
- return "atom";
- }
- }
-
- return {
- startState: function() {
- return {
- extenStart: false,
- extenSame: false,
- extenInclude: false,
- extenExten: false,
- extenPriority: false,
- extenApplication: false
- };
- },
- token: function(stream, state) {
-
- var cur = '';
- var ch = '';
- if(stream.eatSpace()) return null;
- // extension started
- if(state.extenStart){
- stream.eatWhile(/[^\s]/);
- cur = stream.current();
- if(/^=>?$/.test(cur)){
- state.extenExten = true;
- state.extenStart = false;
- return "strong";
- } else {
- state.extenStart = false;
- stream.skipToEnd();
- return "error";
- }
- } else if(state.extenExten) {
- // set exten and priority
- state.extenExten = false;
- state.extenPriority = true;
- stream.eatWhile(/[^,]/);
- if(state.extenInclude) {
- stream.skipToEnd();
- state.extenPriority = false;
- state.extenInclude = false;
- }
- if(state.extenSame) {
- state.extenPriority = false;
- state.extenSame = false;
- state.extenApplication = true;
- }
- return "tag";
- } else if(state.extenPriority) {
- state.extenPriority = false;
- state.extenApplication = true;
- ch = stream.next(); // get comma
- if(state.extenSame) return null;
- stream.eatWhile(/[^,]/);
- return "number";
- } else if(state.extenApplication) {
- stream.eatWhile(/,/);
- cur = stream.current();
- if(cur === ',') return null;
- stream.eatWhile(/\w/);
- cur = stream.current().toLowerCase();
- state.extenApplication = false;
- if(apps.indexOf(cur) !== -1){
- return "def strong";
- }
- } else{
- return basicToken(stream,state);
- }
-
- return null;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-asterisk", "asterisk");
-
-});
diff --git a/public/js/lib/codemirror/mode/asterisk/index.html b/public/js/lib/codemirror/mode/asterisk/index.html
deleted file mode 100644
index 257bd39875..0000000000
--- a/public/js/lib/codemirror/mode/asterisk/index.html
+++ /dev/null
@@ -1,154 +0,0 @@
-
-
-CodeMirror: Asterisk dialplan mode
-
-
-
-
-
-
-
-
-
-
-Asterisk dialplan mode
-
-; extensions.conf - the Asterisk dial plan
-;
-
-[general]
-;
-; If static is set to no, or omitted, then the pbx_config will rewrite
-; this file when extensions are modified. Remember that all comments
-; made in the file will be lost when that happens.
-static=yes
-
-#include "/etc/asterisk/additional_general.conf
-
-[iaxprovider]
-switch => IAX2/user:[key]@myserver/mycontext
-
-[dynamic]
-#exec /usr/bin/dynamic-peers.pl
-
-[trunkint]
-;
-; International long distance through trunk
-;
-exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})
-exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})})
-
-[local]
-;
-; Master context for local, toll-free, and iaxtel calls only
-;
-ignorepat => 9
-include => default
-
-[demo]
-include => stdexten
-;
-; We start with what to do when a call first comes in.
-;
-exten => s,1,Wait(1) ; Wait a second, just for fun
-same => n,Answer ; Answer the line
-same => n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds
-same => n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds
-same => n(restart),BackGround(demo-congrats) ; Play a congratulatory message
-same => n(instruct),BackGround(demo-instruct) ; Play some instructions
-same => n,WaitExten ; Wait for an extension to be dialed.
-
-exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.
-exten => 2,n,Goto(s,instruct)
-
-exten => 3,1,Set(LANGUAGE()=fr) ; Set language to french
-exten => 3,n,Goto(s,restart) ; Start with the congratulations
-
-exten => 1000,1,Goto(default,s,1)
-;
-; We also create an example user, 1234, who is on the console and has
-; voicemail, etc.
-;
-exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."
- ; (but skip if channel is not up)
-exten => 1234,n,Gosub(${EXTEN},stdexten(${GLOBAL(CONSOLE)}))
-exten => 1234,n,Goto(default,s,1) ; exited Voicemail
-
-exten => 1235,1,Voicemail(1234,u) ; Right to voicemail
-
-exten => 1236,1,Dial(Console/dsp) ; Ring forever
-exten => 1236,n,Voicemail(1234,b) ; Unless busy
-
-;
-; # for when they're done with the demo
-;
-exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"
-exten => #,n,Hangup ; Hang them up.
-
-;
-; A timeout and "invalid extension rule"
-;
-exten => t,1,Goto(#,1) ; If they take too long, give up
-exten => i,1,Playback(invalid) ; "That's not valid, try again"
-
-;
-; Create an extension, 500, for dialing the
-; Asterisk demo.
-;
-exten => 500,1,Playback(demo-abouttotry); Let them know what's going on
-exten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default) ; Call the Asterisk demo
-exten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo site
-exten => 500,n,Goto(s,6) ; Return to the start over message.
-
-;
-; Create an extension, 600, for evaluating echo latency.
-;
-exten => 600,1,Playback(demo-echotest) ; Let them know what's going on
-exten => 600,n,Echo ; Do the echo test
-exten => 600,n,Playback(demo-echodone) ; Let them know it's over
-exten => 600,n,Goto(s,6) ; Start over
-
-;
-; You can use the Macro Page to intercom a individual user
-exten => 76245,1,Macro(page,SIP/Grandstream1)
-; or if your peernames are the same as extensions
-exten => _7XXX,1,Macro(page,SIP/${EXTEN})
-;
-;
-; System Wide Page at extension 7999
-;
-exten => 7999,1,Set(TIMEOUT(absolute)=60)
-exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n,d)
-
-; Give voicemail at extension 8500
-;
-exten => 8500,1,VoicemailMain
-exten => 8500,n,Goto(s,6)
-
-
-
-
- MIME types defined: text/x-asterisk
.
-
-
diff --git a/public/js/lib/codemirror/mode/clike/clike.js b/public/js/lib/codemirror/mode/clike/clike.js
deleted file mode 100644
index 710953b229..0000000000
--- a/public/js/lib/codemirror/mode/clike/clike.js
+++ /dev/null
@@ -1,489 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("clike", function(config, parserConfig) {
- var indentUnit = config.indentUnit,
- statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
- dontAlignCalls = parserConfig.dontAlignCalls,
- keywords = parserConfig.keywords || {},
- builtin = parserConfig.builtin || {},
- blockKeywords = parserConfig.blockKeywords || {},
- atoms = parserConfig.atoms || {},
- hooks = parserConfig.hooks || {},
- multiLineStrings = parserConfig.multiLineStrings,
- indentStatements = parserConfig.indentStatements !== false;
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (hooks[ch]) {
- var result = hooks[ch](stream, state);
- if (result !== false) return result;
- }
- if (ch == '"' || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
- var cur = stream.current();
- if (keywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- }
- if (builtin.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "builtin";
- }
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !(escaped || multiLineStrings))
- state.tokenize = null;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- var indent = state.indented;
- if (state.context && state.context.type == "statement")
- indent = state.context.indented;
- return state.context = new Context(indent, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: null,
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- if (ctx.align == null) ctx.align = true;
-
- if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state);
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (indentStatements &&
- (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') ||
- (ctx.type == "statement" && curPunc == "newstatement")))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
- if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
- else if (ctx.align && (!dontAlignCalls || ctx.type != ")")) return ctx.column + (closing ? 0 : 1);
- else if (ctx.type == ")" && !closing) return ctx.indented + statementIndentUnit;
- else return ctx.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}",
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//",
- fold: "brace"
- };
-});
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var cKeywords = "auto if break int case long char register continue return default short do sizeof " +
- "double static else struct entry switch extern typedef float union for unsigned " +
- "goto while enum void const signed volatile";
-
- function cppHook(stream, state) {
- if (!state.startOfLine) return false;
- for (;;) {
- if (stream.skipTo("\\")) {
- stream.next();
- if (stream.eol()) {
- state.tokenize = cppHook;
- break;
- }
- } else {
- stream.skipToEnd();
- state.tokenize = null;
- break;
- }
- }
- return "meta";
- }
-
- function cpp11StringHook(stream, state) {
- stream.backUp(1);
- // Raw strings.
- if (stream.match(/(R|u8R|uR|UR|LR)/)) {
- var match = stream.match(/"([^\s\\()]{0,16})\(/);
- if (!match) {
- return false;
- }
- state.cpp11RawStringDelim = match[1];
- state.tokenize = tokenRawString;
- return tokenRawString(stream, state);
- }
- // Unicode strings/chars.
- if (stream.match(/(u8|u|U|L)/)) {
- if (stream.match(/["']/, /* eat */ false)) {
- return "string";
- }
- return false;
- }
- // Ignore this hook.
- stream.next();
- return false;
- }
-
- // C#-style strings where "" escapes a quote.
- function tokenAtString(stream, state) {
- var next;
- while ((next = stream.next()) != null) {
- if (next == '"' && !stream.eat('"')) {
- state.tokenize = null;
- break;
- }
- }
- return "string";
- }
-
- // C++11 raw string literal is "( anything )", where
- // can be a string up to 16 characters long.
- function tokenRawString(stream, state) {
- // Escape characters that have special regex meanings.
- var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&');
- var match = stream.match(new RegExp(".*?\\)" + delim + '"'));
- if (match)
- state.tokenize = null;
- else
- stream.skipToEnd();
- return "string";
- }
-
- function def(mimes, mode) {
- if (typeof mimes == "string") mimes = [mimes];
- var words = [];
- function add(obj) {
- if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop))
- words.push(prop);
- }
- add(mode.keywords);
- add(mode.builtin);
- add(mode.atoms);
- if (words.length) {
- mode.helperType = mimes[0];
- CodeMirror.registerHelper("hintWords", mimes[0], words);
- }
-
- for (var i = 0; i < mimes.length; ++i)
- CodeMirror.defineMIME(mimes[i], mode);
- }
-
- def(["text/x-csrc", "text/x-c", "text/x-chdr"], {
- name: "clike",
- keywords: words(cKeywords),
- blockKeywords: words("case do else for if switch while struct"),
- atoms: words("null"),
- hooks: {"#": cppHook},
- modeProps: {fold: ["brace", "include"]}
- });
-
- def(["text/x-c++src", "text/x-c++hdr"], {
- name: "clike",
- keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " +
- "static_cast typeid catch operator template typename class friend private " +
- "this using const_cast inline public throw virtual delete mutable protected " +
- "wchar_t alignas alignof constexpr decltype nullptr noexcept thread_local final " +
- "static_assert override"),
- blockKeywords: words("catch class do else finally for if struct switch try while"),
- atoms: words("true false null"),
- hooks: {
- "#": cppHook,
- "u": cpp11StringHook,
- "U": cpp11StringHook,
- "L": cpp11StringHook,
- "R": cpp11StringHook
- },
- modeProps: {fold: ["brace", "include"]}
- });
-
- def("text/x-java", {
- name: "clike",
- keywords: words("abstract assert boolean break byte case catch char class const continue default " +
- "do double else enum extends final finally float for goto if implements import " +
- "instanceof int interface long native new package private protected public " +
- "return short static strictfp super switch synchronized this throw throws transient " +
- "try void volatile while"),
- blockKeywords: words("catch class do else finally for if switch try while"),
- atoms: words("true false null"),
- hooks: {
- "@": function(stream) {
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- }
- },
- modeProps: {fold: ["brace", "import"]}
- });
-
- def("text/x-csharp", {
- name: "clike",
- keywords: words("abstract as base break case catch checked class const continue" +
- " default delegate do else enum event explicit extern finally fixed for" +
- " foreach goto if implicit in interface internal is lock namespace new" +
- " operator out override params private protected public readonly ref return sealed" +
- " sizeof stackalloc static struct switch this throw try typeof unchecked" +
- " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
- " global group into join let orderby partial remove select set value var yield"),
- blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
- builtin: words("Boolean Byte Char DateTime DateTimeOffset Decimal Double" +
- " Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32" +
- " UInt64 bool byte char decimal double short int long object" +
- " sbyte float string ushort uint ulong"),
- atoms: words("true false null"),
- hooks: {
- "@": function(stream, state) {
- if (stream.eat('"')) {
- state.tokenize = tokenAtString;
- return tokenAtString(stream, state);
- }
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- }
- }
- });
-
- function tokenTripleString(stream, state) {
- var escaped = false;
- while (!stream.eol()) {
- if (!escaped && stream.match('"""')) {
- state.tokenize = null;
- break;
- }
- escaped = stream.next() != "\\" && !escaped;
- }
- return "string";
- }
-
- def("text/x-scala", {
- name: "clike",
- keywords: words(
-
- /* scala */
- "abstract case catch class def do else extends false final finally for forSome if " +
- "implicit import lazy match new null object override package private protected return " +
- "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " +
- "<% >: # @ " +
-
- /* package scala */
- "assert assume require print println printf readLine readBoolean readByte readShort " +
- "readChar readInt readLong readFloat readDouble " +
-
- "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
- "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " +
- "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
- "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
- "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " +
-
- /* package java.lang */
- "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
- "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
- "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
- "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
- ),
- multiLineStrings: true,
- blockKeywords: words("catch class do else finally for forSome if match switch try while"),
- atoms: words("true false null"),
- indentStatements: false,
- hooks: {
- "@": function(stream) {
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- },
- '"': function(stream, state) {
- if (!stream.match('""')) return false;
- state.tokenize = tokenTripleString;
- return state.tokenize(stream, state);
- }
- }
- });
-
- def(["x-shader/x-vertex", "x-shader/x-fragment"], {
- name: "clike",
- keywords: words("float int bool void " +
- "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " +
- "mat2 mat3 mat4 " +
- "sampler1D sampler2D sampler3D samplerCube " +
- "sampler1DShadow sampler2DShadow" +
- "const attribute uniform varying " +
- "break continue discard return " +
- "for while do if else struct " +
- "in out inout"),
- blockKeywords: words("for while do if else struct"),
- builtin: words("radians degrees sin cos tan asin acos atan " +
- "pow exp log exp2 sqrt inversesqrt " +
- "abs sign floor ceil fract mod min max clamp mix step smootstep " +
- "length distance dot cross normalize ftransform faceforward " +
- "reflect refract matrixCompMult " +
- "lessThan lessThanEqual greaterThan greaterThanEqual " +
- "equal notEqual any all not " +
- "texture1D texture1DProj texture1DLod texture1DProjLod " +
- "texture2D texture2DProj texture2DLod texture2DProjLod " +
- "texture3D texture3DProj texture3DLod texture3DProjLod " +
- "textureCube textureCubeLod " +
- "shadow1D shadow2D shadow1DProj shadow2DProj " +
- "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " +
- "dFdx dFdy fwidth " +
- "noise1 noise2 noise3 noise4"),
- atoms: words("true false " +
- "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " +
- "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " +
- "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " +
- "gl_FogCoord " +
- "gl_Position gl_PointSize gl_ClipVertex " +
- "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " +
- "gl_TexCoord gl_FogFragCoord " +
- "gl_FragCoord gl_FrontFacing " +
- "gl_FragColor gl_FragData gl_FragDepth " +
- "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
- "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
- "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
- "gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
- "gl_ProjectionMatrixInverseTranspose " +
- "gl_ModelViewProjectionMatrixInverseTranspose " +
- "gl_TextureMatrixInverseTranspose " +
- "gl_NormalScale gl_DepthRange gl_ClipPlane " +
- "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " +
- "gl_FrontLightModelProduct gl_BackLightModelProduct " +
- "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " +
- "gl_FogParameters " +
- "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " +
- "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " +
- "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " +
- "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " +
- "gl_MaxDrawBuffers"),
- hooks: {"#": cppHook},
- modeProps: {fold: ["brace", "include"]}
- });
-
- def("text/x-nesc", {
- name: "clike",
- keywords: words(cKeywords + "as atomic async call command component components configuration event generic " +
- "implementation includes interface module new norace nx_struct nx_union post provides " +
- "signal task uses abstract extends"),
- blockKeywords: words("case do else for if switch while struct"),
- atoms: words("null"),
- hooks: {"#": cppHook},
- modeProps: {fold: ["brace", "include"]}
- });
-
- def("text/x-objectivec", {
- name: "clike",
- keywords: words(cKeywords + "inline restrict _Bool _Complex _Imaginery BOOL Class bycopy byref id IMP in " +
- "inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),
- atoms: words("YES NO NULL NILL ON OFF"),
- hooks: {
- "@": function(stream) {
- stream.eatWhile(/[\w\$]/);
- return "keyword";
- },
- "#": cppHook
- },
- modeProps: {fold: "brace"}
- });
-
-});
diff --git a/public/js/lib/codemirror/mode/clike/index.html b/public/js/lib/codemirror/mode/clike/index.html
deleted file mode 100644
index 8b386d22e0..0000000000
--- a/public/js/lib/codemirror/mode/clike/index.html
+++ /dev/null
@@ -1,251 +0,0 @@
-
-
-CodeMirror: C-like mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-C-like mode
-
-
-/* C demo code */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-typedef struct {
- void* arg_socket;
- zmq_msg_t* arg_msg;
- char* arg_string;
- unsigned long arg_len;
- int arg_int, arg_command;
-
- int signal_fd;
- int pad;
- void* context;
- sem_t sem;
-} acl_zmq_context;
-
-#define p(X) (context->arg_##X)
-
-void* zmq_thread(void* context_pointer) {
- acl_zmq_context* context = (acl_zmq_context*)context_pointer;
- char ok = 'K', err = 'X';
- int res;
-
- while (1) {
- while ((res = sem_wait(&context->sem)) == EINTR);
- if (res) {write(context->signal_fd, &err, 1); goto cleanup;}
- switch(p(command)) {
- case 0: goto cleanup;
- case 1: p(socket) = zmq_socket(context->context, p(int)); break;
- case 2: p(int) = zmq_close(p(socket)); break;
- case 3: p(int) = zmq_bind(p(socket), p(string)); break;
- case 4: p(int) = zmq_connect(p(socket), p(string)); break;
- case 5: p(int) = zmq_getsockopt(p(socket), p(int), (void*)p(string), &p(len)); break;
- case 6: p(int) = zmq_setsockopt(p(socket), p(int), (void*)p(string), p(len)); break;
- case 7: p(int) = zmq_send(p(socket), p(msg), p(int)); break;
- case 8: p(int) = zmq_recv(p(socket), p(msg), p(int)); break;
- case 9: p(int) = zmq_poll(p(socket), p(int), p(len)); break;
- }
- p(command) = errno;
- write(context->signal_fd, &ok, 1);
- }
- cleanup:
- close(context->signal_fd);
- free(context_pointer);
- return 0;
-}
-
-void* zmq_thread_init(void* zmq_context, int signal_fd) {
- acl_zmq_context* context = malloc(sizeof(acl_zmq_context));
- pthread_t thread;
-
- context->context = zmq_context;
- context->signal_fd = signal_fd;
- sem_init(&context->sem, 1, 0);
- pthread_create(&thread, 0, &zmq_thread, context);
- pthread_detach(thread);
- return context;
-}
-
-
-C++ example
-
-
-#include
-#include "mystuff/util.h"
-
-namespace {
-enum Enum {
- VAL1, VAL2, VAL3
-};
-
-char32_t unicode_string = U"\U0010FFFF";
-string raw_string = R"delim(anything
-you
-want)delim";
-
-int Helper(const MyType& param) {
- return 0;
-}
-} // namespace
-
-class ForwardDec;
-
-template
-class Class : public BaseClass {
- const MyType member_;
-
- public:
- const MyType& Method() const {
- return member_;
- }
-
- void Method2(MyType* value);
-}
-
-template
-void Class::Method2(MyType* value) {
- std::out << 1 >> method();
- value->Method3(member_);
- member_ = value;
-}
-
-
-Objective-C example
-
-
-/*
-This is a longer comment
-That spans two lines
-*/
-
-#import
-@implementation YourAppDelegate
-
-// This is a one-line comment
-
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
- char myString[] = "This is a C character array";
- int test = 5;
- return YES;
-}
-
-
-Java example
-
-
-import com.demo.util.MyType;
-import com.demo.util.MyInterface;
-
-public enum Enum {
- VAL1, VAL2, VAL3
-}
-
-public class Class implements MyInterface {
- public static final MyType member;
-
- private class InnerClass {
- public int zero() {
- return 0;
- }
- }
-
- @Override
- public MyType method() {
- return member;
- }
-
- public void method2(MyType value) {
- method();
- value.method3();
- member = value;
- }
-}
-
-
-Scala example
-
-
-object FilterTest extends App {
- def filter(xs: List[Int], threshold: Int) = {
- def process(ys: List[Int]): List[Int] =
- if (ys.isEmpty) ys
- else if (ys.head < threshold) ys.head :: process(ys.tail)
- else process(ys.tail)
- process(xs)
- }
- println(filter(List(1, 9, 2, 8, 3, 7, 4), 5))
-}
-
-
-
-
- Simple mode that tries to handle C-like languages as well as it
- can. Takes two configuration parameters: keywords
, an
- object whose property names are the keywords in the language,
- and useCPP
, which determines whether C preprocessor
- directives are recognized.
-
- MIME types defined: text/x-csrc
- (C), text/x-c++src
(C++), text/x-java
- (Java), text/x-csharp
(C#),
- text/x-objectivec
(Objective-C),
- text/x-scala
(Scala), text/x-vertex
- and x-shader/x-fragment
(shader programs).
-
diff --git a/public/js/lib/codemirror/mode/clike/scala.html b/public/js/lib/codemirror/mode/clike/scala.html
deleted file mode 100644
index aa04cf0f04..0000000000
--- a/public/js/lib/codemirror/mode/clike/scala.html
+++ /dev/null
@@ -1,767 +0,0 @@
-
-
-CodeMirror: Scala mode
-
-
-
-
-
-
-
-
-
-
-
-Scala mode
-
-
-
- /* __ *\
- ** ________ ___ / / ___ Scala API **
- ** / __/ __// _ | / / / _ | (c) 2003-2011, LAMP/EPFL **
- ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
- ** /____/\___/_/ |_/____/_/ | | **
- ** |/ **
- \* */
-
- package scala.collection
-
- import generic._
- import mutable.{ Builder, ListBuffer }
- import annotation.{tailrec, migration, bridge}
- import annotation.unchecked.{ uncheckedVariance => uV }
- import parallel.ParIterable
-
- /** A template trait for traversable collections of type `Traversable[A]`.
- *
- * $traversableInfo
- * @define mutability
- * @define traversableInfo
- * This is a base trait of all kinds of $mutability Scala collections. It
- * implements the behavior common to all collections, in terms of a method
- * `foreach` with signature:
- * {{{
- * def foreach[U](f: Elem => U): Unit
- * }}}
- * Collection classes mixing in this trait provide a concrete
- * `foreach` method which traverses all the
- * elements contained in the collection, applying a given function to each.
- * They also need to provide a method `newBuilder`
- * which creates a builder for collections of the same kind.
- *
- * A traversable class might or might not have two properties: strictness
- * and orderedness. Neither is represented as a type.
- *
- * The instances of a strict collection class have all their elements
- * computed before they can be used as values. By contrast, instances of
- * a non-strict collection class may defer computation of some of their
- * elements until after the instance is available as a value.
- * A typical example of a non-strict collection class is a
- *
- * `scala.collection.immutable.Stream` .
- * A more general class of examples are `TraversableViews`.
- *
- * If a collection is an instance of an ordered collection class, traversing
- * its elements with `foreach` will always visit elements in the
- * same order, even for different runs of the program. If the class is not
- * ordered, `foreach` can visit elements in different orders for
- * different runs (but it will keep the same order in the same run).'
- *
- * A typical example of a collection class which is not ordered is a
- * `HashMap` of objects. The traversal order for hash maps will
- * depend on the hash codes of its elements, and these hash codes might
- * differ from one run to the next. By contrast, a `LinkedHashMap`
- * is ordered because it's `foreach` method visits elements in the
- * order they were inserted into the `HashMap`.
- *
- * @author Martin Odersky
- * @version 2.8
- * @since 2.8
- * @tparam A the element type of the collection
- * @tparam Repr the type of the actual collection containing the elements.
- *
- * @define Coll Traversable
- * @define coll traversable collection
- */
- trait TraversableLike[+A, +Repr] extends HasNewBuilder[A, Repr]
- with FilterMonadic[A, Repr]
- with TraversableOnce[A]
- with GenTraversableLike[A, Repr]
- with Parallelizable[A, ParIterable[A]]
- {
- self =>
-
- import Traversable.breaks._
-
- /** The type implementing this traversable */
- protected type Self = Repr
-
- /** The collection of type $coll underlying this `TraversableLike` object.
- * By default this is implemented as the `TraversableLike` object itself,
- * but this can be overridden.
- */
- def repr: Repr = this.asInstanceOf[Repr]
-
- /** The underlying collection seen as an instance of `$Coll`.
- * By default this is implemented as the current collection object itself,
- * but this can be overridden.
- */
- protected[this] def thisCollection: Traversable[A] = this.asInstanceOf[Traversable[A]]
-
- /** A conversion from collections of type `Repr` to `$Coll` objects.
- * By default this is implemented as just a cast, but this can be overridden.
- */
- protected[this] def toCollection(repr: Repr): Traversable[A] = repr.asInstanceOf[Traversable[A]]
-
- /** Creates a new builder for this collection type.
- */
- protected[this] def newBuilder: Builder[A, Repr]
-
- protected[this] def parCombiner = ParIterable.newCombiner[A]
-
- /** Applies a function `f` to all elements of this $coll.
- *
- * Note: this method underlies the implementation of most other bulk operations.
- * It's important to implement this method in an efficient way.
- *
- *
- * @param f the function that is applied for its side-effect to every element.
- * The result of function `f` is discarded.
- *
- * @tparam U the type parameter describing the result of function `f`.
- * This result will always be ignored. Typically `U` is `Unit`,
- * but this is not necessary.
- *
- * @usecase def foreach(f: A => Unit): Unit
- */
- def foreach[U](f: A => U): Unit
-
- /** Tests whether this $coll is empty.
- *
- * @return `true` if the $coll contain no elements, `false` otherwise.
- */
- def isEmpty: Boolean = {
- var result = true
- breakable {
- for (x <- this) {
- result = false
- break
- }
- }
- result
- }
-
- /** Tests whether this $coll is known to have a finite size.
- * All strict collections are known to have finite size. For a non-strict collection
- * such as `Stream`, the predicate returns `true` if all elements have been computed.
- * It returns `false` if the stream is not yet evaluated to the end.
- *
- * Note: many collection methods will not work on collections of infinite sizes.
- *
- * @return `true` if this collection is known to have finite size, `false` otherwise.
- */
- def hasDefiniteSize = true
-
- def ++[B >: A, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- if (that.isInstanceOf[IndexedSeqLike[_, _]]) b.sizeHint(this, that.seq.size)
- b ++= thisCollection
- b ++= that.seq
- b.result
- }
-
- @bridge
- def ++[B >: A, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =
- ++(that: GenTraversableOnce[B])(bf)
-
- /** Concatenates this $coll with the elements of a traversable collection.
- * It differs from ++ in that the right operand determines the type of the
- * resulting collection rather than the left one.
- *
- * @param that the traversable to append.
- * @tparam B the element type of the returned collection.
- * @tparam That $thatinfo
- * @param bf $bfinfo
- * @return a new collection of type `That` which contains all elements
- * of this $coll followed by all elements of `that`.
- *
- * @usecase def ++:[B](that: TraversableOnce[B]): $Coll[B]
- *
- * @return a new $coll which contains all elements of this $coll
- * followed by all elements of `that`.
- */
- def ++:[B >: A, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- if (that.isInstanceOf[IndexedSeqLike[_, _]]) b.sizeHint(this, that.size)
- b ++= that
- b ++= thisCollection
- b.result
- }
-
- /** This overload exists because: for the implementation of ++: we should reuse
- * that of ++ because many collections override it with more efficient versions.
- * Since TraversableOnce has no '++' method, we have to implement that directly,
- * but Traversable and down can use the overload.
- */
- def ++:[B >: A, That](that: Traversable[B])(implicit bf: CanBuildFrom[Repr, B, That]): That =
- (that ++ seq)(breakOut)
-
- def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- b.sizeHint(this)
- for (x <- this) b += f(x)
- b.result
- }
-
- def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- this) b ++= f(x).seq
- b.result
- }
-
- /** Selects all elements of this $coll which satisfy a predicate.
- *
- * @param p the predicate used to test elements.
- * @return a new $coll consisting of all elements of this $coll that satisfy the given
- * predicate `p`. The order of the elements is preserved.
- */
- def filter(p: A => Boolean): Repr = {
- val b = newBuilder
- for (x <- this)
- if (p(x)) b += x
- b.result
- }
-
- /** Selects all elements of this $coll which do not satisfy a predicate.
- *
- * @param p the predicate used to test elements.
- * @return a new $coll consisting of all elements of this $coll that do not satisfy the given
- * predicate `p`. The order of the elements is preserved.
- */
- def filterNot(p: A => Boolean): Repr = filter(!p(_))
-
- def collect[B, That](pf: PartialFunction[A, B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- this) if (pf.isDefinedAt(x)) b += pf(x)
- b.result
- }
-
- /** Builds a new collection by applying an option-valued function to all
- * elements of this $coll on which the function is defined.
- *
- * @param f the option-valued function which filters and maps the $coll.
- * @tparam B the element type of the returned collection.
- * @tparam That $thatinfo
- * @param bf $bfinfo
- * @return a new collection of type `That` resulting from applying the option-valued function
- * `f` to each element and collecting all defined results.
- * The order of the elements is preserved.
- *
- * @usecase def filterMap[B](f: A => Option[B]): $Coll[B]
- *
- * @param pf the partial function which filters and maps the $coll.
- * @return a new $coll resulting from applying the given option-valued function
- * `f` to each element and collecting all defined results.
- * The order of the elements is preserved.
- def filterMap[B, That](f: A => Option[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- this)
- f(x) match {
- case Some(y) => b += y
- case _ =>
- }
- b.result
- }
- */
-
- /** Partitions this $coll in two ${coll}s according to a predicate.
- *
- * @param p the predicate on which to partition.
- * @return a pair of ${coll}s: the first $coll consists of all elements that
- * satisfy the predicate `p` and the second $coll consists of all elements
- * that don't. The relative order of the elements in the resulting ${coll}s
- * is the same as in the original $coll.
- */
- def partition(p: A => Boolean): (Repr, Repr) = {
- val l, r = newBuilder
- for (x <- this) (if (p(x)) l else r) += x
- (l.result, r.result)
- }
-
- def groupBy[K](f: A => K): immutable.Map[K, Repr] = {
- val m = mutable.Map.empty[K, Builder[A, Repr]]
- for (elem <- this) {
- val key = f(elem)
- val bldr = m.getOrElseUpdate(key, newBuilder)
- bldr += elem
- }
- val b = immutable.Map.newBuilder[K, Repr]
- for ((k, v) <- m)
- b += ((k, v.result))
-
- b.result
- }
-
- /** Tests whether a predicate holds for all elements of this $coll.
- *
- * $mayNotTerminateInf
- *
- * @param p the predicate used to test elements.
- * @return `true` if the given predicate `p` holds for all elements
- * of this $coll, otherwise `false`.
- */
- def forall(p: A => Boolean): Boolean = {
- var result = true
- breakable {
- for (x <- this)
- if (!p(x)) { result = false; break }
- }
- result
- }
-
- /** Tests whether a predicate holds for some of the elements of this $coll.
- *
- * $mayNotTerminateInf
- *
- * @param p the predicate used to test elements.
- * @return `true` if the given predicate `p` holds for some of the
- * elements of this $coll, otherwise `false`.
- */
- def exists(p: A => Boolean): Boolean = {
- var result = false
- breakable {
- for (x <- this)
- if (p(x)) { result = true; break }
- }
- result
- }
-
- /** Finds the first element of the $coll satisfying a predicate, if any.
- *
- * $mayNotTerminateInf
- * $orderDependent
- *
- * @param p the predicate used to test elements.
- * @return an option value containing the first element in the $coll
- * that satisfies `p`, or `None` if none exists.
- */
- def find(p: A => Boolean): Option[A] = {
- var result: Option[A] = None
- breakable {
- for (x <- this)
- if (p(x)) { result = Some(x); break }
- }
- result
- }
-
- def scan[B >: A, That](z: B)(op: (B, B) => B)(implicit cbf: CanBuildFrom[Repr, B, That]): That = scanLeft(z)(op)
-
- def scanLeft[B, That](z: B)(op: (B, A) => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- b.sizeHint(this, 1)
- var acc = z
- b += acc
- for (x <- this) { acc = op(acc, x); b += acc }
- b.result
- }
-
- @migration(2, 9,
- "This scanRight definition has changed in 2.9.\n" +
- "The previous behavior can be reproduced with scanRight.reverse."
- )
- def scanRight[B, That](z: B)(op: (A, B) => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- var scanned = List(z)
- var acc = z
- for (x <- reversed) {
- acc = op(x, acc)
- scanned ::= acc
- }
- val b = bf(repr)
- for (elem <- scanned) b += elem
- b.result
- }
-
- /** Selects the first element of this $coll.
- * $orderDependent
- * @return the first element of this $coll.
- * @throws `NoSuchElementException` if the $coll is empty.
- */
- def head: A = {
- var result: () => A = () => throw new NoSuchElementException
- breakable {
- for (x <- this) {
- result = () => x
- break
- }
- }
- result()
- }
-
- /** Optionally selects the first element.
- * $orderDependent
- * @return the first element of this $coll if it is nonempty, `None` if it is empty.
- */
- def headOption: Option[A] = if (isEmpty) None else Some(head)
-
- /** Selects all elements except the first.
- * $orderDependent
- * @return a $coll consisting of all elements of this $coll
- * except the first one.
- * @throws `UnsupportedOperationException` if the $coll is empty.
- */
- override def tail: Repr = {
- if (isEmpty) throw new UnsupportedOperationException("empty.tail")
- drop(1)
- }
-
- /** Selects the last element.
- * $orderDependent
- * @return The last element of this $coll.
- * @throws NoSuchElementException If the $coll is empty.
- */
- def last: A = {
- var lst = head
- for (x <- this)
- lst = x
- lst
- }
-
- /** Optionally selects the last element.
- * $orderDependent
- * @return the last element of this $coll$ if it is nonempty, `None` if it is empty.
- */
- def lastOption: Option[A] = if (isEmpty) None else Some(last)
-
- /** Selects all elements except the last.
- * $orderDependent
- * @return a $coll consisting of all elements of this $coll
- * except the last one.
- * @throws `UnsupportedOperationException` if the $coll is empty.
- */
- def init: Repr = {
- if (isEmpty) throw new UnsupportedOperationException("empty.init")
- var lst = head
- var follow = false
- val b = newBuilder
- b.sizeHint(this, -1)
- for (x <- this.seq) {
- if (follow) b += lst
- else follow = true
- lst = x
- }
- b.result
- }
-
- def take(n: Int): Repr = slice(0, n)
-
- def drop(n: Int): Repr =
- if (n <= 0) {
- val b = newBuilder
- b.sizeHint(this)
- b ++= thisCollection result
- }
- else sliceWithKnownDelta(n, Int.MaxValue, -n)
-
- def slice(from: Int, until: Int): Repr = sliceWithKnownBound(math.max(from, 0), until)
-
- // Precondition: from >= 0, until > 0, builder already configured for building.
- private[this] def sliceInternal(from: Int, until: Int, b: Builder[A, Repr]): Repr = {
- var i = 0
- breakable {
- for (x <- this.seq) {
- if (i >= from) b += x
- i += 1
- if (i >= until) break
- }
- }
- b.result
- }
- // Precondition: from >= 0
- private[scala] def sliceWithKnownDelta(from: Int, until: Int, delta: Int): Repr = {
- val b = newBuilder
- if (until <= from) b.result
- else {
- b.sizeHint(this, delta)
- sliceInternal(from, until, b)
- }
- }
- // Precondition: from >= 0
- private[scala] def sliceWithKnownBound(from: Int, until: Int): Repr = {
- val b = newBuilder
- if (until <= from) b.result
- else {
- b.sizeHintBounded(until - from, this)
- sliceInternal(from, until, b)
- }
- }
-
- def takeWhile(p: A => Boolean): Repr = {
- val b = newBuilder
- breakable {
- for (x <- this) {
- if (!p(x)) break
- b += x
- }
- }
- b.result
- }
-
- def dropWhile(p: A => Boolean): Repr = {
- val b = newBuilder
- var go = false
- for (x <- this) {
- if (!p(x)) go = true
- if (go) b += x
- }
- b.result
- }
-
- def span(p: A => Boolean): (Repr, Repr) = {
- val l, r = newBuilder
- var toLeft = true
- for (x <- this) {
- toLeft = toLeft && p(x)
- (if (toLeft) l else r) += x
- }
- (l.result, r.result)
- }
-
- def splitAt(n: Int): (Repr, Repr) = {
- val l, r = newBuilder
- l.sizeHintBounded(n, this)
- if (n >= 0) r.sizeHint(this, -n)
- var i = 0
- for (x <- this) {
- (if (i < n) l else r) += x
- i += 1
- }
- (l.result, r.result)
- }
-
- /** Iterates over the tails of this $coll. The first value will be this
- * $coll and the final one will be an empty $coll, with the intervening
- * values the results of successive applications of `tail`.
- *
- * @return an iterator over all the tails of this $coll
- * @example `List(1,2,3).tails = Iterator(List(1,2,3), List(2,3), List(3), Nil)`
- */
- def tails: Iterator[Repr] = iterateUntilEmpty(_.tail)
-
- /** Iterates over the inits of this $coll. The first value will be this
- * $coll and the final one will be an empty $coll, with the intervening
- * values the results of successive applications of `init`.
- *
- * @return an iterator over all the inits of this $coll
- * @example `List(1,2,3).inits = Iterator(List(1,2,3), List(1,2), List(1), Nil)`
- */
- def inits: Iterator[Repr] = iterateUntilEmpty(_.init)
-
- /** Copies elements of this $coll to an array.
- * Fills the given array `xs` with at most `len` elements of
- * this $coll, starting at position `start`.
- * Copying will stop once either the end of the current $coll is reached,
- * or the end of the array is reached, or `len` elements have been copied.
- *
- * $willNotTerminateInf
- *
- * @param xs the array to fill.
- * @param start the starting index.
- * @param len the maximal number of elements to copy.
- * @tparam B the type of the elements of the array.
- *
- *
- * @usecase def copyToArray(xs: Array[A], start: Int, len: Int): Unit
- */
- def copyToArray[B >: A](xs: Array[B], start: Int, len: Int) {
- var i = start
- val end = (start + len) min xs.length
- breakable {
- for (x <- this) {
- if (i >= end) break
- xs(i) = x
- i += 1
- }
- }
- }
-
- def toTraversable: Traversable[A] = thisCollection
- def toIterator: Iterator[A] = toStream.iterator
- def toStream: Stream[A] = toBuffer.toStream
-
- /** Converts this $coll to a string.
- *
- * @return a string representation of this collection. By default this
- * string consists of the `stringPrefix` of this $coll,
- * followed by all elements separated by commas and enclosed in parentheses.
- */
- override def toString = mkString(stringPrefix + "(", ", ", ")")
-
- /** Defines the prefix of this object's `toString` representation.
- *
- * @return a string representation which starts the result of `toString`
- * applied to this $coll. By default the string prefix is the
- * simple name of the collection class $coll.
- */
- def stringPrefix : String = {
- var string = repr.asInstanceOf[AnyRef].getClass.getName
- val idx1 = string.lastIndexOf('.' : Int)
- if (idx1 != -1) string = string.substring(idx1 + 1)
- val idx2 = string.indexOf('$')
- if (idx2 != -1) string = string.substring(0, idx2)
- string
- }
-
- /** Creates a non-strict view of this $coll.
- *
- * @return a non-strict view of this $coll.
- */
- def view = new TraversableView[A, Repr] {
- protected lazy val underlying = self.repr
- override def foreach[U](f: A => U) = self foreach f
- }
-
- /** Creates a non-strict view of a slice of this $coll.
- *
- * Note: the difference between `view` and `slice` is that `view` produces
- * a view of the current $coll, whereas `slice` produces a new $coll.
- *
- * Note: `view(from, to)` is equivalent to `view.slice(from, to)`
- * $orderDependent
- *
- * @param from the index of the first element of the view
- * @param until the index of the element following the view
- * @return a non-strict view of a slice of this $coll, starting at index `from`
- * and extending up to (but not including) index `until`.
- */
- def view(from: Int, until: Int): TraversableView[A, Repr] = view.slice(from, until)
-
- /** Creates a non-strict filter of this $coll.
- *
- * Note: the difference between `c filter p` and `c withFilter p` is that
- * the former creates a new collection, whereas the latter only
- * restricts the domain of subsequent `map`, `flatMap`, `foreach`,
- * and `withFilter` operations.
- * $orderDependent
- *
- * @param p the predicate used to test elements.
- * @return an object of class `WithFilter`, which supports
- * `map`, `flatMap`, `foreach`, and `withFilter` operations.
- * All these operations apply to those elements of this $coll which
- * satisfy the predicate `p`.
- */
- def withFilter(p: A => Boolean): FilterMonadic[A, Repr] = new WithFilter(p)
-
- /** A class supporting filtered operations. Instances of this class are
- * returned by method `withFilter`.
- */
- class WithFilter(p: A => Boolean) extends FilterMonadic[A, Repr] {
-
- /** Builds a new collection by applying a function to all elements of the
- * outer $coll containing this `WithFilter` instance that satisfy predicate `p`.
- *
- * @param f the function to apply to each element.
- * @tparam B the element type of the returned collection.
- * @tparam That $thatinfo
- * @param bf $bfinfo
- * @return a new collection of type `That` resulting from applying
- * the given function `f` to each element of the outer $coll
- * that satisfies predicate `p` and collecting the results.
- *
- * @usecase def map[B](f: A => B): $Coll[B]
- *
- * @return a new $coll resulting from applying the given function
- * `f` to each element of the outer $coll that satisfies
- * predicate `p` and collecting the results.
- */
- def map[B, That](f: A => B)(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- self)
- if (p(x)) b += f(x)
- b.result
- }
-
- /** Builds a new collection by applying a function to all elements of the
- * outer $coll containing this `WithFilter` instance that satisfy
- * predicate `p` and concatenating the results.
- *
- * @param f the function to apply to each element.
- * @tparam B the element type of the returned collection.
- * @tparam That $thatinfo
- * @param bf $bfinfo
- * @return a new collection of type `That` resulting from applying
- * the given collection-valued function `f` to each element
- * of the outer $coll that satisfies predicate `p` and
- * concatenating the results.
- *
- * @usecase def flatMap[B](f: A => TraversableOnce[B]): $Coll[B]
- *
- * @return a new $coll resulting from applying the given collection-valued function
- * `f` to each element of the outer $coll that satisfies predicate `p` and concatenating the results.
- */
- def flatMap[B, That](f: A => GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That = {
- val b = bf(repr)
- for (x <- self)
- if (p(x)) b ++= f(x).seq
- b.result
- }
-
- /** Applies a function `f` to all elements of the outer $coll containing
- * this `WithFilter` instance that satisfy predicate `p`.
- *
- * @param f the function that is applied for its side-effect to every element.
- * The result of function `f` is discarded.
- *
- * @tparam U the type parameter describing the result of function `f`.
- * This result will always be ignored. Typically `U` is `Unit`,
- * but this is not necessary.
- *
- * @usecase def foreach(f: A => Unit): Unit
- */
- def foreach[U](f: A => U): Unit =
- for (x <- self)
- if (p(x)) f(x)
-
- /** Further refines the filter for this $coll.
- *
- * @param q the predicate used to test elements.
- * @return an object of class `WithFilter`, which supports
- * `map`, `flatMap`, `foreach`, and `withFilter` operations.
- * All these operations apply to those elements of this $coll which
- * satisfy the predicate `q` in addition to the predicate `p`.
- */
- def withFilter(q: A => Boolean): WithFilter =
- new WithFilter(x => p(x) && q(x))
- }
-
- // A helper for tails and inits.
- private def iterateUntilEmpty(f: Traversable[A @uV] => Traversable[A @uV]): Iterator[Repr] = {
- val it = Iterator.iterate(thisCollection)(f) takeWhile (x => !x.isEmpty)
- it ++ Iterator(Nil) map (newBuilder ++= _ result)
- }
- }
-
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/mode/clojure/clojure.js b/public/js/lib/codemirror/mode/clojure/clojure.js
deleted file mode 100644
index c334de7300..0000000000
--- a/public/js/lib/codemirror/mode/clojure/clojure.js
+++ /dev/null
@@ -1,243 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Author: Hans Engel
- * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)
- */
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("clojure", function (options) {
- var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", CHARACTER = "string-2",
- ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD = "keyword", VAR = "variable";
- var INDENT_WORD_SKIP = options.indentUnit || 2;
- var NORMAL_INDENT_UNIT = options.indentUnit || 2;
-
- function makeKeywords(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- var atoms = makeKeywords("true false nil");
-
- var keywords = makeKeywords(
- "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle");
-
- var builtins = makeKeywords(
- "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>");
-
- var indentKeys = makeKeywords(
- // Built-ins
- "ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch " +
-
- // Binding forms
- "let letfn binding loop for doseq dotimes when-let if-let " +
-
- // Data structures
- "defstruct struct-map assoc " +
-
- // clojure.test
- "testing deftest " +
-
- // contrib
- "handler-case handle dotrace deftrace");
-
- var tests = {
- digit: /\d/,
- digit_or_colon: /[\d:]/,
- hex: /[0-9a-f]/i,
- sign: /[+-]/,
- exponent: /e/i,
- keyword_char: /[^\s\(\[\;\)\]]/,
- symbol: /[\w*+!\-\._?:<>\/\xa1-\uffff]/
- };
-
- function stateStack(indent, type, prev) { // represents a state stack object
- this.indent = indent;
- this.type = type;
- this.prev = prev;
- }
-
- function pushStack(state, indent, type) {
- state.indentStack = new stateStack(indent, type, state.indentStack);
- }
-
- function popStack(state) {
- state.indentStack = state.indentStack.prev;
- }
-
- function isNumber(ch, stream){
- // hex
- if ( ch === '0' && stream.eat(/x/i) ) {
- stream.eatWhile(tests.hex);
- return true;
- }
-
- // leading sign
- if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {
- stream.eat(tests.sign);
- ch = stream.next();
- }
-
- if ( tests.digit.test(ch) ) {
- stream.eat(ch);
- stream.eatWhile(tests.digit);
-
- if ( '.' == stream.peek() ) {
- stream.eat('.');
- stream.eatWhile(tests.digit);
- }
-
- if ( stream.eat(tests.exponent) ) {
- stream.eat(tests.sign);
- stream.eatWhile(tests.digit);
- }
-
- return true;
- }
-
- return false;
- }
-
- // Eat character that starts after backslash \
- function eatCharacter(stream) {
- var first = stream.next();
- // Read special literals: backspace, newline, space, return.
- // Just read all lowercase letters.
- if (first && first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) {
- return;
- }
- // Read unicode character: \u1000 \uA0a1
- if (first === "u") {
- stream.match(/[0-9a-z]{4}/i, true);
- }
- }
-
- return {
- startState: function () {
- return {
- indentStack: null,
- indentation: 0,
- mode: false
- };
- },
-
- token: function (stream, state) {
- if (state.indentStack == null && stream.sol()) {
- // update indentation, but only if indentStack is empty
- state.indentation = stream.indentation();
- }
-
- // skip spaces
- if (stream.eatSpace()) {
- return null;
- }
- var returnType = null;
-
- switch(state.mode){
- case "string": // multi-line string parsing mode
- var next, escaped = false;
- while ((next = stream.next()) != null) {
- if (next == "\"" && !escaped) {
-
- state.mode = false;
- break;
- }
- escaped = !escaped && next == "\\";
- }
- returnType = STRING; // continue on in string mode
- break;
- default: // default parsing mode
- var ch = stream.next();
-
- if (ch == "\"") {
- state.mode = "string";
- returnType = STRING;
- } else if (ch == "\\") {
- eatCharacter(stream);
- returnType = CHARACTER;
- } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
- returnType = ATOM;
- } else if (ch == ";") { // comment
- stream.skipToEnd(); // rest of the line is a comment
- returnType = COMMENT;
- } else if (isNumber(ch,stream)){
- returnType = NUMBER;
- } else if (ch == "(" || ch == "[" || ch == "{" ) {
- var keyWord = '', indentTemp = stream.column(), letter;
- /**
- Either
- (indent-word ..
- (non-indent-word ..
- (;something else, bracket, etc.
- */
-
- if (ch == "(") while ((letter = stream.eat(tests.keyword_char)) != null) {
- keyWord += letter;
- }
-
- if (keyWord.length > 0 && (indentKeys.propertyIsEnumerable(keyWord) ||
- /^(?:def|with)/.test(keyWord))) { // indent-word
- pushStack(state, indentTemp + INDENT_WORD_SKIP, ch);
- } else { // non-indent word
- // we continue eating the spaces
- stream.eatSpace();
- if (stream.eol() || stream.peek() == ";") {
- // nothing significant after
- // we restart indentation the user defined spaces after
- pushStack(state, indentTemp + NORMAL_INDENT_UNIT, ch);
- } else {
- pushStack(state, indentTemp + stream.current().length, ch); // else we match
- }
- }
- stream.backUp(stream.current().length - 1); // undo all the eating
-
- returnType = BRACKET;
- } else if (ch == ")" || ch == "]" || ch == "}") {
- returnType = BRACKET;
- if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : (ch == "]" ? "[" :"{"))) {
- popStack(state);
- }
- } else if ( ch == ":" ) {
- stream.eatWhile(tests.symbol);
- return ATOM;
- } else {
- stream.eatWhile(tests.symbol);
-
- if (keywords && keywords.propertyIsEnumerable(stream.current())) {
- returnType = KEYWORD;
- } else if (builtins && builtins.propertyIsEnumerable(stream.current())) {
- returnType = BUILTIN;
- } else if (atoms && atoms.propertyIsEnumerable(stream.current())) {
- returnType = ATOM;
- } else {
- returnType = VAR;
- }
- }
- }
-
- return returnType;
- },
-
- indent: function (state) {
- if (state.indentStack == null) return state.indentation;
- return state.indentStack.indent;
- },
-
- lineComment: ";;"
- };
-});
-
-CodeMirror.defineMIME("text/x-clojure", "clojure");
-
-});
diff --git a/public/js/lib/codemirror/mode/clojure/index.html b/public/js/lib/codemirror/mode/clojure/index.html
deleted file mode 100644
index 3ecf4c4862..0000000000
--- a/public/js/lib/codemirror/mode/clojure/index.html
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-CodeMirror: Clojure mode
-
-
-
-
-
-
-
-
-
-
-Clojure mode
-
-; Conway's Game of Life, based on the work of:
-;; Laurent Petit https://gist.github.com/1200343
-;; Christophe Grand http://clj-me.cgrand.net/2011/08/19/conways-game-of-life
-
-(ns ^{:doc "Conway's Game of Life."}
- game-of-life)
-
-;; Core game of life's algorithm functions
-
-(defn neighbours
- "Given a cell's coordinates, returns the coordinates of its neighbours."
- [[x y]]
- (for [dx [-1 0 1] dy (if (zero? dx) [-1 1] [-1 0 1])]
- [(+ dx x) (+ dy y)]))
-
-(defn step
- "Given a set of living cells, computes the new set of living cells."
- [cells]
- (set (for [[cell n] (frequencies (mapcat neighbours cells))
- :when (or (= n 3) (and (= n 2) (cells cell)))]
- cell)))
-
-;; Utility methods for displaying game on a text terminal
-
-(defn print-board
- "Prints a board on *out*, representing a step in the game."
- [board w h]
- (doseq [x (range (inc w)) y (range (inc h))]
- (if (= y 0) (print "\n"))
- (print (if (board [x y]) "[X]" " . "))))
-
-(defn display-grids
- "Prints a squence of boards on *out*, representing several steps."
- [grids w h]
- (doseq [board grids]
- (print-board board w h)
- (print "\n")))
-
-;; Launches an example board
-
-(def
- ^{:doc "board represents the initial set of living cells"}
- board #{[2 1] [2 2] [2 3]})
-
-(display-grids (take 3 (iterate step board)) 5 5)
-
-;; Let's play with characters
-(println \1 \a \# \\
- \" \( \newline
- \} \" \space
- \tab \return \backspace
- \u1000 \uAaAa \u9F9F)
-
-
-
-
- MIME types defined: text/x-clojure
.
-
-
diff --git a/public/js/lib/codemirror/mode/cobol/cobol.js b/public/js/lib/codemirror/mode/cobol/cobol.js
deleted file mode 100644
index 897022b18c..0000000000
--- a/public/js/lib/codemirror/mode/cobol/cobol.js
+++ /dev/null
@@ -1,255 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Author: Gautam Mehta
- * Branched from CodeMirror's Scheme mode
- */
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("cobol", function () {
- var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
- ATOM = "atom", NUMBER = "number", KEYWORD = "keyword", MODTAG = "header",
- COBOLLINENUM = "def", PERIOD = "link";
- function makeKeywords(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var atoms = makeKeywords("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES ");
- var keywords = makeKeywords(
- "ACCEPT ACCESS ACQUIRE ADD ADDRESS " +
- "ADVANCING AFTER ALIAS ALL ALPHABET " +
- "ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED " +
- "ALSO ALTER ALTERNATE AND ANY " +
- "ARE AREA AREAS ARITHMETIC ASCENDING " +
- "ASSIGN AT ATTRIBUTE AUTHOR AUTO " +
- "AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS " +
- "B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP " +
- "BEFORE BELL BINARY BIT BITS " +
- "BLANK BLINK BLOCK BOOLEAN BOTTOM " +
- "BY CALL CANCEL CD CF " +
- "CH CHARACTER CHARACTERS CLASS CLOCK-UNITS " +
- "CLOSE COBOL CODE CODE-SET COL " +
- "COLLATING COLUMN COMMA COMMIT COMMITMENT " +
- "COMMON COMMUNICATION COMP COMP-0 COMP-1 " +
- "COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 " +
- "COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 " +
- "COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 " +
- "COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE " +
- "CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS " +
- "CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS " +
- "CONVERTING COPY CORR CORRESPONDING COUNT " +
- "CRT CRT-UNDER CURRENCY CURRENT CURSOR " +
- "DATA DATE DATE-COMPILED DATE-WRITTEN DAY " +
- "DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION " +
- "DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS " +
- "DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE " +
- "DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING " +
- "DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED " +
- "DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION " +
- "DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 " +
- "DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 " +
- "DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION " +
- "DOWN DROP DUPLICATE DUPLICATES DYNAMIC " +
- "EBCDIC EGI EJECT ELSE EMI " +
- "EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. " +
- "END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY " +
- "END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY " +
- "END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN " +
- "END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT " +
- "END-UNSTRING END-WRITE END-XML ENTER ENTRY " +
- "ENVIRONMENT EOP EQUAL EQUALS ERASE " +
- "ERROR ESI EVALUATE EVERY EXCEEDS " +
- "EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL " +
- "EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL " +
- "FILE-STREAM FILES FILLER FINAL FIND " +
- "FINISH FIRST FOOTING FOR FOREGROUND-COLOR " +
- "FOREGROUND-COLOUR FORMAT FREE FROM FULL " +
- "FUNCTION GENERATE GET GIVING GLOBAL " +
- "GO GOBACK GREATER GROUP HEADING " +
- "HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL " +
- "ID IDENTIFICATION IF IN INDEX " +
- "INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 " +
- "INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED " +
- "INDIC INDICATE INDICATOR INDICATORS INITIAL " +
- "INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT " +
- "INSTALLATION INTO INVALID INVOKE IS " +
- "JUST JUSTIFIED KANJI KEEP KEY " +
- "LABEL LAST LD LEADING LEFT " +
- "LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY " +
- "LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER " +
- "LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE " +
- "LOCALE LOCALLY LOCK " +
- "MEMBER MEMORY MERGE MESSAGE METACLASS " +
- "MODE MODIFIED MODIFY MODULES MOVE " +
- "MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE " +
- "NEXT NO NO-ECHO NONE NOT " +
- "NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER " +
- "NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS " +
- "OF OFF OMITTED ON ONLY " +
- "OPEN OPTIONAL OR ORDER ORGANIZATION " +
- "OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL " +
- "PADDING PAGE PAGE-COUNTER PARSE PERFORM " +
- "PF PH PIC PICTURE PLUS " +
- "POINTER POSITION POSITIVE PREFIX PRESENT " +
- "PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES " +
- "PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID " +
- "PROMPT PROTECTED PURGE QUEUE QUOTE " +
- "QUOTES RANDOM RD READ READY " +
- "REALM RECEIVE RECONNECT RECORD RECORD-NAME " +
- "RECORDS RECURSIVE REDEFINES REEL REFERENCE " +
- "REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE " +
- "REMAINDER REMOVAL RENAMES REPEATED REPLACE " +
- "REPLACING REPORT REPORTING REPORTS REPOSITORY " +
- "REQUIRED RERUN RESERVE RESET RETAINING " +
- "RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO " +
- "REVERSED REWIND REWRITE RF RH " +
- "RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED " +
- "RUN SAME SCREEN SD SEARCH " +
- "SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT " +
- "SELECT SEND SENTENCE SEPARATE SEQUENCE " +
- "SEQUENTIAL SET SHARED SIGN SIZE " +
- "SKIP1 SKIP2 SKIP3 SORT SORT-MERGE " +
- "SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL " +
- "SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 " +
- "START STARTING STATUS STOP STORE " +
- "STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA " +
- "SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS " +
- "SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT " +
- "TABLE TALLYING TAPE TENANT TERMINAL " +
- "TERMINATE TEST TEXT THAN THEN " +
- "THROUGH THRU TIME TIMES TITLE " +
- "TO TOP TRAILING TRAILING-SIGN TRANSACTION " +
- "TYPE TYPEDEF UNDERLINE UNEQUAL UNIT " +
- "UNSTRING UNTIL UP UPDATE UPON " +
- "USAGE USAGE-MODE USE USING VALID " +
- "VALIDATE VALUE VALUES VARYING VLR " +
- "WAIT WHEN WHEN-COMPILED WITH WITHIN " +
- "WORDS WORKING-STORAGE WRITE XML XML-CODE " +
- "XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL " );
-
- var builtins = makeKeywords("- * ** / + < <= = > >= ");
- var tests = {
- digit: /\d/,
- digit_or_colon: /[\d:]/,
- hex: /[0-9a-f]/i,
- sign: /[+-]/,
- exponent: /e/i,
- keyword_char: /[^\s\(\[\;\)\]]/,
- symbol: /[\w*+\-]/
- };
- function isNumber(ch, stream){
- // hex
- if ( ch === '0' && stream.eat(/x/i) ) {
- stream.eatWhile(tests.hex);
- return true;
- }
- // leading sign
- if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) {
- stream.eat(tests.sign);
- ch = stream.next();
- }
- if ( tests.digit.test(ch) ) {
- stream.eat(ch);
- stream.eatWhile(tests.digit);
- if ( '.' == stream.peek()) {
- stream.eat('.');
- stream.eatWhile(tests.digit);
- }
- if ( stream.eat(tests.exponent) ) {
- stream.eat(tests.sign);
- stream.eatWhile(tests.digit);
- }
- return true;
- }
- return false;
- }
- return {
- startState: function () {
- return {
- indentStack: null,
- indentation: 0,
- mode: false
- };
- },
- token: function (stream, state) {
- if (state.indentStack == null && stream.sol()) {
- // update indentation, but only if indentStack is empty
- state.indentation = 6 ; //stream.indentation();
- }
- // skip spaces
- if (stream.eatSpace()) {
- return null;
- }
- var returnType = null;
- switch(state.mode){
- case "string": // multi-line string parsing mode
- var next = false;
- while ((next = stream.next()) != null) {
- if (next == "\"" || next == "\'") {
- state.mode = false;
- break;
- }
- }
- returnType = STRING; // continue on in string mode
- break;
- default: // default parsing mode
- var ch = stream.next();
- var col = stream.column();
- if (col >= 0 && col <= 5) {
- returnType = COBOLLINENUM;
- } else if (col >= 72 && col <= 79) {
- stream.skipToEnd();
- returnType = MODTAG;
- } else if (ch == "*" && col == 6) { // comment
- stream.skipToEnd(); // rest of the line is a comment
- returnType = COMMENT;
- } else if (ch == "\"" || ch == "\'") {
- state.mode = "string";
- returnType = STRING;
- } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
- returnType = ATOM;
- } else if (ch == ".") {
- returnType = PERIOD;
- } else if (isNumber(ch,stream)){
- returnType = NUMBER;
- } else {
- if (stream.current().match(tests.symbol)) {
- while (col < 71) {
- if (stream.eat(tests.symbol) === undefined) {
- break;
- } else {
- col++;
- }
- }
- }
- if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) {
- returnType = KEYWORD;
- } else if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) {
- returnType = BUILTIN;
- } else if (atoms && atoms.propertyIsEnumerable(stream.current().toUpperCase())) {
- returnType = ATOM;
- } else returnType = null;
- }
- }
- return returnType;
- },
- indent: function (state) {
- if (state.indentStack == null) return state.indentation;
- return state.indentStack.indent;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-cobol", "cobol");
-
-});
diff --git a/public/js/lib/codemirror/mode/cobol/index.html b/public/js/lib/codemirror/mode/cobol/index.html
deleted file mode 100644
index 4352419a0c..0000000000
--- a/public/js/lib/codemirror/mode/cobol/index.html
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-CodeMirror: COBOL mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-COBOL mode
-
- Select Theme
- default
- ambiance
- blackboard
- cobalt
- eclipse
- elegant
- erlang-dark
- lesser-dark
- midnight
- monokai
- neat
- night
- rubyblue
- solarized dark
- solarized light
- twilight
- vibrant-ink
- xq-dark
- xq-light
- Select Font Size
- 13px
- 14px
- 16px
- 18px
- 20px
- 24px
- 26px
- 28px
- 30px
- 32px
- 34px
- 36px
-
-Read-only
-
-Insert Spaces on Tab
-
-
-
----------1---------2---------3---------4---------5---------6---------7---------8
-12345678911234567892123456789312345678941234567895123456789612345678971234567898
-000010 IDENTIFICATION DIVISION. MODTGHERE
-000020 PROGRAM-ID. SAMPLE.
-000030 AUTHOR. TEST SAM.
-000040 DATE-WRITTEN. 5 February 2013
-000041
-000042* A sample program just to show the form.
-000043* The program copies its input to the output,
-000044* and counts the number of records.
-000045* At the end this number is printed.
-000046
-000050 ENVIRONMENT DIVISION.
-000060 INPUT-OUTPUT SECTION.
-000070 FILE-CONTROL.
-000080 SELECT STUDENT-FILE ASSIGN TO SYSIN
-000090 ORGANIZATION IS LINE SEQUENTIAL.
-000100 SELECT PRINT-FILE ASSIGN TO SYSOUT
-000110 ORGANIZATION IS LINE SEQUENTIAL.
-000120
-000130 DATA DIVISION.
-000140 FILE SECTION.
-000150 FD STUDENT-FILE
-000160 RECORD CONTAINS 43 CHARACTERS
-000170 DATA RECORD IS STUDENT-IN.
-000180 01 STUDENT-IN PIC X(43).
-000190
-000200 FD PRINT-FILE
-000210 RECORD CONTAINS 80 CHARACTERS
-000220 DATA RECORD IS PRINT-LINE.
-000230 01 PRINT-LINE PIC X(80).
-000240
-000250 WORKING-STORAGE SECTION.
-000260 01 DATA-REMAINS-SWITCH PIC X(2) VALUE SPACES.
-000261 01 RECORDS-WRITTEN PIC 99.
-000270
-000280 01 DETAIL-LINE.
-000290 05 FILLER PIC X(7) VALUE SPACES.
-000300 05 RECORD-IMAGE PIC X(43).
-000310 05 FILLER PIC X(30) VALUE SPACES.
-000311
-000312 01 SUMMARY-LINE.
-000313 05 FILLER PIC X(7) VALUE SPACES.
-000314 05 TOTAL-READ PIC 99.
-000315 05 FILLER PIC X VALUE SPACE.
-000316 05 FILLER PIC X(17)
-000317 VALUE 'Records were read'.
-000318 05 FILLER PIC X(53) VALUE SPACES.
-000319
-000320 PROCEDURE DIVISION.
-000321
-000330 PREPARE-SENIOR-REPORT.
-000340 OPEN INPUT STUDENT-FILE
-000350 OUTPUT PRINT-FILE.
-000351 MOVE ZERO TO RECORDS-WRITTEN.
-000360 READ STUDENT-FILE
-000370 AT END MOVE 'NO' TO DATA-REMAINS-SWITCH
-000380 END-READ.
-000390 PERFORM PROCESS-RECORDS
-000410 UNTIL DATA-REMAINS-SWITCH = 'NO'.
-000411 PERFORM PRINT-SUMMARY.
-000420 CLOSE STUDENT-FILE
-000430 PRINT-FILE.
-000440 STOP RUN.
-000450
-000460 PROCESS-RECORDS.
-000470 MOVE STUDENT-IN TO RECORD-IMAGE.
-000480 MOVE DETAIL-LINE TO PRINT-LINE.
-000490 WRITE PRINT-LINE.
-000500 ADD 1 TO RECORDS-WRITTEN.
-000510 READ STUDENT-FILE
-000520 AT END MOVE 'NO' TO DATA-REMAINS-SWITCH
-000530 END-READ.
-000540
-000550 PRINT-SUMMARY.
-000560 MOVE RECORDS-WRITTEN TO TOTAL-READ.
-000570 MOVE SUMMARY-LINE TO PRINT-LINE.
-000571 WRITE PRINT-LINE.
-000572
-000580
-
-
-
diff --git a/public/js/lib/codemirror/mode/coffeescript/coffeescript.js b/public/js/lib/codemirror/mode/coffeescript/coffeescript.js
deleted file mode 100644
index da0eb2d518..0000000000
--- a/public/js/lib/codemirror/mode/coffeescript/coffeescript.js
+++ /dev/null
@@ -1,369 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Link to the project's GitHub page:
- * https://github.com/pickhardt/coffeescript-codemirror-mode
- */
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("coffeescript", function(conf, parserConf) {
- var ERRORCLASS = "error";
-
- function wordRegexp(words) {
- return new RegExp("^((" + words.join(")|(") + "))\\b");
- }
-
- var operators = /^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/;
- var delimiters = /^(?:[()\[\]{},:`=;]|\.\.?\.?)/;
- var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/;
- var properties = /^(@|this\.)[_A-Za-z$][_A-Za-z$0-9]*/;
-
- var wordOperators = wordRegexp(["and", "or", "not",
- "is", "isnt", "in",
- "instanceof", "typeof"]);
- var indentKeywords = ["for", "while", "loop", "if", "unless", "else",
- "switch", "try", "catch", "finally", "class"];
- var commonKeywords = ["break", "by", "continue", "debugger", "delete",
- "do", "in", "of", "new", "return", "then",
- "this", "@", "throw", "when", "until", "extends"];
-
- var keywords = wordRegexp(indentKeywords.concat(commonKeywords));
-
- indentKeywords = wordRegexp(indentKeywords);
-
-
- var stringPrefixes = /^('{3}|\"{3}|['\"])/;
- var regexPrefixes = /^(\/{3}|\/)/;
- var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"];
- var constants = wordRegexp(commonConstants);
-
- // Tokenizers
- function tokenBase(stream, state) {
- // Handle scope changes
- if (stream.sol()) {
- if (state.scope.align === null) state.scope.align = false;
- var scopeOffset = state.scope.offset;
- if (stream.eatSpace()) {
- var lineOffset = stream.indentation();
- if (lineOffset > scopeOffset && state.scope.type == "coffee") {
- return "indent";
- } else if (lineOffset < scopeOffset) {
- return "dedent";
- }
- return null;
- } else {
- if (scopeOffset > 0) {
- dedent(stream, state);
- }
- }
- }
- if (stream.eatSpace()) {
- return null;
- }
-
- var ch = stream.peek();
-
- // Handle docco title comment (single line)
- if (stream.match("####")) {
- stream.skipToEnd();
- return "comment";
- }
-
- // Handle multi line comments
- if (stream.match("###")) {
- state.tokenize = longComment;
- return state.tokenize(stream, state);
- }
-
- // Single line comment
- if (ch === "#") {
- stream.skipToEnd();
- return "comment";
- }
-
- // Handle number literals
- if (stream.match(/^-?[0-9\.]/, false)) {
- var floatLiteral = false;
- // Floats
- if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) {
- floatLiteral = true;
- }
- if (stream.match(/^-?\d+\.\d*/)) {
- floatLiteral = true;
- }
- if (stream.match(/^-?\.\d+/)) {
- floatLiteral = true;
- }
-
- if (floatLiteral) {
- // prevent from getting extra . on 1..
- if (stream.peek() == "."){
- stream.backUp(1);
- }
- return "number";
- }
- // Integers
- var intLiteral = false;
- // Hex
- if (stream.match(/^-?0x[0-9a-f]+/i)) {
- intLiteral = true;
- }
- // Decimal
- if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) {
- intLiteral = true;
- }
- // Zero by itself with no other piece of number.
- if (stream.match(/^-?0(?![\dx])/i)) {
- intLiteral = true;
- }
- if (intLiteral) {
- return "number";
- }
- }
-
- // Handle strings
- if (stream.match(stringPrefixes)) {
- state.tokenize = tokenFactory(stream.current(), false, "string");
- return state.tokenize(stream, state);
- }
- // Handle regex literals
- if (stream.match(regexPrefixes)) {
- if (stream.current() != "/" || stream.match(/^.*\//, false)) { // prevent highlight of division
- state.tokenize = tokenFactory(stream.current(), true, "string-2");
- return state.tokenize(stream, state);
- } else {
- stream.backUp(1);
- }
- }
-
- // Handle operators and delimiters
- if (stream.match(operators) || stream.match(wordOperators)) {
- return "operator";
- }
- if (stream.match(delimiters)) {
- return "punctuation";
- }
-
- if (stream.match(constants)) {
- return "atom";
- }
-
- if (stream.match(keywords)) {
- return "keyword";
- }
-
- if (stream.match(identifiers)) {
- return "variable";
- }
-
- if (stream.match(properties)) {
- return "property";
- }
-
- // Handle non-detected items
- stream.next();
- return ERRORCLASS;
- }
-
- function tokenFactory(delimiter, singleline, outclass) {
- return function(stream, state) {
- while (!stream.eol()) {
- stream.eatWhile(/[^'"\/\\]/);
- if (stream.eat("\\")) {
- stream.next();
- if (singleline && stream.eol()) {
- return outclass;
- }
- } else if (stream.match(delimiter)) {
- state.tokenize = tokenBase;
- return outclass;
- } else {
- stream.eat(/['"\/]/);
- }
- }
- if (singleline) {
- if (parserConf.singleLineStringErrors) {
- outclass = ERRORCLASS;
- } else {
- state.tokenize = tokenBase;
- }
- }
- return outclass;
- };
- }
-
- function longComment(stream, state) {
- while (!stream.eol()) {
- stream.eatWhile(/[^#]/);
- if (stream.match("###")) {
- state.tokenize = tokenBase;
- break;
- }
- stream.eatWhile("#");
- }
- return "comment";
- }
-
- function indent(stream, state, type) {
- type = type || "coffee";
- var offset = 0, align = false, alignOffset = null;
- for (var scope = state.scope; scope; scope = scope.prev) {
- if (scope.type === "coffee" || scope.type == "}") {
- offset = scope.offset + conf.indentUnit;
- break;
- }
- }
- if (type !== "coffee") {
- align = null;
- alignOffset = stream.column() + stream.current().length;
- } else if (state.scope.align) {
- state.scope.align = false;
- }
- state.scope = {
- offset: offset,
- type: type,
- prev: state.scope,
- align: align,
- alignOffset: alignOffset
- };
- }
-
- function dedent(stream, state) {
- if (!state.scope.prev) return;
- if (state.scope.type === "coffee") {
- var _indent = stream.indentation();
- var matched = false;
- for (var scope = state.scope; scope; scope = scope.prev) {
- if (_indent === scope.offset) {
- matched = true;
- break;
- }
- }
- if (!matched) {
- return true;
- }
- while (state.scope.prev && state.scope.offset !== _indent) {
- state.scope = state.scope.prev;
- }
- return false;
- } else {
- state.scope = state.scope.prev;
- return false;
- }
- }
-
- function tokenLexer(stream, state) {
- var style = state.tokenize(stream, state);
- var current = stream.current();
-
- // Handle "." connected identifiers
- if (current === ".") {
- style = state.tokenize(stream, state);
- current = stream.current();
- if (/^\.[\w$]+$/.test(current)) {
- return "variable";
- } else {
- return ERRORCLASS;
- }
- }
-
- // Handle scope changes.
- if (current === "return") {
- state.dedent = true;
- }
- if (((current === "->" || current === "=>") &&
- !state.lambda &&
- !stream.peek())
- || style === "indent") {
- indent(stream, state);
- }
- var delimiter_index = "[({".indexOf(current);
- if (delimiter_index !== -1) {
- indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1));
- }
- if (indentKeywords.exec(current)){
- indent(stream, state);
- }
- if (current == "then"){
- dedent(stream, state);
- }
-
-
- if (style === "dedent") {
- if (dedent(stream, state)) {
- return ERRORCLASS;
- }
- }
- delimiter_index = "])}".indexOf(current);
- if (delimiter_index !== -1) {
- while (state.scope.type == "coffee" && state.scope.prev)
- state.scope = state.scope.prev;
- if (state.scope.type == current)
- state.scope = state.scope.prev;
- }
- if (state.dedent && stream.eol()) {
- if (state.scope.type == "coffee" && state.scope.prev)
- state.scope = state.scope.prev;
- state.dedent = false;
- }
-
- return style;
- }
-
- var external = {
- startState: function(basecolumn) {
- return {
- tokenize: tokenBase,
- scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false},
- lastToken: null,
- lambda: false,
- dedent: 0
- };
- },
-
- token: function(stream, state) {
- var fillAlign = state.scope.align === null && state.scope;
- if (fillAlign && stream.sol()) fillAlign.align = false;
-
- var style = tokenLexer(stream, state);
- if (fillAlign && style && style != "comment") fillAlign.align = true;
-
- state.lastToken = {style:style, content: stream.current()};
-
- if (stream.eol() && stream.lambda) {
- state.lambda = false;
- }
-
- return style;
- },
-
- indent: function(state, text) {
- if (state.tokenize != tokenBase) return 0;
- var scope = state.scope;
- var closer = text && "])}".indexOf(text.charAt(0)) > -1;
- if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev;
- var closes = closer && scope.type === text.charAt(0);
- if (scope.align)
- return scope.alignOffset - (closes ? 1 : 0);
- else
- return (closes ? scope.prev : scope).offset;
- },
-
- lineComment: "#",
- fold: "indent"
- };
- return external;
-});
-
-CodeMirror.defineMIME("text/x-coffeescript", "coffeescript");
-
-});
diff --git a/public/js/lib/codemirror/mode/coffeescript/index.html b/public/js/lib/codemirror/mode/coffeescript/index.html
deleted file mode 100644
index 93a5f4f309..0000000000
--- a/public/js/lib/codemirror/mode/coffeescript/index.html
+++ /dev/null
@@ -1,740 +0,0 @@
-
-
-CodeMirror: CoffeeScript mode
-
-
-
-
-
-
-
-
-
-
-CoffeeScript mode
-
-# CoffeeScript mode for CodeMirror
-# Copyright (c) 2011 Jeff Pickhardt, released under
-# the MIT License.
-#
-# Modified from the Python CodeMirror mode, which also is
-# under the MIT License Copyright (c) 2010 Timothy Farrell.
-#
-# The following script, Underscore.coffee, is used to
-# demonstrate CoffeeScript mode for CodeMirror.
-#
-# To download CoffeeScript mode for CodeMirror, go to:
-# https://github.com/pickhardt/coffeescript-codemirror-mode
-
-# **Underscore.coffee
-# (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.**
-# Underscore is freely distributable under the terms of the
-# [MIT license](http://en.wikipedia.org/wiki/MIT_License).
-# Portions of Underscore are inspired by or borrowed from
-# [Prototype.js](http://prototypejs.org/api), Oliver Steele's
-# [Functional](http://osteele.com), and John Resig's
-# [Micro-Templating](http://ejohn.org).
-# For all details and documentation:
-# http://documentcloud.github.com/underscore/
-
-
-# Baseline setup
-# --------------
-
-# Establish the root object, `window` in the browser, or `global` on the server.
-root = this
-
-
-# Save the previous value of the `_` variable.
-previousUnderscore = root._
-
-### Multiline
- comment
-###
-
-# Establish the object that gets thrown to break out of a loop iteration.
-# `StopIteration` is SOP on Mozilla.
-breaker = if typeof(StopIteration) is 'undefined' then '__break__' else StopIteration
-
-
-#### Docco style single line comment (title)
-
-
-# Helper function to escape **RegExp** contents, because JS doesn't have one.
-escapeRegExp = (string) -> string.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1')
-
-
-# Save bytes in the minified (but not gzipped) version:
-ArrayProto = Array.prototype
-ObjProto = Object.prototype
-
-
-# Create quick reference variables for speed access to core prototypes.
-slice = ArrayProto.slice
-unshift = ArrayProto.unshift
-toString = ObjProto.toString
-hasOwnProperty = ObjProto.hasOwnProperty
-propertyIsEnumerable = ObjProto.propertyIsEnumerable
-
-
-# All **ECMA5** native implementations we hope to use are declared here.
-nativeForEach = ArrayProto.forEach
-nativeMap = ArrayProto.map
-nativeReduce = ArrayProto.reduce
-nativeReduceRight = ArrayProto.reduceRight
-nativeFilter = ArrayProto.filter
-nativeEvery = ArrayProto.every
-nativeSome = ArrayProto.some
-nativeIndexOf = ArrayProto.indexOf
-nativeLastIndexOf = ArrayProto.lastIndexOf
-nativeIsArray = Array.isArray
-nativeKeys = Object.keys
-
-
-# Create a safe reference to the Underscore object for use below.
-_ = (obj) -> new wrapper(obj)
-
-
-# Export the Underscore object for **CommonJS**.
-if typeof(exports) != 'undefined' then exports._ = _
-
-
-# Export Underscore to global scope.
-root._ = _
-
-
-# Current version.
-_.VERSION = '1.1.0'
-
-
-# Collection Functions
-# --------------------
-
-# The cornerstone, an **each** implementation.
-# Handles objects implementing **forEach**, arrays, and raw objects.
-_.each = (obj, iterator, context) ->
- try
- if nativeForEach and obj.forEach is nativeForEach
- obj.forEach iterator, context
- else if _.isNumber obj.length
- iterator.call context, obj[i], i, obj for i in [0...obj.length]
- else
- iterator.call context, val, key, obj for own key, val of obj
- catch e
- throw e if e isnt breaker
- obj
-
-
-# Return the results of applying the iterator to each element. Use JavaScript
-# 1.6's version of **map**, if possible.
-_.map = (obj, iterator, context) ->
- return obj.map(iterator, context) if nativeMap and obj.map is nativeMap
- results = []
- _.each obj, (value, index, list) ->
- results.push iterator.call context, value, index, list
- results
-
-
-# **Reduce** builds up a single result from a list of values. Also known as
-# **inject**, or **foldl**. Uses JavaScript 1.8's version of **reduce**, if possible.
-_.reduce = (obj, iterator, memo, context) ->
- if nativeReduce and obj.reduce is nativeReduce
- iterator = _.bind iterator, context if context
- return obj.reduce iterator, memo
- _.each obj, (value, index, list) ->
- memo = iterator.call context, memo, value, index, list
- memo
-
-
-# The right-associative version of **reduce**, also known as **foldr**. Uses
-# JavaScript 1.8's version of **reduceRight**, if available.
-_.reduceRight = (obj, iterator, memo, context) ->
- if nativeReduceRight and obj.reduceRight is nativeReduceRight
- iterator = _.bind iterator, context if context
- return obj.reduceRight iterator, memo
- reversed = _.clone(_.toArray(obj)).reverse()
- _.reduce reversed, iterator, memo, context
-
-
-# Return the first value which passes a truth test.
-_.detect = (obj, iterator, context) ->
- result = null
- _.each obj, (value, index, list) ->
- if iterator.call context, value, index, list
- result = value
- _.breakLoop()
- result
-
-
-# Return all the elements that pass a truth test. Use JavaScript 1.6's
-# **filter**, if it exists.
-_.filter = (obj, iterator, context) ->
- return obj.filter iterator, context if nativeFilter and obj.filter is nativeFilter
- results = []
- _.each obj, (value, index, list) ->
- results.push value if iterator.call context, value, index, list
- results
-
-
-# Return all the elements for which a truth test fails.
-_.reject = (obj, iterator, context) ->
- results = []
- _.each obj, (value, index, list) ->
- results.push value if not iterator.call context, value, index, list
- results
-
-
-# Determine whether all of the elements match a truth test. Delegate to
-# JavaScript 1.6's **every**, if it is present.
-_.every = (obj, iterator, context) ->
- iterator ||= _.identity
- return obj.every iterator, context if nativeEvery and obj.every is nativeEvery
- result = true
- _.each obj, (value, index, list) ->
- _.breakLoop() unless (result = result and iterator.call(context, value, index, list))
- result
-
-
-# Determine if at least one element in the object matches a truth test. Use
-# JavaScript 1.6's **some**, if it exists.
-_.some = (obj, iterator, context) ->
- iterator ||= _.identity
- return obj.some iterator, context if nativeSome and obj.some is nativeSome
- result = false
- _.each obj, (value, index, list) ->
- _.breakLoop() if (result = iterator.call(context, value, index, list))
- result
-
-
-# Determine if a given value is included in the array or object,
-# based on `===`.
-_.include = (obj, target) ->
- return _.indexOf(obj, target) isnt -1 if nativeIndexOf and obj.indexOf is nativeIndexOf
- return true for own key, val of obj when val is target
- false
-
-
-# Invoke a method with arguments on every item in a collection.
-_.invoke = (obj, method) ->
- args = _.rest arguments, 2
- (if method then val[method] else val).apply(val, args) for val in obj
-
-
-# Convenience version of a common use case of **map**: fetching a property.
-_.pluck = (obj, key) ->
- _.map(obj, (val) -> val[key])
-
-
-# Return the maximum item or (item-based computation).
-_.max = (obj, iterator, context) ->
- return Math.max.apply(Math, obj) if not iterator and _.isArray(obj)
- result = computed: -Infinity
- _.each obj, (value, index, list) ->
- computed = if iterator then iterator.call(context, value, index, list) else value
- computed >= result.computed and (result = {value: value, computed: computed})
- result.value
-
-
-# Return the minimum element (or element-based computation).
-_.min = (obj, iterator, context) ->
- return Math.min.apply(Math, obj) if not iterator and _.isArray(obj)
- result = computed: Infinity
- _.each obj, (value, index, list) ->
- computed = if iterator then iterator.call(context, value, index, list) else value
- computed < result.computed and (result = {value: value, computed: computed})
- result.value
-
-
-# Sort the object's values by a criterion produced by an iterator.
-_.sortBy = (obj, iterator, context) ->
- _.pluck(((_.map obj, (value, index, list) ->
- {value: value, criteria: iterator.call(context, value, index, list)}
- ).sort((left, right) ->
- a = left.criteria; b = right.criteria
- if a < b then -1 else if a > b then 1 else 0
- )), 'value')
-
-
-# Use a comparator function to figure out at what index an object should
-# be inserted so as to maintain order. Uses binary search.
-_.sortedIndex = (array, obj, iterator) ->
- iterator ||= _.identity
- low = 0
- high = array.length
- while low < high
- mid = (low + high) >> 1
- if iterator(array[mid]) < iterator(obj) then low = mid + 1 else high = mid
- low
-
-
-# Convert anything iterable into a real, live array.
-_.toArray = (iterable) ->
- return [] if (!iterable)
- return iterable.toArray() if (iterable.toArray)
- return iterable if (_.isArray(iterable))
- return slice.call(iterable) if (_.isArguments(iterable))
- _.values(iterable)
-
-
-# Return the number of elements in an object.
-_.size = (obj) -> _.toArray(obj).length
-
-
-# Array Functions
-# ---------------
-
-# Get the first element of an array. Passing `n` will return the first N
-# values in the array. Aliased as **head**. The `guard` check allows it to work
-# with **map**.
-_.first = (array, n, guard) ->
- if n and not guard then slice.call(array, 0, n) else array[0]
-
-
-# Returns everything but the first entry of the array. Aliased as **tail**.
-# Especially useful on the arguments object. Passing an `index` will return
-# the rest of the values in the array from that index onward. The `guard`
-# check allows it to work with **map**.
-_.rest = (array, index, guard) ->
- slice.call(array, if _.isUndefined(index) or guard then 1 else index)
-
-
-# Get the last element of an array.
-_.last = (array) -> array[array.length - 1]
-
-
-# Trim out all falsy values from an array.
-_.compact = (array) -> item for item in array when item
-
-
-# Return a completely flattened version of an array.
-_.flatten = (array) ->
- _.reduce array, (memo, value) ->
- return memo.concat(_.flatten(value)) if _.isArray value
- memo.push value
- memo
- , []
-
-
-# Return a version of the array that does not contain the specified value(s).
-_.without = (array) ->
- values = _.rest arguments
- val for val in _.toArray(array) when not _.include values, val
-
-
-# Produce a duplicate-free version of the array. If the array has already
-# been sorted, you have the option of using a faster algorithm.
-_.uniq = (array, isSorted) ->
- memo = []
- for el, i in _.toArray array
- memo.push el if i is 0 || (if isSorted is true then _.last(memo) isnt el else not _.include(memo, el))
- memo
-
-
-# Produce an array that contains every item shared between all the
-# passed-in arrays.
-_.intersect = (array) ->
- rest = _.rest arguments
- _.select _.uniq(array), (item) ->
- _.all rest, (other) ->
- _.indexOf(other, item) >= 0
-
-
-# Zip together multiple lists into a single array -- elements that share
-# an index go together.
-_.zip = ->
- length = _.max _.pluck arguments, 'length'
- results = new Array length
- for i in [0...length]
- results[i] = _.pluck arguments, String i
- results
-
-
-# If the browser doesn't supply us with **indexOf** (I'm looking at you, MSIE),
-# we need this function. Return the position of the first occurrence of an
-# item in an array, or -1 if the item is not included in the array.
-_.indexOf = (array, item) ->
- return array.indexOf item if nativeIndexOf and array.indexOf is nativeIndexOf
- i = 0; l = array.length
- while l - i
- if array[i] is item then return i else i++
- -1
-
-
-# Provide JavaScript 1.6's **lastIndexOf**, delegating to the native function,
-# if possible.
-_.lastIndexOf = (array, item) ->
- return array.lastIndexOf(item) if nativeLastIndexOf and array.lastIndexOf is nativeLastIndexOf
- i = array.length
- while i
- if array[i] is item then return i else i--
- -1
-
-
-# Generate an integer Array containing an arithmetic progression. A port of
-# [the native Python **range** function](http://docs.python.org/library/functions.html#range).
-_.range = (start, stop, step) ->
- a = arguments
- solo = a.length <= 1
- i = start = if solo then 0 else a[0]
- stop = if solo then a[0] else a[1]
- step = a[2] or 1
- len = Math.ceil((stop - start) / step)
- return [] if len <= 0
- range = new Array len
- idx = 0
- loop
- return range if (if step > 0 then i - stop else stop - i) >= 0
- range[idx] = i
- idx++
- i+= step
-
-
-# Function Functions
-# ------------------
-
-# Create a function bound to a given object (assigning `this`, and arguments,
-# optionally). Binding with arguments is also known as **curry**.
-_.bind = (func, obj) ->
- args = _.rest arguments, 2
- -> func.apply obj or root, args.concat arguments
-
-
-# Bind all of an object's methods to that object. Useful for ensuring that
-# all callbacks defined on an object belong to it.
-_.bindAll = (obj) ->
- funcs = if arguments.length > 1 then _.rest(arguments) else _.functions(obj)
- _.each funcs, (f) -> obj[f] = _.bind obj[f], obj
- obj
-
-
-# Delays a function for the given number of milliseconds, and then calls
-# it with the arguments supplied.
-_.delay = (func, wait) ->
- args = _.rest arguments, 2
- setTimeout((-> func.apply(func, args)), wait)
-
-
-# Memoize an expensive function by storing its results.
-_.memoize = (func, hasher) ->
- memo = {}
- hasher or= _.identity
- ->
- key = hasher.apply this, arguments
- return memo[key] if key of memo
- memo[key] = func.apply this, arguments
-
-
-# Defers a function, scheduling it to run after the current call stack has
-# cleared.
-_.defer = (func) ->
- _.delay.apply _, [func, 1].concat _.rest arguments
-
-
-# Returns the first function passed as an argument to the second,
-# allowing you to adjust arguments, run code before and after, and
-# conditionally execute the original function.
-_.wrap = (func, wrapper) ->
- -> wrapper.apply wrapper, [func].concat arguments
-
-
-# Returns a function that is the composition of a list of functions, each
-# consuming the return value of the function that follows.
-_.compose = ->
- funcs = arguments
- ->
- args = arguments
- for i in [funcs.length - 1..0] by -1
- args = [funcs[i].apply(this, args)]
- args[0]
-
-
-# Object Functions
-# ----------------
-
-# Retrieve the names of an object's properties.
-_.keys = nativeKeys or (obj) ->
- return _.range 0, obj.length if _.isArray(obj)
- key for key, val of obj
-
-
-# Retrieve the values of an object's properties.
-_.values = (obj) ->
- _.map obj, _.identity
-
-
-# Return a sorted list of the function names available in Underscore.
-_.functions = (obj) ->
- _.filter(_.keys(obj), (key) -> _.isFunction(obj[key])).sort()
-
-
-# Extend a given object with all of the properties in a source object.
-_.extend = (obj) ->
- for source in _.rest(arguments)
- obj[key] = val for key, val of source
- obj
-
-
-# Create a (shallow-cloned) duplicate of an object.
-_.clone = (obj) ->
- return obj.slice 0 if _.isArray obj
- _.extend {}, obj
-
-
-# Invokes interceptor with the obj, and then returns obj.
-# The primary purpose of this method is to "tap into" a method chain,
-# in order to perform operations on intermediate results within
- the chain.
-_.tap = (obj, interceptor) ->
- interceptor obj
- obj
-
-
-# Perform a deep comparison to check if two objects are equal.
-_.isEqual = (a, b) ->
- # Check object identity.
- return true if a is b
- # Different types?
- atype = typeof(a); btype = typeof(b)
- return false if atype isnt btype
- # Basic equality test (watch out for coercions).
- return true if `a == b`
- # One is falsy and the other truthy.
- return false if (!a and b) or (a and !b)
- # One of them implements an `isEqual()`?
- return a.isEqual(b) if a.isEqual
- # Check dates' integer values.
- return a.getTime() is b.getTime() if _.isDate(a) and _.isDate(b)
- # Both are NaN?
- return false if _.isNaN(a) and _.isNaN(b)
- # Compare regular expressions.
- if _.isRegExp(a) and _.isRegExp(b)
- return a.source is b.source and
- a.global is b.global and
- a.ignoreCase is b.ignoreCase and
- a.multiline is b.multiline
- # If a is not an object by this point, we can't handle it.
- return false if atype isnt 'object'
- # Check for different array lengths before comparing contents.
- return false if a.length and (a.length isnt b.length)
- # Nothing else worked, deep compare the contents.
- aKeys = _.keys(a); bKeys = _.keys(b)
- # Different object sizes?
- return false if aKeys.length isnt bKeys.length
- # Recursive comparison of contents.
- return false for key, val of a when !(key of b) or !_.isEqual(val, b[key])
- true
-
-
-# Is a given array or object empty?
-_.isEmpty = (obj) ->
- return obj.length is 0 if _.isArray(obj) or _.isString(obj)
- return false for own key of obj
- true
-
-
-# Is a given value a DOM element?
-_.isElement = (obj) -> obj and obj.nodeType is 1
-
-
-# Is a given value an array?
-_.isArray = nativeIsArray or (obj) -> !!(obj and obj.concat and obj.unshift and not obj.callee)
-
-
-# Is a given variable an arguments object?
-_.isArguments = (obj) -> obj and obj.callee
-
-
-# Is the given value a function?
-_.isFunction = (obj) -> !!(obj and obj.constructor and obj.call and obj.apply)
-
-
-# Is the given value a string?
-_.isString = (obj) -> !!(obj is '' or (obj and obj.charCodeAt and obj.substr))
-
-
-# Is a given value a number?
-_.isNumber = (obj) -> (obj is +obj) or toString.call(obj) is '[object Number]'
-
-
-# Is a given value a boolean?
-_.isBoolean = (obj) -> obj is true or obj is false
-
-
-# Is a given value a Date?
-_.isDate = (obj) -> !!(obj and obj.getTimezoneOffset and obj.setUTCFullYear)
-
-
-# Is the given value a regular expression?
-_.isRegExp = (obj) -> !!(obj and obj.exec and (obj.ignoreCase or obj.ignoreCase is false))
-
-
-# Is the given value NaN -- this one is interesting. `NaN != NaN`, and
-# `isNaN(undefined) == true`, so we make sure it's a number first.
-_.isNaN = (obj) -> _.isNumber(obj) and window.isNaN(obj)
-
-
-# Is a given value equal to null?
-_.isNull = (obj) -> obj is null
-
-
-# Is a given variable undefined?
-_.isUndefined = (obj) -> typeof obj is 'undefined'
-
-
-# Utility Functions
-# -----------------
-
-# Run Underscore.js in noConflict mode, returning the `_` variable to its
-# previous owner. Returns a reference to the Underscore object.
-_.noConflict = ->
- root._ = previousUnderscore
- this
-
-
-# Keep the identity function around for default iterators.
-_.identity = (value) -> value
-
-
-# Run a function `n` times.
-_.times = (n, iterator, context) ->
- iterator.call context, i for i in [0...n]
-
-
-# Break out of the middle of an iteration.
-_.breakLoop = -> throw breaker
-
-
-# Add your own custom functions to the Underscore object, ensuring that
-# they're correctly added to the OOP wrapper as well.
-_.mixin = (obj) ->
- for name in _.functions(obj)
- addToWrapper name, _[name] = obj[name]
-
-
-# Generate a unique integer id (unique within the entire client session).
-# Useful for temporary DOM ids.
-idCounter = 0
-_.uniqueId = (prefix) ->
- (prefix or '') + idCounter++
-
-
-# By default, Underscore uses **ERB**-style template delimiters, change the
-# following template settings to use alternative delimiters.
-_.templateSettings = {
- start: '<%'
- end: '%>'
- interpolate: /<%=(.+?)%>/g
-}
-
-
-# JavaScript templating a-la **ERB**, pilfered from John Resig's
-# *Secrets of the JavaScript Ninja*, page 83.
-# Single-quote fix from Rick Strahl.
-# With alterations for arbitrary delimiters, and to preserve whitespace.
-_.template = (str, data) ->
- c = _.templateSettings
- endMatch = new RegExp("'(?=[^"+c.end.substr(0, 1)+"]*"+escapeRegExp(c.end)+")","g")
- fn = new Function 'obj',
- 'var p=[],print=function(){p.push.apply(p,arguments);};' +
- 'with(obj||{}){p.push(\'' +
- str.replace(/\r/g, '\\r')
- .replace(/\n/g, '\\n')
- .replace(/\t/g, '\\t')
- .replace(endMatch,"���")
- .split("'").join("\\'")
- .split("���").join("'")
- .replace(c.interpolate, "',$1,'")
- .split(c.start).join("');")
- .split(c.end).join("p.push('") +
- "');}return p.join('');"
- if data then fn(data) else fn
-
-
-# Aliases
-# -------
-
-_.forEach = _.each
-_.foldl = _.inject = _.reduce
-_.foldr = _.reduceRight
-_.select = _.filter
-_.all = _.every
-_.any = _.some
-_.contains = _.include
-_.head = _.first
-_.tail = _.rest
-_.methods = _.functions
-
-
-# Setup the OOP Wrapper
-# ---------------------
-
-# If Underscore is called as a function, it returns a wrapped object that
-# can be used OO-style. This wrapper holds altered versions of all the
-# underscore functions. Wrapped objects may be chained.
-wrapper = (obj) ->
- this._wrapped = obj
- this
-
-
-# Helper function to continue chaining intermediate results.
-result = (obj, chain) ->
- if chain then _(obj).chain() else obj
-
-
-# A method to easily add functions to the OOP wrapper.
-addToWrapper = (name, func) ->
- wrapper.prototype[name] = ->
- args = _.toArray arguments
- unshift.call args, this._wrapped
- result func.apply(_, args), this._chain
-
-
-# Add all ofthe Underscore functions to the wrapper object.
-_.mixin _
-
-
-# Add all mutator Array functions to the wrapper.
-_.each ['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], (name) ->
- method = Array.prototype[name]
- wrapper.prototype[name] = ->
- method.apply(this._wrapped, arguments)
- result(this._wrapped, this._chain)
-
-
-# Add all accessor Array functions to the wrapper.
-_.each ['concat', 'join', 'slice'], (name) ->
- method = Array.prototype[name]
- wrapper.prototype[name] = ->
- result(method.apply(this._wrapped, arguments), this._chain)
-
-
-# Start chaining a wrapped Underscore object.
-wrapper::chain = ->
- this._chain = true
- this
-
-
-# Extracts the result from a wrapped and chained object.
-wrapper::value = -> this._wrapped
-
-
-
- MIME types defined: text/x-coffeescript
.
-
- The CoffeeScript mode was written by Jeff Pickhardt.
-
-
diff --git a/public/js/lib/codemirror/mode/commonlisp/commonlisp.js b/public/js/lib/codemirror/mode/commonlisp/commonlisp.js
deleted file mode 100644
index 5f50b352de..0000000000
--- a/public/js/lib/codemirror/mode/commonlisp/commonlisp.js
+++ /dev/null
@@ -1,122 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("commonlisp", function (config) {
- var specialForm = /^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/;
- var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/;
- var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/;
- var symbol = /[^\s'`,@()\[\]";]/;
- var type;
-
- function readSym(stream) {
- var ch;
- while (ch = stream.next()) {
- if (ch == "\\") stream.next();
- else if (!symbol.test(ch)) { stream.backUp(1); break; }
- }
- return stream.current();
- }
-
- function base(stream, state) {
- if (stream.eatSpace()) {type = "ws"; return null;}
- if (stream.match(numLiteral)) return "number";
- var ch = stream.next();
- if (ch == "\\") ch = stream.next();
-
- if (ch == '"') return (state.tokenize = inString)(stream, state);
- else if (ch == "(") { type = "open"; return "bracket"; }
- else if (ch == ")" || ch == "]") { type = "close"; return "bracket"; }
- else if (ch == ";") { stream.skipToEnd(); type = "ws"; return "comment"; }
- else if (/['`,@]/.test(ch)) return null;
- else if (ch == "|") {
- if (stream.skipTo("|")) { stream.next(); return "symbol"; }
- else { stream.skipToEnd(); return "error"; }
- } else if (ch == "#") {
- var ch = stream.next();
- if (ch == "[") { type = "open"; return "bracket"; }
- else if (/[+\-=\.']/.test(ch)) return null;
- else if (/\d/.test(ch) && stream.match(/^\d*#/)) return null;
- else if (ch == "|") return (state.tokenize = inComment)(stream, state);
- else if (ch == ":") { readSym(stream); return "meta"; }
- else return "error";
- } else {
- var name = readSym(stream);
- if (name == ".") return null;
- type = "symbol";
- if (name == "nil" || name == "t" || name.charAt(0) == ":") return "atom";
- if (state.lastType == "open" && (specialForm.test(name) || assumeBody.test(name))) return "keyword";
- if (name.charAt(0) == "&") return "variable-2";
- return "variable";
- }
- }
-
- function inString(stream, state) {
- var escaped = false, next;
- while (next = stream.next()) {
- if (next == '"' && !escaped) { state.tokenize = base; break; }
- escaped = !escaped && next == "\\";
- }
- return "string";
- }
-
- function inComment(stream, state) {
- var next, last;
- while (next = stream.next()) {
- if (next == "#" && last == "|") { state.tokenize = base; break; }
- last = next;
- }
- type = "ws";
- return "comment";
- }
-
- return {
- startState: function () {
- return {ctx: {prev: null, start: 0, indentTo: 0}, lastType: null, tokenize: base};
- },
-
- token: function (stream, state) {
- if (stream.sol() && typeof state.ctx.indentTo != "number")
- state.ctx.indentTo = state.ctx.start + 1;
-
- type = null;
- var style = state.tokenize(stream, state);
- if (type != "ws") {
- if (state.ctx.indentTo == null) {
- if (type == "symbol" && assumeBody.test(stream.current()))
- state.ctx.indentTo = state.ctx.start + config.indentUnit;
- else
- state.ctx.indentTo = "next";
- } else if (state.ctx.indentTo == "next") {
- state.ctx.indentTo = stream.column();
- }
- state.lastType = type;
- }
- if (type == "open") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null};
- else if (type == "close") state.ctx = state.ctx.prev || state.ctx;
- return style;
- },
-
- indent: function (state, _textAfter) {
- var i = state.ctx.indentTo;
- return typeof i == "number" ? i : state.ctx.start + 1;
- },
-
- lineComment: ";;",
- blockCommentStart: "#|",
- blockCommentEnd: "|#"
- };
-});
-
-CodeMirror.defineMIME("text/x-common-lisp", "commonlisp");
-
-});
diff --git a/public/js/lib/codemirror/mode/commonlisp/index.html b/public/js/lib/codemirror/mode/commonlisp/index.html
deleted file mode 100644
index f2bf4522d6..0000000000
--- a/public/js/lib/codemirror/mode/commonlisp/index.html
+++ /dev/null
@@ -1,177 +0,0 @@
-
-
-CodeMirror: Common Lisp mode
-
-
-
-
-
-
-
-
-
-
-Common Lisp mode
-(in-package :cl-postgres)
-
-;; These are used to synthesize reader and writer names for integer
-;; reading/writing functions when the amount of bytes and the
-;; signedness is known. Both the macro that creates the functions and
-;; some macros that use them create names this way.
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (defun integer-reader-name (bytes signed)
- (intern (with-standard-io-syntax
- (format nil "~a~a~a~a" '#:read- (if signed "" '#:u) '#:int bytes))))
- (defun integer-writer-name (bytes signed)
- (intern (with-standard-io-syntax
- (format nil "~a~a~a~a" '#:write- (if signed "" '#:u) '#:int bytes)))))
-
-(defmacro integer-reader (bytes)
- "Create a function to read integers from a binary stream."
- (let ((bits (* bytes 8)))
- (labels ((return-form (signed)
- (if signed
- `(if (logbitp ,(1- bits) result)
- (dpb result (byte ,(1- bits) 0) -1)
- result)
- `result))
- (generate-reader (signed)
- `(defun ,(integer-reader-name bytes signed) (socket)
- (declare (type stream socket)
- #.*optimize*)
- ,(if (= bytes 1)
- `(let ((result (the (unsigned-byte 8) (read-byte socket))))
- (declare (type (unsigned-byte 8) result))
- ,(return-form signed))
- `(let ((result 0))
- (declare (type (unsigned-byte ,bits) result))
- ,@(loop :for byte :from (1- bytes) :downto 0
- :collect `(setf (ldb (byte 8 ,(* 8 byte)) result)
- (the (unsigned-byte 8) (read-byte socket))))
- ,(return-form signed))))))
- `(progn
-;; This causes weird errors on SBCL in some circumstances. Disabled for now.
-;; (declaim (inline ,(integer-reader-name bytes t)
-;; ,(integer-reader-name bytes nil)))
- (declaim (ftype (function (t) (signed-byte ,bits))
- ,(integer-reader-name bytes t)))
- ,(generate-reader t)
- (declaim (ftype (function (t) (unsigned-byte ,bits))
- ,(integer-reader-name bytes nil)))
- ,(generate-reader nil)))))
-
-(defmacro integer-writer (bytes)
- "Create a function to write integers to a binary stream."
- (let ((bits (* 8 bytes)))
- `(progn
- (declaim (inline ,(integer-writer-name bytes t)
- ,(integer-writer-name bytes nil)))
- (defun ,(integer-writer-name bytes nil) (socket value)
- (declare (type stream socket)
- (type (unsigned-byte ,bits) value)
- #.*optimize*)
- ,@(if (= bytes 1)
- `((write-byte value socket))
- (loop :for byte :from (1- bytes) :downto 0
- :collect `(write-byte (ldb (byte 8 ,(* byte 8)) value)
- socket)))
- (values))
- (defun ,(integer-writer-name bytes t) (socket value)
- (declare (type stream socket)
- (type (signed-byte ,bits) value)
- #.*optimize*)
- ,@(if (= bytes 1)
- `((write-byte (ldb (byte 8 0) value) socket))
- (loop :for byte :from (1- bytes) :downto 0
- :collect `(write-byte (ldb (byte 8 ,(* byte 8)) value)
- socket)))
- (values)))))
-
-;; All the instances of the above that we need.
-
-(integer-reader 1)
-(integer-reader 2)
-(integer-reader 4)
-(integer-reader 8)
-
-(integer-writer 1)
-(integer-writer 2)
-(integer-writer 4)
-
-(defun write-bytes (socket bytes)
- "Write a byte-array to a stream."
- (declare (type stream socket)
- (type (simple-array (unsigned-byte 8)) bytes)
- #.*optimize*)
- (write-sequence bytes socket))
-
-(defun write-str (socket string)
- "Write a null-terminated string to a stream \(encoding it when UTF-8
-support is enabled.)."
- (declare (type stream socket)
- (type string string)
- #.*optimize*)
- (enc-write-string string socket)
- (write-uint1 socket 0))
-
-(declaim (ftype (function (t unsigned-byte)
- (simple-array (unsigned-byte 8) (*)))
- read-bytes))
-(defun read-bytes (socket length)
- "Read a byte array of the given length from a stream."
- (declare (type stream socket)
- (type fixnum length)
- #.*optimize*)
- (let ((result (make-array length :element-type '(unsigned-byte 8))))
- (read-sequence result socket)
- result))
-
-(declaim (ftype (function (t) string) read-str))
-(defun read-str (socket)
- "Read a null-terminated string from a stream. Takes care of encoding
-when UTF-8 support is enabled."
- (declare (type stream socket)
- #.*optimize*)
- (enc-read-string socket :null-terminated t))
-
-(defun skip-bytes (socket length)
- "Skip a given number of bytes in a binary stream."
- (declare (type stream socket)
- (type (unsigned-byte 32) length)
- #.*optimize*)
- (dotimes (i length)
- (read-byte socket)))
-
-(defun skip-str (socket)
- "Skip a null-terminated string."
- (declare (type stream socket)
- #.*optimize*)
- (loop :for char :of-type fixnum = (read-byte socket)
- :until (zerop char)))
-
-(defun ensure-socket-is-closed (socket &key abort)
- (when (open-stream-p socket)
- (handler-case
- (close socket :abort abort)
- (error (error)
- (warn "Ignoring the error which happened while trying to close PostgreSQL socket: ~A" error)))))
-
-
-
- MIME types defined: text/x-common-lisp
.
-
-
diff --git a/public/js/lib/codemirror/mode/cypher/cypher.js b/public/js/lib/codemirror/mode/cypher/cypher.js
deleted file mode 100644
index 315778706e..0000000000
--- a/public/js/lib/codemirror/mode/cypher/cypher.js
+++ /dev/null
@@ -1,146 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// By the Neo4j Team and contributors.
-// https://github.com/neo4j-contrib/CodeMirror
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
- var wordRegexp = function(words) {
- return new RegExp("^(?:" + words.join("|") + ")$", "i");
- };
-
- CodeMirror.defineMode("cypher", function(config) {
- var tokenBase = function(stream/*, state*/) {
- var ch = stream.next(), curPunc = null;
- if (ch === "\"" || ch === "'") {
- stream.match(/.+?["']/);
- return "string";
- }
- if (/[{}\(\),\.;\[\]]/.test(ch)) {
- curPunc = ch;
- return "node";
- } else if (ch === "/" && stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- } else if (operatorChars.test(ch)) {
- stream.eatWhile(operatorChars);
- return null;
- } else {
- stream.eatWhile(/[_\w\d]/);
- if (stream.eat(":")) {
- stream.eatWhile(/[\w\d_\-]/);
- return "atom";
- }
- var word = stream.current();
- if (funcs.test(word)) return "builtin";
- if (preds.test(word)) return "def";
- if (keywords.test(word)) return "keyword";
- return "variable";
- }
- };
- var pushContext = function(state, type, col) {
- return state.context = {
- prev: state.context,
- indent: state.indent,
- col: col,
- type: type
- };
- };
- var popContext = function(state) {
- state.indent = state.context.indent;
- return state.context = state.context.prev;
- };
- var indentUnit = config.indentUnit;
- var curPunc;
- var funcs = wordRegexp(["abs", "acos", "allShortestPaths", "asin", "atan", "atan2", "avg", "ceil", "coalesce", "collect", "cos", "cot", "count", "degrees", "e", "endnode", "exp", "extract", "filter", "floor", "haversin", "head", "id", "labels", "last", "left", "length", "log", "log10", "lower", "ltrim", "max", "min", "node", "nodes", "percentileCont", "percentileDisc", "pi", "radians", "rand", "range", "reduce", "rel", "relationship", "relationships", "replace", "right", "round", "rtrim", "shortestPath", "sign", "sin", "split", "sqrt", "startnode", "stdev", "stdevp", "str", "substring", "sum", "tail", "tan", "timestamp", "toFloat", "toInt", "trim", "type", "upper"]);
- var preds = wordRegexp(["all", "and", "any", "has", "in", "none", "not", "or", "single", "xor"]);
- var keywords = wordRegexp(["as", "asc", "ascending", "assert", "by", "case", "commit", "constraint", "create", "csv", "cypher", "delete", "desc", "descending", "distinct", "drop", "else", "end", "explain", "false", "fieldterminator", "foreach", "from", "headers", "in", "index", "is", "limit", "load", "match", "merge", "null", "on", "optional", "order", "periodic", "profile", "remove", "return", "scan", "set", "skip", "start", "then", "true", "union", "unique", "unwind", "using", "when", "where", "with"]);
- var operatorChars = /[*+\-<>=&|~%^]/;
-
- return {
- startState: function(/*base*/) {
- return {
- tokenize: tokenBase,
- context: null,
- indent: 0,
- col: 0
- };
- },
- token: function(stream, state) {
- if (stream.sol()) {
- if (state.context && (state.context.align == null)) {
- state.context.align = false;
- }
- state.indent = stream.indentation();
- }
- if (stream.eatSpace()) {
- return null;
- }
- var style = state.tokenize(stream, state);
- if (style !== "comment" && state.context && (state.context.align == null) && state.context.type !== "pattern") {
- state.context.align = true;
- }
- if (curPunc === "(") {
- pushContext(state, ")", stream.column());
- } else if (curPunc === "[") {
- pushContext(state, "]", stream.column());
- } else if (curPunc === "{") {
- pushContext(state, "}", stream.column());
- } else if (/[\]\}\)]/.test(curPunc)) {
- while (state.context && state.context.type === "pattern") {
- popContext(state);
- }
- if (state.context && curPunc === state.context.type) {
- popContext(state);
- }
- } else if (curPunc === "." && state.context && state.context.type === "pattern") {
- popContext(state);
- } else if (/atom|string|variable/.test(style) && state.context) {
- if (/[\}\]]/.test(state.context.type)) {
- pushContext(state, "pattern", stream.column());
- } else if (state.context.type === "pattern" && !state.context.align) {
- state.context.align = true;
- state.context.col = stream.column();
- }
- }
- return style;
- },
- indent: function(state, textAfter) {
- var firstChar = textAfter && textAfter.charAt(0);
- var context = state.context;
- if (/[\]\}]/.test(firstChar)) {
- while (context && context.type === "pattern") {
- context = context.prev;
- }
- }
- var closing = context && firstChar === context.type;
- if (!context) return 0;
- if (context.type === "keywords") return CodeMirror.commands.newlineAndIndent;
- if (context.align) return context.col + (closing ? 0 : 1);
- return context.indent + (closing ? 0 : indentUnit);
- }
- };
- });
-
- CodeMirror.modeExtensions["cypher"] = {
- autoFormatLineBreaks: function(text) {
- var i, lines, reProcessedPortion;
- var lines = text.split("\n");
- var reProcessedPortion = /\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g;
- for (var i = 0; i < lines.length; i++)
- lines[i] = lines[i].replace(reProcessedPortion, " \n$1 ").trim();
- return lines.join("\n");
- }
- };
-
- CodeMirror.defineMIME("application/x-cypher-query", "cypher");
-
-});
diff --git a/public/js/lib/codemirror/mode/cypher/index.html b/public/js/lib/codemirror/mode/cypher/index.html
deleted file mode 100644
index b8bd75c8b3..0000000000
--- a/public/js/lib/codemirror/mode/cypher/index.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-CodeMirror: Cypher Mode for CodeMirror
-
-
-
-
-
-
-
-
-
-
-
-Cypher Mode for CodeMirror
-
- // Cypher Mode for CodeMirror, using the neo theme
-MATCH (joe { name: 'Joe' })-[:knows*2..2]-(friend_of_friend)
-WHERE NOT (joe)-[:knows]-(friend_of_friend)
-RETURN friend_of_friend.name, COUNT(*)
-ORDER BY COUNT(*) DESC , friend_of_friend.name
-
-
- MIME types defined:
- application/x-cypher-query
-
-
-
-
diff --git a/public/js/lib/codemirror/mode/d/d.js b/public/js/lib/codemirror/mode/d/d.js
deleted file mode 100644
index c927a7e358..0000000000
--- a/public/js/lib/codemirror/mode/d/d.js
+++ /dev/null
@@ -1,218 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("d", function(config, parserConfig) {
- var indentUnit = config.indentUnit,
- statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
- keywords = parserConfig.keywords || {},
- builtin = parserConfig.builtin || {},
- blockKeywords = parserConfig.blockKeywords || {},
- atoms = parserConfig.atoms || {},
- hooks = parserConfig.hooks || {},
- multiLineStrings = parserConfig.multiLineStrings;
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (hooks[ch]) {
- var result = hooks[ch](stream, state);
- if (result !== false) return result;
- }
- if (ch == '"' || ch == "'" || ch == "`") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("+")) {
- state.tokenize = tokenComment;
- return tokenNestedComment(stream, state);
- }
- if (stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
- var cur = stream.current();
- if (keywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- }
- if (builtin.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "builtin";
- }
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !(escaped || multiLineStrings))
- state.tokenize = null;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function tokenNestedComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "+");
- }
- return "comment";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- var indent = state.indented;
- if (state.context && state.context.type == "statement")
- indent = state.context.indented;
- return state.context = new Context(indent, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: null,
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- if (ctx.align == null) ctx.align = true;
-
- if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state);
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement"))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass;
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
- if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit);
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}"
- };
-});
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- var blockKeywords = "body catch class do else enum for foreach foreach_reverse if in interface mixin " +
- "out scope struct switch try union unittest version while with";
-
- CodeMirror.defineMIME("text/x-d", {
- name: "d",
- keywords: words("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue " +
- "debug default delegate delete deprecated export extern final finally function goto immutable " +
- "import inout invariant is lazy macro module new nothrow override package pragma private " +
- "protected public pure ref return shared short static super synchronized template this " +
- "throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " +
- blockKeywords),
- blockKeywords: words(blockKeywords),
- builtin: words("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte " +
- "ucent uint ulong ushort wchar wstring void size_t sizediff_t"),
- atoms: words("exit failure success true false null"),
- hooks: {
- "@": function(stream, _state) {
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- }
- }
- });
-
-});
diff --git a/public/js/lib/codemirror/mode/d/index.html b/public/js/lib/codemirror/mode/d/index.html
deleted file mode 100644
index 08cabd8a2e..0000000000
--- a/public/js/lib/codemirror/mode/d/index.html
+++ /dev/null
@@ -1,273 +0,0 @@
-
-
-CodeMirror: D mode
-
-
-
-
-
-
-
-
-
-
-
-D mode
-
-/* D demo code // copied from phobos/sd/metastrings.d */
-// Written in the D programming language.
-
-/**
-Templates with which to do compile-time manipulation of strings.
-
-Macros:
- WIKI = Phobos/StdMetastrings
-
-Copyright: Copyright Digital Mars 2007 - 2009.
-License: Boost License 1.0 .
-Authors: $(WEB digitalmars.com, Walter Bright),
- Don Clugston
-Source: $(PHOBOSSRC std/_metastrings.d)
-*/
-/*
- Copyright Digital Mars 2007 - 2009.
-Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
- */
-module std.metastrings;
-
-/**
-Formats constants into a string at compile time. Analogous to $(XREF
-string,format).
-
-Parameters:
-
-A = tuple of constants, which can be strings, characters, or integral
- values.
-
-Formats:
- * The formats supported are %s for strings, and %%
- * for the % character.
-Example:
----
-import std.metastrings;
-import std.stdio;
-
-void main()
-{
- string s = Format!("Arg %s = %s", "foo", 27);
- writefln(s); // "Arg foo = 27"
-}
- * ---
- */
-
-template Format(A...)
-{
- static if (A.length == 0)
- enum Format = "";
- else static if (is(typeof(A[0]) : const(char)[]))
- enum Format = FormatString!(A[0], A[1..$]);
- else
- enum Format = toStringNow!(A[0]) ~ Format!(A[1..$]);
-}
-
-template FormatString(const(char)[] F, A...)
-{
- static if (F.length == 0)
- enum FormatString = Format!(A);
- else static if (F.length == 1)
- enum FormatString = F[0] ~ Format!(A);
- else static if (F[0..2] == "%s")
- enum FormatString
- = toStringNow!(A[0]) ~ FormatString!(F[2..$],A[1..$]);
- else static if (F[0..2] == "%%")
- enum FormatString = "%" ~ FormatString!(F[2..$],A);
- else
- {
- static assert(F[0] != '%', "unrecognized format %" ~ F[1]);
- enum FormatString = F[0] ~ FormatString!(F[1..$],A);
- }
-}
-
-unittest
-{
- auto s = Format!("hel%slo", "world", -138, 'c', true);
- assert(s == "helworldlo-138ctrue", "[" ~ s ~ "]");
-}
-
-/**
- * Convert constant argument to a string.
- */
-
-template toStringNow(ulong v)
-{
- static if (v < 10)
- enum toStringNow = "" ~ cast(char)(v + '0');
- else
- enum toStringNow = toStringNow!(v / 10) ~ toStringNow!(v % 10);
-}
-
-unittest
-{
- static assert(toStringNow!(1uL << 62) == "4611686018427387904");
-}
-
-/// ditto
-template toStringNow(long v)
-{
- static if (v < 0)
- enum toStringNow = "-" ~ toStringNow!(cast(ulong) -v);
- else
- enum toStringNow = toStringNow!(cast(ulong) v);
-}
-
-unittest
-{
- static assert(toStringNow!(0x100000000) == "4294967296");
- static assert(toStringNow!(-138L) == "-138");
-}
-
-/// ditto
-template toStringNow(uint U)
-{
- enum toStringNow = toStringNow!(cast(ulong)U);
-}
-
-/// ditto
-template toStringNow(int I)
-{
- enum toStringNow = toStringNow!(cast(long)I);
-}
-
-/// ditto
-template toStringNow(bool B)
-{
- enum toStringNow = B ? "true" : "false";
-}
-
-/// ditto
-template toStringNow(string S)
-{
- enum toStringNow = S;
-}
-
-/// ditto
-template toStringNow(char C)
-{
- enum toStringNow = "" ~ C;
-}
-
-
-/********
- * Parse unsigned integer literal from the start of string s.
- * returns:
- * .value = the integer literal as a string,
- * .rest = the string following the integer literal
- * Otherwise:
- * .value = null,
- * .rest = s
- */
-
-template parseUinteger(const(char)[] s)
-{
- static if (s.length == 0)
- {
- enum value = "";
- enum rest = "";
- }
- else static if (s[0] >= '0' && s[0] <= '9')
- {
- enum value = s[0] ~ parseUinteger!(s[1..$]).value;
- enum rest = parseUinteger!(s[1..$]).rest;
- }
- else
- {
- enum value = "";
- enum rest = s;
- }
-}
-
-/********
-Parse integer literal optionally preceded by $(D '-') from the start
-of string $(D s).
-
-Returns:
- .value = the integer literal as a string,
- .rest = the string following the integer literal
-
-Otherwise:
- .value = null,
- .rest = s
-*/
-
-template parseInteger(const(char)[] s)
-{
- static if (s.length == 0)
- {
- enum value = "";
- enum rest = "";
- }
- else static if (s[0] >= '0' && s[0] <= '9')
- {
- enum value = s[0] ~ parseUinteger!(s[1..$]).value;
- enum rest = parseUinteger!(s[1..$]).rest;
- }
- else static if (s.length >= 2 &&
- s[0] == '-' && s[1] >= '0' && s[1] <= '9')
- {
- enum value = s[0..2] ~ parseUinteger!(s[2..$]).value;
- enum rest = parseUinteger!(s[2..$]).rest;
- }
- else
- {
- enum value = "";
- enum rest = s;
- }
-}
-
-unittest
-{
- assert(parseUinteger!("1234abc").value == "1234");
- assert(parseUinteger!("1234abc").rest == "abc");
- assert(parseInteger!("-1234abc").value == "-1234");
- assert(parseInteger!("-1234abc").rest == "abc");
-}
-
-/**
-Deprecated aliases held for backward compatibility.
-*/
-deprecated alias toStringNow ToString;
-/// Ditto
-deprecated alias parseUinteger ParseUinteger;
-/// Ditto
-deprecated alias parseUinteger ParseInteger;
-
-
-
-
-
- Simple mode that handle D-Syntax (DLang Homepage ).
-
- MIME types defined: text/x-d
- .
-
diff --git a/public/js/lib/codemirror/mode/dart/dart.js b/public/js/lib/codemirror/mode/dart/dart.js
deleted file mode 100644
index a49e218c3b..0000000000
--- a/public/js/lib/codemirror/mode/dart/dart.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../clike/clike"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../clike/clike"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- var keywords = ("this super static final const abstract class extends external factory " +
- "implements get native operator set typedef with enum throw rethrow " +
- "assert break case continue default in return new deferred async await " +
- "try catch finally do else for if switch while import library export " +
- "part of show hide is").split(" ");
- var blockKeywords = "try catch finally do else for if switch while".split(" ");
- var atoms = "true false null".split(" ");
- var builtins = "void bool num int double dynamic var String".split(" ");
-
- function set(words) {
- var obj = {};
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- CodeMirror.defineMIME("application/dart", {
- name: "clike",
- keywords: set(keywords),
- multiLineStrings: true,
- blockKeywords: set(blockKeywords),
- builtin: set(builtins),
- atoms: set(atoms),
- hooks: {
- "@": function(stream) {
- stream.eatWhile(/[\w\$_]/);
- return "meta";
- }
- }
- });
-
- CodeMirror.registerHelper("hintWords", "application/dart", keywords.concat(atoms).concat(builtins));
-
- // This is needed to make loading through meta.js work.
- CodeMirror.defineMode("dart", function(conf) {
- return CodeMirror.getMode(conf, "application/dart");
- }, "clike");
-});
diff --git a/public/js/lib/codemirror/mode/dart/index.html b/public/js/lib/codemirror/mode/dart/index.html
deleted file mode 100644
index e79da5a8b0..0000000000
--- a/public/js/lib/codemirror/mode/dart/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-CodeMirror: Dart mode
-
-
-
-
-
-
-
-
-
-
-Dart mode
-
-
-import 'dart:math' show Random;
-
-void main() {
- print(new Die(n: 12).roll());
-}
-
-// Define a class.
-class Die {
- // Define a class variable.
- static Random shaker = new Random();
-
- // Define instance variables.
- int sides, value;
-
- // Define a method using shorthand syntax.
- String toString() => '$value';
-
- // Define a constructor.
- Die({int n: 6}) {
- if (4 <= n && n <= 20) {
- sides = n;
- } else {
- // Support for errors and exceptions.
- throw new ArgumentError(/* */);
- }
- }
-
- // Define an instance method.
- int roll() {
- return value = shaker.nextInt(sides) + 1;
- }
-}
-
-
-
-
-
-
diff --git a/public/js/lib/codemirror/mode/diff/diff.js b/public/js/lib/codemirror/mode/diff/diff.js
deleted file mode 100644
index fe0305e7b6..0000000000
--- a/public/js/lib/codemirror/mode/diff/diff.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("diff", function() {
-
- var TOKEN_NAMES = {
- '+': 'positive',
- '-': 'negative',
- '@': 'meta'
- };
-
- return {
- token: function(stream) {
- var tw_pos = stream.string.search(/[\t ]+?$/);
-
- if (!stream.sol() || tw_pos === 0) {
- stream.skipToEnd();
- return ("error " + (
- TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, '');
- }
-
- var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd();
-
- if (tw_pos === -1) {
- stream.skipToEnd();
- } else {
- stream.pos = tw_pos;
- }
-
- return token_name;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-diff", "diff");
-
-});
diff --git a/public/js/lib/codemirror/mode/diff/index.html b/public/js/lib/codemirror/mode/diff/index.html
deleted file mode 100644
index 0af611fa48..0000000000
--- a/public/js/lib/codemirror/mode/diff/index.html
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-CodeMirror: Diff mode
-
-
-
-
-
-
-
-
-
-
-Diff mode
-
-diff --git a/index.html b/index.html
-index c1d9156..7764744 100644
---- a/index.html
-+++ b/index.html
-@@ -95,7 +95,8 @@ StringStream.prototype = {
-
-
-diff --git a/lib/codemirror.js b/lib/codemirror.js
-index 04646a9..9a39cc7 100644
---- a/lib/codemirror.js
-+++ b/lib/codemirror.js
-@@ -399,10 +399,16 @@ var CodeMirror = (function() {
- }
-
- function onMouseDown(e) {
-- var start = posFromMouse(e), last = start;
-+ var start = posFromMouse(e), last = start, target = e.target();
- if (!start) return;
- setCursor(start.line, start.ch, false);
- if (e.button() != 1) return;
-+ if (target.parentNode == gutter) {
-+ if (options.onGutterClick)
-+ options.onGutterClick(indexOf(gutter.childNodes, target) + showingFrom);
-+ return;
-+ }
-+
- if (!focused) onFocus();
-
- e.stop();
-@@ -808,7 +814,7 @@ var CodeMirror = (function() {
- for (var i = showingFrom; i < showingTo; ++i) {
- var marker = lines[i].gutterMarker;
- if (marker) html.push('' + htmlEscape(marker.text) + '
');
-- else html.push("" + (options.lineNumbers ? i + 1 : "\u00a0") + "
");
-+ else html.push("" + (options.lineNumbers ? i + options.firstLineNumber : "\u00a0") + "
");
- }
- gutter.style.display = "none"; // TODO test whether this actually helps
- gutter.innerHTML = html.join("");
-@@ -1371,10 +1377,8 @@ var CodeMirror = (function() {
- if (option == "parser") setParser(value);
- else if (option === "lineNumbers") setLineNumbers(value);
- else if (option === "gutter") setGutter(value);
-- else if (option === "readOnly") options.readOnly = value;
-- else if (option === "indentUnit") {options.indentUnit = indentUnit = value; setParser(options.parser);}
-- else if (/^(?:enterMode|tabMode|indentWithTabs|readOnly|autoMatchBrackets|undoDepth)$/.test(option)) options[option] = value;
-- else throw new Error("Can't set option " + option);
-+ else if (option === "indentUnit") {options.indentUnit = value; setParser(options.parser);}
-+ else options[option] = value;
- },
- cursorCoords: cursorCoords,
- undo: operation(undo),
-@@ -1402,7 +1406,8 @@ var CodeMirror = (function() {
- replaceRange: operation(replaceRange),
-
- operation: function(f){return operation(f)();},
-- refresh: function(){updateDisplay([{from: 0, to: lines.length}]);}
-+ refresh: function(){updateDisplay([{from: 0, to: lines.length}]);},
-+ getInputField: function(){return input;}
- };
- return instance;
- }
-@@ -1420,6 +1425,7 @@ var CodeMirror = (function() {
- readOnly: false,
- onChange: null,
- onCursorActivity: null,
-+ onGutterClick: null,
- autoMatchBrackets: false,
- workTime: 200,
- workDelay: 300,
-
-
-
- MIME types defined: text/x-diff
.
-
-
diff --git a/public/js/lib/codemirror/mode/django/django.js b/public/js/lib/codemirror/mode/django/django.js
deleted file mode 100644
index d70b2fe948..0000000000
--- a/public/js/lib/codemirror/mode/django/django.js
+++ /dev/null
@@ -1,67 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"),
- require("../../addon/mode/overlay"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../htmlmixed/htmlmixed",
- "../../addon/mode/overlay"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode("django:inner", function() {
- var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false",
- "loop", "none", "self", "super", "if", "endif", "as", "not", "and",
- "else", "import", "with", "endwith", "without", "context", "ifequal", "endifequal",
- "ifnotequal", "endifnotequal", "extends", "include", "load", "length", "comment",
- "endcomment", "empty"];
- keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b");
-
- function tokenBase (stream, state) {
- stream.eatWhile(/[^\{]/);
- var ch = stream.next();
- if (ch == "{") {
- if (ch = stream.eat(/\{|%|#/)) {
- state.tokenize = inTag(ch);
- return "tag";
- }
- }
- }
- function inTag (close) {
- if (close == "{") {
- close = "}";
- }
- return function (stream, state) {
- var ch = stream.next();
- if ((ch == close) && stream.eat("}")) {
- state.tokenize = tokenBase;
- return "tag";
- }
- if (stream.match(keywords)) {
- return "keyword";
- }
- return close == "#" ? "comment" : "string";
- };
- }
- return {
- startState: function () {
- return {tokenize: tokenBase};
- },
- token: function (stream, state) {
- return state.tokenize(stream, state);
- }
- };
- });
-
- CodeMirror.defineMode("django", function(config) {
- var htmlBase = CodeMirror.getMode(config, "text/html");
- var djangoInner = CodeMirror.getMode(config, "django:inner");
- return CodeMirror.overlayMode(htmlBase, djangoInner);
- });
-
- CodeMirror.defineMIME("text/x-django", "django");
-});
diff --git a/public/js/lib/codemirror/mode/django/index.html b/public/js/lib/codemirror/mode/django/index.html
deleted file mode 100644
index 79d9a6a04b..0000000000
--- a/public/js/lib/codemirror/mode/django/index.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-CodeMirror: Django template mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-Django template mode
-
-
-
-
- My Django web application
-
-
-
- {{ page.title }}
-
-
- {% for item in items %}
- {% item.name %}
- {% empty %}
- You have no items in your list.
- {% endfor %}
-
-
-
-
-
-
-
- Mode for HTML with embedded Django template markup.
-
- MIME types defined: text/x-django
-
diff --git a/public/js/lib/codemirror/mode/dockerfile/dockerfile.js b/public/js/lib/codemirror/mode/dockerfile/dockerfile.js
deleted file mode 100644
index 6d51775067..0000000000
--- a/public/js/lib/codemirror/mode/dockerfile/dockerfile.js
+++ /dev/null
@@ -1,76 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../../addon/mode/simple"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../../addon/mode/simple"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- // Collect all Dockerfile directives
- var instructions = ["from", "maintainer", "run", "cmd", "expose", "env",
- "add", "copy", "entrypoint", "volume", "user",
- "workdir", "onbuild"],
- instructionRegex = "(" + instructions.join('|') + ")",
- instructionOnlyLine = new RegExp(instructionRegex + "\\s*$", "i"),
- instructionWithArguments = new RegExp(instructionRegex + "(\\s+)", "i");
-
- CodeMirror.defineSimpleMode("dockerfile", {
- start: [
- // Block comment: This is a line starting with a comment
- {
- regex: /#.*$/,
- token: "comment"
- },
- // Highlight an instruction without any arguments (for convenience)
- {
- regex: instructionOnlyLine,
- token: "variable-2"
- },
- // Highlight an instruction followed by arguments
- {
- regex: instructionWithArguments,
- token: ["variable-2", null],
- next: "arguments"
- },
- {
- regex: /./,
- token: null
- }
- ],
- arguments: [
- {
- // Line comment without instruction arguments is an error
- regex: /#.*$/,
- token: "error",
- next: "start"
- },
- {
- regex: /[^#]+\\$/,
- token: null
- },
- {
- // Match everything except for the inline comment
- regex: /[^#]+/,
- token: null,
- next: "start"
- },
- {
- regex: /$/,
- token: null,
- next: "start"
- },
- // Fail safe return to start
- {
- token: null,
- next: "start"
- }
- ]
- });
-
- CodeMirror.defineMIME("text/x-dockerfile", "dockerfile");
-});
diff --git a/public/js/lib/codemirror/mode/dockerfile/index.html b/public/js/lib/codemirror/mode/dockerfile/index.html
deleted file mode 100644
index a31759bce1..0000000000
--- a/public/js/lib/codemirror/mode/dockerfile/index.html
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-CodeMirror: Dockerfile mode
-
-
-
-
-
-
-
-
-
-
-
-Dockerfile mode
-# Install Ghost blogging platform and run development environment
-#
-# VERSION 1.0.0
-
-FROM ubuntu:12.10
-MAINTAINER Amer Grgic "amer@livebyt.es"
-WORKDIR /data/ghost
-
-# Install dependencies for nginx installation
-RUN apt-get update
-RUN apt-get install -y python g++ make software-properties-common --force-yes
-RUN add-apt-repository ppa:chris-lea/node.js
-RUN apt-get update
-# Install unzip
-RUN apt-get install -y unzip
-# Install curl
-RUN apt-get install -y curl
-# Install nodejs & npm
-RUN apt-get install -y rlwrap
-RUN apt-get install -y nodejs
-# Download Ghost v0.4.1
-RUN curl -L https://ghost.org/zip/ghost-latest.zip -o /tmp/ghost.zip
-# Unzip Ghost zip to /data/ghost
-RUN unzip -uo /tmp/ghost.zip -d /data/ghost
-# Add custom config js to /data/ghost
-ADD ./config.example.js /data/ghost/config.js
-# Install Ghost with NPM
-RUN cd /data/ghost/ && npm install --production
-# Expose port 2368
-EXPOSE 2368
-# Run Ghost
-CMD ["npm","start"]
-
-
-
-
- Dockerfile syntax highlighting for CodeMirror. Depends on
- the simplemode addon.
-
- MIME types defined: text/x-dockerfile
-
diff --git a/public/js/lib/codemirror/mode/dtd/dtd.js b/public/js/lib/codemirror/mode/dtd/dtd.js
deleted file mode 100644
index f37029a77d..0000000000
--- a/public/js/lib/codemirror/mode/dtd/dtd.js
+++ /dev/null
@@ -1,142 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/*
- DTD mode
- Ported to CodeMirror by Peter Kroon
- Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
- GitHub: @peterkroon
-*/
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("dtd", function(config) {
- var indentUnit = config.indentUnit, type;
- function ret(style, tp) {type = tp; return style;}
-
- function tokenBase(stream, state) {
- var ch = stream.next();
-
- if (ch == "<" && stream.eat("!") ) {
- if (stream.eatWhile(/[\-]/)) {
- state.tokenize = tokenSGMLComment;
- return tokenSGMLComment(stream, state);
- } else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent");
- } else if (ch == "<" && stream.eat("?")) { //xml declaration
- state.tokenize = inBlock("meta", "?>");
- return ret("meta", ch);
- } else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag");
- else if (ch == "|") return ret("keyword", "seperator");
- else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else
- else if (ch.match(/[\[\]]/)) return ret("rule", ch);
- else if (ch == "\"" || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- } else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) {
- var sc = stream.current();
- if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1);
- return ret("tag", "tag");
- } else if (ch == "%" || ch == "*" ) return ret("number", "number");
- else {
- stream.eatWhile(/[\w\\\-_%.{,]/);
- return ret(null, null);
- }
- }
-
- function tokenSGMLComment(stream, state) {
- var dashes = 0, ch;
- while ((ch = stream.next()) != null) {
- if (dashes >= 2 && ch == ">") {
- state.tokenize = tokenBase;
- break;
- }
- dashes = (ch == "-") ? dashes + 1 : 0;
- }
- return ret("comment", "comment");
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == quote && !escaped) {
- state.tokenize = tokenBase;
- break;
- }
- escaped = !escaped && ch == "\\";
- }
- return ret("string", "tag");
- };
- }
-
- function inBlock(style, terminator) {
- return function(stream, state) {
- while (!stream.eol()) {
- if (stream.match(terminator)) {
- state.tokenize = tokenBase;
- break;
- }
- stream.next();
- }
- return style;
- };
- }
-
- return {
- startState: function(base) {
- return {tokenize: tokenBase,
- baseIndent: base || 0,
- stack: []};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- var style = state.tokenize(stream, state);
-
- var context = state.stack[state.stack.length-1];
- if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule");
- else if (type === "endtag") state.stack[state.stack.length-1] = "endtag";
- else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop();
- else if (type == "[") state.stack.push("[");
- return style;
- },
-
- indent: function(state, textAfter) {
- var n = state.stack.length;
-
- if( textAfter.match(/\]\s+|\]/) )n=n-1;
- else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){
- if(textAfter.substr(0,1) === "<")n;
- else if( type == "doindent" && textAfter.length > 1 )n;
- else if( type == "doindent")n--;
- else if( type == ">" && textAfter.length > 1)n;
- else if( type == "tag" && textAfter !== ">")n;
- else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--;
- else if( type == "tag")n++;
- else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--;
- else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule")n;
- else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1;
- else if( textAfter === ">")n;
- else n=n-1;
- //over rule them all
- if(type == null || type == "]")n--;
- }
-
- return state.baseIndent + n * indentUnit;
- },
-
- electricChars: "]>"
- };
-});
-
-CodeMirror.defineMIME("application/xml-dtd", "dtd");
-
-});
diff --git a/public/js/lib/codemirror/mode/dtd/index.html b/public/js/lib/codemirror/mode/dtd/index.html
deleted file mode 100644
index e6798a748a..0000000000
--- a/public/js/lib/codemirror/mode/dtd/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-CodeMirror: DTD mode
-
-
-
-
-
-
-
-
-
-
-DTD mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ]
->
-
-
-
-
-
-
- MIME types defined: application/xml-dtd
.
-
diff --git a/public/js/lib/codemirror/mode/dylan/dylan.js b/public/js/lib/codemirror/mode/dylan/dylan.js
deleted file mode 100644
index be2986adb5..0000000000
--- a/public/js/lib/codemirror/mode/dylan/dylan.js
+++ /dev/null
@@ -1,299 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("dylan", function(_config) {
- // Words
- var words = {
- // Words that introduce unnamed definitions like "define interface"
- unnamedDefinition: ["interface"],
-
- // Words that introduce simple named definitions like "define library"
- namedDefinition: ["module", "library", "macro",
- "C-struct", "C-union",
- "C-function", "C-callable-wrapper"
- ],
-
- // Words that introduce type definitions like "define class".
- // These are also parameterized like "define method" and are
- // appended to otherParameterizedDefinitionWords
- typeParameterizedDefinition: ["class", "C-subtype", "C-mapped-subtype"],
-
- // Words that introduce trickier definitions like "define method".
- // These require special definitions to be added to startExpressions
- otherParameterizedDefinition: ["method", "function",
- "C-variable", "C-address"
- ],
-
- // Words that introduce module constant definitions.
- // These must also be simple definitions and are
- // appended to otherSimpleDefinitionWords
- constantSimpleDefinition: ["constant"],
-
- // Words that introduce module variable definitions.
- // These must also be simple definitions and are
- // appended to otherSimpleDefinitionWords
- variableSimpleDefinition: ["variable"],
-
- // Other words that introduce simple definitions
- // (without implicit bodies).
- otherSimpleDefinition: ["generic", "domain",
- "C-pointer-type",
- "table"
- ],
-
- // Words that begin statements with implicit bodies.
- statement: ["if", "block", "begin", "method", "case",
- "for", "select", "when", "unless", "until",
- "while", "iterate", "profiling", "dynamic-bind"
- ],
-
- // Patterns that act as separators in compound statements.
- // This may include any general pattern that must be indented
- // specially.
- separator: ["finally", "exception", "cleanup", "else",
- "elseif", "afterwards"
- ],
-
- // Keywords that do not require special indentation handling,
- // but which should be highlighted
- other: ["above", "below", "by", "from", "handler", "in",
- "instance", "let", "local", "otherwise", "slot",
- "subclass", "then", "to", "keyed-by", "virtual"
- ],
-
- // Condition signaling function calls
- signalingCalls: ["signal", "error", "cerror",
- "break", "check-type", "abort"
- ]
- };
-
- words["otherDefinition"] =
- words["unnamedDefinition"]
- .concat(words["namedDefinition"])
- .concat(words["otherParameterizedDefinition"]);
-
- words["definition"] =
- words["typeParameterizedDefinition"]
- .concat(words["otherDefinition"]);
-
- words["parameterizedDefinition"] =
- words["typeParameterizedDefinition"]
- .concat(words["otherParameterizedDefinition"]);
-
- words["simpleDefinition"] =
- words["constantSimpleDefinition"]
- .concat(words["variableSimpleDefinition"])
- .concat(words["otherSimpleDefinition"]);
-
- words["keyword"] =
- words["statement"]
- .concat(words["separator"])
- .concat(words["other"]);
-
- // Patterns
- var symbolPattern = "[-_a-zA-Z?!*@<>$%]+";
- var symbol = new RegExp("^" + symbolPattern);
- var patterns = {
- // Symbols with special syntax
- symbolKeyword: symbolPattern + ":",
- symbolClass: "<" + symbolPattern + ">",
- symbolGlobal: "\\*" + symbolPattern + "\\*",
- symbolConstant: "\\$" + symbolPattern
- };
- var patternStyles = {
- symbolKeyword: "atom",
- symbolClass: "tag",
- symbolGlobal: "variable-2",
- symbolConstant: "variable-3"
- };
-
- // Compile all patterns to regular expressions
- for (var patternName in patterns)
- if (patterns.hasOwnProperty(patternName))
- patterns[patternName] = new RegExp("^" + patterns[patternName]);
-
- // Names beginning "with-" and "without-" are commonly
- // used as statement macro
- patterns["keyword"] = [/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];
-
- var styles = {};
- styles["keyword"] = "keyword";
- styles["definition"] = "def";
- styles["simpleDefinition"] = "def";
- styles["signalingCalls"] = "builtin";
-
- // protected words lookup table
- var wordLookup = {};
- var styleLookup = {};
-
- [
- "keyword",
- "definition",
- "simpleDefinition",
- "signalingCalls"
- ].forEach(function(type) {
- words[type].forEach(function(word) {
- wordLookup[word] = type;
- styleLookup[word] = styles[type];
- });
- });
-
-
- function chain(stream, state, f) {
- state.tokenize = f;
- return f(stream, state);
- }
-
- var type, content;
-
- function ret(_type, style, _content) {
- type = _type;
- content = _content;
- return style;
- }
-
- function tokenBase(stream, state) {
- // String
- var ch = stream.peek();
- if (ch == "'" || ch == '"') {
- stream.next();
- return chain(stream, state, tokenString(ch, "string", "string"));
- }
- // Comment
- else if (ch == "/") {
- stream.next();
- if (stream.eat("*")) {
- return chain(stream, state, tokenComment);
- } else if (stream.eat("/")) {
- stream.skipToEnd();
- return ret("comment", "comment");
- } else {
- stream.skipTo(" ");
- return ret("operator", "operator");
- }
- }
- // Decimal
- else if (/\d/.test(ch)) {
- stream.match(/^\d*(?:\.\d*)?(?:e[+\-]?\d+)?/);
- return ret("number", "number");
- }
- // Hash
- else if (ch == "#") {
- stream.next();
- // Symbol with string syntax
- ch = stream.peek();
- if (ch == '"') {
- stream.next();
- return chain(stream, state, tokenString('"', "symbol", "string-2"));
- }
- // Binary number
- else if (ch == "b") {
- stream.next();
- stream.eatWhile(/[01]/);
- return ret("number", "number");
- }
- // Hex number
- else if (ch == "x") {
- stream.next();
- stream.eatWhile(/[\da-f]/i);
- return ret("number", "number");
- }
- // Octal number
- else if (ch == "o") {
- stream.next();
- stream.eatWhile(/[0-7]/);
- return ret("number", "number");
- }
- // Hash symbol
- else {
- stream.eatWhile(/[-a-zA-Z]/);
- return ret("hash", "keyword");
- }
- } else if (stream.match("end")) {
- return ret("end", "keyword");
- }
- for (var name in patterns) {
- if (patterns.hasOwnProperty(name)) {
- var pattern = patterns[name];
- if ((pattern instanceof Array && pattern.some(function(p) {
- return stream.match(p);
- })) || stream.match(pattern))
- return ret(name, patternStyles[name], stream.current());
- }
- }
- if (stream.match("define")) {
- return ret("definition", "def");
- } else {
- stream.eatWhile(/[\w\-]/);
- // Keyword
- if (wordLookup[stream.current()]) {
- return ret(wordLookup[stream.current()], styleLookup[stream.current()], stream.current());
- } else if (stream.current().match(symbol)) {
- return ret("variable", "variable");
- } else {
- stream.next();
- return ret("other", "variable-2");
- }
- }
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false,
- ch;
- while ((ch = stream.next())) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return ret("comment", "comment");
- }
-
- function tokenString(quote, type, style) {
- return function(stream, state) {
- var next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote) {
- end = true;
- break;
- }
- }
- if (end)
- state.tokenize = tokenBase;
- return ret(type, style);
- };
- }
-
- // Interface
- return {
- startState: function() {
- return {
- tokenize: tokenBase,
- currentIndent: 0
- };
- },
- token: function(stream, state) {
- if (stream.eatSpace())
- return null;
- var style = state.tokenize(stream, state);
- return style;
- },
- blockCommentStart: "/*",
- blockCommentEnd: "*/"
- };
-});
-
-CodeMirror.defineMIME("text/x-dylan", "dylan");
-
-});
diff --git a/public/js/lib/codemirror/mode/dylan/index.html b/public/js/lib/codemirror/mode/dylan/index.html
deleted file mode 100644
index ddf5ad067d..0000000000
--- a/public/js/lib/codemirror/mode/dylan/index.html
+++ /dev/null
@@ -1,407 +0,0 @@
-
-
-CodeMirror: Dylan mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-Dylan mode
-
-
-
-Module: locators-internals
-Synopsis: Abstract modeling of locations
-Author: Andy Armstrong
-Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc.
- All rights reserved.
-License: See License.txt in this distribution for details.
-Warranty: Distributed WITHOUT WARRANTY OF ANY KIND
-
-define open generic locator-server
- (locator :: ) => (server :: false-or());
-define open generic locator-host
- (locator :: ) => (host :: false-or());
-define open generic locator-volume
- (locator :: ) => (volume :: false-or());
-define open generic locator-directory
- (locator :: ) => (directory :: false-or());
-define open generic locator-relative?
- (locator :: ) => (relative? :: );
-define open generic locator-path
- (locator :: ) => (path :: );
-define open generic locator-base
- (locator :: ) => (base :: false-or());
-define open generic locator-extension
- (locator :: ) => (extension :: false-or());
-
-/// Locator classes
-
-define open abstract class ()
-end class ;
-
-define open abstract class ()
-end class ;
-
-define method as
- (class == , string :: )
- => (locator :: )
- as(, string)
-end method as;
-
-define method make
- (class == ,
- #key server :: false-or() = #f,
- path :: = #[],
- relative? :: = #f,
- name :: false-or() = #f)
- => (locator :: )
- make(,
- server: server,
- path: path,
- relative?: relative?,
- name: name)
-end method make;
-
-define method as
- (class == , string :: )
- => (locator :: )
- as(, string)
-end method as;
-
-define method make
- (class == ,
- #key directory :: false-or() = #f,
- base :: false-or() = #f,
- extension :: false-or() = #f,
- name :: false-or() = #f)
- => (locator :: )
- make(,
- directory: directory,
- base: base,
- extension: extension,
- name: name)
-end method make;
-
-/// Locator coercion
-
-//---*** andrewa: This caching scheme doesn't work yet, so disable it.
-define constant $cache-locators? = #f;
-define constant $cache-locator-strings? = #f;
-
-define constant $locator-to-string-cache = make(, weak: #"key");
-define constant $string-to-locator-cache = make(, weak: #"value");
-
-define open generic locator-as-string
- (class :: subclass(), locator :: )
- => (string :: );
-
-define open generic string-as-locator
- (class :: subclass(), string :: )
- => (locator :: );
-
-define sealed sideways method as
- (class :: subclass(), locator :: )
- => (string :: )
- let string = element($locator-to-string-cache, locator, default: #f);
- if (string)
- as(class, string)
- else
- let string = locator-as-string(class, locator);
- if ($cache-locator-strings?)
- element($locator-to-string-cache, locator) := string;
- else
- string
- end
- end
-end method as;
-
-define sealed sideways method as
- (class :: subclass(), string :: )
- => (locator :: )
- let locator = element($string-to-locator-cache, string, default: #f);
- if (instance?(locator, class))
- locator
- else
- let locator = string-as-locator(class, string);
- if ($cache-locators?)
- element($string-to-locator-cache, string) := locator;
- else
- locator
- end
- end
-end method as;
-
-/// Locator conditions
-
-define class (, )
-end class ;
-
-define function locator-error
- (format-string :: , #rest format-arguments)
- error(make(,
- format-string: format-string,
- format-arguments: format-arguments))
-end function locator-error;
-
-/// Useful locator protocols
-
-define open generic locator-test
- (locator :: ) => (test :: );
-
-define method locator-test
- (locator :: ) => (test :: )
- \=
-end method locator-test;
-
-define open generic locator-might-have-links?
- (locator :: ) => (links? :: );
-
-define method locator-might-have-links?
- (locator :: ) => (links? :: singleton(#f))
- #f
-end method locator-might-have-links?;
-
-define method locator-relative?
- (locator :: ) => (relative? :: )
- let directory = locator.locator-directory;
- ~directory | directory.locator-relative?
-end method locator-relative?;
-
-define method current-directory-locator?
- (locator :: ) => (current-directory? :: )
- locator.locator-relative?
- & locator.locator-path = #[#"self"]
-end method current-directory-locator?;
-
-define method locator-directory
- (locator :: ) => (parent :: false-or())
- let path = locator.locator-path;
- unless (empty?(path))
- make(object-class(locator),
- server: locator.locator-server,
- path: copy-sequence(path, end: path.size - 1),
- relative?: locator.locator-relative?)
- end
-end method locator-directory;
-
-/// Simplify locator
-
-define open generic simplify-locator
- (locator :: )
- => (simplified-locator :: );
-
-define method simplify-locator
- (locator :: )
- => (simplified-locator :: )
- let path = locator.locator-path;
- let relative? = locator.locator-relative?;
- let resolve-parent? = ~locator.locator-might-have-links?;
- let simplified-path
- = simplify-path(path,
- resolve-parent?: resolve-parent?,
- relative?: relative?);
- if (path ~= simplified-path)
- make(object-class(locator),
- server: locator.locator-server,
- path: simplified-path,
- relative?: locator.locator-relative?)
- else
- locator
- end
-end method simplify-locator;
-
-define method simplify-locator
- (locator :: ) => (simplified-locator :: )
- let directory = locator.locator-directory;
- let simplified-directory = directory & simplify-locator(directory);
- if (directory ~= simplified-directory)
- make(object-class(locator),
- directory: simplified-directory,
- base: locator.locator-base,
- extension: locator.locator-extension)
- else
- locator
- end
-end method simplify-locator;
-
-/// Subdirectory locator
-
-define open generic subdirectory-locator
- (locator :: , #rest sub-path)
- => (subdirectory :: );
-
-define method subdirectory-locator
- (locator :: , #rest sub-path)
- => (subdirectory :: )
- let old-path = locator.locator-path;
- let new-path = concatenate-as(, old-path, sub-path);
- make(object-class(locator),
- server: locator.locator-server,
- path: new-path,
- relative?: locator.locator-relative?)
-end method subdirectory-locator;
-
-/// Relative locator
-
-define open generic relative-locator
- (locator :: , from-locator :: )
- => (relative-locator :: );
-
-define method relative-locator
- (locator :: , from-locator :: )
- => (relative-locator :: )
- let path = locator.locator-path;
- let from-path = from-locator.locator-path;
- case
- ~locator.locator-relative? & from-locator.locator-relative? =>
- locator-error
- ("Cannot find relative path of absolute locator %= from relative locator %=",
- locator, from-locator);
- locator.locator-server ~= from-locator.locator-server =>
- locator;
- path = from-path =>
- make(object-class(locator),
- path: vector(#"self"),
- relative?: #t);
- otherwise =>
- make(object-class(locator),
- path: relative-path(path, from-path, test: locator.locator-test),
- relative?: #t);
- end
-end method relative-locator;
-
-define method relative-locator
- (locator :: , from-directory :: )
- => (relative-locator :: )
- let directory = locator.locator-directory;
- let relative-directory = directory & relative-locator(directory, from-directory);
- if (relative-directory ~= directory)
- simplify-locator
- (make(object-class(locator),
- directory: relative-directory,
- base: locator.locator-base,
- extension: locator.locator-extension))
- else
- locator
- end
-end method relative-locator;
-
-define method relative-locator
- (locator :: , from-locator :: )
- => (relative-locator :: )
- let from-directory = from-locator.locator-directory;
- case
- from-directory =>
- relative-locator(locator, from-directory);
- ~locator.locator-relative? =>
- locator-error
- ("Cannot find relative path of absolute locator %= from relative locator %=",
- locator, from-locator);
- otherwise =>
- locator;
- end
-end method relative-locator;
-
-/// Merge locators
-
-define open generic merge-locators
- (locator :: , from-locator :: )
- => (merged-locator :: );
-
-/// Merge locators
-
-define method merge-locators
- (locator :: , from-locator :: )
- => (merged-locator :: )
- if (locator.locator-relative?)
- let path = concatenate(from-locator.locator-path, locator.locator-path);
- simplify-locator
- (make(object-class(locator),
- server: from-locator.locator-server,
- path: path,
- relative?: from-locator.locator-relative?))
- else
- locator
- end
-end method merge-locators;
-
-define method merge-locators
- (locator :: , from-locator :: )
- => (merged-locator :: )
- let directory = locator.locator-directory;
- let merged-directory
- = if (directory)
- merge-locators(directory, from-locator)
- else
- simplify-locator(from-locator)
- end;
- if (merged-directory ~= directory)
- make(object-class(locator),
- directory: merged-directory,
- base: locator.locator-base,
- extension: locator.locator-extension)
- else
- locator
- end
-end method merge-locators;
-
-define method merge-locators
- (locator :: , from-locator :: )
- => (merged-locator :: )
- let from-directory = from-locator.locator-directory;
- if (from-directory)
- merge-locators(locator, from-directory)
- else
- locator
- end
-end method merge-locators;
-
-/// Locator protocols
-
-define sideways method supports-open-locator?
- (locator :: ) => (openable? :: )
- ~locator.locator-relative?
-end method supports-open-locator?;
-
-define sideways method open-locator
- (locator :: , #rest keywords, #key, #all-keys)
- => (stream :: )
- apply(open-file-stream, locator, keywords)
-end method open-locator;
-
-
-
-
- MIME types defined: text/x-dylan
.
-
diff --git a/public/js/lib/codemirror/mode/ebnf/ebnf.js b/public/js/lib/codemirror/mode/ebnf/ebnf.js
deleted file mode 100644
index 6b51aba07e..0000000000
--- a/public/js/lib/codemirror/mode/ebnf/ebnf.js
+++ /dev/null
@@ -1,195 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode("ebnf", function (config) {
- var commentType = {slash: 0, parenthesis: 1};
- var stateType = {comment: 0, _string: 1, characterClass: 2};
- var bracesMode = null;
-
- if (config.bracesMode)
- bracesMode = CodeMirror.getMode(config, config.bracesMode);
-
- return {
- startState: function () {
- return {
- stringType: null,
- commentType: null,
- braced: 0,
- lhs: true,
- localState: null,
- stack: [],
- inDefinition: false
- };
- },
- token: function (stream, state) {
- if (!stream) return;
-
- //check for state changes
- if (state.stack.length === 0) {
- //strings
- if ((stream.peek() == '"') || (stream.peek() == "'")) {
- state.stringType = stream.peek();
- stream.next(); // Skip quote
- state.stack.unshift(stateType._string);
- } else if (stream.match(/^\/\*/)) { //comments starting with /*
- state.stack.unshift(stateType.comment);
- state.commentType = commentType.slash;
- } else if (stream.match(/^\(\*/)) { //comments starting with (*
- state.stack.unshift(stateType.comment);
- state.commentType = commentType.parenthesis;
- }
- }
-
- //return state
- //stack has
- switch (state.stack[0]) {
- case stateType._string:
- while (state.stack[0] === stateType._string && !stream.eol()) {
- if (stream.peek() === state.stringType) {
- stream.next(); // Skip quote
- state.stack.shift(); // Clear flag
- } else if (stream.peek() === "\\") {
- stream.next();
- stream.next();
- } else {
- stream.match(/^.[^\\\"\']*/);
- }
- }
- return state.lhs ? "property string" : "string"; // Token style
-
- case stateType.comment:
- while (state.stack[0] === stateType.comment && !stream.eol()) {
- if (state.commentType === commentType.slash && stream.match(/\*\//)) {
- state.stack.shift(); // Clear flag
- state.commentType = null;
- } else if (state.commentType === commentType.parenthesis && stream.match(/\*\)/)) {
- state.stack.shift(); // Clear flag
- state.commentType = null;
- } else {
- stream.match(/^.[^\*]*/);
- }
- }
- return "comment";
-
- case stateType.characterClass:
- while (state.stack[0] === stateType.characterClass && !stream.eol()) {
- if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) {
- state.stack.shift();
- }
- }
- return "operator";
- }
-
- var peek = stream.peek();
-
- if (bracesMode !== null && (state.braced || peek === "{")) {
- if (state.localState === null)
- state.localState = bracesMode.startState();
-
- var token = bracesMode.token(stream, state.localState),
- text = stream.current();
-
- if (!token) {
- for (var i = 0; i < text.length; i++) {
- if (text[i] === "{") {
- if (state.braced === 0) {
- token = "matchingbracket";
- }
- state.braced++;
- } else if (text[i] === "}") {
- state.braced--;
- if (state.braced === 0) {
- token = "matchingbracket";
- }
- }
- }
- }
- return token;
- }
-
- //no stack
- switch (peek) {
- case "[":
- stream.next();
- state.stack.unshift(stateType.characterClass);
- return "bracket";
- case ":":
- case "|":
- case ";":
- stream.next();
- return "operator";
- case "%":
- if (stream.match("%%")) {
- return "header";
- } else if (stream.match(/[%][A-Za-z]+/)) {
- return "keyword";
- } else if (stream.match(/[%][}]/)) {
- return "matchingbracket";
- }
- break;
- case "/":
- if (stream.match(/[\/][A-Za-z]+/)) {
- return "keyword";
- }
- case "\\":
- if (stream.match(/[\][a-z]+/)) {
- return "string-2";
- }
- case ".":
- if (stream.match(".")) {
- return "atom";
- }
- case "*":
- case "-":
- case "+":
- case "^":
- if (stream.match(peek)) {
- return "atom";
- }
- case "$":
- if (stream.match("$$")) {
- return "builtin";
- } else if (stream.match(/[$][0-9]+/)) {
- return "variable-3";
- }
- case "<":
- if (stream.match(/<<[a-zA-Z_]+>>/)) {
- return "builtin";
- }
- }
-
- if (stream.match(/^\/\//)) {
- stream.skipToEnd();
- return "comment";
- } else if (stream.match(/return/)) {
- return "operator";
- } else if (stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)) {
- if (stream.match(/(?=[\(.])/)) {
- return "variable";
- } else if (stream.match(/(?=[\s\n]*[:=])/)) {
- return "def";
- }
- return "variable-2";
- } else if (["[", "]", "(", ")"].indexOf(stream.peek()) != -1) {
- stream.next();
- return "bracket";
- } else if (!stream.eatSpace()) {
- stream.next();
- }
- return null;
- }
- };
- });
-
- CodeMirror.defineMIME("text/x-ebnf", "ebnf");
-});
diff --git a/public/js/lib/codemirror/mode/ebnf/index.html b/public/js/lib/codemirror/mode/ebnf/index.html
deleted file mode 100644
index 13845629b3..0000000000
--- a/public/js/lib/codemirror/mode/ebnf/index.html
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
- CodeMirror: EBNF Mode
-
-
-
-
-
-
-
-
-
-
-
-
-
- EBNF Mode (bracesMode setting = "javascript")
-
-/* description: Parses end executes mathematical expressions. */
-
-/* lexical grammar */
-%lex
-
-%%
-\s+ /* skip whitespace */
-[0-9]+("."[0-9]+)?\b return 'NUMBER';
-"*" return '*';
-"/" return '/';
-"-" return '-';
-"+" return '+';
-"^" return '^';
-"(" return '(';
-")" return ')';
-"PI" return 'PI';
-"E" return 'E';
-<<EOF>> return 'EOF';
-
-/lex
-
-/* operator associations and precedence */
-
-%left '+' '-'
-%left '*' '/'
-%left '^'
-%left UMINUS
-
-%start expressions
-
-%% /* language grammar */
-
-expressions
-: e EOF
-{print($1); return $1;}
-;
-
-e
-: e '+' e
-{$$ = $1+$3;}
-| e '-' e
-{$$ = $1-$3;}
-| e '*' e
-{$$ = $1*$3;}
-| e '/' e
-{$$ = $1/$3;}
-| e '^' e
-{$$ = Math.pow($1, $3);}
-| '-' e %prec UMINUS
-{$$ = -$2;}
-| '(' e ')'
-{$$ = $2;}
-| NUMBER
-{$$ = Number(yytext);}
-| E
-{$$ = Math.E;}
-| PI
-{$$ = Math.PI;}
-;
-
- The EBNF Mode
- Created by Robert Plummer
-
-
-
diff --git a/public/js/lib/codemirror/mode/ecl/ecl.js b/public/js/lib/codemirror/mode/ecl/ecl.js
deleted file mode 100644
index 18778f1691..0000000000
--- a/public/js/lib/codemirror/mode/ecl/ecl.js
+++ /dev/null
@@ -1,207 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("ecl", function(config) {
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- function metaHook(stream, state) {
- if (!state.startOfLine) return false;
- stream.skipToEnd();
- return "meta";
- }
-
- var indentUnit = config.indentUnit;
- var keyword = words("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode");
- var variable = words("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait");
- var variable_2 = words("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath");
- var variable_3 = words("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode");
- var builtin = words("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when");
- var blockKeywords = words("catch class do else finally for if switch try while");
- var atoms = words("true false null");
- var hooks = {"#": metaHook};
- var multiLineStrings;
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (hooks[ch]) {
- var result = hooks[ch](stream, state);
- if (result !== false) return result;
- }
- if (ch == '"' || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
- var cur = stream.current().toLowerCase();
- if (keyword.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- } else if (variable.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "variable";
- } else if (variable_2.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "variable-2";
- } else if (variable_3.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "variable-3";
- } else if (builtin.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "builtin";
- } else { //Data types are of from KEYWORD##
- var i = cur.length - 1;
- while(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_'))
- --i;
-
- if (i > 0) {
- var cur2 = cur.substr(0, i + 1);
- if (variable_3.propertyIsEnumerable(cur2)) {
- if (blockKeywords.propertyIsEnumerable(cur2)) curPunc = "newstatement";
- return "variable-3";
- }
- }
- }
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return null;
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !(escaped || multiLineStrings))
- state.tokenize = tokenBase;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- return state.context = new Context(state.indented, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: null,
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- if (ctx.align == null) ctx.align = true;
-
- if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != tokenBase && state.tokenize != null) return 0;
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
- if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit);
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}"
- };
-});
-
-CodeMirror.defineMIME("text/x-ecl", "ecl");
-
-});
diff --git a/public/js/lib/codemirror/mode/ecl/index.html b/public/js/lib/codemirror/mode/ecl/index.html
deleted file mode 100644
index 2306860dcb..0000000000
--- a/public/js/lib/codemirror/mode/ecl/index.html
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-CodeMirror: ECL mode
-
-
-
-
-
-
-
-
-
-
-ECL mode
-
-/*
-sample useless code to demonstrate ecl syntax highlighting
-this is a multiline comment!
-*/
-
-// this is a singleline comment!
-
-import ut;
-r :=
- record
- string22 s1 := '123';
- integer4 i1 := 123;
- end;
-#option('tmp', true);
-d := dataset('tmp::qb', r, thor);
-output(d);
-
-
-
- Based on CodeMirror's clike mode. For more information see HPCC Systems web site.
- MIME types defined: text/x-ecl
.
-
-
diff --git a/public/js/lib/codemirror/mode/eiffel/eiffel.js b/public/js/lib/codemirror/mode/eiffel/eiffel.js
deleted file mode 100644
index fcdf295cbc..0000000000
--- a/public/js/lib/codemirror/mode/eiffel/eiffel.js
+++ /dev/null
@@ -1,162 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("eiffel", function() {
- function wordObj(words) {
- var o = {};
- for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true;
- return o;
- }
- var keywords = wordObj([
- 'note',
- 'across',
- 'when',
- 'variant',
- 'until',
- 'unique',
- 'undefine',
- 'then',
- 'strip',
- 'select',
- 'retry',
- 'rescue',
- 'require',
- 'rename',
- 'reference',
- 'redefine',
- 'prefix',
- 'once',
- 'old',
- 'obsolete',
- 'loop',
- 'local',
- 'like',
- 'is',
- 'inspect',
- 'infix',
- 'include',
- 'if',
- 'frozen',
- 'from',
- 'external',
- 'export',
- 'ensure',
- 'end',
- 'elseif',
- 'else',
- 'do',
- 'creation',
- 'create',
- 'check',
- 'alias',
- 'agent',
- 'separate',
- 'invariant',
- 'inherit',
- 'indexing',
- 'feature',
- 'expanded',
- 'deferred',
- 'class',
- 'Void',
- 'True',
- 'Result',
- 'Precursor',
- 'False',
- 'Current',
- 'create',
- 'attached',
- 'detachable',
- 'as',
- 'and',
- 'implies',
- 'not',
- 'or'
- ]);
- var operators = wordObj([":=", "and then","and", "or","<<",">>"]);
- var curPunc;
-
- function chain(newtok, stream, state) {
- state.tokenize.push(newtok);
- return newtok(stream, state);
- }
-
- function tokenBase(stream, state) {
- curPunc = null;
- if (stream.eatSpace()) return null;
- var ch = stream.next();
- if (ch == '"'||ch == "'") {
- return chain(readQuoted(ch, "string"), stream, state);
- } else if (ch == "-"&&stream.eat("-")) {
- stream.skipToEnd();
- return "comment";
- } else if (ch == ":"&&stream.eat("=")) {
- return "operator";
- } else if (/[0-9]/.test(ch)) {
- stream.eatWhile(/[xXbBCc0-9\.]/);
- stream.eat(/[\?\!]/);
- return "ident";
- } else if (/[a-zA-Z_0-9]/.test(ch)) {
- stream.eatWhile(/[a-zA-Z_0-9]/);
- stream.eat(/[\?\!]/);
- return "ident";
- } else if (/[=+\-\/*^%<>~]/.test(ch)) {
- stream.eatWhile(/[=+\-\/*^%<>~]/);
- return "operator";
- } else {
- return null;
- }
- }
-
- function readQuoted(quote, style, unescaped) {
- return function(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == quote && (unescaped || !escaped)) {
- state.tokenize.pop();
- break;
- }
- escaped = !escaped && ch == "%";
- }
- return style;
- };
- }
-
- return {
- startState: function() {
- return {tokenize: [tokenBase]};
- },
-
- token: function(stream, state) {
- var style = state.tokenize[state.tokenize.length-1](stream, state);
- if (style == "ident") {
- var word = stream.current();
- style = keywords.propertyIsEnumerable(stream.current()) ? "keyword"
- : operators.propertyIsEnumerable(stream.current()) ? "operator"
- : /^[A-Z][A-Z_0-9]*$/g.test(word) ? "tag"
- : /^0[bB][0-1]+$/g.test(word) ? "number"
- : /^0[cC][0-7]+$/g.test(word) ? "number"
- : /^0[xX][a-fA-F0-9]+$/g.test(word) ? "number"
- : /^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(word) ? "number"
- : /^[0-9]+$/g.test(word) ? "number"
- : "variable";
- }
- return style;
- },
- lineComment: "--"
- };
-});
-
-CodeMirror.defineMIME("text/x-eiffel", "eiffel");
-
-});
diff --git a/public/js/lib/codemirror/mode/eiffel/index.html b/public/js/lib/codemirror/mode/eiffel/index.html
deleted file mode 100644
index 108a71bec8..0000000000
--- a/public/js/lib/codemirror/mode/eiffel/index.html
+++ /dev/null
@@ -1,429 +0,0 @@
-
-
-CodeMirror: Eiffel mode
-
-
-
-
-
-
-
-
-
-
-
-Eiffel mode
-
-note
- description: "[
- Project-wide universal properties.
- This class is an ancestor to all developer-written classes.
- ANY may be customized for individual projects or teams.
- ]"
-
- library: "Free implementation of ELKS library"
- status: "See notice at end of class."
- legal: "See notice at end of class."
- date: "$Date: 2013-01-25 11:49:00 -0800 (Fri, 25 Jan 2013) $"
- revision: "$Revision: 712 $"
-
-class
- ANY
-
-feature -- Customization
-
-feature -- Access
-
- generator: STRING
- -- Name of current object's generating class
- -- (base class of the type of which it is a direct instance)
- external
- "built_in"
- ensure
- generator_not_void: Result /= Void
- generator_not_empty: not Result.is_empty
- end
-
- generating_type: TYPE [detachable like Current]
- -- Type of current object
- -- (type of which it is a direct instance)
- do
- Result := {detachable like Current}
- ensure
- generating_type_not_void: Result /= Void
- end
-
-feature -- Status report
-
- conforms_to (other: ANY): BOOLEAN
- -- Does type of current object conform to type
- -- of `other' (as per Eiffel: The Language, chapter 13)?
- require
- other_not_void: other /= Void
- external
- "built_in"
- end
-
- same_type (other: ANY): BOOLEAN
- -- Is type of current object identical to type of `other'?
- require
- other_not_void: other /= Void
- external
- "built_in"
- ensure
- definition: Result = (conforms_to (other) and
- other.conforms_to (Current))
- end
-
-feature -- Comparison
-
- is_equal (other: like Current): BOOLEAN
- -- Is `other' attached to an object considered
- -- equal to current object?
- require
- other_not_void: other /= Void
- external
- "built_in"
- ensure
- symmetric: Result implies other ~ Current
- consistent: standard_is_equal (other) implies Result
- end
-
- frozen standard_is_equal (other: like Current): BOOLEAN
- -- Is `other' attached to an object of the same type
- -- as current object, and field-by-field identical to it?
- require
- other_not_void: other /= Void
- external
- "built_in"
- ensure
- same_type: Result implies same_type (other)
- symmetric: Result implies other.standard_is_equal (Current)
- end
-
- frozen equal (a: detachable ANY; b: like a): BOOLEAN
- -- Are `a' and `b' either both void or attached
- -- to objects considered equal?
- do
- if a = Void then
- Result := b = Void
- else
- Result := b /= Void and then
- a.is_equal (b)
- end
- ensure
- definition: Result = (a = Void and b = Void) or else
- ((a /= Void and b /= Void) and then
- a.is_equal (b))
- end
-
- frozen standard_equal (a: detachable ANY; b: like a): BOOLEAN
- -- Are `a' and `b' either both void or attached to
- -- field-by-field identical objects of the same type?
- -- Always uses default object comparison criterion.
- do
- if a = Void then
- Result := b = Void
- else
- Result := b /= Void and then
- a.standard_is_equal (b)
- end
- ensure
- definition: Result = (a = Void and b = Void) or else
- ((a /= Void and b /= Void) and then
- a.standard_is_equal (b))
- end
-
- frozen is_deep_equal (other: like Current): BOOLEAN
- -- Are `Current' and `other' attached to isomorphic object structures?
- require
- other_not_void: other /= Void
- external
- "built_in"
- ensure
- shallow_implies_deep: standard_is_equal (other) implies Result
- same_type: Result implies same_type (other)
- symmetric: Result implies other.is_deep_equal (Current)
- end
-
- frozen deep_equal (a: detachable ANY; b: like a): BOOLEAN
- -- Are `a' and `b' either both void
- -- or attached to isomorphic object structures?
- do
- if a = Void then
- Result := b = Void
- else
- Result := b /= Void and then a.is_deep_equal (b)
- end
- ensure
- shallow_implies_deep: standard_equal (a, b) implies Result
- both_or_none_void: (a = Void) implies (Result = (b = Void))
- same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b))
- symmetric: Result implies deep_equal (b, a)
- end
-
-feature -- Duplication
-
- frozen twin: like Current
- -- New object equal to `Current'
- -- `twin' calls `copy'; to change copying/twinning semantics, redefine `copy'.
- external
- "built_in"
- ensure
- twin_not_void: Result /= Void
- is_equal: Result ~ Current
- end
-
- copy (other: like Current)
- -- Update current object using fields of object attached
- -- to `other', so as to yield equal objects.
- require
- other_not_void: other /= Void
- type_identity: same_type (other)
- external
- "built_in"
- ensure
- is_equal: Current ~ other
- end
-
- frozen standard_copy (other: like Current)
- -- Copy every field of `other' onto corresponding field
- -- of current object.
- require
- other_not_void: other /= Void
- type_identity: same_type (other)
- external
- "built_in"
- ensure
- is_standard_equal: standard_is_equal (other)
- end
-
- frozen clone (other: detachable ANY): like other
- -- Void if `other' is void; otherwise new object
- -- equal to `other'
- --
- -- For non-void `other', `clone' calls `copy';
- -- to change copying/cloning semantics, redefine `copy'.
- obsolete
- "Use `twin' instead."
- do
- if other /= Void then
- Result := other.twin
- end
- ensure
- equal: Result ~ other
- end
-
- frozen standard_clone (other: detachable ANY): like other
- -- Void if `other' is void; otherwise new object
- -- field-by-field identical to `other'.
- -- Always uses default copying semantics.
- obsolete
- "Use `standard_twin' instead."
- do
- if other /= Void then
- Result := other.standard_twin
- end
- ensure
- equal: standard_equal (Result, other)
- end
-
- frozen standard_twin: like Current
- -- New object field-by-field identical to `other'.
- -- Always uses default copying semantics.
- external
- "built_in"
- ensure
- standard_twin_not_void: Result /= Void
- equal: standard_equal (Result, Current)
- end
-
- frozen deep_twin: like Current
- -- New object structure recursively duplicated from Current.
- external
- "built_in"
- ensure
- deep_twin_not_void: Result /= Void
- deep_equal: deep_equal (Current, Result)
- end
-
- frozen deep_clone (other: detachable ANY): like other
- -- Void if `other' is void: otherwise, new object structure
- -- recursively duplicated from the one attached to `other'
- obsolete
- "Use `deep_twin' instead."
- do
- if other /= Void then
- Result := other.deep_twin
- end
- ensure
- deep_equal: deep_equal (other, Result)
- end
-
- frozen deep_copy (other: like Current)
- -- Effect equivalent to that of:
- -- `copy' (`other' . `deep_twin')
- require
- other_not_void: other /= Void
- do
- copy (other.deep_twin)
- ensure
- deep_equal: deep_equal (Current, other)
- end
-
-feature {NONE} -- Retrieval
-
- frozen internal_correct_mismatch
- -- Called from runtime to perform a proper dynamic dispatch on `correct_mismatch'
- -- from MISMATCH_CORRECTOR.
- local
- l_msg: STRING
- l_exc: EXCEPTIONS
- do
- if attached {MISMATCH_CORRECTOR} Current as l_corrector then
- l_corrector.correct_mismatch
- else
- create l_msg.make_from_string ("Mismatch: ")
- create l_exc
- l_msg.append (generating_type.name)
- l_exc.raise_retrieval_exception (l_msg)
- end
- end
-
-feature -- Output
-
- io: STD_FILES
- -- Handle to standard file setup
- once
- create Result
- Result.set_output_default
- ensure
- io_not_void: Result /= Void
- end
-
- out: STRING
- -- New string containing terse printable representation
- -- of current object
- do
- Result := tagged_out
- ensure
- out_not_void: Result /= Void
- end
-
- frozen tagged_out: STRING
- -- New string containing terse printable representation
- -- of current object
- external
- "built_in"
- ensure
- tagged_out_not_void: Result /= Void
- end
-
- print (o: detachable ANY)
- -- Write terse external representation of `o'
- -- on standard output.
- do
- if o /= Void then
- io.put_string (o.out)
- end
- end
-
-feature -- Platform
-
- Operating_environment: OPERATING_ENVIRONMENT
- -- Objects available from the operating system
- once
- create Result
- ensure
- operating_environment_not_void: Result /= Void
- end
-
-feature {NONE} -- Initialization
-
- default_create
- -- Process instances of classes with no creation clause.
- -- (Default: do nothing.)
- do
- end
-
-feature -- Basic operations
-
- default_rescue
- -- Process exception for routines with no Rescue clause.
- -- (Default: do nothing.)
- do
- end
-
- frozen do_nothing
- -- Execute a null action.
- do
- end
-
- frozen default: detachable like Current
- -- Default value of object's type
- do
- end
-
- frozen default_pointer: POINTER
- -- Default value of type `POINTER'
- -- (Avoid the need to write `p'.`default' for
- -- some `p' of type `POINTER'.)
- do
- ensure
- -- Result = Result.default
- end
-
- frozen as_attached: attached like Current
- -- Attached version of Current
- -- (Can be used during transitional period to convert
- -- non-void-safe classes to void-safe ones.)
- do
- Result := Current
- end
-
-invariant
- reflexive_equality: standard_is_equal (Current)
- reflexive_conformance: conforms_to (Current)
-
-note
- copyright: "Copyright (c) 1984-2012, Eiffel Software and others"
- license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
- source: "[
- Eiffel Software
- 5949 Hollister Ave., Goleta, CA 93117 USA
- Telephone 805-685-1006, Fax 805-685-6869
- Website http://www.eiffel.com
- Customer support http://support.eiffel.com
- ]"
-
-end
-
-
-
-
- MIME types defined: text/x-eiffel
.
-
- Created by YNH .
-
diff --git a/public/js/lib/codemirror/mode/erlang/erlang.js b/public/js/lib/codemirror/mode/erlang/erlang.js
deleted file mode 100644
index fbca292f03..0000000000
--- a/public/js/lib/codemirror/mode/erlang/erlang.js
+++ /dev/null
@@ -1,622 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/*jshint unused:true, eqnull:true, curly:true, bitwise:true */
-/*jshint undef:true, latedef:true, trailing:true */
-/*global CodeMirror:true */
-
-// erlang mode.
-// tokenizer -> token types -> CodeMirror styles
-// tokenizer maintains a parse stack
-// indenter uses the parse stack
-
-// TODO indenter:
-// bit syntax
-// old guard/bif/conversion clashes (e.g. "float/1")
-// type/spec/opaque
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMIME("text/x-erlang", "erlang");
-
-CodeMirror.defineMode("erlang", function(cmCfg) {
- "use strict";
-
-/////////////////////////////////////////////////////////////////////////////
-// constants
-
- var typeWords = [
- "-type", "-spec", "-export_type", "-opaque"];
-
- var keywordWords = [
- "after","begin","catch","case","cond","end","fun","if",
- "let","of","query","receive","try","when"];
-
- var separatorRE = /[\->,;]/;
- var separatorWords = [
- "->",";",","];
-
- var operatorAtomWords = [
- "and","andalso","band","bnot","bor","bsl","bsr","bxor",
- "div","not","or","orelse","rem","xor"];
-
- var operatorSymbolRE = /[\+\-\*\/<>=\|:!]/;
- var operatorSymbolWords = [
- "=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"];
-
- var openParenRE = /[<\(\[\{]/;
- var openParenWords = [
- "<<","(","[","{"];
-
- var closeParenRE = /[>\)\]\}]/;
- var closeParenWords = [
- "}","]",")",">>"];
-
- var guardWords = [
- "is_atom","is_binary","is_bitstring","is_boolean","is_float",
- "is_function","is_integer","is_list","is_number","is_pid",
- "is_port","is_record","is_reference","is_tuple",
- "atom","binary","bitstring","boolean","function","integer","list",
- "number","pid","port","record","reference","tuple"];
-
- var bifWords = [
- "abs","adler32","adler32_combine","alive","apply","atom_to_binary",
- "atom_to_list","binary_to_atom","binary_to_existing_atom",
- "binary_to_list","binary_to_term","bit_size","bitstring_to_list",
- "byte_size","check_process_code","contact_binary","crc32",
- "crc32_combine","date","decode_packet","delete_module",
- "disconnect_node","element","erase","exit","float","float_to_list",
- "garbage_collect","get","get_keys","group_leader","halt","hd",
- "integer_to_list","internal_bif","iolist_size","iolist_to_binary",
- "is_alive","is_atom","is_binary","is_bitstring","is_boolean",
- "is_float","is_function","is_integer","is_list","is_number","is_pid",
- "is_port","is_process_alive","is_record","is_reference","is_tuple",
- "length","link","list_to_atom","list_to_binary","list_to_bitstring",
- "list_to_existing_atom","list_to_float","list_to_integer",
- "list_to_pid","list_to_tuple","load_module","make_ref","module_loaded",
- "monitor_node","node","node_link","node_unlink","nodes","notalive",
- "now","open_port","pid_to_list","port_close","port_command",
- "port_connect","port_control","pre_loaded","process_flag",
- "process_info","processes","purge_module","put","register",
- "registered","round","self","setelement","size","spawn","spawn_link",
- "spawn_monitor","spawn_opt","split_binary","statistics",
- "term_to_binary","time","throw","tl","trunc","tuple_size",
- "tuple_to_list","unlink","unregister","whereis"];
-
-// upper case: [A-Z] [Ø-Þ] [À-Ö]
-// lower case: [a-z] [ß-ö] [ø-ÿ]
- var anumRE = /[\w@Ø-ÞÀ-Öß-öø-ÿ]/;
- var escapesRE =
- /[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;
-
-/////////////////////////////////////////////////////////////////////////////
-// tokenizer
-
- function tokenizer(stream,state) {
- // in multi-line string
- if (state.in_string) {
- state.in_string = (!doubleQuote(stream));
- return rval(state,stream,"string");
- }
-
- // in multi-line atom
- if (state.in_atom) {
- state.in_atom = (!singleQuote(stream));
- return rval(state,stream,"atom");
- }
-
- // whitespace
- if (stream.eatSpace()) {
- return rval(state,stream,"whitespace");
- }
-
- // attributes and type specs
- if (!peekToken(state) &&
- stream.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/)) {
- if (is_member(stream.current(),typeWords)) {
- return rval(state,stream,"type");
- }else{
- return rval(state,stream,"attribute");
- }
- }
-
- var ch = stream.next();
-
- // comment
- if (ch == '%') {
- stream.skipToEnd();
- return rval(state,stream,"comment");
- }
-
- // colon
- if (ch == ":") {
- return rval(state,stream,"colon");
- }
-
- // macro
- if (ch == '?') {
- stream.eatSpace();
- stream.eatWhile(anumRE);
- return rval(state,stream,"macro");
- }
-
- // record
- if (ch == "#") {
- stream.eatSpace();
- stream.eatWhile(anumRE);
- return rval(state,stream,"record");
- }
-
- // dollar escape
- if (ch == "$") {
- if (stream.next() == "\\" && !stream.match(escapesRE)) {
- return rval(state,stream,"error");
- }
- return rval(state,stream,"number");
- }
-
- // dot
- if (ch == ".") {
- return rval(state,stream,"dot");
- }
-
- // quoted atom
- if (ch == '\'') {
- if (!(state.in_atom = (!singleQuote(stream)))) {
- if (stream.match(/\s*\/\s*[0-9]/,false)) {
- stream.match(/\s*\/\s*[0-9]/,true);
- return rval(state,stream,"fun"); // 'f'/0 style fun
- }
- if (stream.match(/\s*\(/,false) || stream.match(/\s*:/,false)) {
- return rval(state,stream,"function");
- }
- }
- return rval(state,stream,"atom");
- }
-
- // string
- if (ch == '"') {
- state.in_string = (!doubleQuote(stream));
- return rval(state,stream,"string");
- }
-
- // variable
- if (/[A-Z_Ø-ÞÀ-Ö]/.test(ch)) {
- stream.eatWhile(anumRE);
- return rval(state,stream,"variable");
- }
-
- // atom/keyword/BIF/function
- if (/[a-z_ß-öø-ÿ]/.test(ch)) {
- stream.eatWhile(anumRE);
-
- if (stream.match(/\s*\/\s*[0-9]/,false)) {
- stream.match(/\s*\/\s*[0-9]/,true);
- return rval(state,stream,"fun"); // f/0 style fun
- }
-
- var w = stream.current();
-
- if (is_member(w,keywordWords)) {
- return rval(state,stream,"keyword");
- }else if (is_member(w,operatorAtomWords)) {
- return rval(state,stream,"operator");
- }else if (stream.match(/\s*\(/,false)) {
- // 'put' and 'erlang:put' are bifs, 'foo:put' is not
- if (is_member(w,bifWords) &&
- ((peekToken(state).token != ":") ||
- (peekToken(state,2).token == "erlang"))) {
- return rval(state,stream,"builtin");
- }else if (is_member(w,guardWords)) {
- return rval(state,stream,"guard");
- }else{
- return rval(state,stream,"function");
- }
- }else if (is_member(w,operatorAtomWords)) {
- return rval(state,stream,"operator");
- }else if (lookahead(stream) == ":") {
- if (w == "erlang") {
- return rval(state,stream,"builtin");
- } else {
- return rval(state,stream,"function");
- }
- }else if (is_member(w,["true","false"])) {
- return rval(state,stream,"boolean");
- }else if (is_member(w,["true","false"])) {
- return rval(state,stream,"boolean");
- }else{
- return rval(state,stream,"atom");
- }
- }
-
- // number
- var digitRE = /[0-9]/;
- var radixRE = /[0-9a-zA-Z]/; // 36#zZ style int
- if (digitRE.test(ch)) {
- stream.eatWhile(digitRE);
- if (stream.eat('#')) { // 36#aZ style integer
- if (!stream.eatWhile(radixRE)) {
- stream.backUp(1); //"36#" - syntax error
- }
- } else if (stream.eat('.')) { // float
- if (!stream.eatWhile(digitRE)) {
- stream.backUp(1); // "3." - probably end of function
- } else {
- if (stream.eat(/[eE]/)) { // float with exponent
- if (stream.eat(/[-+]/)) {
- if (!stream.eatWhile(digitRE)) {
- stream.backUp(2); // "2e-" - syntax error
- }
- } else {
- if (!stream.eatWhile(digitRE)) {
- stream.backUp(1); // "2e" - syntax error
- }
- }
- }
- }
- }
- return rval(state,stream,"number"); // normal integer
- }
-
- // open parens
- if (nongreedy(stream,openParenRE,openParenWords)) {
- return rval(state,stream,"open_paren");
- }
-
- // close parens
- if (nongreedy(stream,closeParenRE,closeParenWords)) {
- return rval(state,stream,"close_paren");
- }
-
- // separators
- if (greedy(stream,separatorRE,separatorWords)) {
- return rval(state,stream,"separator");
- }
-
- // operators
- if (greedy(stream,operatorSymbolRE,operatorSymbolWords)) {
- return rval(state,stream,"operator");
- }
-
- return rval(state,stream,null);
- }
-
-/////////////////////////////////////////////////////////////////////////////
-// utilities
- function nongreedy(stream,re,words) {
- if (stream.current().length == 1 && re.test(stream.current())) {
- stream.backUp(1);
- while (re.test(stream.peek())) {
- stream.next();
- if (is_member(stream.current(),words)) {
- return true;
- }
- }
- stream.backUp(stream.current().length-1);
- }
- return false;
- }
-
- function greedy(stream,re,words) {
- if (stream.current().length == 1 && re.test(stream.current())) {
- while (re.test(stream.peek())) {
- stream.next();
- }
- while (0 < stream.current().length) {
- if (is_member(stream.current(),words)) {
- return true;
- }else{
- stream.backUp(1);
- }
- }
- stream.next();
- }
- return false;
- }
-
- function doubleQuote(stream) {
- return quote(stream, '"', '\\');
- }
-
- function singleQuote(stream) {
- return quote(stream,'\'','\\');
- }
-
- function quote(stream,quoteChar,escapeChar) {
- while (!stream.eol()) {
- var ch = stream.next();
- if (ch == quoteChar) {
- return true;
- }else if (ch == escapeChar) {
- stream.next();
- }
- }
- return false;
- }
-
- function lookahead(stream) {
- var m = stream.match(/([\n\s]+|%[^\n]*\n)*(.)/,false);
- return m ? m.pop() : "";
- }
-
- function is_member(element,list) {
- return (-1 < list.indexOf(element));
- }
-
- function rval(state,stream,type) {
-
- // parse stack
- pushToken(state,realToken(type,stream));
-
- // map erlang token type to CodeMirror style class
- // erlang -> CodeMirror tag
- switch (type) {
- case "atom": return "atom";
- case "attribute": return "attribute";
- case "boolean": return "atom";
- case "builtin": return "builtin";
- case "close_paren": return null;
- case "colon": return null;
- case "comment": return "comment";
- case "dot": return null;
- case "error": return "error";
- case "fun": return "meta";
- case "function": return "tag";
- case "guard": return "property";
- case "keyword": return "keyword";
- case "macro": return "variable-2";
- case "number": return "number";
- case "open_paren": return null;
- case "operator": return "operator";
- case "record": return "bracket";
- case "separator": return null;
- case "string": return "string";
- case "type": return "def";
- case "variable": return "variable";
- default: return null;
- }
- }
-
- function aToken(tok,col,ind,typ) {
- return {token: tok,
- column: col,
- indent: ind,
- type: typ};
- }
-
- function realToken(type,stream) {
- return aToken(stream.current(),
- stream.column(),
- stream.indentation(),
- type);
- }
-
- function fakeToken(type) {
- return aToken(type,0,0,type);
- }
-
- function peekToken(state,depth) {
- var len = state.tokenStack.length;
- var dep = (depth ? depth : 1);
-
- if (len < dep) {
- return false;
- }else{
- return state.tokenStack[len-dep];
- }
- }
-
- function pushToken(state,token) {
-
- if (!(token.type == "comment" || token.type == "whitespace")) {
- state.tokenStack = maybe_drop_pre(state.tokenStack,token);
- state.tokenStack = maybe_drop_post(state.tokenStack);
- }
- }
-
- function maybe_drop_pre(s,token) {
- var last = s.length-1;
-
- if (0 < last && s[last].type === "record" && token.type === "dot") {
- s.pop();
- }else if (0 < last && s[last].type === "group") {
- s.pop();
- s.push(token);
- }else{
- s.push(token);
- }
- return s;
- }
-
- function maybe_drop_post(s) {
- var last = s.length-1;
-
- if (s[last].type === "dot") {
- return [];
- }
- if (s[last].type === "fun" && s[last-1].token === "fun") {
- return s.slice(0,last-1);
- }
- switch (s[s.length-1].token) {
- case "}": return d(s,{g:["{"]});
- case "]": return d(s,{i:["["]});
- case ")": return d(s,{i:["("]});
- case ">>": return d(s,{i:["<<"]});
- case "end": return d(s,{i:["begin","case","fun","if","receive","try"]});
- case ",": return d(s,{e:["begin","try","when","->",
- ",","(","[","{","<<"]});
- case "->": return d(s,{r:["when"],
- m:["try","if","case","receive"]});
- case ";": return d(s,{E:["case","fun","if","receive","try","when"]});
- case "catch":return d(s,{e:["try"]});
- case "of": return d(s,{e:["case"]});
- case "after":return d(s,{e:["receive","try"]});
- default: return s;
- }
- }
-
- function d(stack,tt) {
- // stack is a stack of Token objects.
- // tt is an object; {type:tokens}
- // type is a char, tokens is a list of token strings.
- // The function returns (possibly truncated) stack.
- // It will descend the stack, looking for a Token such that Token.token
- // is a member of tokens. If it does not find that, it will normally (but
- // see "E" below) return stack. If it does find a match, it will remove
- // all the Tokens between the top and the matched Token.
- // If type is "m", that is all it does.
- // If type is "i", it will also remove the matched Token and the top Token.
- // If type is "g", like "i", but add a fake "group" token at the top.
- // If type is "r", it will remove the matched Token, but not the top Token.
- // If type is "e", it will keep the matched Token but not the top Token.
- // If type is "E", it behaves as for type "e", except if there is no match,
- // in which case it will return an empty stack.
-
- for (var type in tt) {
- var len = stack.length-1;
- var tokens = tt[type];
- for (var i = len-1; -1 < i ; i--) {
- if (is_member(stack[i].token,tokens)) {
- var ss = stack.slice(0,i);
- switch (type) {
- case "m": return ss.concat(stack[i]).concat(stack[len]);
- case "r": return ss.concat(stack[len]);
- case "i": return ss;
- case "g": return ss.concat(fakeToken("group"));
- case "E": return ss.concat(stack[i]);
- case "e": return ss.concat(stack[i]);
- }
- }
- }
- }
- return (type == "E" ? [] : stack);
- }
-
-/////////////////////////////////////////////////////////////////////////////
-// indenter
-
- function indenter(state,textAfter) {
- var t;
- var unit = cmCfg.indentUnit;
- var wordAfter = wordafter(textAfter);
- var currT = peekToken(state,1);
- var prevT = peekToken(state,2);
-
- if (state.in_string || state.in_atom) {
- return CodeMirror.Pass;
- }else if (!prevT) {
- return 0;
- }else if (currT.token == "when") {
- return currT.column+unit;
- }else if (wordAfter === "when" && prevT.type === "function") {
- return prevT.indent+unit;
- }else if (wordAfter === "(" && currT.token === "fun") {
- return currT.column+3;
- }else if (wordAfter === "catch" && (t = getToken(state,["try"]))) {
- return t.column;
- }else if (is_member(wordAfter,["end","after","of"])) {
- t = getToken(state,["begin","case","fun","if","receive","try"]);
- return t ? t.column : CodeMirror.Pass;
- }else if (is_member(wordAfter,closeParenWords)) {
- t = getToken(state,openParenWords);
- return t ? t.column : CodeMirror.Pass;
- }else if (is_member(currT.token,[",","|","||"]) ||
- is_member(wordAfter,[",","|","||"])) {
- t = postcommaToken(state);
- return t ? t.column+t.token.length : unit;
- }else if (currT.token == "->") {
- if (is_member(prevT.token, ["receive","case","if","try"])) {
- return prevT.column+unit+unit;
- }else{
- return prevT.column+unit;
- }
- }else if (is_member(currT.token,openParenWords)) {
- return currT.column+currT.token.length;
- }else{
- t = defaultToken(state);
- return truthy(t) ? t.column+unit : 0;
- }
- }
-
- function wordafter(str) {
- var m = str.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);
-
- return truthy(m) && (m.index === 0) ? m[0] : "";
- }
-
- function postcommaToken(state) {
- var objs = state.tokenStack.slice(0,-1);
- var i = getTokenIndex(objs,"type",["open_paren"]);
-
- return truthy(objs[i]) ? objs[i] : false;
- }
-
- function defaultToken(state) {
- var objs = state.tokenStack;
- var stop = getTokenIndex(objs,"type",["open_paren","separator","keyword"]);
- var oper = getTokenIndex(objs,"type",["operator"]);
-
- if (truthy(stop) && truthy(oper) && stop < oper) {
- return objs[stop+1];
- } else if (truthy(stop)) {
- return objs[stop];
- } else {
- return false;
- }
- }
-
- function getToken(state,tokens) {
- var objs = state.tokenStack;
- var i = getTokenIndex(objs,"token",tokens);
-
- return truthy(objs[i]) ? objs[i] : false;
- }
-
- function getTokenIndex(objs,propname,propvals) {
-
- for (var i = objs.length-1; -1 < i ; i--) {
- if (is_member(objs[i][propname],propvals)) {
- return i;
- }
- }
- return false;
- }
-
- function truthy(x) {
- return (x !== false) && (x != null);
- }
-
-/////////////////////////////////////////////////////////////////////////////
-// this object defines the mode
-
- return {
- startState:
- function() {
- return {tokenStack: [],
- in_string: false,
- in_atom: false};
- },
-
- token:
- function(stream, state) {
- return tokenizer(stream, state);
- },
-
- indent:
- function(state, textAfter) {
- return indenter(state,textAfter);
- },
-
- lineComment: "%"
- };
-});
-
-});
diff --git a/public/js/lib/codemirror/mode/erlang/index.html b/public/js/lib/codemirror/mode/erlang/index.html
deleted file mode 100644
index 6d06a890a2..0000000000
--- a/public/js/lib/codemirror/mode/erlang/index.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-CodeMirror: Erlang mode
-
-
-
-
-
-
-
-
-
-
-
-
-Erlang mode
-
-%% -*- mode: erlang; erlang-indent-level: 2 -*-
-%%% Created : 7 May 2012 by mats cronqvist
-
-%% @doc
-%% Demonstrates how to print a record.
-%% @end
-
--module('ex').
--author('mats cronqvist').
--export([demo/0,
- rec_info/1]).
-
--record(demo,{a="One",b="Two",c="Three",d="Four"}).
-
-rec_info(demo) -> record_info(fields,demo).
-
-demo() -> expand_recs(?MODULE,#demo{a="A",b="BB"}).
-
-expand_recs(M,List) when is_list(List) ->
- [expand_recs(M,L)||L<-List];
-expand_recs(M,Tup) when is_tuple(Tup) ->
- case tuple_size(Tup) of
- L when L < 1 -> Tup;
- L ->
- try
- Fields = M:rec_info(element(1,Tup)),
- L = length(Fields)+1,
- lists:zip(Fields,expand_recs(M,tl(tuple_to_list(Tup))))
- catch
- _:_ -> list_to_tuple(expand_recs(M,tuple_to_list(Tup)))
- end
- end;
-expand_recs(_,Term) ->
- Term.
-
-
-
-
- MIME types defined: text/x-erlang
.
-
diff --git a/public/js/lib/codemirror/mode/fortran/fortran.js b/public/js/lib/codemirror/mode/fortran/fortran.js
deleted file mode 100644
index 4d88f006aa..0000000000
--- a/public/js/lib/codemirror/mode/fortran/fortran.js
+++ /dev/null
@@ -1,188 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("fortran", function() {
- function words(array) {
- var keys = {};
- for (var i = 0; i < array.length; ++i) {
- keys[array[i]] = true;
- }
- return keys;
- }
-
- var keywords = words([
- "abstract", "accept", "allocatable", "allocate",
- "array", "assign", "asynchronous", "backspace",
- "bind", "block", "byte", "call", "case",
- "class", "close", "common", "contains",
- "continue", "cycle", "data", "deallocate",
- "decode", "deferred", "dimension", "do",
- "elemental", "else", "encode", "end",
- "endif", "entry", "enumerator", "equivalence",
- "exit", "external", "extrinsic", "final",
- "forall", "format", "function", "generic",
- "go", "goto", "if", "implicit", "import", "include",
- "inquire", "intent", "interface", "intrinsic",
- "module", "namelist", "non_intrinsic",
- "non_overridable", "none", "nopass",
- "nullify", "open", "optional", "options",
- "parameter", "pass", "pause", "pointer",
- "print", "private", "program", "protected",
- "public", "pure", "read", "recursive", "result",
- "return", "rewind", "save", "select", "sequence",
- "stop", "subroutine", "target", "then", "to", "type",
- "use", "value", "volatile", "where", "while",
- "write"]);
- var builtins = words(["abort", "abs", "access", "achar", "acos",
- "adjustl", "adjustr", "aimag", "aint", "alarm",
- "all", "allocated", "alog", "amax", "amin",
- "amod", "and", "anint", "any", "asin",
- "associated", "atan", "besj", "besjn", "besy",
- "besyn", "bit_size", "btest", "cabs", "ccos",
- "ceiling", "cexp", "char", "chdir", "chmod",
- "clog", "cmplx", "command_argument_count",
- "complex", "conjg", "cos", "cosh", "count",
- "cpu_time", "cshift", "csin", "csqrt", "ctime",
- "c_funloc", "c_loc", "c_associated", "c_null_ptr",
- "c_null_funptr", "c_f_pointer", "c_null_char",
- "c_alert", "c_backspace", "c_form_feed",
- "c_new_line", "c_carriage_return",
- "c_horizontal_tab", "c_vertical_tab", "dabs",
- "dacos", "dasin", "datan", "date_and_time",
- "dbesj", "dbesj", "dbesjn", "dbesy", "dbesy",
- "dbesyn", "dble", "dcos", "dcosh", "ddim", "derf",
- "derfc", "dexp", "digits", "dim", "dint", "dlog",
- "dlog", "dmax", "dmin", "dmod", "dnint",
- "dot_product", "dprod", "dsign", "dsinh",
- "dsin", "dsqrt", "dtanh", "dtan", "dtime",
- "eoshift", "epsilon", "erf", "erfc", "etime",
- "exit", "exp", "exponent", "extends_type_of",
- "fdate", "fget", "fgetc", "float", "floor",
- "flush", "fnum", "fputc", "fput", "fraction",
- "fseek", "fstat", "ftell", "gerror", "getarg",
- "get_command", "get_command_argument",
- "get_environment_variable", "getcwd",
- "getenv", "getgid", "getlog", "getpid",
- "getuid", "gmtime", "hostnm", "huge", "iabs",
- "iachar", "iand", "iargc", "ibclr", "ibits",
- "ibset", "ichar", "idate", "idim", "idint",
- "idnint", "ieor", "ierrno", "ifix", "imag",
- "imagpart", "index", "int", "ior", "irand",
- "isatty", "ishft", "ishftc", "isign",
- "iso_c_binding", "is_iostat_end", "is_iostat_eor",
- "itime", "kill", "kind", "lbound", "len", "len_trim",
- "lge", "lgt", "link", "lle", "llt", "lnblnk", "loc",
- "log", "logical", "long", "lshift", "lstat", "ltime",
- "matmul", "max", "maxexponent", "maxloc", "maxval",
- "mclock", "merge", "move_alloc", "min", "minexponent",
- "minloc", "minval", "mod", "modulo", "mvbits",
- "nearest", "new_line", "nint", "not", "or", "pack",
- "perror", "precision", "present", "product", "radix",
- "rand", "random_number", "random_seed", "range",
- "real", "realpart", "rename", "repeat", "reshape",
- "rrspacing", "rshift", "same_type_as", "scale",
- "scan", "second", "selected_int_kind",
- "selected_real_kind", "set_exponent", "shape",
- "short", "sign", "signal", "sinh", "sin", "sleep",
- "sngl", "spacing", "spread", "sqrt", "srand", "stat",
- "sum", "symlnk", "system", "system_clock", "tan",
- "tanh", "time", "tiny", "transfer", "transpose",
- "trim", "ttynam", "ubound", "umask", "unlink",
- "unpack", "verify", "xor", "zabs", "zcos", "zexp",
- "zlog", "zsin", "zsqrt"]);
-
- var dataTypes = words(["c_bool", "c_char", "c_double", "c_double_complex",
- "c_float", "c_float_complex", "c_funptr", "c_int",
- "c_int16_t", "c_int32_t", "c_int64_t", "c_int8_t",
- "c_int_fast16_t", "c_int_fast32_t", "c_int_fast64_t",
- "c_int_fast8_t", "c_int_least16_t", "c_int_least32_t",
- "c_int_least64_t", "c_int_least8_t", "c_intmax_t",
- "c_intptr_t", "c_long", "c_long_double",
- "c_long_double_complex", "c_long_long", "c_ptr",
- "c_short", "c_signed_char", "c_size_t", "character",
- "complex", "double", "integer", "logical", "real"]);
- var isOperatorChar = /[+\-*&=<>\/\:]/;
- var litOperator = new RegExp("(\.and\.|\.or\.|\.eq\.|\.lt\.|\.le\.|\.gt\.|\.ge\.|\.ne\.|\.not\.|\.eqv\.|\.neqv\.)", "i");
-
- function tokenBase(stream, state) {
-
- if (stream.match(litOperator)){
- return 'operator';
- }
-
- var ch = stream.next();
- if (ch == "!") {
- stream.skipToEnd();
- return "comment";
- }
- if (ch == '"' || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\[\]\(\),]/.test(ch)) {
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
- var word = stream.current().toLowerCase();
-
- if (keywords.hasOwnProperty(word)){
- return 'keyword';
- }
- if (builtins.hasOwnProperty(word) || dataTypes.hasOwnProperty(word)) {
- return 'builtin';
- }
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {
- end = true;
- break;
- }
- escaped = !escaped && next == "\\";
- }
- if (end || !escaped) state.tokenize = null;
- return "string";
- };
- }
-
- // Interface
-
- return {
- startState: function() {
- return {tokenize: null};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- return style;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-fortran", "fortran");
-
-});
diff --git a/public/js/lib/codemirror/mode/fortran/index.html b/public/js/lib/codemirror/mode/fortran/index.html
deleted file mode 100644
index 102e8f8269..0000000000
--- a/public/js/lib/codemirror/mode/fortran/index.html
+++ /dev/null
@@ -1,81 +0,0 @@
-
-
-CodeMirror: Fortran mode
-
-
-
-
-
-
-
-
-
-
-Fortran mode
-
-
-
-! Example Fortran code
- program average
-
- ! Read in some numbers and take the average
- ! As written, if there are no data points, an average of zero is returned
- ! While this may not be desired behavior, it keeps this example simple
-
- implicit none
-
- real, dimension(:), allocatable :: points
- integer :: number_of_points
- real :: average_points=0., positive_average=0., negative_average=0.
-
- write (*,*) "Input number of points to average:"
- read (*,*) number_of_points
-
- allocate (points(number_of_points))
-
- write (*,*) "Enter the points to average:"
- read (*,*) points
-
- ! Take the average by summing points and dividing by number_of_points
- if (number_of_points > 0) average_points = sum(points) / number_of_points
-
- ! Now form average over positive and negative points only
- if (count(points > 0.) > 0) then
- positive_average = sum(points, points > 0.) / count(points > 0.)
- end if
-
- if (count(points < 0.) > 0) then
- negative_average = sum(points, points < 0.) / count(points < 0.)
- end if
-
- deallocate (points)
-
- ! Print result to terminal
- write (*,'(a,g12.4)') 'Average = ', average_points
- write (*,'(a,g12.4)') 'Average of positive points = ', positive_average
- write (*,'(a,g12.4)') 'Average of negative points = ', negative_average
-
- end program average
-
-
-
-
- MIME types defined: text/x-Fortran
.
-
diff --git a/public/js/lib/codemirror/mode/gas/gas.js b/public/js/lib/codemirror/mode/gas/gas.js
deleted file mode 100644
index 0c74bedc57..0000000000
--- a/public/js/lib/codemirror/mode/gas/gas.js
+++ /dev/null
@@ -1,345 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("gas", function(_config, parserConfig) {
- 'use strict';
-
- // If an architecture is specified, its initialization function may
- // populate this array with custom parsing functions which will be
- // tried in the event that the standard functions do not find a match.
- var custom = [];
-
- // The symbol used to start a line comment changes based on the target
- // architecture.
- // If no architecture is pased in "parserConfig" then only multiline
- // comments will have syntax support.
- var lineCommentStartSymbol = "";
-
- // These directives are architecture independent.
- // Machine specific directives should go in their respective
- // architecture initialization function.
- // Reference:
- // http://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops
- var directives = {
- ".abort" : "builtin",
- ".align" : "builtin",
- ".altmacro" : "builtin",
- ".ascii" : "builtin",
- ".asciz" : "builtin",
- ".balign" : "builtin",
- ".balignw" : "builtin",
- ".balignl" : "builtin",
- ".bundle_align_mode" : "builtin",
- ".bundle_lock" : "builtin",
- ".bundle_unlock" : "builtin",
- ".byte" : "builtin",
- ".cfi_startproc" : "builtin",
- ".comm" : "builtin",
- ".data" : "builtin",
- ".def" : "builtin",
- ".desc" : "builtin",
- ".dim" : "builtin",
- ".double" : "builtin",
- ".eject" : "builtin",
- ".else" : "builtin",
- ".elseif" : "builtin",
- ".end" : "builtin",
- ".endef" : "builtin",
- ".endfunc" : "builtin",
- ".endif" : "builtin",
- ".equ" : "builtin",
- ".equiv" : "builtin",
- ".eqv" : "builtin",
- ".err" : "builtin",
- ".error" : "builtin",
- ".exitm" : "builtin",
- ".extern" : "builtin",
- ".fail" : "builtin",
- ".file" : "builtin",
- ".fill" : "builtin",
- ".float" : "builtin",
- ".func" : "builtin",
- ".global" : "builtin",
- ".gnu_attribute" : "builtin",
- ".hidden" : "builtin",
- ".hword" : "builtin",
- ".ident" : "builtin",
- ".if" : "builtin",
- ".incbin" : "builtin",
- ".include" : "builtin",
- ".int" : "builtin",
- ".internal" : "builtin",
- ".irp" : "builtin",
- ".irpc" : "builtin",
- ".lcomm" : "builtin",
- ".lflags" : "builtin",
- ".line" : "builtin",
- ".linkonce" : "builtin",
- ".list" : "builtin",
- ".ln" : "builtin",
- ".loc" : "builtin",
- ".loc_mark_labels" : "builtin",
- ".local" : "builtin",
- ".long" : "builtin",
- ".macro" : "builtin",
- ".mri" : "builtin",
- ".noaltmacro" : "builtin",
- ".nolist" : "builtin",
- ".octa" : "builtin",
- ".offset" : "builtin",
- ".org" : "builtin",
- ".p2align" : "builtin",
- ".popsection" : "builtin",
- ".previous" : "builtin",
- ".print" : "builtin",
- ".protected" : "builtin",
- ".psize" : "builtin",
- ".purgem" : "builtin",
- ".pushsection" : "builtin",
- ".quad" : "builtin",
- ".reloc" : "builtin",
- ".rept" : "builtin",
- ".sbttl" : "builtin",
- ".scl" : "builtin",
- ".section" : "builtin",
- ".set" : "builtin",
- ".short" : "builtin",
- ".single" : "builtin",
- ".size" : "builtin",
- ".skip" : "builtin",
- ".sleb128" : "builtin",
- ".space" : "builtin",
- ".stab" : "builtin",
- ".string" : "builtin",
- ".struct" : "builtin",
- ".subsection" : "builtin",
- ".symver" : "builtin",
- ".tag" : "builtin",
- ".text" : "builtin",
- ".title" : "builtin",
- ".type" : "builtin",
- ".uleb128" : "builtin",
- ".val" : "builtin",
- ".version" : "builtin",
- ".vtable_entry" : "builtin",
- ".vtable_inherit" : "builtin",
- ".warning" : "builtin",
- ".weak" : "builtin",
- ".weakref" : "builtin",
- ".word" : "builtin"
- };
-
- var registers = {};
-
- function x86(_parserConfig) {
- lineCommentStartSymbol = "#";
-
- registers.ax = "variable";
- registers.eax = "variable-2";
- registers.rax = "variable-3";
-
- registers.bx = "variable";
- registers.ebx = "variable-2";
- registers.rbx = "variable-3";
-
- registers.cx = "variable";
- registers.ecx = "variable-2";
- registers.rcx = "variable-3";
-
- registers.dx = "variable";
- registers.edx = "variable-2";
- registers.rdx = "variable-3";
-
- registers.si = "variable";
- registers.esi = "variable-2";
- registers.rsi = "variable-3";
-
- registers.di = "variable";
- registers.edi = "variable-2";
- registers.rdi = "variable-3";
-
- registers.sp = "variable";
- registers.esp = "variable-2";
- registers.rsp = "variable-3";
-
- registers.bp = "variable";
- registers.ebp = "variable-2";
- registers.rbp = "variable-3";
-
- registers.ip = "variable";
- registers.eip = "variable-2";
- registers.rip = "variable-3";
-
- registers.cs = "keyword";
- registers.ds = "keyword";
- registers.ss = "keyword";
- registers.es = "keyword";
- registers.fs = "keyword";
- registers.gs = "keyword";
- }
-
- function armv6(_parserConfig) {
- // Reference:
- // http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf
- // http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301h/DDI0301H_arm1176jzfs_r0p7_trm.pdf
- lineCommentStartSymbol = "@";
- directives.syntax = "builtin";
-
- registers.r0 = "variable";
- registers.r1 = "variable";
- registers.r2 = "variable";
- registers.r3 = "variable";
- registers.r4 = "variable";
- registers.r5 = "variable";
- registers.r6 = "variable";
- registers.r7 = "variable";
- registers.r8 = "variable";
- registers.r9 = "variable";
- registers.r10 = "variable";
- registers.r11 = "variable";
- registers.r12 = "variable";
-
- registers.sp = "variable-2";
- registers.lr = "variable-2";
- registers.pc = "variable-2";
- registers.r13 = registers.sp;
- registers.r14 = registers.lr;
- registers.r15 = registers.pc;
-
- custom.push(function(ch, stream) {
- if (ch === '#') {
- stream.eatWhile(/\w/);
- return "number";
- }
- });
- }
-
- var arch = (parserConfig.architecture || "x86").toLowerCase();
- if (arch === "x86") {
- x86(parserConfig);
- } else if (arch === "arm" || arch === "armv6") {
- armv6(parserConfig);
- }
-
- function nextUntilUnescaped(stream, end) {
- var escaped = false, next;
- while ((next = stream.next()) != null) {
- if (next === end && !escaped) {
- return false;
- }
- escaped = !escaped && next === "\\";
- }
- return escaped;
- }
-
- function clikeComment(stream, state) {
- var maybeEnd = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch === "/" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch === "*");
- }
- return "comment";
- }
-
- return {
- startState: function() {
- return {
- tokenize: null
- };
- },
-
- token: function(stream, state) {
- if (state.tokenize) {
- return state.tokenize(stream, state);
- }
-
- if (stream.eatSpace()) {
- return null;
- }
-
- var style, cur, ch = stream.next();
-
- if (ch === "/") {
- if (stream.eat("*")) {
- state.tokenize = clikeComment;
- return clikeComment(stream, state);
- }
- }
-
- if (ch === lineCommentStartSymbol) {
- stream.skipToEnd();
- return "comment";
- }
-
- if (ch === '"') {
- nextUntilUnescaped(stream, '"');
- return "string";
- }
-
- if (ch === '.') {
- stream.eatWhile(/\w/);
- cur = stream.current().toLowerCase();
- style = directives[cur];
- return style || null;
- }
-
- if (ch === '=') {
- stream.eatWhile(/\w/);
- return "tag";
- }
-
- if (ch === '{') {
- return "braket";
- }
-
- if (ch === '}') {
- return "braket";
- }
-
- if (/\d/.test(ch)) {
- if (ch === "0" && stream.eat("x")) {
- stream.eatWhile(/[0-9a-fA-F]/);
- return "number";
- }
- stream.eatWhile(/\d/);
- return "number";
- }
-
- if (/\w/.test(ch)) {
- stream.eatWhile(/\w/);
- if (stream.eat(":")) {
- return 'tag';
- }
- cur = stream.current().toLowerCase();
- style = registers[cur];
- return style || null;
- }
-
- for (var i = 0; i < custom.length; i++) {
- style = custom[i](ch, stream, state);
- if (style) {
- return style;
- }
- }
- },
-
- lineComment: lineCommentStartSymbol,
- blockCommentStart: "/*",
- blockCommentEnd: "*/"
- };
-});
-
-});
diff --git a/public/js/lib/codemirror/mode/gas/index.html b/public/js/lib/codemirror/mode/gas/index.html
deleted file mode 100644
index df75ca2db7..0000000000
--- a/public/js/lib/codemirror/mode/gas/index.html
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-CodeMirror: Gas mode
-
-
-
-
-
-
-
-
-
-
-Gas mode
-
-
-.syntax unified
-.global main
-
-/*
- * A
- * multi-line
- * comment.
- */
-
-@ A single line comment.
-
-main:
- push {sp, lr}
- ldr r0, =message
- bl puts
- mov r0, #0
- pop {sp, pc}
-
-message:
- .asciz "Hello world! "
-
-
-
-
-
- Handles AT&T assembler syntax (more specifically this handles
- the GNU Assembler (gas) syntax.)
- It takes a single optional configuration parameter:
- architecture
, which can be one of "ARM"
,
- "ARMv6"
or "x86"
.
- Including the parameter adds syntax for the registers and special
- directives for the supplied architecture.
-
-
MIME types defined: text/x-gas
-
diff --git a/public/js/lib/codemirror/mode/gfm/gfm.js b/public/js/lib/codemirror/mode/gfm/gfm.js
deleted file mode 100644
index 80a8e2c84d..0000000000
--- a/public/js/lib/codemirror/mode/gfm/gfm.js
+++ /dev/null
@@ -1,123 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../markdown/markdown"), require("../../addon/mode/overlay"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../markdown/markdown", "../../addon/mode/overlay"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("gfm", function(config, modeConfig) {
- var codeDepth = 0;
- function blankLine(state) {
- state.code = false;
- return null;
- }
- var gfmOverlay = {
- startState: function() {
- return {
- code: false,
- codeBlock: false,
- ateSpace: false
- };
- },
- copyState: function(s) {
- return {
- code: s.code,
- codeBlock: s.codeBlock,
- ateSpace: s.ateSpace
- };
- },
- token: function(stream, state) {
- state.combineTokens = null;
-
- // Hack to prevent formatting override inside code blocks (block and inline)
- if (state.codeBlock) {
- if (stream.match(/^```/)) {
- state.codeBlock = false;
- return null;
- }
- stream.skipToEnd();
- return null;
- }
- if (stream.sol()) {
- state.code = false;
- }
- if (stream.sol() && stream.match(/^```/)) {
- stream.skipToEnd();
- state.codeBlock = true;
- return null;
- }
- // If this block is changed, it may need to be updated in Markdown mode
- if (stream.peek() === '`') {
- stream.next();
- var before = stream.pos;
- stream.eatWhile('`');
- var difference = 1 + stream.pos - before;
- if (!state.code) {
- codeDepth = difference;
- state.code = true;
- } else {
- if (difference === codeDepth) { // Must be exact
- state.code = false;
- }
- }
- return null;
- } else if (state.code) {
- stream.next();
- return null;
- }
- // Check if space. If so, links can be formatted later on
- if (stream.eatSpace()) {
- state.ateSpace = true;
- return null;
- }
- if (stream.sol() || state.ateSpace) {
- state.ateSpace = false;
- if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/)) {
- // User/Project@SHA
- // User@SHA
- // SHA
- state.combineTokens = true;
- return "link";
- } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) {
- // User/Project#Num
- // User#Num
- // #Num
- state.combineTokens = true;
- return "link";
- }
- }
- if (stream.match(/^((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i) &&
- stream.string.slice(stream.start - 2, stream.start) != "](") {
- // URLs
- // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
- // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine
- state.combineTokens = true;
- return "link";
- }
- stream.next();
- return null;
- },
- blankLine: blankLine
- };
-
- var markdownConfig = {
- underscoresBreakWords: false,
- taskLists: true,
- fencedCodeBlocks: true,
- strikethrough: true
- };
- for (var attr in modeConfig) {
- markdownConfig[attr] = modeConfig[attr];
- }
- markdownConfig.name = "markdown";
- CodeMirror.defineMIME("gfmBase", markdownConfig);
- return CodeMirror.overlayMode(CodeMirror.getMode(config, "gfmBase"), gfmOverlay);
-}, "markdown");
-
-});
diff --git a/public/js/lib/codemirror/mode/gfm/index.html b/public/js/lib/codemirror/mode/gfm/index.html
deleted file mode 100644
index 7e38c52d60..0000000000
--- a/public/js/lib/codemirror/mode/gfm/index.html
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-CodeMirror: GFM mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-GFM mode
-
-GitHub Flavored Markdown
-========================
-
-Everything from markdown plus GFM features:
-
-## URL autolinking
-
-Underscores_are_allowed_between_words.
-
-## Strikethrough text
-
-GFM adds syntax to strikethrough text, which is missing from standard Markdown.
-
-~~Mistaken text.~~
-~~**works with other fomatting**~~
-
-~~spans across
-lines~~
-
-## Fenced code blocks (and syntax highlighting)
-
-```javascript
-for (var i = 0; i < items.length; i++) {
- console.log(items[i], i); // log them
-}
-```
-
-## Task Lists
-
-- [ ] Incomplete task list item
-- [x] **Completed** task list item
-
-## A bit of GitHub spice
-
-* SHA: be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* User@SHA ref: mojombo@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* User/Project@SHA: mojombo/god@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2
-* \#Num: #1
-* User/#Num: mojombo#1
-* User/Project#Num: mojombo/god#1
-
-See http://github.github.com/github-flavored-markdown/.
-
-
-
-
-
- Optionally depends on other modes for properly highlighted code blocks.
-
- Parsing/Highlighting Tests: normal , verbose .
-
-
diff --git a/public/js/lib/codemirror/mode/gfm/test.js b/public/js/lib/codemirror/mode/gfm/test.js
deleted file mode 100644
index c2bc38fd57..0000000000
--- a/public/js/lib/codemirror/mode/gfm/test.js
+++ /dev/null
@@ -1,213 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({tabSize: 4}, "gfm");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
- var modeHighlightFormatting = CodeMirror.getMode({tabSize: 4}, {name: "gfm", highlightFormatting: true});
- function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); }
-
- FT("codeBackticks",
- "[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]");
-
- FT("doubleBackticks",
- "[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]");
-
- FT("codeBlock",
- "[comment&formatting&formatting-code-block ```css]",
- "[tag foo]",
- "[comment&formatting&formatting-code-block ```]");
-
- FT("taskList",
- "[variable-2&formatting&formatting-list&formatting-list-ul - ][meta&formatting&formatting-task [ ]]][variable-2 foo]",
- "[variable-2&formatting&formatting-list&formatting-list-ul - ][property&formatting&formatting-task [x]]][variable-2 foo]");
-
- FT("formatting_strikethrough",
- "[strikethrough&formatting&formatting-strikethrough ~~][strikethrough foo][strikethrough&formatting&formatting-strikethrough ~~]");
-
- FT("formatting_strikethrough",
- "foo [strikethrough&formatting&formatting-strikethrough ~~][strikethrough bar][strikethrough&formatting&formatting-strikethrough ~~]");
-
- MT("emInWordAsterisk",
- "foo[em *bar*]hello");
-
- MT("emInWordUnderscore",
- "foo_bar_hello");
-
- MT("emStrongUnderscore",
- "[strong __][em&strong _foo__][em _] bar");
-
- MT("fencedCodeBlocks",
- "[comment ```]",
- "[comment foo]",
- "",
- "[comment ```]",
- "bar");
-
- MT("fencedCodeBlockModeSwitching",
- "[comment ```javascript]",
- "[variable foo]",
- "",
- "[comment ```]",
- "bar");
-
- MT("taskListAsterisk",
- "[variable-2 * []] foo]", // Invalid; must have space or x between []
- "[variable-2 * [ ]]bar]", // Invalid; must have space after ]
- "[variable-2 * [x]]hello]", // Invalid; must have space after ]
- "[variable-2 * ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
- " [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested
-
- MT("taskListPlus",
- "[variable-2 + []] foo]", // Invalid; must have space or x between []
- "[variable-2 + [ ]]bar]", // Invalid; must have space after ]
- "[variable-2 + [x]]hello]", // Invalid; must have space after ]
- "[variable-2 + ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
- " [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested
-
- MT("taskListDash",
- "[variable-2 - []] foo]", // Invalid; must have space or x between []
- "[variable-2 - [ ]]bar]", // Invalid; must have space after ]
- "[variable-2 - [x]]hello]", // Invalid; must have space after ]
- "[variable-2 - ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
- " [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested
-
- MT("taskListNumber",
- "[variable-2 1. []] foo]", // Invalid; must have space or x between []
- "[variable-2 2. [ ]]bar]", // Invalid; must have space after ]
- "[variable-2 3. [x]]hello]", // Invalid; must have space after ]
- "[variable-2 4. ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links
- " [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested
-
- MT("SHA",
- "foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar");
-
- MT("SHAEmphasis",
- "[em *foo ][em&link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
-
- MT("shortSHA",
- "foo [link be6a8cc] bar");
-
- MT("tooShortSHA",
- "foo be6a8c bar");
-
- MT("longSHA",
- "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar");
-
- MT("badSHA",
- "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar");
-
- MT("userSHA",
- "foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello");
-
- MT("userSHAEmphasis",
- "[em *foo ][em&link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
-
- MT("userProjectSHA",
- "foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world");
-
- MT("userProjectSHAEmphasis",
- "[em *foo ][em&link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]");
-
- MT("num",
- "foo [link #1] bar");
-
- MT("numEmphasis",
- "[em *foo ][em&link #1][em *]");
-
- MT("badNum",
- "foo #1bar hello");
-
- MT("userNum",
- "foo [link bar#1] hello");
-
- MT("userNumEmphasis",
- "[em *foo ][em&link bar#1][em *]");
-
- MT("userProjectNum",
- "foo [link bar/hello#1] world");
-
- MT("userProjectNumEmphasis",
- "[em *foo ][em&link bar/hello#1][em *]");
-
- MT("vanillaLink",
- "foo [link http://www.example.com/] bar");
-
- MT("vanillaLinkPunctuation",
- "foo [link http://www.example.com/]. bar");
-
- MT("vanillaLinkExtension",
- "foo [link http://www.example.com/index.html] bar");
-
- MT("vanillaLinkEmphasis",
- "foo [em *][em&link http://www.example.com/index.html][em *] bar");
-
- MT("notALink",
- "[comment ```css]",
- "[tag foo] {[property color]:[keyword black];}",
- "[comment ```][link http://www.example.com/]");
-
- MT("notALink",
- "[comment ``foo `bar` http://www.example.com/``] hello");
-
- MT("notALink",
- "[comment `foo]",
- "[link http://www.example.com/]",
- "[comment `foo]",
- "",
- "[link http://www.example.com/]");
-
- MT("headerCodeBlockGithub",
- "[header&header-1 # heading]",
- "",
- "[comment ```]",
- "[comment code]",
- "[comment ```]",
- "",
- "Commit: [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2]",
- "Issue: [link #1]",
- "Link: [link http://www.example.com/]");
-
- MT("strikethrough",
- "[strikethrough ~~foo~~]");
-
- MT("strikethroughWithStartingSpace",
- "~~ foo~~");
-
- MT("strikethroughUnclosedStrayTildes",
- "[strikethrough ~~foo~~~]");
-
- MT("strikethroughUnclosedStrayTildes",
- "[strikethrough ~~foo ~~]");
-
- MT("strikethroughUnclosedStrayTildes",
- "[strikethrough ~~foo ~~ bar]");
-
- MT("strikethroughUnclosedStrayTildes",
- "[strikethrough ~~foo ~~ bar~~]hello");
-
- MT("strikethroughOneLetter",
- "[strikethrough ~~a~~]");
-
- MT("strikethroughWrapped",
- "[strikethrough ~~foo]",
- "[strikethrough foo~~]");
-
- MT("strikethroughParagraph",
- "[strikethrough ~~foo]",
- "",
- "foo[strikethrough ~~bar]");
-
- MT("strikethroughEm",
- "[strikethrough ~~foo][em&strikethrough *bar*][strikethrough ~~]");
-
- MT("strikethroughEm",
- "[em *][em&strikethrough ~~foo~~][em *]");
-
- MT("strikethroughStrong",
- "[strikethrough ~~][strong&strikethrough **foo**][strikethrough ~~]");
-
- MT("strikethroughStrong",
- "[strong **][strong&strikethrough ~~foo~~][strong **]");
-
-})();
diff --git a/public/js/lib/codemirror/mode/gherkin/gherkin.js b/public/js/lib/codemirror/mode/gherkin/gherkin.js
deleted file mode 100644
index fc2ebee167..0000000000
--- a/public/js/lib/codemirror/mode/gherkin/gherkin.js
+++ /dev/null
@@ -1,178 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/*
-Gherkin mode - http://www.cukes.info/
-Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
-*/
-
-// Following Objs from Brackets implementation: https://github.com/tregusti/brackets-gherkin/blob/master/main.js
-//var Quotes = {
-// SINGLE: 1,
-// DOUBLE: 2
-//};
-
-//var regex = {
-// keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/
-//};
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("gherkin", function () {
- return {
- startState: function () {
- return {
- lineNumber: 0,
- tableHeaderLine: false,
- allowFeature: true,
- allowBackground: false,
- allowScenario: false,
- allowSteps: false,
- allowPlaceholders: false,
- allowMultilineArgument: false,
- inMultilineString: false,
- inMultilineTable: false,
- inKeywordLine: false
- };
- },
- token: function (stream, state) {
- if (stream.sol()) {
- state.lineNumber++;
- state.inKeywordLine = false;
- if (state.inMultilineTable) {
- state.tableHeaderLine = false;
- if (!stream.match(/\s*\|/, false)) {
- state.allowMultilineArgument = false;
- state.inMultilineTable = false;
- }
- }
- }
-
- stream.eatSpace();
-
- if (state.allowMultilineArgument) {
-
- // STRING
- if (state.inMultilineString) {
- if (stream.match('"""')) {
- state.inMultilineString = false;
- state.allowMultilineArgument = false;
- } else {
- stream.match(/.*/);
- }
- return "string";
- }
-
- // TABLE
- if (state.inMultilineTable) {
- if (stream.match(/\|\s*/)) {
- return "bracket";
- } else {
- stream.match(/[^\|]*/);
- return state.tableHeaderLine ? "header" : "string";
- }
- }
-
- // DETECT START
- if (stream.match('"""')) {
- // String
- state.inMultilineString = true;
- return "string";
- } else if (stream.match("|")) {
- // Table
- state.inMultilineTable = true;
- state.tableHeaderLine = true;
- return "bracket";
- }
-
- }
-
- // LINE COMMENT
- if (stream.match(/#.*/)) {
- return "comment";
-
- // TAG
- } else if (!state.inKeywordLine && stream.match(/@\S+/)) {
- return "tag";
-
- // FEATURE
- } else if (!state.inKeywordLine && state.allowFeature && stream.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)) {
- state.allowScenario = true;
- state.allowBackground = true;
- state.allowPlaceholders = false;
- state.allowSteps = false;
- state.allowMultilineArgument = false;
- state.inKeywordLine = true;
- return "keyword";
-
- // BACKGROUND
- } else if (!state.inKeywordLine && state.allowBackground && stream.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)) {
- state.allowPlaceholders = false;
- state.allowSteps = true;
- state.allowBackground = false;
- state.allowMultilineArgument = false;
- state.inKeywordLine = true;
- return "keyword";
-
- // SCENARIO OUTLINE
- } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)) {
- state.allowPlaceholders = true;
- state.allowSteps = true;
- state.allowMultilineArgument = false;
- state.inKeywordLine = true;
- return "keyword";
-
- // EXAMPLES
- } else if (state.allowScenario && stream.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)) {
- state.allowPlaceholders = false;
- state.allowSteps = true;
- state.allowBackground = false;
- state.allowMultilineArgument = true;
- return "keyword";
-
- // SCENARIO
- } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)) {
- state.allowPlaceholders = false;
- state.allowSteps = true;
- state.allowBackground = false;
- state.allowMultilineArgument = false;
- state.inKeywordLine = true;
- return "keyword";
-
- // STEPS
- } else if (!state.inKeywordLine && state.allowSteps && stream.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)) {
- state.inStep = true;
- state.allowPlaceholders = true;
- state.allowMultilineArgument = true;
- state.inKeywordLine = true;
- return "keyword";
-
- // INLINE STRING
- } else if (stream.match(/"[^"]*"?/)) {
- return "string";
-
- // PLACEHOLDER
- } else if (state.allowPlaceholders && stream.match(/<[^>]*>?/)) {
- return "variable";
-
- // Fall through
- } else {
- stream.next();
- stream.eatWhile(/[^@"<#]/);
- return null;
- }
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-feature", "gherkin");
-
-});
diff --git a/public/js/lib/codemirror/mode/gherkin/index.html b/public/js/lib/codemirror/mode/gherkin/index.html
deleted file mode 100644
index af8184c981..0000000000
--- a/public/js/lib/codemirror/mode/gherkin/index.html
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-CodeMirror: Gherkin mode
-
-
-
-
-
-
-
-
-
-
-Gherkin mode
-
-Feature: Using Google
- Background:
- Something something
- Something else
- Scenario: Has a homepage
- When I navigate to the google home page
- Then the home page should contain the menu and the search form
- Scenario: Searching for a term
- When I navigate to the google home page
- When I search for Tofu
- Then the search results page is displayed
- Then the search results page contains 10 individual search results
- Then the search results contain a link to the wikipedia tofu page
-
-
-
- MIME types defined: text/x-feature
.
-
-
diff --git a/public/js/lib/codemirror/mode/go/go.js b/public/js/lib/codemirror/mode/go/go.js
deleted file mode 100644
index 173e034d0c..0000000000
--- a/public/js/lib/codemirror/mode/go/go.js
+++ /dev/null
@@ -1,184 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("go", function(config) {
- var indentUnit = config.indentUnit;
-
- var keywords = {
- "break":true, "case":true, "chan":true, "const":true, "continue":true,
- "default":true, "defer":true, "else":true, "fallthrough":true, "for":true,
- "func":true, "go":true, "goto":true, "if":true, "import":true,
- "interface":true, "map":true, "package":true, "range":true, "return":true,
- "select":true, "struct":true, "switch":true, "type":true, "var":true,
- "bool":true, "byte":true, "complex64":true, "complex128":true,
- "float32":true, "float64":true, "int8":true, "int16":true, "int32":true,
- "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true,
- "uint64":true, "int":true, "uint":true, "uintptr":true
- };
-
- var atoms = {
- "true":true, "false":true, "iota":true, "nil":true, "append":true,
- "cap":true, "close":true, "complex":true, "copy":true, "imag":true,
- "len":true, "make":true, "new":true, "panic":true, "print":true,
- "println":true, "real":true, "recover":true
- };
-
- var isOperatorChar = /[+\-*&^%:=<>!|\/]/;
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (ch == '"' || ch == "'" || ch == "`") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (/[\d\.]/.test(ch)) {
- if (ch == ".") {
- stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/);
- } else if (ch == "0") {
- stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/);
- } else {
- stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/);
- }
- return "number";
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_\xa1-\uffff]/);
- var cur = stream.current();
- if (keywords.propertyIsEnumerable(cur)) {
- if (cur == "case" || cur == "default") curPunc = "case";
- return "keyword";
- }
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !(escaped || quote == "`"))
- state.tokenize = tokenBase;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- return state.context = new Context(state.indented, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: null,
- context: new Context((basecolumn || 0) - indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- if (ctx.type == "case") ctx.type = "}";
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment") return style;
- if (ctx.align == null) ctx.align = true;
-
- if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "case") ctx.type = "case";
- else if (curPunc == "}" && ctx.type == "}") ctx = popContext(state);
- else if (curPunc == ctx.type) popContext(state);
- state.startOfLine = false;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != tokenBase && state.tokenize != null) return 0;
- var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
- if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) {
- state.context.type = "}";
- return ctx.indented;
- }
- var closing = firstChar == ctx.type;
- if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}):",
- fold: "brace",
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//"
- };
-});
-
-CodeMirror.defineMIME("text/x-go", "go");
-
-});
diff --git a/public/js/lib/codemirror/mode/go/index.html b/public/js/lib/codemirror/mode/go/index.html
deleted file mode 100644
index 72e3b364c6..0000000000
--- a/public/js/lib/codemirror/mode/go/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-CodeMirror: Go mode
-
-
-
-
-
-
-
-
-
-
-
-
-Go mode
-
-// Prime Sieve in Go.
-// Taken from the Go specification.
-// Copyright © The Go Authors.
-
-package main
-
-import "fmt"
-
-// Send the sequence 2, 3, 4, ... to channel 'ch'.
-func generate(ch chan<- int) {
- for i := 2; ; i++ {
- ch <- i // Send 'i' to channel 'ch'
- }
-}
-
-// Copy the values from channel 'src' to channel 'dst',
-// removing those divisible by 'prime'.
-func filter(src <-chan int, dst chan<- int, prime int) {
- for i := range src { // Loop over values received from 'src'.
- if i%prime != 0 {
- dst <- i // Send 'i' to channel 'dst'.
- }
- }
-}
-
-// The prime sieve: Daisy-chain filter processes together.
-func sieve() {
- ch := make(chan int) // Create a new channel.
- go generate(ch) // Start generate() as a subprocess.
- for {
- prime := <-ch
- fmt.Print(prime, "\n")
- ch1 := make(chan int)
- go filter(ch, ch1, prime)
- ch = ch1
- }
-}
-
-func main() {
- sieve()
-}
-
-
-
-
- MIME type: text/x-go
-
diff --git a/public/js/lib/codemirror/mode/groovy/groovy.js b/public/js/lib/codemirror/mode/groovy/groovy.js
deleted file mode 100644
index 89b8224cf5..0000000000
--- a/public/js/lib/codemirror/mode/groovy/groovy.js
+++ /dev/null
@@ -1,226 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("groovy", function(config) {
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var keywords = words(
- "abstract as assert boolean break byte case catch char class const continue def default " +
- "do double else enum extends final finally float for goto if implements import in " +
- "instanceof int interface long native new package private protected public return " +
- "short static strictfp super switch synchronized threadsafe throw throws transient " +
- "try void volatile while");
- var blockKeywords = words("catch class do else finally for if switch try while enum interface def");
- var atoms = words("null true false this");
-
- var curPunc;
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (ch == '"' || ch == "'") {
- return startString(ch, stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- if (stream.eat(/eE/)) { stream.eat(/\+\-/); stream.eatWhile(/\d/); }
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize.push(tokenComment);
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- if (expectExpression(state.lastToken)) {
- return startString(ch, stream, state);
- }
- }
- if (ch == "-" && stream.eat(">")) {
- curPunc = "->";
- return null;
- }
- if (/[+\-*&%=<>!?|\/~]/.test(ch)) {
- stream.eatWhile(/[+\-*&%=<>|~]/);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
- if (ch == "@") { stream.eatWhile(/[\w\$_\.]/); return "meta"; }
- if (state.lastToken == ".") return "property";
- if (stream.eat(":")) { curPunc = "proplabel"; return "property"; }
- var cur = stream.current();
- if (atoms.propertyIsEnumerable(cur)) { return "atom"; }
- if (keywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- }
- return "variable";
- }
- tokenBase.isBase = true;
-
- function startString(quote, stream, state) {
- var tripleQuoted = false;
- if (quote != "/" && stream.eat(quote)) {
- if (stream.eat(quote)) tripleQuoted = true;
- else return "string";
- }
- function t(stream, state) {
- var escaped = false, next, end = !tripleQuoted;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {
- if (!tripleQuoted) { break; }
- if (stream.match(quote + quote)) { end = true; break; }
- }
- if (quote == '"' && next == "$" && !escaped && stream.eat("{")) {
- state.tokenize.push(tokenBaseUntilBrace());
- return "string";
- }
- escaped = !escaped && next == "\\";
- }
- if (end) state.tokenize.pop();
- return "string";
- }
- state.tokenize.push(t);
- return t(stream, state);
- }
-
- function tokenBaseUntilBrace() {
- var depth = 1;
- function t(stream, state) {
- if (stream.peek() == "}") {
- depth--;
- if (depth == 0) {
- state.tokenize.pop();
- return state.tokenize[state.tokenize.length-1](stream, state);
- }
- } else if (stream.peek() == "{") {
- depth++;
- }
- return tokenBase(stream, state);
- }
- t.isBase = true;
- return t;
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize.pop();
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function expectExpression(last) {
- return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) ||
- last == "newstatement" || last == "keyword" || last == "proplabel";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
- function pushContext(state, col, type) {
- return state.context = new Context(state.indented, col, type, null, state.context);
- }
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- return {
- tokenize: [tokenBase],
- context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true,
- lastToken: null
- };
- },
-
- token: function(stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- // Automatic semicolon insertion
- if (ctx.type == "statement" && !expectExpression(state.lastToken)) {
- popContext(state); ctx = state.context;
- }
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = state.tokenize[state.tokenize.length-1](stream, state);
- if (style == "comment") return style;
- if (ctx.align == null) ctx.align = true;
-
- if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
- // Handle indentation for {x -> \n ... }
- else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") {
- popContext(state);
- state.context.align = false;
- }
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- state.lastToken = curPunc || style;
- return style;
- },
-
- indent: function(state, textAfter) {
- if (!state.tokenize[state.tokenize.length-1].isBase) return 0;
- var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;
- if (ctx.type == "statement" && !expectExpression(state.lastToken)) ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit);
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : config.indentUnit);
- },
-
- electricChars: "{}",
- fold: "brace"
- };
-});
-
-CodeMirror.defineMIME("text/x-groovy", "groovy");
-
-});
diff --git a/public/js/lib/codemirror/mode/groovy/index.html b/public/js/lib/codemirror/mode/groovy/index.html
deleted file mode 100644
index bb0df078c3..0000000000
--- a/public/js/lib/codemirror/mode/groovy/index.html
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-CodeMirror: Groovy mode
-
-
-
-
-
-
-
-
-
-
-
-Groovy mode
-
-//Pattern for groovy script
-def p = ~/.*\.groovy/
-new File( 'd:\\scripts' ).eachFileMatch(p) {f ->
- // imports list
- def imports = []
- f.eachLine {
- // condition to detect an import instruction
- ln -> if ( ln =~ '^import .*' ) {
- imports << "${ln - 'import '}"
- }
- }
- // print thmen
- if ( ! imports.empty ) {
- println f
- imports.each{ println " $it" }
- }
-}
-
-/* Coin changer demo code from http://groovy.codehaus.org */
-
-enum UsCoin {
- quarter(25), dime(10), nickel(5), penny(1)
- UsCoin(v) { value = v }
- final value
-}
-
-enum OzzieCoin {
- fifty(50), twenty(20), ten(10), five(5)
- OzzieCoin(v) { value = v }
- final value
-}
-
-def plural(word, count) {
- if (count == 1) return word
- word[-1] == 'y' ? word[0..-2] + "ies" : word + "s"
-}
-
-def change(currency, amount) {
- currency.values().inject([]){ list, coin ->
- int count = amount / coin.value
- amount = amount % coin.value
- list += "$count ${plural(coin.toString(), count)}"
- }
-}
-
-
-
-
- MIME types defined: text/x-groovy
-
diff --git a/public/js/lib/codemirror/mode/haml/haml.js b/public/js/lib/codemirror/mode/haml/haml.js
deleted file mode 100644
index 8fe63b0203..0000000000
--- a/public/js/lib/codemirror/mode/haml/haml.js
+++ /dev/null
@@ -1,159 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../ruby/ruby"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../ruby/ruby"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
- // full haml mode. This handled embeded ruby and html fragments too
- CodeMirror.defineMode("haml", function(config) {
- var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"});
- var rubyMode = CodeMirror.getMode(config, "ruby");
-
- function rubyInQuote(endQuote) {
- return function(stream, state) {
- var ch = stream.peek();
- if (ch == endQuote && state.rubyState.tokenize.length == 1) {
- // step out of ruby context as it seems to complete processing all the braces
- stream.next();
- state.tokenize = html;
- return "closeAttributeTag";
- } else {
- return ruby(stream, state);
- }
- };
- }
-
- function ruby(stream, state) {
- if (stream.match("-#")) {
- stream.skipToEnd();
- return "comment";
- }
- return rubyMode.token(stream, state.rubyState);
- }
-
- function html(stream, state) {
- var ch = stream.peek();
-
- // handle haml declarations. All declarations that cant be handled here
- // will be passed to html mode
- if (state.previousToken.style == "comment" ) {
- if (state.indented > state.previousToken.indented) {
- stream.skipToEnd();
- return "commentLine";
- }
- }
-
- if (state.startOfLine) {
- if (ch == "!" && stream.match("!!")) {
- stream.skipToEnd();
- return "tag";
- } else if (stream.match(/^%[\w:#\.]+=/)) {
- state.tokenize = ruby;
- return "hamlTag";
- } else if (stream.match(/^%[\w:]+/)) {
- return "hamlTag";
- } else if (ch == "/" ) {
- stream.skipToEnd();
- return "comment";
- }
- }
-
- if (state.startOfLine || state.previousToken.style == "hamlTag") {
- if ( ch == "#" || ch == ".") {
- stream.match(/[\w-#\.]*/);
- return "hamlAttribute";
- }
- }
-
- // donot handle --> as valid ruby, make it HTML close comment instead
- if (state.startOfLine && !stream.match("-->", false) && (ch == "=" || ch == "-" )) {
- state.tokenize = ruby;
- return state.tokenize(stream, state);
- }
-
- if (state.previousToken.style == "hamlTag" ||
- state.previousToken.style == "closeAttributeTag" ||
- state.previousToken.style == "hamlAttribute") {
- if (ch == "(") {
- state.tokenize = rubyInQuote(")");
- return state.tokenize(stream, state);
- } else if (ch == "{") {
- state.tokenize = rubyInQuote("}");
- return state.tokenize(stream, state);
- }
- }
-
- return htmlMode.token(stream, state.htmlState);
- }
-
- return {
- // default to html mode
- startState: function() {
- var htmlState = htmlMode.startState();
- var rubyState = rubyMode.startState();
- return {
- htmlState: htmlState,
- rubyState: rubyState,
- indented: 0,
- previousToken: { style: null, indented: 0},
- tokenize: html
- };
- },
-
- copyState: function(state) {
- return {
- htmlState : CodeMirror.copyState(htmlMode, state.htmlState),
- rubyState: CodeMirror.copyState(rubyMode, state.rubyState),
- indented: state.indented,
- previousToken: state.previousToken,
- tokenize: state.tokenize
- };
- },
-
- token: function(stream, state) {
- if (stream.sol()) {
- state.indented = stream.indentation();
- state.startOfLine = true;
- }
- if (stream.eatSpace()) return null;
- var style = state.tokenize(stream, state);
- state.startOfLine = false;
- // dont record comment line as we only want to measure comment line with
- // the opening comment block
- if (style && style != "commentLine") {
- state.previousToken = { style: style, indented: state.indented };
- }
- // if current state is ruby and the previous token is not `,` reset the
- // tokenize to html
- if (stream.eol() && state.tokenize == ruby) {
- stream.backUp(1);
- var ch = stream.peek();
- stream.next();
- if (ch && ch != ",") {
- state.tokenize = html;
- }
- }
- // reprocess some of the specific style tag when finish setting previousToken
- if (style == "hamlTag") {
- style = "tag";
- } else if (style == "commentLine") {
- style = "comment";
- } else if (style == "hamlAttribute") {
- style = "attribute";
- } else if (style == "closeAttributeTag") {
- style = null;
- }
- return style;
- }
- };
- }, "htmlmixed", "ruby");
-
- CodeMirror.defineMIME("text/x-haml", "haml");
-});
diff --git a/public/js/lib/codemirror/mode/haml/index.html b/public/js/lib/codemirror/mode/haml/index.html
deleted file mode 100644
index 2894a938e8..0000000000
--- a/public/js/lib/codemirror/mode/haml/index.html
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-CodeMirror: HAML mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-HAML mode
-
-!!!
-#content
-.left.column(title="title"){:href => "/hello", :test => "#{hello}_#{world}"}
-
- %h2 Welcome to our site!
- %p= puts "HAML MODE"
- .right.column
- = render :partial => "sidebar"
-
-.container
- .row
- .span8
- %h1.title= @page_title
-%p.title= @page_title
-%p
- /
- The same as HTML comment
- Hello multiline comment
-
- -# haml comment
- This wont be displayed
- nor will this
- Date/Time:
- - now = DateTime.now
- %strong= now
- - if now > DateTime.parse("December 31, 2006")
- = "Happy new " + "year!"
-
-%title
- = @title
- \= @title
- Title
-
- Title
-
-
-
-
- MIME types defined: text/x-haml
.
-
- Parsing/Highlighting Tests: normal , verbose .
-
-
diff --git a/public/js/lib/codemirror/mode/haml/test.js b/public/js/lib/codemirror/mode/haml/test.js
deleted file mode 100644
index 508458a437..0000000000
--- a/public/js/lib/codemirror/mode/haml/test.js
+++ /dev/null
@@ -1,97 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "haml");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
-
- // Requires at least one media query
- MT("elementName",
- "[tag %h1] Hey There");
-
- MT("oneElementPerLine",
- "[tag %h1] Hey There %h2");
-
- MT("idSelector",
- "[tag %h1][attribute #test] Hey There");
-
- MT("classSelector",
- "[tag %h1][attribute .hello] Hey There");
-
- MT("docType",
- "[tag !!! XML]");
-
- MT("comment",
- "[comment / Hello WORLD]");
-
- MT("notComment",
- "[tag %h1] This is not a / comment ");
-
- MT("attributes",
- "[tag %a]([variable title][operator =][string \"test\"]){[atom :title] [operator =>] [string \"test\"]}");
-
- MT("htmlCode",
- "[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket ][tag h1][tag&bracket >]");
-
- MT("rubyBlock",
- "[operator =][variable-2 @item]");
-
- MT("selectorRubyBlock",
- "[tag %a.selector=] [variable-2 @item]");
-
- MT("nestedRubyBlock",
- "[tag %a]",
- " [operator =][variable puts] [string \"test\"]");
-
- MT("multilinePlaintext",
- "[tag %p]",
- " Hello,",
- " World");
-
- MT("multilineRuby",
- "[tag %p]",
- " [comment -# this is a comment]",
- " [comment and this is a comment too]",
- " Date/Time",
- " [operator -] [variable now] [operator =] [tag DateTime][operator .][property now]",
- " [tag %strong=] [variable now]",
- " [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \"December 31, 2006\"])",
- " [operator =][string \"Happy\"]",
- " [operator =][string \"Belated\"]",
- " [operator =][string \"Birthday\"]");
-
- MT("multilineComment",
- "[comment /]",
- " [comment Multiline]",
- " [comment Comment]");
-
- MT("hamlComment",
- "[comment -# this is a comment]");
-
- MT("multilineHamlComment",
- "[comment -# this is a comment]",
- " [comment and this is a comment too]");
-
- MT("multilineHTMLComment",
- "[comment ]");
-
- MT("hamlAfterRubyTag",
- "[attribute .block]",
- " [tag %strong=] [variable now]",
- " [attribute .test]",
- " [operator =][variable now]",
- " [attribute .right]");
-
- MT("stretchedRuby",
- "[operator =] [variable puts] [string \"Hello\"],",
- " [string \"World\"]");
-
- MT("interpolationInHashAttribute",
- //"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");
- "[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test");
-
- MT("interpolationInHTMLAttribute",
- "[tag %div]([variable title][operator =][string \"#{][variable test][string }_#{][variable ting]()[string }\"]) Test");
-})();
diff --git a/public/js/lib/codemirror/mode/haskell/haskell.js b/public/js/lib/codemirror/mode/haskell/haskell.js
deleted file mode 100644
index fe0bab67ed..0000000000
--- a/public/js/lib/codemirror/mode/haskell/haskell.js
+++ /dev/null
@@ -1,267 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("haskell", function(_config, modeConfig) {
-
- function switchState(source, setState, f) {
- setState(f);
- return f(source, setState);
- }
-
- // These should all be Unicode extended, as per the Haskell 2010 report
- var smallRE = /[a-z_]/;
- var largeRE = /[A-Z]/;
- var digitRE = /\d/;
- var hexitRE = /[0-9A-Fa-f]/;
- var octitRE = /[0-7]/;
- var idRE = /[a-z_A-Z0-9'\xa1-\uffff]/;
- var symbolRE = /[-!#$%&*+.\/<=>?@\\^|~:]/;
- var specialRE = /[(),;[\]`{}]/;
- var whiteCharRE = /[ \t\v\f]/; // newlines are handled in tokenizer
-
- function normal(source, setState) {
- if (source.eatWhile(whiteCharRE)) {
- return null;
- }
-
- var ch = source.next();
- if (specialRE.test(ch)) {
- if (ch == '{' && source.eat('-')) {
- var t = "comment";
- if (source.eat('#')) {
- t = "meta";
- }
- return switchState(source, setState, ncomment(t, 1));
- }
- return null;
- }
-
- if (ch == '\'') {
- if (source.eat('\\')) {
- source.next(); // should handle other escapes here
- }
- else {
- source.next();
- }
- if (source.eat('\'')) {
- return "string";
- }
- return "error";
- }
-
- if (ch == '"') {
- return switchState(source, setState, stringLiteral);
- }
-
- if (largeRE.test(ch)) {
- source.eatWhile(idRE);
- if (source.eat('.')) {
- return "qualifier";
- }
- return "variable-2";
- }
-
- if (smallRE.test(ch)) {
- source.eatWhile(idRE);
- return "variable";
- }
-
- if (digitRE.test(ch)) {
- if (ch == '0') {
- if (source.eat(/[xX]/)) {
- source.eatWhile(hexitRE); // should require at least 1
- return "integer";
- }
- if (source.eat(/[oO]/)) {
- source.eatWhile(octitRE); // should require at least 1
- return "number";
- }
- }
- source.eatWhile(digitRE);
- var t = "number";
- if (source.match(/^\.\d+/)) {
- t = "number";
- }
- if (source.eat(/[eE]/)) {
- t = "number";
- source.eat(/[-+]/);
- source.eatWhile(digitRE); // should require at least 1
- }
- return t;
- }
-
- if (ch == "." && source.eat("."))
- return "keyword";
-
- if (symbolRE.test(ch)) {
- if (ch == '-' && source.eat(/-/)) {
- source.eatWhile(/-/);
- if (!source.eat(symbolRE)) {
- source.skipToEnd();
- return "comment";
- }
- }
- var t = "variable";
- if (ch == ':') {
- t = "variable-2";
- }
- source.eatWhile(symbolRE);
- return t;
- }
-
- return "error";
- }
-
- function ncomment(type, nest) {
- if (nest == 0) {
- return normal;
- }
- return function(source, setState) {
- var currNest = nest;
- while (!source.eol()) {
- var ch = source.next();
- if (ch == '{' && source.eat('-')) {
- ++currNest;
- }
- else if (ch == '-' && source.eat('}')) {
- --currNest;
- if (currNest == 0) {
- setState(normal);
- return type;
- }
- }
- }
- setState(ncomment(type, currNest));
- return type;
- };
- }
-
- function stringLiteral(source, setState) {
- while (!source.eol()) {
- var ch = source.next();
- if (ch == '"') {
- setState(normal);
- return "string";
- }
- if (ch == '\\') {
- if (source.eol() || source.eat(whiteCharRE)) {
- setState(stringGap);
- return "string";
- }
- if (source.eat('&')) {
- }
- else {
- source.next(); // should handle other escapes here
- }
- }
- }
- setState(normal);
- return "error";
- }
-
- function stringGap(source, setState) {
- if (source.eat('\\')) {
- return switchState(source, setState, stringLiteral);
- }
- source.next();
- setState(normal);
- return "error";
- }
-
-
- var wellKnownWords = (function() {
- var wkw = {};
- function setType(t) {
- return function () {
- for (var i = 0; i < arguments.length; i++)
- wkw[arguments[i]] = t;
- };
- }
-
- setType("keyword")(
- "case", "class", "data", "default", "deriving", "do", "else", "foreign",
- "if", "import", "in", "infix", "infixl", "infixr", "instance", "let",
- "module", "newtype", "of", "then", "type", "where", "_");
-
- setType("keyword")(
- "\.\.", ":", "::", "=", "\\", "\"", "<-", "->", "@", "~", "=>");
-
- setType("builtin")(
- "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<",
- "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", "**");
-
- setType("builtin")(
- "Bool", "Bounded", "Char", "Double", "EQ", "Either", "Enum", "Eq",
- "False", "FilePath", "Float", "Floating", "Fractional", "Functor", "GT",
- "IO", "IOError", "Int", "Integer", "Integral", "Just", "LT", "Left",
- "Maybe", "Monad", "Nothing", "Num", "Ord", "Ordering", "Rational", "Read",
- "ReadS", "Real", "RealFloat", "RealFrac", "Right", "Show", "ShowS",
- "String", "True");
-
- setType("builtin")(
- "abs", "acos", "acosh", "all", "and", "any", "appendFile", "asTypeOf",
- "asin", "asinh", "atan", "atan2", "atanh", "break", "catch", "ceiling",
- "compare", "concat", "concatMap", "const", "cos", "cosh", "curry",
- "cycle", "decodeFloat", "div", "divMod", "drop", "dropWhile", "either",
- "elem", "encodeFloat", "enumFrom", "enumFromThen", "enumFromThenTo",
- "enumFromTo", "error", "even", "exp", "exponent", "fail", "filter",
- "flip", "floatDigits", "floatRadix", "floatRange", "floor", "fmap",
- "foldl", "foldl1", "foldr", "foldr1", "fromEnum", "fromInteger",
- "fromIntegral", "fromRational", "fst", "gcd", "getChar", "getContents",
- "getLine", "head", "id", "init", "interact", "ioError", "isDenormalized",
- "isIEEE", "isInfinite", "isNaN", "isNegativeZero", "iterate", "last",
- "lcm", "length", "lex", "lines", "log", "logBase", "lookup", "map",
- "mapM", "mapM_", "max", "maxBound", "maximum", "maybe", "min", "minBound",
- "minimum", "mod", "negate", "not", "notElem", "null", "odd", "or",
- "otherwise", "pi", "pred", "print", "product", "properFraction",
- "putChar", "putStr", "putStrLn", "quot", "quotRem", "read", "readFile",
- "readIO", "readList", "readLn", "readParen", "reads", "readsPrec",
- "realToFrac", "recip", "rem", "repeat", "replicate", "return", "reverse",
- "round", "scaleFloat", "scanl", "scanl1", "scanr", "scanr1", "seq",
- "sequence", "sequence_", "show", "showChar", "showList", "showParen",
- "showString", "shows", "showsPrec", "significand", "signum", "sin",
- "sinh", "snd", "span", "splitAt", "sqrt", "subtract", "succ", "sum",
- "tail", "take", "takeWhile", "tan", "tanh", "toEnum", "toInteger",
- "toRational", "truncate", "uncurry", "undefined", "unlines", "until",
- "unwords", "unzip", "unzip3", "userError", "words", "writeFile", "zip",
- "zip3", "zipWith", "zipWith3");
-
- var override = modeConfig.overrideKeywords;
- if (override) for (var word in override) if (override.hasOwnProperty(word))
- wkw[word] = override[word];
-
- return wkw;
- })();
-
-
-
- return {
- startState: function () { return { f: normal }; },
- copyState: function (s) { return { f: s.f }; },
-
- token: function(stream, state) {
- var t = state.f(stream, function(s) { state.f = s; });
- var w = stream.current();
- return wellKnownWords.hasOwnProperty(w) ? wellKnownWords[w] : t;
- },
-
- blockCommentStart: "{-",
- blockCommentEnd: "-}",
- lineComment: "--"
- };
-
-});
-
-CodeMirror.defineMIME("text/x-haskell", "haskell");
-
-});
diff --git a/public/js/lib/codemirror/mode/haskell/index.html b/public/js/lib/codemirror/mode/haskell/index.html
deleted file mode 100644
index 42240b0f2f..0000000000
--- a/public/js/lib/codemirror/mode/haskell/index.html
+++ /dev/null
@@ -1,73 +0,0 @@
-
-
-CodeMirror: Haskell mode
-
-
-
-
-
-
-
-
-
-
-
-
-Haskell mode
-
-module UniquePerms (
- uniquePerms
- )
-where
-
--- | Find all unique permutations of a list where there might be duplicates.
-uniquePerms :: (Eq a) => [a] -> [[a]]
-uniquePerms = permBag . makeBag
-
--- | An unordered collection where duplicate values are allowed,
--- but represented with a single value and a count.
-type Bag a = [(a, Int)]
-
-makeBag :: (Eq a) => [a] -> Bag a
-makeBag [] = []
-makeBag (a:as) = mix a $ makeBag as
- where
- mix a [] = [(a,1)]
- mix a (bn@(b,n):bs) | a == b = (b,n+1):bs
- | otherwise = bn : mix a bs
-
-permBag :: Bag a -> [[a]]
-permBag [] = [[]]
-permBag bs = concatMap (\(f,cs) -> map (f:) $ permBag cs) . oneOfEach $ bs
- where
- oneOfEach [] = []
- oneOfEach (an@(a,n):bs) =
- let bs' = if n == 1 then bs else (a,n-1):bs
- in (a,bs') : mapSnd (an:) (oneOfEach bs)
-
- apSnd f (a,b) = (a, f b)
- mapSnd = map . apSnd
-
-
-
-
- MIME types defined: text/x-haskell
.
-
diff --git a/public/js/lib/codemirror/mode/haxe/haxe.js b/public/js/lib/codemirror/mode/haxe/haxe.js
deleted file mode 100644
index d49ad70f99..0000000000
--- a/public/js/lib/codemirror/mode/haxe/haxe.js
+++ /dev/null
@@ -1,518 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("haxe", function(config, parserConfig) {
- var indentUnit = config.indentUnit;
-
- // Tokenizer
-
- var keywords = function(){
- function kw(type) {return {type: type, style: "keyword"};}
- var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
- var operator = kw("operator"), atom = {type: "atom", style: "atom"}, attribute = {type:"attribute", style: "attribute"};
- var type = kw("typedef");
- return {
- "if": A, "while": A, "else": B, "do": B, "try": B,
- "return": C, "break": C, "continue": C, "new": C, "throw": C,
- "var": kw("var"), "inline":attribute, "static": attribute, "using":kw("import"),
- "public": attribute, "private": attribute, "cast": kw("cast"), "import": kw("import"), "macro": kw("macro"),
- "function": kw("function"), "catch": kw("catch"), "untyped": kw("untyped"), "callback": kw("cb"),
- "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
- "in": operator, "never": kw("property_access"), "trace":kw("trace"),
- "class": type, "abstract":type, "enum":type, "interface":type, "typedef":type, "extends":type, "implements":type, "dynamic":type,
- "true": atom, "false": atom, "null": atom
- };
- }();
-
- var isOperatorChar = /[+\-*&%=<>!?|]/;
-
- function chain(stream, state, f) {
- state.tokenize = f;
- return f(stream, state);
- }
-
- function nextUntilUnescaped(stream, end) {
- var escaped = false, next;
- while ((next = stream.next()) != null) {
- if (next == end && !escaped)
- return false;
- escaped = !escaped && next == "\\";
- }
- return escaped;
- }
-
- // Used as scratch variables to communicate multiple values without
- // consing up tons of objects.
- var type, content;
- function ret(tp, style, cont) {
- type = tp; content = cont;
- return style;
- }
-
- function haxeTokenBase(stream, state) {
- var ch = stream.next();
- if (ch == '"' || ch == "'")
- return chain(stream, state, haxeTokenString(ch));
- else if (/[\[\]{}\(\),;\:\.]/.test(ch))
- return ret(ch);
- else if (ch == "0" && stream.eat(/x/i)) {
- stream.eatWhile(/[\da-f]/i);
- return ret("number", "number");
- }
- else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) {
- stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
- return ret("number", "number");
- }
- else if (state.reAllowed && (ch == "~" && stream.eat(/\//))) {
- nextUntilUnescaped(stream, "/");
- stream.eatWhile(/[gimsu]/);
- return ret("regexp", "string-2");
- }
- else if (ch == "/") {
- if (stream.eat("*")) {
- return chain(stream, state, haxeTokenComment);
- }
- else if (stream.eat("/")) {
- stream.skipToEnd();
- return ret("comment", "comment");
- }
- else {
- stream.eatWhile(isOperatorChar);
- return ret("operator", null, stream.current());
- }
- }
- else if (ch == "#") {
- stream.skipToEnd();
- return ret("conditional", "meta");
- }
- else if (ch == "@") {
- stream.eat(/:/);
- stream.eatWhile(/[\w_]/);
- return ret ("metadata", "meta");
- }
- else if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return ret("operator", null, stream.current());
- }
- else {
- var word;
- if(/[A-Z]/.test(ch))
- {
- stream.eatWhile(/[\w_<>]/);
- word = stream.current();
- return ret("type", "variable-3", word);
- }
- else
- {
- stream.eatWhile(/[\w_]/);
- var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
- return (known && state.kwAllowed) ? ret(known.type, known.style, word) :
- ret("variable", "variable", word);
- }
- }
- }
-
- function haxeTokenString(quote) {
- return function(stream, state) {
- if (!nextUntilUnescaped(stream, quote))
- state.tokenize = haxeTokenBase;
- return ret("string", "string");
- };
- }
-
- function haxeTokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = haxeTokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return ret("comment", "comment");
- }
-
- // Parser
-
- var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true};
-
- function HaxeLexical(indented, column, type, align, prev, info) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.prev = prev;
- this.info = info;
- if (align != null) this.align = align;
- }
-
- function inScope(state, varname) {
- for (var v = state.localVars; v; v = v.next)
- if (v.name == varname) return true;
- }
-
- function parseHaxe(state, style, type, content, stream) {
- var cc = state.cc;
- // Communicate our context to the combinators.
- // (Less wasteful than consing up a hundred closures on every call.)
- cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
-
- if (!state.lexical.hasOwnProperty("align"))
- state.lexical.align = true;
-
- while(true) {
- var combinator = cc.length ? cc.pop() : statement;
- if (combinator(type, content)) {
- while(cc.length && cc[cc.length - 1].lex)
- cc.pop()();
- if (cx.marked) return cx.marked;
- if (type == "variable" && inScope(state, content)) return "variable-2";
- if (type == "variable" && imported(state, content)) return "variable-3";
- return style;
- }
- }
- }
-
- function imported(state, typename)
- {
- if (/[a-z]/.test(typename.charAt(0)))
- return false;
- var len = state.importedtypes.length;
- for (var i = 0; i= 0; i--) cx.cc.push(arguments[i]);
- }
- function cont() {
- pass.apply(null, arguments);
- return true;
- }
- function register(varname) {
- var state = cx.state;
- if (state.context) {
- cx.marked = "def";
- for (var v = state.localVars; v; v = v.next)
- if (v.name == varname) return;
- state.localVars = {name: varname, next: state.localVars};
- }
- }
-
- // Combinators
-
- var defaultVars = {name: "this", next: null};
- function pushcontext() {
- if (!cx.state.context) cx.state.localVars = defaultVars;
- cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
- }
- function popcontext() {
- cx.state.localVars = cx.state.context.vars;
- cx.state.context = cx.state.context.prev;
- }
- function pushlex(type, info) {
- var result = function() {
- var state = cx.state;
- state.lexical = new HaxeLexical(state.indented, cx.stream.column(), type, null, state.lexical, info);
- };
- result.lex = true;
- return result;
- }
- function poplex() {
- var state = cx.state;
- if (state.lexical.prev) {
- if (state.lexical.type == ")")
- state.indented = state.lexical.indented;
- state.lexical = state.lexical.prev;
- }
- }
- poplex.lex = true;
-
- function expect(wanted) {
- function f(type) {
- if (type == wanted) return cont();
- else if (wanted == ";") return pass();
- else return cont(f);
- };
- return f;
- }
-
- function statement(type) {
- if (type == "@") return cont(metadef);
- if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex);
- if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
- if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
- if (type == "{") return cont(pushlex("}"), pushcontext, block, poplex, popcontext);
- if (type == ";") return cont();
- if (type == "attribute") return cont(maybeattribute);
- if (type == "function") return cont(functiondef);
- if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"),
- poplex, statement, poplex);
- if (type == "variable") return cont(pushlex("stat"), maybelabel);
- if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
- block, poplex, poplex);
- if (type == "case") return cont(expression, expect(":"));
- if (type == "default") return cont(expect(":"));
- if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
- statement, poplex, popcontext);
- if (type == "import") return cont(importdef, expect(";"));
- if (type == "typedef") return cont(typedef);
- return pass(pushlex("stat"), expression, expect(";"), poplex);
- }
- function expression(type) {
- if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);
- if (type == "function") return cont(functiondef);
- if (type == "keyword c") return cont(maybeexpression);
- if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator);
- if (type == "operator") return cont(expression);
- if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator);
- if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
- return cont();
- }
- function maybeexpression(type) {
- if (type.match(/[;\}\)\],]/)) return pass();
- return pass(expression);
- }
-
- function maybeoperator(type, value) {
- if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator);
- if (type == "operator" || type == ":") return cont(expression);
- if (type == ";") return;
- if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator);
- if (type == ".") return cont(property, maybeoperator);
- if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator);
- }
-
- function maybeattribute(type) {
- if (type == "attribute") return cont(maybeattribute);
- if (type == "function") return cont(functiondef);
- if (type == "var") return cont(vardef1);
- }
-
- function metadef(type) {
- if(type == ":") return cont(metadef);
- if(type == "variable") return cont(metadef);
- if(type == "(") return cont(pushlex(")"), commasep(metaargs, ")"), poplex, statement);
- }
- function metaargs(type) {
- if(type == "variable") return cont();
- }
-
- function importdef (type, value) {
- if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); }
- else if(type == "variable" || type == "property" || type == "." || value == "*") return cont(importdef);
- }
-
- function typedef (type, value)
- {
- if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); }
- else if (type == "type" && /[A-Z]/.test(value.charAt(0))) { return cont(); }
- }
-
- function maybelabel(type) {
- if (type == ":") return cont(poplex, statement);
- return pass(maybeoperator, expect(";"), poplex);
- }
- function property(type) {
- if (type == "variable") {cx.marked = "property"; return cont();}
- }
- function objprop(type) {
- if (type == "variable") cx.marked = "property";
- if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression);
- }
- function commasep(what, end) {
- function proceed(type) {
- if (type == ",") return cont(what, proceed);
- if (type == end) return cont();
- return cont(expect(end));
- }
- return function(type) {
- if (type == end) return cont();
- else return pass(what, proceed);
- };
- }
- function block(type) {
- if (type == "}") return cont();
- return pass(statement, block);
- }
- function vardef1(type, value) {
- if (type == "variable"){register(value); return cont(typeuse, vardef2);}
- return cont();
- }
- function vardef2(type, value) {
- if (value == "=") return cont(expression, vardef2);
- if (type == ",") return cont(vardef1);
- }
- function forspec1(type, value) {
- if (type == "variable") {
- register(value);
- }
- return cont(pushlex(")"), pushcontext, forin, expression, poplex, statement, popcontext);
- }
- function forin(_type, value) {
- if (value == "in") return cont();
- }
- function functiondef(type, value) {
- if (type == "variable") {register(value); return cont(functiondef);}
- if (value == "new") return cont(functiondef);
- if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, typeuse, statement, popcontext);
- }
- function typeuse(type) {
- if(type == ":") return cont(typestring);
- }
- function typestring(type) {
- if(type == "type") return cont();
- if(type == "variable") return cont();
- if(type == "{") return cont(pushlex("}"), commasep(typeprop, "}"), poplex);
- }
- function typeprop(type) {
- if(type == "variable") return cont(typeuse);
- }
- function funarg(type, value) {
- if (type == "variable") {register(value); return cont(typeuse);}
- }
-
- // Interface
-
- return {
- startState: function(basecolumn) {
- var defaulttypes = ["Int", "Float", "String", "Void", "Std", "Bool", "Dynamic", "Array"];
- return {
- tokenize: haxeTokenBase,
- reAllowed: true,
- kwAllowed: true,
- cc: [],
- lexical: new HaxeLexical((basecolumn || 0) - indentUnit, 0, "block", false),
- localVars: parserConfig.localVars,
- importedtypes: defaulttypes,
- context: parserConfig.localVars && {vars: parserConfig.localVars},
- indented: 0
- };
- },
-
- token: function(stream, state) {
- if (stream.sol()) {
- if (!state.lexical.hasOwnProperty("align"))
- state.lexical.align = false;
- state.indented = stream.indentation();
- }
- if (stream.eatSpace()) return null;
- var style = state.tokenize(stream, state);
- if (type == "comment") return style;
- state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/));
- state.kwAllowed = type != '.';
- return parseHaxe(state, style, type, content, stream);
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != haxeTokenBase) return 0;
- var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
- if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
- var type = lexical.type, closing = firstChar == type;
- if (type == "vardef") return lexical.indented + 4;
- else if (type == "form" && firstChar == "{") return lexical.indented;
- else if (type == "stat" || type == "form") return lexical.indented + indentUnit;
- else if (lexical.info == "switch" && !closing)
- return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
- else if (lexical.align) return lexical.column + (closing ? 0 : 1);
- else return lexical.indented + (closing ? 0 : indentUnit);
- },
-
- electricChars: "{}",
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//"
- };
-});
-
-CodeMirror.defineMIME("text/x-haxe", "haxe");
-
-CodeMirror.defineMode("hxml", function () {
-
- return {
- startState: function () {
- return {
- define: false,
- inString: false
- };
- },
- token: function (stream, state) {
- var ch = stream.peek();
- var sol = stream.sol();
-
- ///* comments */
- if (ch == "#") {
- stream.skipToEnd();
- return "comment";
- }
- if (sol && ch == "-") {
- var style = "variable-2";
-
- stream.eat(/-/);
-
- if (stream.peek() == "-") {
- stream.eat(/-/);
- style = "keyword a";
- }
-
- if (stream.peek() == "D") {
- stream.eat(/[D]/);
- style = "keyword c";
- state.define = true;
- }
-
- stream.eatWhile(/[A-Z]/i);
- return style;
- }
-
- var ch = stream.peek();
-
- if (state.inString == false && ch == "'") {
- state.inString = true;
- ch = stream.next();
- }
-
- if (state.inString == true) {
- if (stream.skipTo("'")) {
-
- } else {
- stream.skipToEnd();
- }
-
- if (stream.peek() == "'") {
- stream.next();
- state.inString = false;
- }
-
- return "string";
- }
-
- stream.next();
- return null;
- },
- lineComment: "#"
- };
-});
-
-CodeMirror.defineMIME("text/x-hxml", "hxml");
-
-});
diff --git a/public/js/lib/codemirror/mode/haxe/index.html b/public/js/lib/codemirror/mode/haxe/index.html
deleted file mode 100644
index d415b5e109..0000000000
--- a/public/js/lib/codemirror/mode/haxe/index.html
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
-CodeMirror: Haxe mode
-
-
-
-
-
-
-
-
-
-
-Haxe mode
-
-
-
-import one.two.Three;
-
-@attr("test")
-class Foo<T> extends Three
-{
- public function new()
- {
- noFoo = 12;
- }
-
- public static inline function doFoo(obj:{k:Int, l:Float}):Int
- {
- for(i in 0...10)
- {
- obj.k++;
- trace(i);
- var var1 = new Array();
- if(var1.length > 1)
- throw "Error";
- }
- // The following line should not be colored, the variable is scoped out
- var1;
- /* Multi line
- * Comment test
- */
- return obj.k;
- }
- private function bar():Void
- {
- #if flash
- var t1:String = "1.21";
- #end
- try {
- doFoo({k:3, l:1.2});
- }
- catch (e : String) {
- trace(e);
- }
- var t2:Float = cast(3.2);
- var t3:haxe.Timer = new haxe.Timer();
- var t4 = {k:Std.int(t2), l:Std.parseFloat(t1)};
- var t5 = ~/123+.*$/i;
- doFoo(t4);
- untyped t1 = 4;
- bob = new Foo<Int>
- }
- public var okFoo(default, never):Float;
- var noFoo(getFoo, null):Int;
- function getFoo():Int {
- return noFoo;
- }
-
- public var three:Int;
-}
-enum Color
-{
- red;
- green;
- blue;
- grey( v : Int );
- rgb (r:Int,g:Int,b:Int);
-}
-
-
-
Hxml mode:
-
-
--cp test
--js path/to/file.js
-#-remap nme:flash
---next
--D source-map-content
--cmd 'test'
--lib lime
-
-
-
-
-
- MIME types defined: text/x-haxe, text/x-hxml
.
-
diff --git a/public/js/lib/codemirror/mode/http/http.js b/public/js/lib/codemirror/mode/http/http.js
deleted file mode 100644
index 9a3c5f9fd8..0000000000
--- a/public/js/lib/codemirror/mode/http/http.js
+++ /dev/null
@@ -1,113 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("http", function() {
- function failFirstLine(stream, state) {
- stream.skipToEnd();
- state.cur = header;
- return "error";
- }
-
- function start(stream, state) {
- if (stream.match(/^HTTP\/\d\.\d/)) {
- state.cur = responseStatusCode;
- return "keyword";
- } else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) {
- state.cur = requestPath;
- return "keyword";
- } else {
- return failFirstLine(stream, state);
- }
- }
-
- function responseStatusCode(stream, state) {
- var code = stream.match(/^\d+/);
- if (!code) return failFirstLine(stream, state);
-
- state.cur = responseStatusText;
- var status = Number(code[0]);
- if (status >= 100 && status < 200) {
- return "positive informational";
- } else if (status >= 200 && status < 300) {
- return "positive success";
- } else if (status >= 300 && status < 400) {
- return "positive redirect";
- } else if (status >= 400 && status < 500) {
- return "negative client-error";
- } else if (status >= 500 && status < 600) {
- return "negative server-error";
- } else {
- return "error";
- }
- }
-
- function responseStatusText(stream, state) {
- stream.skipToEnd();
- state.cur = header;
- return null;
- }
-
- function requestPath(stream, state) {
- stream.eatWhile(/\S/);
- state.cur = requestProtocol;
- return "string-2";
- }
-
- function requestProtocol(stream, state) {
- if (stream.match(/^HTTP\/\d\.\d$/)) {
- state.cur = header;
- return "keyword";
- } else {
- return failFirstLine(stream, state);
- }
- }
-
- function header(stream) {
- if (stream.sol() && !stream.eat(/[ \t]/)) {
- if (stream.match(/^.*?:/)) {
- return "atom";
- } else {
- stream.skipToEnd();
- return "error";
- }
- } else {
- stream.skipToEnd();
- return "string";
- }
- }
-
- function body(stream) {
- stream.skipToEnd();
- return null;
- }
-
- return {
- token: function(stream, state) {
- var cur = state.cur;
- if (cur != header && cur != body && stream.eatSpace()) return null;
- return cur(stream, state);
- },
-
- blankLine: function(state) {
- state.cur = body;
- },
-
- startState: function() {
- return {cur: start};
- }
- };
-});
-
-CodeMirror.defineMIME("message/http", "http");
-
-});
diff --git a/public/js/lib/codemirror/mode/http/index.html b/public/js/lib/codemirror/mode/http/index.html
deleted file mode 100644
index 0b8d5315da..0000000000
--- a/public/js/lib/codemirror/mode/http/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-CodeMirror: HTTP mode
-
-
-
-
-
-
-
-
-
-
-HTTP mode
-
-
-
-POST /somewhere HTTP/1.1
-Host: example.com
-If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
-Content-Type: application/x-www-form-urlencoded;
- charset=utf-8
-User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Ubuntu/12.04 Chromium/20.0.1132.47 Chrome/20.0.1132.47 Safari/536.11
-
-This is the request body!
-
-
-
-
- MIME types defined: message/http
.
-
diff --git a/public/js/lib/codemirror/mode/index.html b/public/js/lib/codemirror/mode/index.html
deleted file mode 100644
index c933e1e943..0000000000
--- a/public/js/lib/codemirror/mode/index.html
+++ /dev/null
@@ -1,132 +0,0 @@
-
-
-CodeMirror: Language Modes
-
-
-
-
-
-
-
- Language modes
-
- This is a list of every mode in the distribution. Each mode lives
-in a subdirectory of the mode/
directory, and typically
-defines a single JavaScript file that implements the mode. Loading
-such file will make the language available to CodeMirror, through
-the mode
-option.
-
-
-
-
diff --git a/public/js/lib/codemirror/mode/jinja2/index.html b/public/js/lib/codemirror/mode/jinja2/index.html
deleted file mode 100644
index 5a70e9153b..0000000000
--- a/public/js/lib/codemirror/mode/jinja2/index.html
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-CodeMirror: Jinja2 mode
-
-
-
-
-
-
-
-
-
-
-Jinja2 mode
-
-{# this is a comment #}
-{%- for item in li -%}
- <li>{{ item.label }}</li>
-{% endfor -%}
-{{ item.sand == true and item.keyword == false ? 1 : 0 }}
-{{ app.get(55, 1.2, true) }}
-{% if app.get('_route') == ('_home') %}home{% endif %}
-{% if app.session.flashbag.has('message') %}
- {% for message in app.session.flashbag.get('message') %}
- {{ message.content }}
- {% endfor %}
-{% endif %}
-{{ path('_home', {'section': app.request.get('section')}) }}
-{{ path('_home', {
- 'section': app.request.get('section'),
- 'boolean': true,
- 'number': 55.33
- })
-}}
-{% include ('test.incl.html.twig') %}
-
-
-
diff --git a/public/js/lib/codemirror/mode/jinja2/jinja2.js b/public/js/lib/codemirror/mode/jinja2/jinja2.js
deleted file mode 100644
index ed195581cf..0000000000
--- a/public/js/lib/codemirror/mode/jinja2/jinja2.js
+++ /dev/null
@@ -1,142 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode("jinja2", function() {
- var keywords = ["and", "as", "block", "endblock", "by", "cycle", "debug", "else", "elif",
- "extends", "filter", "endfilter", "firstof", "for",
- "endfor", "if", "endif", "ifchanged", "endifchanged",
- "ifequal", "endifequal", "ifnotequal",
- "endifnotequal", "in", "include", "load", "not", "now", "or",
- "parsed", "regroup", "reversed", "spaceless",
- "endspaceless", "ssi", "templatetag", "openblock",
- "closeblock", "openvariable", "closevariable",
- "openbrace", "closebrace", "opencomment",
- "closecomment", "widthratio", "url", "with", "endwith",
- "get_current_language", "trans", "endtrans", "noop", "blocktrans",
- "endblocktrans", "get_available_languages",
- "get_current_language_bidi", "plural"],
- operator = /^[+\-*&%=<>!?|~^]/,
- sign = /^[:\[\(\{]/,
- atom = ["true", "false"],
- number = /^(\d[+\-\*\/])?\d+(\.\d+)?/;
-
- keywords = new RegExp("((" + keywords.join(")|(") + "))\\b");
- atom = new RegExp("((" + atom.join(")|(") + "))\\b");
-
- function tokenBase (stream, state) {
- var ch = stream.peek();
-
- //Comment
- if (state.incomment) {
- if(!stream.skipTo("#}")) {
- stream.skipToEnd();
- } else {
- stream.eatWhile(/\#|}/);
- state.incomment = false;
- }
- return "comment";
- //Tag
- } else if (state.intag) {
- //After operator
- if(state.operator) {
- state.operator = false;
- if(stream.match(atom)) {
- return "atom";
- }
- if(stream.match(number)) {
- return "number";
- }
- }
- //After sign
- if(state.sign) {
- state.sign = false;
- if(stream.match(atom)) {
- return "atom";
- }
- if(stream.match(number)) {
- return "number";
- }
- }
-
- if(state.instring) {
- if(ch == state.instring) {
- state.instring = false;
- }
- stream.next();
- return "string";
- } else if(ch == "'" || ch == '"') {
- state.instring = ch;
- stream.next();
- return "string";
- } else if(stream.match(state.intag + "}") || stream.eat("-") && stream.match(state.intag + "}")) {
- state.intag = false;
- return "tag";
- } else if(stream.match(operator)) {
- state.operator = true;
- return "operator";
- } else if(stream.match(sign)) {
- state.sign = true;
- } else {
- if(stream.eat(" ") || stream.sol()) {
- if(stream.match(keywords)) {
- return "keyword";
- }
- if(stream.match(atom)) {
- return "atom";
- }
- if(stream.match(number)) {
- return "number";
- }
- if(stream.sol()) {
- stream.next();
- }
- } else {
- stream.next();
- }
-
- }
- return "variable";
- } else if (stream.eat("{")) {
- if (ch = stream.eat("#")) {
- state.incomment = true;
- if(!stream.skipTo("#}")) {
- stream.skipToEnd();
- } else {
- stream.eatWhile(/\#|}/);
- state.incomment = false;
- }
- return "comment";
- //Open tag
- } else if (ch = stream.eat(/\{|%/)) {
- //Cache close tag
- state.intag = ch;
- if(ch == "{") {
- state.intag = "}";
- }
- stream.eat("-");
- return "tag";
- }
- }
- stream.next();
- };
-
- return {
- startState: function () {
- return {tokenize: tokenBase};
- },
- token: function (stream, state) {
- return state.tokenize(stream, state);
- }
- };
- });
-});
diff --git a/public/js/lib/codemirror/mode/julia/index.html b/public/js/lib/codemirror/mode/julia/index.html
deleted file mode 100644
index e1492c210f..0000000000
--- a/public/js/lib/codemirror/mode/julia/index.html
+++ /dev/null
@@ -1,195 +0,0 @@
-
-
-CodeMirror: Julia mode
-
-
-
-
-
-
-
-
-
-
-Julia mode
-
-
-#numbers
-1234
-1234im
-.234
-.234im
-2.23im
-2.3f3
-23e2
-0x234
-
-#strings
-'a'
-"asdf"
-r"regex"
-b"bytestring"
-
-"""
-multiline string
-"""
-
-#identifiers
-a
-as123
-function_name!
-
-#unicode identifiers
-# a = x\ddot
-a⃗ = ẍ
-# a = v\dot
-a⃗ = v̇
-#F\vec = m \cdotp a\vec
-F⃗ = m·a⃗
-
-#literal identifier multiples
-3x
-4[1, 2, 3]
-
-#dicts and indexing
-x=[1, 2, 3]
-x[end-1]
-x={"julia"=>"language of technical computing"}
-
-
-#exception handling
-try
- f()
-catch
- @printf "Error"
-finally
- g()
-end
-
-#types
-immutable Color{T<:Number}
- r::T
- g::T
- b::T
-end
-
-#functions
-function change!(x::Vector{Float64})
- for i = 1:length(x)
- x[i] *= 2
- end
-end
-
-#function invocation
-f('b', (2, 3)...)
-
-#operators
-|=
-&=
-^=
-\-
-%=
-*=
-+=
--=
-<=
->=
-!=
-==
-%
-*
-+
--
-<
->
-!
-=
-|
-&
-^
-\
-?
-~
-:
-$
-<:
-.<
-.>
-<<
-<<=
->>
->>>>
->>=
->>>=
-<<=
-<<<=
-.<=
-.>=
-.==
-->
-//
-in
-...
-//
-:=
-.//=
-.*=
-./=
-.^=
-.%=
-.+=
-.-=
-\=
-\\=
-||
-===
-&&
-|=
-.|=
-<:
->:
-|>
-<|
-::
-x ? y : z
-
-#macros
-@spawnat 2 1+1
-@eval(:x)
-
-#keywords and operators
-if else elseif while for
- begin let end do
-try catch finally return break continue
-global local const
-export import importall using
-function macro module baremodule
-type immutable quote
-true false enumerate
-
-
-
-
-
- MIME types defined: text/x-julia
.
-
diff --git a/public/js/lib/codemirror/mode/julia/julia.js b/public/js/lib/codemirror/mode/julia/julia.js
deleted file mode 100644
index e854988aa3..0000000000
--- a/public/js/lib/codemirror/mode/julia/julia.js
+++ /dev/null
@@ -1,301 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("julia", function(_conf, parserConf) {
- var ERRORCLASS = 'error';
-
- function wordRegexp(words) {
- return new RegExp("^((" + words.join(")|(") + "))\\b");
- }
-
- var operators = parserConf.operators || /^\.?[|&^\\%*+\-<>!=\/]=?|\?|~|:|\$|\.[<>]|<<=?|>>>?=?|\.[<>=]=|->?|\/\/|\bin\b/;
- var delimiters = parserConf.delimiters || /^[;,()[\]{}]/;
- var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*!*/;
- var blockOpeners = ["begin", "function", "type", "immutable", "let", "macro", "for", "while", "quote", "if", "else", "elseif", "try", "finally", "catch", "do"];
- var blockClosers = ["end", "else", "elseif", "catch", "finally"];
- var keywordList = ['if', 'else', 'elseif', 'while', 'for', 'begin', 'let', 'end', 'do', 'try', 'catch', 'finally', 'return', 'break', 'continue', 'global', 'local', 'const', 'export', 'import', 'importall', 'using', 'function', 'macro', 'module', 'baremodule', 'type', 'immutable', 'quote', 'typealias', 'abstract', 'bitstype', 'ccall'];
- var builtinList = ['true', 'false', 'enumerate', 'open', 'close', 'nothing', 'NaN', 'Inf', 'print', 'println', 'Int', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32', 'Uint32', 'Int64', 'Uint64', 'Int128', 'Uint128', 'Bool', 'Char', 'Float16', 'Float32', 'Float64', 'Array', 'Vector', 'Matrix', 'String', 'UTF8String', 'ASCIIString', 'error', 'warn', 'info', '@printf'];
-
- //var stringPrefixes = new RegExp("^[br]?('|\")")
- var stringPrefixes = /^(`|'|"{3}|([br]?"))/;
- var keywords = wordRegexp(keywordList);
- var builtins = wordRegexp(builtinList);
- var openers = wordRegexp(blockOpeners);
- var closers = wordRegexp(blockClosers);
- var macro = /^@[_A-Za-z][_A-Za-z0-9]*/;
- var symbol = /^:[_A-Za-z][_A-Za-z0-9]*/;
- var indentInfo = null;
-
- function in_array(state) {
- var ch = cur_scope(state);
- if(ch=="[" || ch=="{") {
- return true;
- }
- else {
- return false;
- }
- }
-
- function cur_scope(state) {
- if(state.scopes.length==0) {
- return null;
- }
- return state.scopes[state.scopes.length - 1];
- }
-
- // tokenizers
- function tokenBase(stream, state) {
- // Handle scope changes
- var leaving_expr = state.leaving_expr;
- if(stream.sol()) {
- leaving_expr = false;
- }
- state.leaving_expr = false;
- if(leaving_expr) {
- if(stream.match(/^'+/)) {
- return 'operator';
- }
-
- }
-
- if(stream.match(/^\.{2,3}/)) {
- return 'operator';
- }
-
- if (stream.eatSpace()) {
- return null;
- }
-
- var ch = stream.peek();
- // Handle Comments
- if (ch === '#') {
- stream.skipToEnd();
- return 'comment';
- }
- if(ch==='[') {
- state.scopes.push("[");
- }
-
- if(ch==='{') {
- state.scopes.push("{");
- }
-
- var scope=cur_scope(state);
-
- if(scope==='[' && ch===']') {
- state.scopes.pop();
- state.leaving_expr=true;
- }
-
- if(scope==='{' && ch==='}') {
- state.scopes.pop();
- state.leaving_expr=true;
- }
-
- if(ch===')') {
- state.leaving_expr = true;
- }
-
- var match;
- if(!in_array(state) && (match=stream.match(openers, false))) {
- state.scopes.push(match);
- }
-
- if(!in_array(state) && stream.match(closers, false)) {
- state.scopes.pop();
- }
-
- if(in_array(state)) {
- if(stream.match(/^end/)) {
- return 'number';
- }
-
- }
-
- if(stream.match(/^=>/)) {
- return 'operator';
- }
-
-
- // Handle Number Literals
- if (stream.match(/^[0-9\.]/, false)) {
- var imMatcher = RegExp(/^im\b/);
- var floatLiteral = false;
- // Floats
- if (stream.match(/^\d*\.(?!\.)\d+([ef][\+\-]?\d+)?/i)) { floatLiteral = true; }
- if (stream.match(/^\d+\.(?!\.)\d*/)) { floatLiteral = true; }
- if (stream.match(/^\.\d+/)) { floatLiteral = true; }
- if (floatLiteral) {
- // Float literals may be "imaginary"
- stream.match(imMatcher);
- state.leaving_expr = true;
- return 'number';
- }
- // Integers
- var intLiteral = false;
- // Hex
- if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; }
- // Binary
- if (stream.match(/^0b[01]+/i)) { intLiteral = true; }
- // Octal
- if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; }
- // Decimal
- if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) {
- intLiteral = true;
- }
- // Zero by itself with no other piece of number.
- if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; }
- if (intLiteral) {
- // Integer literals may be "long"
- stream.match(imMatcher);
- state.leaving_expr = true;
- return 'number';
- }
- }
-
- if(stream.match(/^(::)|(<:)/)) {
- return 'operator';
- }
-
- // Handle symbols
- if(!leaving_expr && stream.match(symbol)) {
- return 'string';
- }
-
- // Handle operators and Delimiters
- if (stream.match(operators)) {
- return 'operator';
- }
-
-
- // Handle Strings
- if (stream.match(stringPrefixes)) {
- state.tokenize = tokenStringFactory(stream.current());
- return state.tokenize(stream, state);
- }
-
- if (stream.match(macro)) {
- return 'meta';
- }
-
-
- if (stream.match(delimiters)) {
- return null;
- }
-
- if (stream.match(keywords)) {
- return 'keyword';
- }
-
- if (stream.match(builtins)) {
- return 'builtin';
- }
-
-
- if (stream.match(identifiers)) {
- state.leaving_expr=true;
- return 'variable';
- }
- // Handle non-detected items
- stream.next();
- return ERRORCLASS;
- }
-
- function tokenStringFactory(delimiter) {
- while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) {
- delimiter = delimiter.substr(1);
- }
- var singleline = delimiter.length == 1;
- var OUTCLASS = 'string';
-
- function tokenString(stream, state) {
- while (!stream.eol()) {
- stream.eatWhile(/[^'"\\]/);
- if (stream.eat('\\')) {
- stream.next();
- if (singleline && stream.eol()) {
- return OUTCLASS;
- }
- } else if (stream.match(delimiter)) {
- state.tokenize = tokenBase;
- return OUTCLASS;
- } else {
- stream.eat(/['"]/);
- }
- }
- if (singleline) {
- if (parserConf.singleLineStringErrors) {
- return ERRORCLASS;
- } else {
- state.tokenize = tokenBase;
- }
- }
- return OUTCLASS;
- }
- tokenString.isString = true;
- return tokenString;
- }
-
- function tokenLexer(stream, state) {
- indentInfo = null;
- var style = state.tokenize(stream, state);
- var current = stream.current();
-
- // Handle '.' connected identifiers
- if (current === '.') {
- style = stream.match(identifiers, false) ? null : ERRORCLASS;
- if (style === null && state.lastStyle === 'meta') {
- // Apply 'meta' style to '.' connected identifiers when
- // appropriate.
- style = 'meta';
- }
- return style;
- }
-
- return style;
- }
-
- var external = {
- startState: function() {
- return {
- tokenize: tokenBase,
- scopes: [],
- leaving_expr: false
- };
- },
-
- token: function(stream, state) {
- var style = tokenLexer(stream, state);
- state.lastStyle = style;
- return style;
- },
-
- indent: function(state, textAfter) {
- var delta = 0;
- if(textAfter=="end" || textAfter=="]" || textAfter=="}" || textAfter=="else" || textAfter=="elseif" || textAfter=="catch" || textAfter=="finally") {
- delta = -1;
- }
- return (state.scopes.length + delta) * 4;
- },
-
- lineComment: "#",
- fold: "indent",
- electricChars: "edlsifyh]}"
- };
- return external;
-});
-
-
-CodeMirror.defineMIME("text/x-julia", "julia");
-
-});
diff --git a/public/js/lib/codemirror/mode/kotlin/index.html b/public/js/lib/codemirror/mode/kotlin/index.html
deleted file mode 100644
index 859e109fb8..0000000000
--- a/public/js/lib/codemirror/mode/kotlin/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-CodeMirror: Kotlin mode
-
-
-
-
-
-
-
-
-
-
-Kotlin mode
-
-
-
-package org.wasabi.http
-
-import java.util.concurrent.Executors
-import java.net.InetSocketAddress
-import org.wasabi.app.AppConfiguration
-import io.netty.bootstrap.ServerBootstrap
-import io.netty.channel.nio.NioEventLoopGroup
-import io.netty.channel.socket.nio.NioServerSocketChannel
-import org.wasabi.app.AppServer
-
-public class HttpServer(private val appServer: AppServer) {
-
- val bootstrap: ServerBootstrap
- val primaryGroup: NioEventLoopGroup
- val workerGroup: NioEventLoopGroup
-
- {
- // Define worker groups
- primaryGroup = NioEventLoopGroup()
- workerGroup = NioEventLoopGroup()
-
- // Initialize bootstrap of server
- bootstrap = ServerBootstrap()
-
- bootstrap.group(primaryGroup, workerGroup)
- bootstrap.channel(javaClass())
- bootstrap.childHandler(NettyPipelineInitializer(appServer))
- }
-
- public fun start(wait: Boolean = true) {
- val channel = bootstrap.bind(appServer.configuration.port)?.sync()?.channel()
-
- if (wait) {
- channel?.closeFuture()?.sync()
- }
- }
-
- public fun stop() {
- // Shutdown all event loops
- primaryGroup.shutdownGracefully()
- workerGroup.shutdownGracefully()
-
- // Wait till all threads are terminated
- primaryGroup.terminationFuture().sync()
- workerGroup.terminationFuture().sync()
- }
-}
-
-
-
- Mode for Kotlin (http://kotlin.jetbrains.org/)
- Developed by Hadi Hariri (https://github.com/hhariri).
- MIME type defined: text/x-kotlin
.
-
diff --git a/public/js/lib/codemirror/mode/kotlin/kotlin.js b/public/js/lib/codemirror/mode/kotlin/kotlin.js
deleted file mode 100644
index 73c84f6c4f..0000000000
--- a/public/js/lib/codemirror/mode/kotlin/kotlin.js
+++ /dev/null
@@ -1,280 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("kotlin", function (config, parserConfig) {
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- var multiLineStrings = parserConfig.multiLineStrings;
-
- var keywords = words(
- "package continue return object while break class data trait throw super" +
- " when type this else This try val var fun for is in if do as true false null get set");
- var softKeywords = words("import" +
- " where by get set abstract enum open annotation override private public internal" +
- " protected catch out vararg inline finally final ref");
- var blockKeywords = words("catch class do else finally for if where try while enum");
- var atoms = words("null true false this");
-
- var curPunc;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (ch == '"' || ch == "'") {
- return startString(ch, stream, state);
- }
- // Wildcard import w/o trailing semicolon (import smth.*)
- if (ch == "." && stream.eat("*")) {
- return "word";
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- curPunc = ch;
- return null;
- }
- if (/\d/.test(ch)) {
- if (stream.eat(/eE/)) {
- stream.eat(/\+\-/);
- stream.eatWhile(/\d/);
- }
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("*")) {
- state.tokenize.push(tokenComment);
- return tokenComment(stream, state);
- }
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- if (expectExpression(state.lastToken)) {
- return startString(ch, stream, state);
- }
- }
- // Commented
- if (ch == "-" && stream.eat(">")) {
- curPunc = "->";
- return null;
- }
- if (/[\-+*&%=<>!?|\/~]/.test(ch)) {
- stream.eatWhile(/[\-+*&%=<>|~]/);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
-
- var cur = stream.current();
- if (atoms.propertyIsEnumerable(cur)) {
- return "atom";
- }
- if (softKeywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "softKeyword";
- }
-
- if (keywords.propertyIsEnumerable(cur)) {
- if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement";
- return "keyword";
- }
- return "word";
- }
-
- tokenBase.isBase = true;
-
- function startString(quote, stream, state) {
- var tripleQuoted = false;
- if (quote != "/" && stream.eat(quote)) {
- if (stream.eat(quote)) tripleQuoted = true;
- else return "string";
- }
- function t(stream, state) {
- var escaped = false, next, end = !tripleQuoted;
-
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {
- if (!tripleQuoted) {
- break;
- }
- if (stream.match(quote + quote)) {
- end = true;
- break;
- }
- }
-
- if (quote == '"' && next == "$" && !escaped && stream.eat("{")) {
- state.tokenize.push(tokenBaseUntilBrace());
- return "string";
- }
-
- if (next == "$" && !escaped && !stream.eat(" ")) {
- state.tokenize.push(tokenBaseUntilSpace());
- return "string";
- }
- escaped = !escaped && next == "\\";
- }
- if (multiLineStrings)
- state.tokenize.push(t);
- if (end) state.tokenize.pop();
- return "string";
- }
-
- state.tokenize.push(t);
- return t(stream, state);
- }
-
- function tokenBaseUntilBrace() {
- var depth = 1;
-
- function t(stream, state) {
- if (stream.peek() == "}") {
- depth--;
- if (depth == 0) {
- state.tokenize.pop();
- return state.tokenize[state.tokenize.length - 1](stream, state);
- }
- } else if (stream.peek() == "{") {
- depth++;
- }
- return tokenBase(stream, state);
- }
-
- t.isBase = true;
- return t;
- }
-
- function tokenBaseUntilSpace() {
- function t(stream, state) {
- if (stream.eat(/[\w]/)) {
- var isWord = stream.eatWhile(/[\w]/);
- if (isWord) {
- state.tokenize.pop();
- return "word";
- }
- }
- state.tokenize.pop();
- return "string";
- }
-
- t.isBase = true;
- return t;
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize.pop();
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function expectExpression(last) {
- return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) ||
- last == "newstatement" || last == "keyword" || last == "proplabel";
- }
-
- function Context(indented, column, type, align, prev) {
- this.indented = indented;
- this.column = column;
- this.type = type;
- this.align = align;
- this.prev = prev;
- }
-
- function pushContext(state, col, type) {
- return state.context = new Context(state.indented, col, type, null, state.context);
- }
-
- function popContext(state) {
- var t = state.context.type;
- if (t == ")" || t == "]" || t == "}")
- state.indented = state.context.indented;
- return state.context = state.context.prev;
- }
-
- // Interface
-
- return {
- startState: function (basecolumn) {
- return {
- tokenize: [tokenBase],
- context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false),
- indented: 0,
- startOfLine: true,
- lastToken: null
- };
- },
-
- token: function (stream, state) {
- var ctx = state.context;
- if (stream.sol()) {
- if (ctx.align == null) ctx.align = false;
- state.indented = stream.indentation();
- state.startOfLine = true;
- // Automatic semicolon insertion
- if (ctx.type == "statement" && !expectExpression(state.lastToken)) {
- popContext(state);
- ctx = state.context;
- }
- }
- if (stream.eatSpace()) return null;
- curPunc = null;
- var style = state.tokenize[state.tokenize.length - 1](stream, state);
- if (style == "comment") return style;
- if (ctx.align == null) ctx.align = true;
- if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state);
- // Handle indentation for {x -> \n ... }
- else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") {
- popContext(state);
- state.context.align = false;
- }
- else if (curPunc == "{") pushContext(state, stream.column(), "}");
- else if (curPunc == "[") pushContext(state, stream.column(), "]");
- else if (curPunc == "(") pushContext(state, stream.column(), ")");
- else if (curPunc == "}") {
- while (ctx.type == "statement") ctx = popContext(state);
- if (ctx.type == "}") ctx = popContext(state);
- while (ctx.type == "statement") ctx = popContext(state);
- }
- else if (curPunc == ctx.type) popContext(state);
- else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement"))
- pushContext(state, stream.column(), "statement");
- state.startOfLine = false;
- state.lastToken = curPunc || style;
- return style;
- },
-
- indent: function (state, textAfter) {
- if (!state.tokenize[state.tokenize.length - 1].isBase) return 0;
- var firstChar = textAfter && textAfter.charAt(0), ctx = state.context;
- if (ctx.type == "statement" && !expectExpression(state.lastToken)) ctx = ctx.prev;
- var closing = firstChar == ctx.type;
- if (ctx.type == "statement") {
- return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit);
- }
- else if (ctx.align) return ctx.column + (closing ? 0 : 1);
- else return ctx.indented + (closing ? 0 : config.indentUnit);
- },
-
- electricChars: "{}"
- };
-});
-
-CodeMirror.defineMIME("text/x-kotlin", "kotlin");
-
-});
diff --git a/public/js/lib/codemirror/mode/livescript/index.html b/public/js/lib/codemirror/mode/livescript/index.html
deleted file mode 100644
index f415479876..0000000000
--- a/public/js/lib/codemirror/mode/livescript/index.html
+++ /dev/null
@@ -1,459 +0,0 @@
-
-
-CodeMirror: LiveScript mode
-
-
-
-
-
-
-
-
-
-
-
-LiveScript mode
-
-# LiveScript mode for CodeMirror
-# The following script, prelude.ls, is used to
-# demonstrate LiveScript mode for CodeMirror.
-# https://github.com/gkz/prelude-ls
-
-export objToFunc = objToFunc = (obj) ->
- (key) -> obj[key]
-
-export each = (f, xs) -->
- if typeof! xs is \Object
- for , x of xs then f x
- else
- for x in xs then f x
- xs
-
-export map = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- type = typeof! xs
- if type is \Object
- {[key, f x] for key, x of xs}
- else
- result = [f x for x in xs]
- if type is \String then result * '' else result
-
-export filter = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- type = typeof! xs
- if type is \Object
- {[key, x] for key, x of xs when f x}
- else
- result = [x for x in xs when f x]
- if type is \String then result * '' else result
-
-export reject = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- type = typeof! xs
- if type is \Object
- {[key, x] for key, x of xs when not f x}
- else
- result = [x for x in xs when not f x]
- if type is \String then result * '' else result
-
-export partition = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- type = typeof! xs
- if type is \Object
- passed = {}
- failed = {}
- for key, x of xs
- (if f x then passed else failed)[key] = x
- else
- passed = []
- failed = []
- for x in xs
- (if f x then passed else failed)push x
- if type is \String
- passed *= ''
- failed *= ''
- [passed, failed]
-
-export find = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- if typeof! xs is \Object
- for , x of xs when f x then return x
- else
- for x in xs when f x then return x
- void
-
-export head = export first = (xs) ->
- return void if not xs.length
- xs.0
-
-export tail = (xs) ->
- return void if not xs.length
- xs.slice 1
-
-export last = (xs) ->
- return void if not xs.length
- xs[*-1]
-
-export initial = (xs) ->
- return void if not xs.length
- xs.slice 0 xs.length - 1
-
-export empty = (xs) ->
- if typeof! xs is \Object
- for x of xs then return false
- return yes
- not xs.length
-
-export values = (obj) ->
- [x for , x of obj]
-
-export keys = (obj) ->
- [x for x of obj]
-
-export len = (xs) ->
- xs = values xs if typeof! xs is \Object
- xs.length
-
-export cons = (x, xs) -->
- if typeof! xs is \String then x + xs else [x] ++ xs
-
-export append = (xs, ys) -->
- if typeof! ys is \String then xs + ys else xs ++ ys
-
-export join = (sep, xs) -->
- xs = values xs if typeof! xs is \Object
- xs.join sep
-
-export reverse = (xs) ->
- if typeof! xs is \String
- then (xs / '')reverse! * ''
- else xs.slice!reverse!
-
-export fold = export foldl = (f, memo, xs) -->
- if typeof! xs is \Object
- for , x of xs then memo = f memo, x
- else
- for x in xs then memo = f memo, x
- memo
-
-export fold1 = export foldl1 = (f, xs) --> fold f, xs.0, xs.slice 1
-
-export foldr = (f, memo, xs) --> fold f, memo, xs.slice!reverse!
-
-export foldr1 = (f, xs) -->
- xs.=slice!reverse!
- fold f, xs.0, xs.slice 1
-
-export unfoldr = export unfold = (f, b) -->
- if (f b)?
- [that.0] ++ unfoldr f, that.1
- else
- []
-
-export andList = (xs) ->
- for x in xs when not x
- return false
- true
-
-export orList = (xs) ->
- for x in xs when x
- return true
- false
-
-export any = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- for x in xs when f x
- return yes
- no
-
-export all = (f, xs) -->
- f = objToFunc f if typeof! f isnt \Function
- for x in xs when not f x
- return no
- yes
-
-export unique = (xs) ->
- result = []
- if typeof! xs is \Object
- for , x of xs when x not in result then result.push x
- else
- for x in xs when x not in result then result.push x
- if typeof! xs is \String then result * '' else result
-
-export sort = (xs) ->
- xs.concat!sort (x, y) ->
- | x > y => 1
- | x < y => -1
- | _ => 0
-
-export sortBy = (f, xs) -->
- return [] unless xs.length
- xs.concat!sort f
-
-export compare = (f, x, y) -->
- | (f x) > (f y) => 1
- | (f x) < (f y) => -1
- | otherwise => 0
-
-export sum = (xs) ->
- result = 0
- if typeof! xs is \Object
- for , x of xs then result += x
- else
- for x in xs then result += x
- result
-
-export product = (xs) ->
- result = 1
- if typeof! xs is \Object
- for , x of xs then result *= x
- else
- for x in xs then result *= x
- result
-
-export mean = export average = (xs) -> (sum xs) / len xs
-
-export concat = (xss) -> fold append, [], xss
-
-export concatMap = (f, xs) --> fold ((memo, x) -> append memo, f x), [], xs
-
-export listToObj = (xs) ->
- {[x.0, x.1] for x in xs}
-
-export maximum = (xs) -> fold1 (>?), xs
-
-export minimum = (xs) -> fold1 (), xs
-
-export scan = export scanl = (f, memo, xs) -->
- last = memo
- if typeof! xs is \Object
- then [memo] ++ [last = f last, x for , x of xs]
- else [memo] ++ [last = f last, x for x in xs]
-
-export scan1 = export scanl1 = (f, xs) --> scan f, xs.0, xs.slice 1
-
-export scanr = (f, memo, xs) -->
- xs.=slice!reverse!
- scan f, memo, xs .reverse!
-
-export scanr1 = (f, xs) -->
- xs.=slice!reverse!
- scan f, xs.0, xs.slice 1 .reverse!
-
-export replicate = (n, x) -->
- result = []
- i = 0
- while i < n, ++i then result.push x
- result
-
-export take = (n, xs) -->
- | n <= 0
- if typeof! xs is \String then '' else []
- | not xs.length => xs
- | otherwise => xs.slice 0, n
-
-export drop = (n, xs) -->
- | n <= 0 => xs
- | not xs.length => xs
- | otherwise => xs.slice n
-
-export splitAt = (n, xs) --> [(take n, xs), (drop n, xs)]
-
-export takeWhile = (p, xs) -->
- return xs if not xs.length
- p = objToFunc p if typeof! p isnt \Function
- result = []
- for x in xs
- break if not p x
- result.push x
- if typeof! xs is \String then result * '' else result
-
-export dropWhile = (p, xs) -->
- return xs if not xs.length
- p = objToFunc p if typeof! p isnt \Function
- i = 0
- for x in xs
- break if not p x
- ++i
- drop i, xs
-
-export span = (p, xs) --> [(takeWhile p, xs), (dropWhile p, xs)]
-
-export breakIt = (p, xs) --> span (not) << p, xs
-
-export zip = (xs, ys) -->
- result = []
- for zs, i in [xs, ys]
- for z, j in zs
- result.push [] if i is 0
- result[j]?push z
- result
-
-export zipWith = (f,xs, ys) -->
- f = objToFunc f if typeof! f isnt \Function
- if not xs.length or not ys.length
- []
- else
- [f.apply this, zs for zs in zip.call this, xs, ys]
-
-export zipAll = (...xss) ->
- result = []
- for xs, i in xss
- for x, j in xs
- result.push [] if i is 0
- result[j]?push x
- result
-
-export zipAllWith = (f, ...xss) ->
- f = objToFunc f if typeof! f isnt \Function
- if not xss.0.length or not xss.1.length
- []
- else
- [f.apply this, xs for xs in zipAll.apply this, xss]
-
-export compose = (...funcs) ->
- ->
- args = arguments
- for f in funcs
- args = [f.apply this, args]
- args.0
-
-export curry = (f) ->
- curry$ f # using util method curry$ from livescript
-
-export id = (x) -> x
-
-export flip = (f, x, y) --> f y, x
-
-export fix = (f) ->
- ( (g, x) -> -> f(g g) ...arguments ) do
- (g, x) -> -> f(g g) ...arguments
-
-export lines = (str) ->
- return [] if not str.length
- str / \\n
-
-export unlines = (strs) -> strs * \\n
-
-export words = (str) ->
- return [] if not str.length
- str / /[ ]+/
-
-export unwords = (strs) -> strs * ' '
-
-export max = (>?)
-
-export min = ()
-
-export negate = (x) -> -x
-
-export abs = Math.abs
-
-export signum = (x) ->
- | x < 0 => -1
- | x > 0 => 1
- | otherwise => 0
-
-export quot = (x, y) --> ~~(x / y)
-
-export rem = (%)
-
-export div = (x, y) --> Math.floor x / y
-
-export mod = (%%)
-
-export recip = (1 /)
-
-export pi = Math.PI
-
-export tau = pi * 2
-
-export exp = Math.exp
-
-export sqrt = Math.sqrt
-
-# changed from log as log is a
-# common function for logging things
-export ln = Math.log
-
-export pow = (^)
-
-export sin = Math.sin
-
-export tan = Math.tan
-
-export cos = Math.cos
-
-export asin = Math.asin
-
-export acos = Math.acos
-
-export atan = Math.atan
-
-export atan2 = (x, y) --> Math.atan2 x, y
-
-# sinh
-# tanh
-# cosh
-# asinh
-# atanh
-# acosh
-
-export truncate = (x) -> ~~x
-
-export round = Math.round
-
-export ceiling = Math.ceil
-
-export floor = Math.floor
-
-export isItNaN = (x) -> x isnt x
-
-export even = (x) -> x % 2 == 0
-
-export odd = (x) -> x % 2 != 0
-
-export gcd = (x, y) -->
- x = Math.abs x
- y = Math.abs y
- until y is 0
- z = x % y
- x = y
- y = z
- x
-
-export lcm = (x, y) -->
- Math.abs Math.floor (x / (gcd x, y) * y)
-
-# meta
-export installPrelude = !(target) ->
- unless target.prelude?isInstalled
- target <<< out$ # using out$ generated by livescript
- target <<< target.prelude.isInstalled = true
-
-export prelude = out$
-
-
-
- MIME types defined: text/x-livescript
.
-
- The LiveScript mode was written by Kenneth Bentley.
-
-
diff --git a/public/js/lib/codemirror/mode/livescript/livescript.js b/public/js/lib/codemirror/mode/livescript/livescript.js
deleted file mode 100644
index 55882efc3b..0000000000
--- a/public/js/lib/codemirror/mode/livescript/livescript.js
+++ /dev/null
@@ -1,280 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**
- * Link to the project's GitHub page:
- * https://github.com/duralog/CodeMirror
- */
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode('livescript', function(){
- var tokenBase = function(stream, state) {
- var next_rule = state.next || "start";
- if (next_rule) {
- state.next = state.next;
- var nr = Rules[next_rule];
- if (nr.splice) {
- for (var i$ = 0; i$ < nr.length; ++i$) {
- var r = nr[i$], m;
- if (r.regex && (m = stream.match(r.regex))) {
- state.next = r.next || state.next;
- return r.token;
- }
- }
- stream.next();
- return 'error';
- }
- if (stream.match(r = Rules[next_rule])) {
- if (r.regex && stream.match(r.regex)) {
- state.next = r.next;
- return r.token;
- } else {
- stream.next();
- return 'error';
- }
- }
- }
- stream.next();
- return 'error';
- };
- var external = {
- startState: function(){
- return {
- next: 'start',
- lastToken: null
- };
- },
- token: function(stream, state){
- while (stream.pos == stream.start)
- var style = tokenBase(stream, state);
- state.lastToken = {
- style: style,
- indent: stream.indentation(),
- content: stream.current()
- };
- return style.replace(/\./g, ' ');
- },
- indent: function(state){
- var indentation = state.lastToken.indent;
- if (state.lastToken.content.match(indenter)) {
- indentation += 2;
- }
- return indentation;
- }
- };
- return external;
- });
-
- var identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*';
- var indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$');
- var keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))';
- var stringfill = {
- token: 'string',
- regex: '.+'
- };
- var Rules = {
- start: [
- {
- token: 'comment.doc',
- regex: '/\\*',
- next: 'comment'
- }, {
- token: 'comment',
- regex: '#.*'
- }, {
- token: 'keyword',
- regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend
- }, {
- token: 'constant.language',
- regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
- }, {
- token: 'invalid.illegal',
- regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend
- }, {
- token: 'language.support.class',
- regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend
- }, {
- token: 'language.support.function',
- regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend
- }, {
- token: 'variable.language',
- regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
- }, {
- token: 'identifier',
- regex: identifier + '\\s*:(?![:=])'
- }, {
- token: 'variable',
- regex: identifier
- }, {
- token: 'keyword.operator',
- regex: '(?:\\.{3}|\\s+\\?)'
- }, {
- token: 'keyword.variable',
- regex: '(?:@+|::|\\.\\.)',
- next: 'key'
- }, {
- token: 'keyword.operator',
- regex: '\\.\\s*',
- next: 'key'
- }, {
- token: 'string',
- regex: '\\\\\\S[^\\s,;)}\\]]*'
- }, {
- token: 'string.doc',
- regex: '\'\'\'',
- next: 'qdoc'
- }, {
- token: 'string.doc',
- regex: '"""',
- next: 'qqdoc'
- }, {
- token: 'string',
- regex: '\'',
- next: 'qstring'
- }, {
- token: 'string',
- regex: '"',
- next: 'qqstring'
- }, {
- token: 'string',
- regex: '`',
- next: 'js'
- }, {
- token: 'string',
- regex: '<\\[',
- next: 'words'
- }, {
- token: 'string.regex',
- regex: '//',
- next: 'heregex'
- }, {
- token: 'string.regex',
- regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}',
- next: 'key'
- }, {
- token: 'constant.numeric',
- regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
- }, {
- token: 'lparen',
- regex: '[({[]'
- }, {
- token: 'rparen',
- regex: '[)}\\]]',
- next: 'key'
- }, {
- token: 'keyword.operator',
- regex: '\\S+'
- }, {
- token: 'text',
- regex: '\\s+'
- }
- ],
- heregex: [
- {
- token: 'string.regex',
- regex: '.*?//[gimy$?]{0,4}',
- next: 'start'
- }, {
- token: 'string.regex',
- regex: '\\s*#{'
- }, {
- token: 'comment.regex',
- regex: '\\s+(?:#.*)?'
- }, {
- token: 'string.regex',
- regex: '\\S+'
- }
- ],
- key: [
- {
- token: 'keyword.operator',
- regex: '[.?@!]+'
- }, {
- token: 'identifier',
- regex: identifier,
- next: 'start'
- }, {
- token: 'text',
- regex: '',
- next: 'start'
- }
- ],
- comment: [
- {
- token: 'comment.doc',
- regex: '.*?\\*/',
- next: 'start'
- }, {
- token: 'comment.doc',
- regex: '.+'
- }
- ],
- qdoc: [
- {
- token: 'string',
- regex: ".*?'''",
- next: 'key'
- }, stringfill
- ],
- qqdoc: [
- {
- token: 'string',
- regex: '.*?"""',
- next: 'key'
- }, stringfill
- ],
- qstring: [
- {
- token: 'string',
- regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'',
- next: 'key'
- }, stringfill
- ],
- qqstring: [
- {
- token: 'string',
- regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
- next: 'key'
- }, stringfill
- ],
- js: [
- {
- token: 'string',
- regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`',
- next: 'key'
- }, stringfill
- ],
- words: [
- {
- token: 'string',
- regex: '.*?\\]>',
- next: 'key'
- }, stringfill
- ]
- };
- for (var idx in Rules) {
- var r = Rules[idx];
- if (r.splice) {
- for (var i = 0, len = r.length; i < len; ++i) {
- var rr = r[i];
- if (typeof rr.regex === 'string') {
- Rules[idx][i].regex = new RegExp('^' + rr.regex);
- }
- }
- } else if (typeof rr.regex === 'string') {
- Rules[idx].regex = new RegExp('^' + r.regex);
- }
- }
-
- CodeMirror.defineMIME('text/x-livescript', 'livescript');
-
-});
diff --git a/public/js/lib/codemirror/mode/lua/index.html b/public/js/lib/codemirror/mode/lua/index.html
deleted file mode 100644
index fc98b94468..0000000000
--- a/public/js/lib/codemirror/mode/lua/index.html
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-CodeMirror: Lua mode
-
-
-
-
-
-
-
-
-
-
-
-
-Lua mode
-
---[[
-example useless code to show lua syntax highlighting
-this is multiline comment
-]]
-
-function blahblahblah(x)
-
- local table = {
- "asd" = 123,
- "x" = 0.34,
- }
- if x ~= 3 then
- print( x )
- elseif x == "string"
- my_custom_function( 0x34 )
- else
- unknown_function( "some string" )
- end
-
- --single line comment
-
-end
-
-function blablabla3()
-
- for k,v in ipairs( table ) do
- --abcde..
- y=[=[
- x=[[
- x is a multi line string
- ]]
- but its definition is iside a highest level string!
- ]=]
- print(" \"\" ")
-
- s = math.sin( x )
- end
-
-end
-
-
-
- Loosely based on Franciszek
- Wawrzak's CodeMirror
- 1 mode . One configuration parameter is
- supported, specials
, to which you can provide an
- array of strings to have those identifiers highlighted with
- the lua-special
style.
- MIME types defined: text/x-lua
.
-
-
diff --git a/public/js/lib/codemirror/mode/lua/lua.js b/public/js/lib/codemirror/mode/lua/lua.js
deleted file mode 100644
index 0b19abd304..0000000000
--- a/public/js/lib/codemirror/mode/lua/lua.js
+++ /dev/null
@@ -1,159 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's
-// CodeMirror 1 mode.
-// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("lua", function(config, parserConfig) {
- var indentUnit = config.indentUnit;
-
- function prefixRE(words) {
- return new RegExp("^(?:" + words.join("|") + ")", "i");
- }
- function wordRE(words) {
- return new RegExp("^(?:" + words.join("|") + ")$", "i");
- }
- var specials = wordRE(parserConfig.specials || []);
-
- // long list of standard functions from lua manual
- var builtins = wordRE([
- "_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load",
- "loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require",
- "select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall",
-
- "coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield",
-
- "debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable",
- "debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable",
- "debug.setupvalue","debug.traceback",
-
- "close","flush","lines","read","seek","setvbuf","write",
-
- "io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin",
- "io.stdout","io.tmpfile","io.type","io.write",
-
- "math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg",
- "math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max",
- "math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh",
- "math.sqrt","math.tan","math.tanh",
-
- "os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale",
- "os.time","os.tmpname",
-
- "package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload",
- "package.seeall",
-
- "string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub",
- "string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper",
-
- "table.concat","table.insert","table.maxn","table.remove","table.sort"
- ]);
- var keywords = wordRE(["and","break","elseif","false","nil","not","or","return",
- "true","function", "end", "if", "then", "else", "do",
- "while", "repeat", "until", "for", "in", "local" ]);
-
- var indentTokens = wordRE(["function", "if","repeat","do", "\\(", "{"]);
- var dedentTokens = wordRE(["end", "until", "\\)", "}"]);
- var dedentPartial = prefixRE(["end", "until", "\\)", "}", "else", "elseif"]);
-
- function readBracket(stream) {
- var level = 0;
- while (stream.eat("=")) ++level;
- stream.eat("[");
- return level;
- }
-
- function normal(stream, state) {
- var ch = stream.next();
- if (ch == "-" && stream.eat("-")) {
- if (stream.eat("[") && stream.eat("["))
- return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state);
- stream.skipToEnd();
- return "comment";
- }
- if (ch == "\"" || ch == "'")
- return (state.cur = string(ch))(stream, state);
- if (ch == "[" && /[\[=]/.test(stream.peek()))
- return (state.cur = bracketed(readBracket(stream), "string"))(stream, state);
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w.%]/);
- return "number";
- }
- if (/[\w_]/.test(ch)) {
- stream.eatWhile(/[\w\\\-_.]/);
- return "variable";
- }
- return null;
- }
-
- function bracketed(level, style) {
- return function(stream, state) {
- var curlev = null, ch;
- while ((ch = stream.next()) != null) {
- if (curlev == null) {if (ch == "]") curlev = 0;}
- else if (ch == "=") ++curlev;
- else if (ch == "]" && curlev == level) { state.cur = normal; break; }
- else curlev = null;
- }
- return style;
- };
- }
-
- function string(quote) {
- return function(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == quote && !escaped) break;
- escaped = !escaped && ch == "\\";
- }
- if (!escaped) state.cur = normal;
- return "string";
- };
- }
-
- return {
- startState: function(basecol) {
- return {basecol: basecol || 0, indentDepth: 0, cur: normal};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- var style = state.cur(stream, state);
- var word = stream.current();
- if (style == "variable") {
- if (keywords.test(word)) style = "keyword";
- else if (builtins.test(word)) style = "builtin";
- else if (specials.test(word)) style = "variable-2";
- }
- if ((style != "comment") && (style != "string")){
- if (indentTokens.test(word)) ++state.indentDepth;
- else if (dedentTokens.test(word)) --state.indentDepth;
- }
- return style;
- },
-
- indent: function(state, textAfter) {
- var closing = dedentPartial.test(textAfter);
- return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0));
- },
-
- lineComment: "--",
- blockCommentStart: "--[[",
- blockCommentEnd: "]]"
- };
-});
-
-CodeMirror.defineMIME("text/x-lua", "lua");
-
-});
diff --git a/public/js/lib/codemirror/mode/mirc/index.html b/public/js/lib/codemirror/mode/mirc/index.html
deleted file mode 100644
index fd2f34e4ba..0000000000
--- a/public/js/lib/codemirror/mode/mirc/index.html
+++ /dev/null
@@ -1,160 +0,0 @@
-
-
-CodeMirror: mIRC mode
-
-
-
-
-
-
-
-
-
-
-
-mIRC mode
-
-;AKA Nick Tracker by Ford_Lawnmower irc.GeekShed.net #Script-Help
-;*****************************************************************************;
-;**Start Setup
-;Change JoinDisplay, below, for On Join AKA Display. On = 1 - Off = 0
-alias -l JoinDisplay { return 1 }
-;Change MaxNicks, below, to the number of nicknames you want to store for each hostmask. I wouldn't go over 400 with this ;/
-alias -l MaxNicks { return 20 }
-;Change AKALogo, below, To the text you want displayed before each AKA result.
-alias -l AKALogo { return 06 05A06K07A 06 }
-;**End Setup
-;*****************************************************************************;
-On *:Join:#: {
- if ($nick == $me) { .timer 1 1 ialupdateCheck $chan }
- NickNamesAdd $nick $+($network,$wildsite)
- if ($JoinDisplay) { .timerNickNames $+ $nick 1 2 NickNames.display $nick $chan $network $wildsite }
-}
-on *:Nick: { NickNamesAdd $newnick $+($network,$wildsite) $nick }
-alias -l NickNames.display {
- if ($gettok($hget(NickNames,$+($3,$4)),0,126) > 1) {
- echo -g $2 $AKALogo $+(09,$1) $AKALogo 07 $mid($replace($hget(NickNames,$+($3,$4)),$chr(126),$chr(44)),2,-1)
- }
-}
-alias -l NickNamesAdd {
- if ($hget(NickNames,$2)) {
- if (!$regex($hget(NickNames,$2),/~\Q $+ $replacecs($1,\E,\E\\E\Q) $+ \E~/i)) {
- if ($gettok($hget(NickNames,$2),0,126) <= $MaxNicks) {
- hadd NickNames $2 $+($hget(NickNames,$2),$1,~)
- }
- else {
- hadd NickNames $2 $+($mid($hget(NickNames,$2),$pos($hget(NickNames,$2),~,2)),$1,~)
- }
- }
- }
- else {
- hadd -m NickNames $2 $+(~,$1,~,$iif($3,$+($3,~)))
- }
-}
-alias -l Fix.All.MindUser {
- var %Fix.Count = $hfind(NickNames,/[^~]+[0-9]{4}~/,0,r).data
- while (%Fix.Count) {
- if ($Fix.MindUser($hget(NickNames,$hfind(NickNames,/[^~]+[0-9]{4}~/,%Fix.Count,r).data))) {
- echo -ag Record %Fix.Count - $v1 - Was Cleaned
- hadd NickNames $hfind(NickNames,/[^~]+[0-9]{4}~/,%Fix.Count,r).data $v1
- }
- dec %Fix.Count
- }
-}
-alias -l Fix.MindUser { return $regsubex($1,/[^~]+[0-9]{4}~/g,$null) }
-menu nicklist,query {
- -
- .AKA
- ..Check $$1: {
- if ($gettok($hget(NickNames,$+($network,$address($1,2))),0,126) > 1) {
- NickNames.display $1 $active $network $address($1,2)
- }
- else { echo -ag $AKALogo $+(09,$1) 07has not been known by any other nicknames while I have been watching. }
- }
- ..Cleanup $$1:hadd NickNames $+($network,$address($1,2)) $fix.minduser($hget(NickNames,$+($network,$address($1,2))))
- ..Clear $$1:hadd NickNames $+($network,$address($1,2)) $+(~,$1,~)
- ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
- -
-}
-menu status,channel {
- -
- .AKA
- ..AKA Search Dialog:dialog $iif($dialog(AKA_Search),-v,-m) AKA_Search AKA_Search
- ..Clean All Records:Fix.All.Minduser
- -
-}
-dialog AKA_Search {
- title "AKA Search Engine"
- size -1 -1 206 221
- option dbu
- edit "", 1, 8 5 149 10, autohs
- button "Search", 2, 163 4 32 12
- radio "Search HostMask", 4, 61 22 55 10
- radio "Search Nicknames", 5, 123 22 56 10
- list 6, 8 38 190 169, sort extsel vsbar
- button "Check Selected", 7, 67 206 40 12
- button "Close", 8, 160 206 38 12, cancel
- box "Search Type", 3, 11 17 183 18
- button "Copy to Clipboard", 9, 111 206 46 12
-}
-On *:Dialog:Aka_Search:init:*: { did -c $dname 5 }
-On *:Dialog:Aka_Search:Sclick:2,7,9: {
- if ($did == 2) && ($did($dname,1)) {
- did -r $dname 6
- var %search $+(*,$v1,*), %type $iif($did($dname,5).state,data,item), %matches = $hfind(NickNames,%search,0,w). [ $+ [ %type ] ]
- while (%matches) {
- did -a $dname 6 $hfind(NickNames,%search,%matches,w). [ $+ [ %type ] ]
- dec %matches
- }
- did -c $dname 6 1
- }
- elseif ($did == 7) && ($did($dname,6).seltext) { echo -ga $AKALogo 07 $mid($replace($hget(NickNames,$v1),$chr(126),$chr(44)),2,-1) }
- elseif ($did == 9) && ($did($dname,6).seltext) { clipboard $mid($v1,$pos($v1,*,1)) }
-}
-On *:Start:{
- if (!$hget(NickNames)) { hmake NickNames 10 }
- if ($isfile(NickNames.hsh)) { hload NickNames NickNames.hsh }
-}
-On *:Exit: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
-On *:Disconnect: { if ($hget(NickNames)) { hsave NickNames NickNames.hsh } }
-On *:Unload: { hfree NickNames }
-alias -l ialupdateCheck {
- inc -z $+(%,ialupdateCheck,$network) $calc($nick($1,0) / 4)
- ;If your ial is already being updated on join .who $1 out.
- ;If you are using /names to update ial you will still need this line.
- .who $1
-}
-Raw 352:*: {
- if ($($+(%,ialupdateCheck,$network),2)) haltdef
- NickNamesAdd $6 $+($network,$address($6,2))
-}
-Raw 315:*: {
- if ($($+(%,ialupdateCheck,$network),2)) haltdef
-}
-
-
-
-
- MIME types defined: text/mirc
.
-
-
diff --git a/public/js/lib/codemirror/mode/mirc/mirc.js b/public/js/lib/codemirror/mode/mirc/mirc.js
deleted file mode 100644
index f0d5c6ad50..0000000000
--- a/public/js/lib/codemirror/mode/mirc/mirc.js
+++ /dev/null
@@ -1,193 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-//mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMIME("text/mirc", "mirc");
-CodeMirror.defineMode("mirc", function() {
- function parseWords(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var specials = parseWords("$! $$ $& $? $+ $abook $abs $active $activecid " +
- "$activewid $address $addtok $agent $agentname $agentstat $agentver " +
- "$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime " +
- "$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind " +
- "$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes " +
- "$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color " +
- "$com $comcall $comchan $comerr $compact $compress $comval $cos $count " +
- "$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight " +
- "$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress " +
- "$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll " +
- "$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error " +
- "$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir " +
- "$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve " +
- "$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt " +
- "$group $halted $hash $height $hfind $hget $highlight $hnick $hotline " +
- "$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil " +
- "$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect " +
- "$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile " +
- "$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive " +
- "$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock " +
- "$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer " +
- "$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext " +
- "$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode " +
- "$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile " +
- "$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly " +
- "$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree " +
- "$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo " +
- "$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex " +
- "$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline " +
- "$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin " +
- "$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname " +
- "$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped " +
- "$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp " +
- "$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel " +
- "$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver " +
- "$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor");
- var keywords = parseWords("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice " +
- "away background ban bcopy beep bread break breplace bset btrunc bunset bwrite " +
- "channel clear clearall cline clipboard close cnick color comclose comopen " +
- "comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver " +
- "debug dec describe dialog did didtok disable disconnect dlevel dline dll " +
- "dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace " +
- "drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable " +
- "events exit fclose filter findtext finger firewall flash flist flood flush " +
- "flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove " +
- "gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd " +
- "halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear " +
- "ialmark identd if ignore iline inc invite iuser join kick linesep links list " +
- "load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice " +
- "notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice " +
- "qme qmsg query queryn quit raw reload remini remote remove rename renwin " +
- "reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini " +
- "say scid scon server set showmirc signam sline sockaccept sockclose socklist " +
- "socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite " +
- "sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize " +
- "toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho " +
- "var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum " +
- "isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower " +
- "isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs " +
- "elseif else goto menu nicklist status title icon size option text edit " +
- "button check radio box scroll list combo link tab item");
- var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch");
- var isOperatorChar = /[+\-*&%=<>!?^\/\|]/;
- function chain(stream, state, f) {
- state.tokenize = f;
- return f(stream, state);
- }
- function tokenBase(stream, state) {
- var beforeParams = state.beforeParams;
- state.beforeParams = false;
- var ch = stream.next();
- if (/[\[\]{}\(\),\.]/.test(ch)) {
- if (ch == "(" && beforeParams) state.inParams = true;
- else if (ch == ")") state.inParams = false;
- return null;
- }
- else if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- else if (ch == "\\") {
- stream.eat("\\");
- stream.eat(/./);
- return "number";
- }
- else if (ch == "/" && stream.eat("*")) {
- return chain(stream, state, tokenComment);
- }
- else if (ch == ";" && stream.match(/ *\( *\(/)) {
- return chain(stream, state, tokenUnparsed);
- }
- else if (ch == ";" && !state.inParams) {
- stream.skipToEnd();
- return "comment";
- }
- else if (ch == '"') {
- stream.eat(/"/);
- return "keyword";
- }
- else if (ch == "$") {
- stream.eatWhile(/[$_a-z0-9A-Z\.:]/);
- if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) {
- return "keyword";
- }
- else {
- state.beforeParams = true;
- return "builtin";
- }
- }
- else if (ch == "%") {
- stream.eatWhile(/[^,^\s^\(^\)]/);
- state.beforeParams = true;
- return "string";
- }
- else if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- else {
- stream.eatWhile(/[\w\$_{}]/);
- var word = stream.current().toLowerCase();
- if (keywords && keywords.propertyIsEnumerable(word))
- return "keyword";
- if (functions && functions.propertyIsEnumerable(word)) {
- state.beforeParams = true;
- return "keyword";
- }
- return null;
- }
- }
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == "/" && maybeEnd) {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
- function tokenUnparsed(stream, state) {
- var maybeEnd = 0, ch;
- while (ch = stream.next()) {
- if (ch == ";" && maybeEnd == 2) {
- state.tokenize = tokenBase;
- break;
- }
- if (ch == ")")
- maybeEnd++;
- else if (ch != " ")
- maybeEnd = 0;
- }
- return "meta";
- }
- return {
- startState: function() {
- return {
- tokenize: tokenBase,
- beforeParams: false,
- inParams: false
- };
- },
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- return state.tokenize(stream, state);
- }
- };
-});
-
-});
diff --git a/public/js/lib/codemirror/mode/mllike/index.html b/public/js/lib/codemirror/mode/mllike/index.html
deleted file mode 100644
index 5923af8f87..0000000000
--- a/public/js/lib/codemirror/mode/mllike/index.html
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-CodeMirror: ML-like mode
-
-
-
-
-
-
-
-
-
-
-
-OCaml mode
-
-
-
-(* Summing a list of integers *)
-let rec sum xs =
- match xs with
- | [] -> 0
- | x :: xs' -> x + sum xs'
-
-(* Quicksort *)
-let rec qsort = function
- | [] -> []
- | pivot :: rest ->
- let is_less x = x < pivot in
- let left, right = List.partition is_less rest in
- qsort left @ [pivot] @ qsort right
-
-(* Fibonacci Sequence *)
-let rec fib_aux n a b =
- match n with
- | 0 -> a
- | _ -> fib_aux (n - 1) (a + b) a
-let fib n = fib_aux n 0 1
-
-(* Birthday paradox *)
-let year_size = 365.
-
-let rec birthday_paradox prob people =
- let prob' = (year_size -. float people) /. year_size *. prob in
- if prob' < 0.5 then
- Printf.printf "answer = %d\n" (people+1)
- else
- birthday_paradox prob' (people+1) ;;
-
-birthday_paradox 1.0 1
-
-(* Church numerals *)
-let zero f x = x
-let succ n f x = f (n f x)
-let one = succ zero
-let two = succ (succ zero)
-let add n1 n2 f x = n1 f (n2 f x)
-let to_string n = n (fun k -> "S" ^ k) "0"
-let _ = to_string (add (succ two) two)
-
-(* Elementary functions *)
-let square x = x * x;;
-let rec fact x =
- if x <= 1 then 1 else x * fact (x - 1);;
-
-(* Automatic memory management *)
-let l = 1 :: 2 :: 3 :: [];;
-[1; 2; 3];;
-5 :: l;;
-
-(* Polymorphism: sorting lists *)
-let rec sort = function
- | [] -> []
- | x :: l -> insert x (sort l)
-
-and insert elem = function
- | [] -> [elem]
- | x :: l ->
- if elem < x then elem :: x :: l else x :: insert elem l;;
-
-(* Imperative features *)
-let add_polynom p1 p2 =
- let n1 = Array.length p1
- and n2 = Array.length p2 in
- let result = Array.create (max n1 n2) 0 in
- for i = 0 to n1 - 1 do result.(i) <- p1.(i) done;
- for i = 0 to n2 - 1 do result.(i) <- result.(i) + p2.(i) done;
- result;;
-add_polynom [| 1; 2 |] [| 1; 2; 3 |];;
-
-(* We may redefine fact using a reference cell and a for loop *)
-let fact n =
- let result = ref 1 in
- for i = 2 to n do
- result := i * !result
- done;
- !result;;
-fact 5;;
-
-(* Triangle (graphics) *)
-let () =
- ignore( Glut.init Sys.argv );
- Glut.initDisplayMode ~double_buffer:true ();
- ignore (Glut.createWindow ~title:"OpenGL Demo");
- let angle t = 10. *. t *. t in
- let render () =
- GlClear.clear [ `color ];
- GlMat.load_identity ();
- GlMat.rotate ~angle: (angle (Sys.time ())) ~z:1. ();
- GlDraw.begins `triangles;
- List.iter GlDraw.vertex2 [-1., -1.; 0., 1.; 1., -1.];
- GlDraw.ends ();
- Glut.swapBuffers () in
- GlMat.mode `modelview;
- Glut.displayFunc ~cb:render;
- Glut.idleFunc ~cb:(Some Glut.postRedisplay);
- Glut.mainLoop ()
-
-(* A Hundred Lines of Caml - http://caml.inria.fr/about/taste.en.html *)
-(* OCaml page on Wikipedia - http://en.wikipedia.org/wiki/OCaml *)
-
-
-F# mode
-
-module CodeMirror.FSharp
-
-let rec fib = function
- | 0 -> 0
- | 1 -> 1
- | n -> fib (n - 1) + fib (n - 2)
-
-type Point =
- {
- x : int
- y : int
- }
-
-type Color =
- | Red
- | Green
- | Blue
-
-[0 .. 10]
-|> List.map ((+) 2)
-|> List.fold (fun x y -> x + y) 0
-|> printf "%i"
-
-
-
-
-
-MIME types defined: text/x-ocaml
(OCaml) and text/x-fsharp
(F#).
-
diff --git a/public/js/lib/codemirror/mode/mllike/mllike.js b/public/js/lib/codemirror/mode/mllike/mllike.js
deleted file mode 100644
index 04ab1c98ec..0000000000
--- a/public/js/lib/codemirror/mode/mllike/mllike.js
+++ /dev/null
@@ -1,205 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode('mllike', function(_config, parserConfig) {
- var words = {
- 'let': 'keyword',
- 'rec': 'keyword',
- 'in': 'keyword',
- 'of': 'keyword',
- 'and': 'keyword',
- 'if': 'keyword',
- 'then': 'keyword',
- 'else': 'keyword',
- 'for': 'keyword',
- 'to': 'keyword',
- 'while': 'keyword',
- 'do': 'keyword',
- 'done': 'keyword',
- 'fun': 'keyword',
- 'function': 'keyword',
- 'val': 'keyword',
- 'type': 'keyword',
- 'mutable': 'keyword',
- 'match': 'keyword',
- 'with': 'keyword',
- 'try': 'keyword',
- 'open': 'builtin',
- 'ignore': 'builtin',
- 'begin': 'keyword',
- 'end': 'keyword'
- };
-
- var extraWords = parserConfig.extraWords || {};
- for (var prop in extraWords) {
- if (extraWords.hasOwnProperty(prop)) {
- words[prop] = parserConfig.extraWords[prop];
- }
- }
-
- function tokenBase(stream, state) {
- var ch = stream.next();
-
- if (ch === '"') {
- state.tokenize = tokenString;
- return state.tokenize(stream, state);
- }
- if (ch === '(') {
- if (stream.eat('*')) {
- state.commentLevel++;
- state.tokenize = tokenComment;
- return state.tokenize(stream, state);
- }
- }
- if (ch === '~') {
- stream.eatWhile(/\w/);
- return 'variable-2';
- }
- if (ch === '`') {
- stream.eatWhile(/\w/);
- return 'quote';
- }
- if (ch === '/' && parserConfig.slashComments && stream.eat('/')) {
- stream.skipToEnd();
- return 'comment';
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\d]/);
- if (stream.eat('.')) {
- stream.eatWhile(/[\d]/);
- }
- return 'number';
- }
- if ( /[+\-*&%=<>!?|]/.test(ch)) {
- return 'operator';
- }
- stream.eatWhile(/\w/);
- var cur = stream.current();
- return words[cur] || 'variable';
- }
-
- function tokenString(stream, state) {
- var next, end = false, escaped = false;
- while ((next = stream.next()) != null) {
- if (next === '"' && !escaped) {
- end = true;
- break;
- }
- escaped = !escaped && next === '\\';
- }
- if (end && !escaped) {
- state.tokenize = tokenBase;
- }
- return 'string';
- };
-
- function tokenComment(stream, state) {
- var prev, next;
- while(state.commentLevel > 0 && (next = stream.next()) != null) {
- if (prev === '(' && next === '*') state.commentLevel++;
- if (prev === '*' && next === ')') state.commentLevel--;
- prev = next;
- }
- if (state.commentLevel <= 0) {
- state.tokenize = tokenBase;
- }
- return 'comment';
- }
-
- return {
- startState: function() {return {tokenize: tokenBase, commentLevel: 0};},
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- return state.tokenize(stream, state);
- },
-
- blockCommentStart: "(*",
- blockCommentEnd: "*)",
- lineComment: parserConfig.slashComments ? "//" : null
- };
-});
-
-CodeMirror.defineMIME('text/x-ocaml', {
- name: 'mllike',
- extraWords: {
- 'succ': 'keyword',
- 'trace': 'builtin',
- 'exit': 'builtin',
- 'print_string': 'builtin',
- 'print_endline': 'builtin',
- 'true': 'atom',
- 'false': 'atom',
- 'raise': 'keyword'
- }
-});
-
-CodeMirror.defineMIME('text/x-fsharp', {
- name: 'mllike',
- extraWords: {
- 'abstract': 'keyword',
- 'as': 'keyword',
- 'assert': 'keyword',
- 'base': 'keyword',
- 'class': 'keyword',
- 'default': 'keyword',
- 'delegate': 'keyword',
- 'downcast': 'keyword',
- 'downto': 'keyword',
- 'elif': 'keyword',
- 'exception': 'keyword',
- 'extern': 'keyword',
- 'finally': 'keyword',
- 'global': 'keyword',
- 'inherit': 'keyword',
- 'inline': 'keyword',
- 'interface': 'keyword',
- 'internal': 'keyword',
- 'lazy': 'keyword',
- 'let!': 'keyword',
- 'member' : 'keyword',
- 'module': 'keyword',
- 'namespace': 'keyword',
- 'new': 'keyword',
- 'null': 'keyword',
- 'override': 'keyword',
- 'private': 'keyword',
- 'public': 'keyword',
- 'return': 'keyword',
- 'return!': 'keyword',
- 'select': 'keyword',
- 'static': 'keyword',
- 'struct': 'keyword',
- 'upcast': 'keyword',
- 'use': 'keyword',
- 'use!': 'keyword',
- 'val': 'keyword',
- 'when': 'keyword',
- 'yield': 'keyword',
- 'yield!': 'keyword',
-
- 'List': 'builtin',
- 'Seq': 'builtin',
- 'Map': 'builtin',
- 'Set': 'builtin',
- 'int': 'builtin',
- 'string': 'builtin',
- 'raise': 'builtin',
- 'failwith': 'builtin',
- 'not': 'builtin',
- 'true': 'builtin',
- 'false': 'builtin'
- },
- slashComments: true
-});
-
-});
diff --git a/public/js/lib/codemirror/mode/modelica/index.html b/public/js/lib/codemirror/mode/modelica/index.html
deleted file mode 100644
index 408c3b17e3..0000000000
--- a/public/js/lib/codemirror/mode/modelica/index.html
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-CodeMirror: Modelica mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-Modelica mode
-
-
-model BouncingBall
- parameter Real e = 0.7;
- parameter Real g = 9.81;
- Real h(start=1);
- Real v;
- Boolean flying(start=true);
- Boolean impact;
- Real v_new;
-equation
- impact = h <= 0.0;
- der(v) = if flying then -g else 0;
- der(h) = v;
- when {h <= 0.0 and v <= 0.0, impact} then
- v_new = if edge(impact) then -e*pre(v) else 0;
- flying = v_new > 0;
- reinit(v, v_new);
- end when;
- annotation (uses(Modelica(version="3.2")));
-end BouncingBall;
-
-
-
-
- Simple mode that tries to handle Modelica as well as it can.
-
- MIME types defined: text/x-modelica
- (Modlica code).
-
diff --git a/public/js/lib/codemirror/mode/modelica/modelica.js b/public/js/lib/codemirror/mode/modelica/modelica.js
deleted file mode 100644
index 77ec7a3c18..0000000000
--- a/public/js/lib/codemirror/mode/modelica/modelica.js
+++ /dev/null
@@ -1,245 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// Modelica support for CodeMirror, copyright (c) by Lennart Ochel
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})
-
-(function(CodeMirror) {
- "use strict";
-
- CodeMirror.defineMode("modelica", function(config, parserConfig) {
-
- var indentUnit = config.indentUnit;
- var keywords = parserConfig.keywords || {};
- var builtin = parserConfig.builtin || {};
- var atoms = parserConfig.atoms || {};
-
- var isSingleOperatorChar = /[;=\(:\),{}.*<>+\-\/^\[\]]/;
- var isDoubleOperatorChar = /(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/;
- var isDigit = /[0-9]/;
- var isNonDigit = /[_a-zA-Z]/;
-
- function tokenLineComment(stream, state) {
- stream.skipToEnd();
- state.tokenize = null;
- return "comment";
- }
-
- function tokenBlockComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (maybeEnd && ch == "/") {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- function tokenString(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == '"' && !escaped) {
- state.tokenize = null;
- state.sol = false;
- break;
- }
- escaped = !escaped && ch == "\\";
- }
-
- return "string";
- }
-
- function tokenIdent(stream, state) {
- stream.eatWhile(isDigit);
- while (stream.eat(isDigit) || stream.eat(isNonDigit)) { }
-
-
- var cur = stream.current();
-
- if(state.sol && (cur == "package" || cur == "model" || cur == "when" || cur == "connector")) state.level++;
- else if(state.sol && cur == "end" && state.level > 0) state.level--;
-
- state.tokenize = null;
- state.sol = false;
-
- if (keywords.propertyIsEnumerable(cur)) return "keyword";
- else if (builtin.propertyIsEnumerable(cur)) return "builtin";
- else if (atoms.propertyIsEnumerable(cur)) return "atom";
- else return "variable";
- }
-
- function tokenQIdent(stream, state) {
- while (stream.eat(/[^']/)) { }
-
- state.tokenize = null;
- state.sol = false;
-
- if(stream.eat("'"))
- return "variable";
- else
- return "error";
- }
-
- function tokenUnsignedNuber(stream, state) {
- stream.eatWhile(isDigit);
- if (stream.eat('.')) {
- stream.eatWhile(isDigit);
- }
- if (stream.eat('e') || stream.eat('E')) {
- if (!stream.eat('-'))
- stream.eat('+');
- stream.eatWhile(isDigit);
- }
-
- state.tokenize = null;
- state.sol = false;
- return "number";
- }
-
- // Interface
- return {
- startState: function() {
- return {
- tokenize: null,
- level: 0,
- sol: true
- };
- },
-
- token: function(stream, state) {
- if(state.tokenize != null) {
- return state.tokenize(stream, state);
- }
-
- if(stream.sol()) {
- state.sol = true;
- }
-
- // WHITESPACE
- if(stream.eatSpace()) {
- state.tokenize = null;
- return null;
- }
-
- var ch = stream.next();
-
- // LINECOMMENT
- if(ch == '/' && stream.eat('/')) {
- state.tokenize = tokenLineComment;
- }
- // BLOCKCOMMENT
- else if(ch == '/' && stream.eat('*')) {
- state.tokenize = tokenBlockComment;
- }
- // TWO SYMBOL TOKENS
- else if(isDoubleOperatorChar.test(ch+stream.peek())) {
- stream.next();
- state.tokenize = null;
- return "operator";
- }
- // SINGLE SYMBOL TOKENS
- else if(isSingleOperatorChar.test(ch)) {
- state.tokenize = null;
- return "operator";
- }
- // IDENT
- else if(isNonDigit.test(ch)) {
- state.tokenize = tokenIdent;
- }
- // Q-IDENT
- else if(ch == "'" && stream.peek() && stream.peek() != "'") {
- state.tokenize = tokenQIdent;
- }
- // STRING
- else if(ch == '"') {
- state.tokenize = tokenString;
- }
- // UNSIGNED_NUBER
- else if(isDigit.test(ch)) {
- state.tokenize = tokenUnsignedNuber;
- }
- // ERROR
- else {
- state.tokenize = null;
- return "error";
- }
-
- return state.tokenize(stream, state);
- },
-
- indent: function(state, textAfter) {
- if (state.tokenize != null) return CodeMirror.Pass;
-
- var level = state.level;
- if(/(algorithm)/.test(textAfter)) level--;
- if(/(equation)/.test(textAfter)) level--;
- if(/(initial algorithm)/.test(textAfter)) level--;
- if(/(initial equation)/.test(textAfter)) level--;
- if(/(end)/.test(textAfter)) level--;
-
- if(level > 0)
- return indentUnit*level;
- else
- return 0;
- },
-
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//"
- };
- });
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i=0; i
-
-CodeMirror: NGINX mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-NGINX mode
-
-server {
- listen 173.255.219.235:80;
- server_name website.com.au;
- rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www
-}
-
-server {
- listen 173.255.219.235:443;
- server_name website.com.au;
- rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www
-}
-
-server {
-
- listen 173.255.219.235:80;
- server_name www.website.com.au;
-
-
-
- root /data/www;
- index index.html index.php;
-
- location / {
- index index.html index.php; ## Allow a static html file to be shown first
- try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
- expires 30d; ## Assume all files are cachable
- }
-
- ## These locations would be hidden by .htaccess normally
- location /app/ { deny all; }
- location /includes/ { deny all; }
- location /lib/ { deny all; }
- location /media/downloadable/ { deny all; }
- location /pkginfo/ { deny all; }
- location /report/config.xml { deny all; }
- location /var/ { deny all; }
-
- location /var/export/ { ## Allow admins only to view export folder
- auth_basic "Restricted"; ## Message shown in login window
- auth_basic_user_file /rs/passwords/testfile; ## See /etc/nginx/htpassword
- autoindex on;
- }
-
- location /. { ## Disable .htaccess and other hidden files
- return 404;
- }
-
- location @handler { ## Magento uses a common front handler
- rewrite / /index.php;
- }
-
- location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
- rewrite ^/(.*.php)/ /$1 last;
- }
-
- location ~ \.php$ {
- if (!-e $request_filename) { rewrite / /index.php last; } ## Catch 404s that try_files miss
-
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param PATH_INFO $fastcgi_script_name;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /rs/confs/nginx/fastcgi_params;
- }
-
-}
-
-
-server {
-
- listen 173.255.219.235:443;
- server_name website.com.au www.website.com.au;
-
- root /data/www;
- index index.html index.php;
-
- ssl on;
- ssl_certificate /rs/ssl/ssl.crt;
- ssl_certificate_key /rs/ssl/ssl.key;
-
- ssl_session_timeout 5m;
-
- ssl_protocols SSLv2 SSLv3 TLSv1;
- ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
- ssl_prefer_server_ciphers on;
-
-
-
- location / {
- index index.html index.php; ## Allow a static html file to be shown first
- try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
- expires 30d; ## Assume all files are cachable
- }
-
- ## These locations would be hidden by .htaccess normally
- location /app/ { deny all; }
- location /includes/ { deny all; }
- location /lib/ { deny all; }
- location /media/downloadable/ { deny all; }
- location /pkginfo/ { deny all; }
- location /report/config.xml { deny all; }
- location /var/ { deny all; }
-
- location /var/export/ { ## Allow admins only to view export folder
- auth_basic "Restricted"; ## Message shown in login window
- auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
- autoindex on;
- }
-
- location /. { ## Disable .htaccess and other hidden files
- return 404;
- }
-
- location @handler { ## Magento uses a common front handler
- rewrite / /index.php;
- }
-
- location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
- rewrite ^/(.*.php)/ /$1 last;
- }
-
- location ~ .php$ { ## Execute PHP scripts
- if (!-e $request_filename) { rewrite /index.php last; } ## Catch 404s that try_files miss
-
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param PATH_INFO $fastcgi_script_name;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include /rs/confs/nginx/fastcgi_params;
-
- fastcgi_param HTTPS on;
- }
-
-}
-
-
-
- MIME types defined: text/nginx
.
-
-
diff --git a/public/js/lib/codemirror/mode/nginx/nginx.js b/public/js/lib/codemirror/mode/nginx/nginx.js
deleted file mode 100644
index 135b9cc7f8..0000000000
--- a/public/js/lib/codemirror/mode/nginx/nginx.js
+++ /dev/null
@@ -1,178 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("nginx", function(config) {
-
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- var keywords = words(
- /* ngxDirectiveControl */ "break return rewrite set" +
- /* ngxDirective */ " accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"
- );
-
- var keywords_block = words(
- /* ngxDirectiveBlock */ "http mail events server types location upstream charset_map limit_except if geo map"
- );
-
- var keywords_important = words(
- /* ngxDirectiveImportant */ "include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"
- );
-
- var indentUnit = config.indentUnit, type;
- function ret(style, tp) {type = tp; return style;}
-
- function tokenBase(stream, state) {
-
-
- stream.eatWhile(/[\w\$_]/);
-
- var cur = stream.current();
-
-
- if (keywords.propertyIsEnumerable(cur)) {
- return "keyword";
- }
- else if (keywords_block.propertyIsEnumerable(cur)) {
- return "variable-2";
- }
- else if (keywords_important.propertyIsEnumerable(cur)) {
- return "string-2";
- }
- /**/
-
- var ch = stream.next();
- if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());}
- else if (ch == "/" && stream.eat("*")) {
- state.tokenize = tokenCComment;
- return tokenCComment(stream, state);
- }
- else if (ch == "<" && stream.eat("!")) {
- state.tokenize = tokenSGMLComment;
- return tokenSGMLComment(stream, state);
- }
- else if (ch == "=") ret(null, "compare");
- else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare");
- else if (ch == "\"" || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- else if (ch == "#") {
- stream.skipToEnd();
- return ret("comment", "comment");
- }
- else if (ch == "!") {
- stream.match(/^\s*\w*/);
- return ret("keyword", "important");
- }
- else if (/\d/.test(ch)) {
- stream.eatWhile(/[\w.%]/);
- return ret("number", "unit");
- }
- else if (/[,.+>*\/]/.test(ch)) {
- return ret(null, "select-op");
- }
- else if (/[;{}:\[\]]/.test(ch)) {
- return ret(null, ch);
- }
- else {
- stream.eatWhile(/[\w\\\-]/);
- return ret("variable", "variable");
- }
- }
-
- function tokenCComment(stream, state) {
- var maybeEnd = false, ch;
- while ((ch = stream.next()) != null) {
- if (maybeEnd && ch == "/") {
- state.tokenize = tokenBase;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return ret("comment", "comment");
- }
-
- function tokenSGMLComment(stream, state) {
- var dashes = 0, ch;
- while ((ch = stream.next()) != null) {
- if (dashes >= 2 && ch == ">") {
- state.tokenize = tokenBase;
- break;
- }
- dashes = (ch == "-") ? dashes + 1 : 0;
- }
- return ret("comment", "comment");
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, ch;
- while ((ch = stream.next()) != null) {
- if (ch == quote && !escaped)
- break;
- escaped = !escaped && ch == "\\";
- }
- if (!escaped) state.tokenize = tokenBase;
- return ret("string", "string");
- };
- }
-
- return {
- startState: function(base) {
- return {tokenize: tokenBase,
- baseIndent: base || 0,
- stack: []};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- type = null;
- var style = state.tokenize(stream, state);
-
- var context = state.stack[state.stack.length-1];
- if (type == "hash" && context == "rule") style = "atom";
- else if (style == "variable") {
- if (context == "rule") style = "number";
- else if (!context || context == "@media{") style = "tag";
- }
-
- if (context == "rule" && /^[\{\};]$/.test(type))
- state.stack.pop();
- if (type == "{") {
- if (context == "@media") state.stack[state.stack.length-1] = "@media{";
- else state.stack.push("{");
- }
- else if (type == "}") state.stack.pop();
- else if (type == "@media") state.stack.push("@media");
- else if (context == "{" && type != "comment") state.stack.push("rule");
- return style;
- },
-
- indent: function(state, textAfter) {
- var n = state.stack.length;
- if (/^\}/.test(textAfter))
- n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1;
- return state.baseIndent + n * indentUnit;
- },
-
- electricChars: "}"
- };
-});
-
-CodeMirror.defineMIME("text/nginx", "text/x-nginx-conf");
-
-});
diff --git a/public/js/lib/codemirror/mode/ntriples/index.html b/public/js/lib/codemirror/mode/ntriples/index.html
deleted file mode 100644
index 1355e7189e..0000000000
--- a/public/js/lib/codemirror/mode/ntriples/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-CodeMirror: NTriples mode
-
-
-
-
-
-
-
-
-
-
-NTriples mode
-
-
- .
- "literal 1" .
- _:bnode3 .
-_:bnode4 "literal 2"@lang .
-_:bnode5 "literal 3"^^ .
-
-
-
-
- MIME types defined: text/n-triples
.
-
diff --git a/public/js/lib/codemirror/mode/ntriples/ntriples.js b/public/js/lib/codemirror/mode/ntriples/ntriples.js
deleted file mode 100644
index 0524b1e8ab..0000000000
--- a/public/js/lib/codemirror/mode/ntriples/ntriples.js
+++ /dev/null
@@ -1,186 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-/**********************************************************
-* This script provides syntax highlighting support for
-* the Ntriples format.
-* Ntriples format specification:
-* http://www.w3.org/TR/rdf-testcases/#ntriples
-***********************************************************/
-
-/*
- The following expression defines the defined ASF grammar transitions.
-
- pre_subject ->
- {
- ( writing_subject_uri | writing_bnode_uri )
- -> pre_predicate
- -> writing_predicate_uri
- -> pre_object
- -> writing_object_uri | writing_object_bnode |
- (
- writing_object_literal
- -> writing_literal_lang | writing_literal_type
- )
- -> post_object
- -> BEGIN
- } otherwise {
- -> ERROR
- }
-*/
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("ntriples", function() {
-
- var Location = {
- PRE_SUBJECT : 0,
- WRITING_SUB_URI : 1,
- WRITING_BNODE_URI : 2,
- PRE_PRED : 3,
- WRITING_PRED_URI : 4,
- PRE_OBJ : 5,
- WRITING_OBJ_URI : 6,
- WRITING_OBJ_BNODE : 7,
- WRITING_OBJ_LITERAL : 8,
- WRITING_LIT_LANG : 9,
- WRITING_LIT_TYPE : 10,
- POST_OBJ : 11,
- ERROR : 12
- };
- function transitState(currState, c) {
- var currLocation = currState.location;
- var ret;
-
- // Opening.
- if (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI;
- else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI;
- else if(currLocation == Location.PRE_PRED && c == '<') ret = Location.WRITING_PRED_URI;
- else if(currLocation == Location.PRE_OBJ && c == '<') ret = Location.WRITING_OBJ_URI;
- else if(currLocation == Location.PRE_OBJ && c == '_') ret = Location.WRITING_OBJ_BNODE;
- else if(currLocation == Location.PRE_OBJ && c == '"') ret = Location.WRITING_OBJ_LITERAL;
-
- // Closing.
- else if(currLocation == Location.WRITING_SUB_URI && c == '>') ret = Location.PRE_PRED;
- else if(currLocation == Location.WRITING_BNODE_URI && c == ' ') ret = Location.PRE_PRED;
- else if(currLocation == Location.WRITING_PRED_URI && c == '>') ret = Location.PRE_OBJ;
- else if(currLocation == Location.WRITING_OBJ_URI && c == '>') ret = Location.POST_OBJ;
- else if(currLocation == Location.WRITING_OBJ_BNODE && c == ' ') ret = Location.POST_OBJ;
- else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '"') ret = Location.POST_OBJ;
- else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ;
- else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ;
-
- // Closing typed and language literal.
- else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG;
- else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE;
-
- // Spaces.
- else if( c == ' ' &&
- (
- currLocation == Location.PRE_SUBJECT ||
- currLocation == Location.PRE_PRED ||
- currLocation == Location.PRE_OBJ ||
- currLocation == Location.POST_OBJ
- )
- ) ret = currLocation;
-
- // Reset.
- else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT;
-
- // Error
- else ret = Location.ERROR;
-
- currState.location=ret;
- }
-
- return {
- startState: function() {
- return {
- location : Location.PRE_SUBJECT,
- uris : [],
- anchors : [],
- bnodes : [],
- langs : [],
- types : []
- };
- },
- token: function(stream, state) {
- var ch = stream.next();
- if(ch == '<') {
- transitState(state, ch);
- var parsedURI = '';
- stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} );
- state.uris.push(parsedURI);
- if( stream.match('#', false) ) return 'variable';
- stream.next();
- transitState(state, '>');
- return 'variable';
- }
- if(ch == '#') {
- var parsedAnchor = '';
- stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;});
- state.anchors.push(parsedAnchor);
- return 'variable-2';
- }
- if(ch == '>') {
- transitState(state, '>');
- return 'variable';
- }
- if(ch == '_') {
- transitState(state, ch);
- var parsedBNode = '';
- stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;});
- state.bnodes.push(parsedBNode);
- stream.next();
- transitState(state, ' ');
- return 'builtin';
- }
- if(ch == '"') {
- transitState(state, ch);
- stream.eatWhile( function(c) { return c != '"'; } );
- stream.next();
- if( stream.peek() != '@' && stream.peek() != '^' ) {
- transitState(state, '"');
- }
- return 'string';
- }
- if( ch == '@' ) {
- transitState(state, '@');
- var parsedLang = '';
- stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;});
- state.langs.push(parsedLang);
- stream.next();
- transitState(state, ' ');
- return 'string-2';
- }
- if( ch == '^' ) {
- stream.next();
- transitState(state, '^');
- var parsedType = '';
- stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} );
- state.types.push(parsedType);
- stream.next();
- transitState(state, '>');
- return 'variable';
- }
- if( ch == ' ' ) {
- transitState(state, ch);
- }
- if( ch == '.' ) {
- transitState(state, ch);
- }
- }
- };
-});
-
-CodeMirror.defineMIME("text/n-triples", "ntriples");
-
-});
diff --git a/public/js/lib/codemirror/mode/octave/index.html b/public/js/lib/codemirror/mode/octave/index.html
deleted file mode 100644
index 79df581199..0000000000
--- a/public/js/lib/codemirror/mode/octave/index.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-CodeMirror: Octave mode
-
-
-
-
-
-
-
-
-
-
-Octave mode
-
-
-%numbers
-[1234 1234i 1234j]
-[.234 .234j 2.23i]
-[23e2 12E1j 123D-4 0x234]
-
-%strings
-'asda''a'
-"asda""a"
-
-%identifiers
-a + as123 - __asd__
-
-%operators
--
-+
-=
-==
->
-<
->=
-<=
-&
-~
-...
-break zeros default margin round ones rand
-ceil floor size clear zeros eye mean std cov
-error eval function
-abs acos atan asin cos cosh exp log prod sum
-log10 max min sign sin sinh sqrt tan reshape
-return
-case switch
-else elseif end if otherwise
-do for while
-try catch
-classdef properties events methods
-global persistent
-
-%one line comment
-%{ multi
-line commment %}
-
-
-
-
- MIME types defined: text/x-octave
.
-
diff --git a/public/js/lib/codemirror/mode/octave/octave.js b/public/js/lib/codemirror/mode/octave/octave.js
deleted file mode 100644
index a7bec030c2..0000000000
--- a/public/js/lib/codemirror/mode/octave/octave.js
+++ /dev/null
@@ -1,135 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("octave", function() {
- function wordRegexp(words) {
- return new RegExp("^((" + words.join(")|(") + "))\\b");
- }
-
- var singleOperators = new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]");
- var singleDelimiters = new RegExp('^[\\(\\[\\{\\},:=;]');
- var doubleOperators = new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))");
- var doubleDelimiters = new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))");
- var tripleDelimiters = new RegExp("^((>>=)|(<<=))");
- var expressionEnd = new RegExp("^[\\]\\)]");
- var identifiers = new RegExp("^[_A-Za-z\xa1-\uffff][_A-Za-z0-9\xa1-\uffff]*");
-
- var builtins = wordRegexp([
- 'error', 'eval', 'function', 'abs', 'acos', 'atan', 'asin', 'cos',
- 'cosh', 'exp', 'log', 'prod', 'sum', 'log10', 'max', 'min', 'sign', 'sin', 'sinh',
- 'sqrt', 'tan', 'reshape', 'break', 'zeros', 'default', 'margin', 'round', 'ones',
- 'rand', 'syn', 'ceil', 'floor', 'size', 'clear', 'zeros', 'eye', 'mean', 'std', 'cov',
- 'det', 'eig', 'inv', 'norm', 'rank', 'trace', 'expm', 'logm', 'sqrtm', 'linspace', 'plot',
- 'title', 'xlabel', 'ylabel', 'legend', 'text', 'grid', 'meshgrid', 'mesh', 'num2str',
- 'fft', 'ifft', 'arrayfun', 'cellfun', 'input', 'fliplr', 'flipud', 'ismember'
- ]);
-
- var keywords = wordRegexp([
- 'return', 'case', 'switch', 'else', 'elseif', 'end', 'endif', 'endfunction',
- 'if', 'otherwise', 'do', 'for', 'while', 'try', 'catch', 'classdef', 'properties', 'events',
- 'methods', 'global', 'persistent', 'endfor', 'endwhile', 'printf', 'sprintf', 'disp', 'until',
- 'continue', 'pkg'
- ]);
-
-
- // tokenizers
- function tokenTranspose(stream, state) {
- if (!stream.sol() && stream.peek() === '\'') {
- stream.next();
- state.tokenize = tokenBase;
- return 'operator';
- }
- state.tokenize = tokenBase;
- return tokenBase(stream, state);
- }
-
-
- function tokenComment(stream, state) {
- if (stream.match(/^.*%}/)) {
- state.tokenize = tokenBase;
- return 'comment';
- };
- stream.skipToEnd();
- return 'comment';
- }
-
- function tokenBase(stream, state) {
- // whitespaces
- if (stream.eatSpace()) return null;
-
- // Handle one line Comments
- if (stream.match('%{')){
- state.tokenize = tokenComment;
- stream.skipToEnd();
- return 'comment';
- }
-
- if (stream.match(/^[%#]/)){
- stream.skipToEnd();
- return 'comment';
- }
-
- // Handle Number Literals
- if (stream.match(/^[0-9\.+-]/, false)) {
- if (stream.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/)) {
- stream.tokenize = tokenBase;
- return 'number'; };
- if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; };
- if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; };
- }
- if (stream.match(wordRegexp(['nan','NaN','inf','Inf']))) { return 'number'; };
-
- // Handle Strings
- if (stream.match(/^"([^"]|(""))*"/)) { return 'string'; } ;
- if (stream.match(/^'([^']|(''))*'/)) { return 'string'; } ;
-
- // Handle words
- if (stream.match(keywords)) { return 'keyword'; } ;
- if (stream.match(builtins)) { return 'builtin'; } ;
- if (stream.match(identifiers)) { return 'variable'; } ;
-
- if (stream.match(singleOperators) || stream.match(doubleOperators)) { return 'operator'; };
- if (stream.match(singleDelimiters) || stream.match(doubleDelimiters) || stream.match(tripleDelimiters)) { return null; };
-
- if (stream.match(expressionEnd)) {
- state.tokenize = tokenTranspose;
- return null;
- };
-
-
- // Handle non-detected items
- stream.next();
- return 'error';
- };
-
-
- return {
- startState: function() {
- return {
- tokenize: tokenBase
- };
- },
-
- token: function(stream, state) {
- var style = state.tokenize(stream, state);
- if (style === 'number' || style === 'variable'){
- state.tokenize = tokenTranspose;
- }
- return style;
- }
- };
-});
-
-CodeMirror.defineMIME("text/x-octave", "octave");
-
-});
diff --git a/public/js/lib/codemirror/mode/pascal/index.html b/public/js/lib/codemirror/mode/pascal/index.html
deleted file mode 100644
index f8a99ad01e..0000000000
--- a/public/js/lib/codemirror/mode/pascal/index.html
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-CodeMirror: Pascal mode
-
-
-
-
-
-
-
-
-
-
-Pascal mode
-
-
-
-(* Example Pascal code *)
-
-while a <> b do writeln('Waiting');
-
-if a > b then
- writeln('Condition met')
-else
- writeln('Condition not met');
-
-for i := 1 to 10 do
- writeln('Iteration: ', i:1);
-
-repeat
- a := a + 1
-until a = 10;
-
-case i of
- 0: write('zero');
- 1: write('one');
- 2: write('two')
-end;
-
-
-
-
- MIME types defined: text/x-pascal
.
-
diff --git a/public/js/lib/codemirror/mode/pascal/pascal.js b/public/js/lib/codemirror/mode/pascal/pascal.js
deleted file mode 100644
index 2d0c3d4240..0000000000
--- a/public/js/lib/codemirror/mode/pascal/pascal.js
+++ /dev/null
@@ -1,109 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("pascal", function() {
- function words(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
- var keywords = words("and array begin case const div do downto else end file for forward integer " +
- "boolean char function goto if in label mod nil not of or packed procedure " +
- "program record repeat set string then to type until var while with");
- var atoms = {"null": true};
-
- var isOperatorChar = /[+\-*&%=<>!?|\/]/;
-
- function tokenBase(stream, state) {
- var ch = stream.next();
- if (ch == "#" && state.startOfLine) {
- stream.skipToEnd();
- return "meta";
- }
- if (ch == '"' || ch == "'") {
- state.tokenize = tokenString(ch);
- return state.tokenize(stream, state);
- }
- if (ch == "(" && stream.eat("*")) {
- state.tokenize = tokenComment;
- return tokenComment(stream, state);
- }
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
- return null;
- }
- if (/\d/.test(ch)) {
- stream.eatWhile(/[\w\.]/);
- return "number";
- }
- if (ch == "/") {
- if (stream.eat("/")) {
- stream.skipToEnd();
- return "comment";
- }
- }
- if (isOperatorChar.test(ch)) {
- stream.eatWhile(isOperatorChar);
- return "operator";
- }
- stream.eatWhile(/[\w\$_]/);
- var cur = stream.current();
- if (keywords.propertyIsEnumerable(cur)) return "keyword";
- if (atoms.propertyIsEnumerable(cur)) return "atom";
- return "variable";
- }
-
- function tokenString(quote) {
- return function(stream, state) {
- var escaped = false, next, end = false;
- while ((next = stream.next()) != null) {
- if (next == quote && !escaped) {end = true; break;}
- escaped = !escaped && next == "\\";
- }
- if (end || !escaped) state.tokenize = null;
- return "string";
- };
- }
-
- function tokenComment(stream, state) {
- var maybeEnd = false, ch;
- while (ch = stream.next()) {
- if (ch == ")" && maybeEnd) {
- state.tokenize = null;
- break;
- }
- maybeEnd = (ch == "*");
- }
- return "comment";
- }
-
- // Interface
-
- return {
- startState: function() {
- return {tokenize: null};
- },
-
- token: function(stream, state) {
- if (stream.eatSpace()) return null;
- var style = (state.tokenize || tokenBase)(stream, state);
- if (style == "comment" || style == "meta") return style;
- return style;
- },
-
- electricChars: "{}"
- };
-});
-
-CodeMirror.defineMIME("text/x-pascal", "pascal");
-
-});
diff --git a/public/js/lib/codemirror/mode/pegjs/index.html b/public/js/lib/codemirror/mode/pegjs/index.html
deleted file mode 100644
index 0c74604881..0000000000
--- a/public/js/lib/codemirror/mode/pegjs/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
- CodeMirror: PEG.js Mode
-
-
-
-
-
-
-
-
-
-
-
-
-
- PEG.js Mode
-
-/*
- * Classic example grammar, which recognizes simple arithmetic expressions like
- * "2*(3+4)". The parser generated from this grammar then computes their value.
- */
-
-start
- = additive
-
-additive
- = left:multiplicative "+" right:additive { return left + right; }
- / multiplicative
-
-multiplicative
- = left:primary "*" right:multiplicative { return left * right; }
- / primary
-
-primary
- = integer
- / "(" additive:additive ")" { return additive; }
-
-integer "integer"
- = digits:[0-9]+ { return parseInt(digits.join(""), 10); }
-
-letter = [a-z]+
-
- The PEG.js Mode
- Created by Forbes Lindesay.
-
-
-
diff --git a/public/js/lib/codemirror/mode/pegjs/pegjs.js b/public/js/lib/codemirror/mode/pegjs/pegjs.js
deleted file mode 100644
index 306e3768c9..0000000000
--- a/public/js/lib/codemirror/mode/pegjs/pegjs.js
+++ /dev/null
@@ -1,114 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../javascript/javascript"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../javascript/javascript"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("pegjs", function (config) {
- var jsMode = CodeMirror.getMode(config, "javascript");
-
- function identifier(stream) {
- return stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/);
- }
-
- return {
- startState: function () {
- return {
- inString: false,
- stringType: null,
- inComment: false,
- inChracterClass: false,
- braced: 0,
- lhs: true,
- localState: null
- };
- },
- token: function (stream, state) {
- if (stream)
-
- //check for state changes
- if (!state.inString && !state.inComment && ((stream.peek() == '"') || (stream.peek() == "'"))) {
- state.stringType = stream.peek();
- stream.next(); // Skip quote
- state.inString = true; // Update state
- }
- if (!state.inString && !state.inComment && stream.match(/^\/\*/)) {
- state.inComment = true;
- }
-
- //return state
- if (state.inString) {
- while (state.inString && !stream.eol()) {
- if (stream.peek() === state.stringType) {
- stream.next(); // Skip quote
- state.inString = false; // Clear flag
- } else if (stream.peek() === '\\') {
- stream.next();
- stream.next();
- } else {
- stream.match(/^.[^\\\"\']*/);
- }
- }
- return state.lhs ? "property string" : "string"; // Token style
- } else if (state.inComment) {
- while (state.inComment && !stream.eol()) {
- if (stream.match(/\*\//)) {
- state.inComment = false; // Clear flag
- } else {
- stream.match(/^.[^\*]*/);
- }
- }
- return "comment";
- } else if (state.inChracterClass) {
- while (state.inChracterClass && !stream.eol()) {
- if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) {
- state.inChracterClass = false;
- }
- }
- } else if (stream.peek() === '[') {
- stream.next();
- state.inChracterClass = true;
- return 'bracket';
- } else if (stream.match(/^\/\//)) {
- stream.skipToEnd();
- return "comment";
- } else if (state.braced || stream.peek() === '{') {
- if (state.localState === null) {
- state.localState = jsMode.startState();
- }
- var token = jsMode.token(stream, state.localState);
- var text = stream.current();
- if (!token) {
- for (var i = 0; i < text.length; i++) {
- if (text[i] === '{') {
- state.braced++;
- } else if (text[i] === '}') {
- state.braced--;
- }
- };
- }
- return token;
- } else if (identifier(stream)) {
- if (stream.peek() === ':') {
- return 'variable';
- }
- return 'variable-2';
- } else if (['[', ']', '(', ')'].indexOf(stream.peek()) != -1) {
- stream.next();
- return 'bracket';
- } else if (!stream.eatSpace()) {
- stream.next();
- }
- return null;
- }
- };
-}, "javascript");
-
-});
diff --git a/public/js/lib/codemirror/mode/perl/index.html b/public/js/lib/codemirror/mode/perl/index.html
deleted file mode 100644
index 8c1021c42b..0000000000
--- a/public/js/lib/codemirror/mode/perl/index.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-CodeMirror: Perl mode
-
-
-
-
-
-
-
-
-
-
-Perl mode
-
-
-
-#!/usr/bin/perl
-
-use Something qw(func1 func2);
-
-# strings
-my $s1 = qq'single line';
-our $s2 = q(multi-
- line);
-
-=item Something
- Example.
-=cut
-
-my $html=<<'HTML'
-
-hi!
-
-HTML
-
-print "first,".join(',', 'second', qq~third~);
-
-if($s1 =~ m[(?{$1}=$$.' predefined variables';
- $s2 =~ s/\-line//ox;
- $s1 =~ s[
- line ]
- [
- block
- ]ox;
-}
-
-1; # numbers and comments
-
-__END__
-something...
-
-
-
-
-
- MIME types defined: text/x-perl
.
-
diff --git a/public/js/lib/codemirror/mode/perl/perl.js b/public/js/lib/codemirror/mode/perl/perl.js
deleted file mode 100644
index 311574e74a..0000000000
--- a/public/js/lib/codemirror/mode/perl/perl.js
+++ /dev/null
@@ -1,832 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08)
-// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com)
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
-"use strict";
-
-CodeMirror.defineMode("perl",function(){
- // http://perldoc.perl.org
- var PERL={ // null - magic touch
- // 1 - keyword
- // 2 - def
- // 3 - atom
- // 4 - operator
- // 5 - variable-2 (predefined)
- // [x,y] - x=1,2,3; y=must be defined if x{...}
- // PERL operators
- '->' : 4,
- '++' : 4,
- '--' : 4,
- '**' : 4,
- // ! ~ \ and unary + and -
- '=~' : 4,
- '!~' : 4,
- '*' : 4,
- '/' : 4,
- '%' : 4,
- 'x' : 4,
- '+' : 4,
- '-' : 4,
- '.' : 4,
- '<<' : 4,
- '>>' : 4,
- // named unary operators
- '<' : 4,
- '>' : 4,
- '<=' : 4,
- '>=' : 4,
- 'lt' : 4,
- 'gt' : 4,
- 'le' : 4,
- 'ge' : 4,
- '==' : 4,
- '!=' : 4,
- '<=>' : 4,
- 'eq' : 4,
- 'ne' : 4,
- 'cmp' : 4,
- '~~' : 4,
- '&' : 4,
- '|' : 4,
- '^' : 4,
- '&&' : 4,
- '||' : 4,
- '//' : 4,
- '..' : 4,
- '...' : 4,
- '?' : 4,
- ':' : 4,
- '=' : 4,
- '+=' : 4,
- '-=' : 4,
- '*=' : 4, // etc. ???
- ',' : 4,
- '=>' : 4,
- '::' : 4,
- // list operators (rightward)
- 'not' : 4,
- 'and' : 4,
- 'or' : 4,
- 'xor' : 4,
- // PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;)
- 'BEGIN' : [5,1],
- 'END' : [5,1],
- 'PRINT' : [5,1],
- 'PRINTF' : [5,1],
- 'GETC' : [5,1],
- 'READ' : [5,1],
- 'READLINE' : [5,1],
- 'DESTROY' : [5,1],
- 'TIE' : [5,1],
- 'TIEHANDLE' : [5,1],
- 'UNTIE' : [5,1],
- 'STDIN' : 5,
- 'STDIN_TOP' : 5,
- 'STDOUT' : 5,
- 'STDOUT_TOP' : 5,
- 'STDERR' : 5,
- 'STDERR_TOP' : 5,
- '$ARG' : 5,
- '$_' : 5,
- '@ARG' : 5,
- '@_' : 5,
- '$LIST_SEPARATOR' : 5,
- '$"' : 5,
- '$PROCESS_ID' : 5,
- '$PID' : 5,
- '$$' : 5,
- '$REAL_GROUP_ID' : 5,
- '$GID' : 5,
- '$(' : 5,
- '$EFFECTIVE_GROUP_ID' : 5,
- '$EGID' : 5,
- '$)' : 5,
- '$PROGRAM_NAME' : 5,
- '$0' : 5,
- '$SUBSCRIPT_SEPARATOR' : 5,
- '$SUBSEP' : 5,
- '$;' : 5,
- '$REAL_USER_ID' : 5,
- '$UID' : 5,
- '$<' : 5,
- '$EFFECTIVE_USER_ID' : 5,
- '$EUID' : 5,
- '$>' : 5,
- '$a' : 5,
- '$b' : 5,
- '$COMPILING' : 5,
- '$^C' : 5,
- '$DEBUGGING' : 5,
- '$^D' : 5,
- '${^ENCODING}' : 5,
- '$ENV' : 5,
- '%ENV' : 5,
- '$SYSTEM_FD_MAX' : 5,
- '$^F' : 5,
- '@F' : 5,
- '${^GLOBAL_PHASE}' : 5,
- '$^H' : 5,
- '%^H' : 5,
- '@INC' : 5,
- '%INC' : 5,
- '$INPLACE_EDIT' : 5,
- '$^I' : 5,
- '$^M' : 5,
- '$OSNAME' : 5,
- '$^O' : 5,
- '${^OPEN}' : 5,
- '$PERLDB' : 5,
- '$^P' : 5,
- '$SIG' : 5,
- '%SIG' : 5,
- '$BASETIME' : 5,
- '$^T' : 5,
- '${^TAINT}' : 5,
- '${^UNICODE}' : 5,
- '${^UTF8CACHE}' : 5,
- '${^UTF8LOCALE}' : 5,
- '$PERL_VERSION' : 5,
- '$^V' : 5,
- '${^WIN32_SLOPPY_STAT}' : 5,
- '$EXECUTABLE_NAME' : 5,
- '$^X' : 5,
- '$1' : 5, // - regexp $1, $2...
- '$MATCH' : 5,
- '$&' : 5,
- '${^MATCH}' : 5,
- '$PREMATCH' : 5,
- '$`' : 5,
- '${^PREMATCH}' : 5,
- '$POSTMATCH' : 5,
- "$'" : 5,
- '${^POSTMATCH}' : 5,
- '$LAST_PAREN_MATCH' : 5,
- '$+' : 5,
- '$LAST_SUBMATCH_RESULT' : 5,
- '$^N' : 5,
- '@LAST_MATCH_END' : 5,
- '@+' : 5,
- '%LAST_PAREN_MATCH' : 5,
- '%+' : 5,
- '@LAST_MATCH_START' : 5,
- '@-' : 5,
- '%LAST_MATCH_START' : 5,
- '%-' : 5,
- '$LAST_REGEXP_CODE_RESULT' : 5,
- '$^R' : 5,
- '${^RE_DEBUG_FLAGS}' : 5,
- '${^RE_TRIE_MAXBUF}' : 5,
- '$ARGV' : 5,
- '@ARGV' : 5,
- 'ARGV' : 5,
- 'ARGVOUT' : 5,
- '$OUTPUT_FIELD_SEPARATOR' : 5,
- '$OFS' : 5,
- '$,' : 5,
- '$INPUT_LINE_NUMBER' : 5,
- '$NR' : 5,
- '$.' : 5,
- '$INPUT_RECORD_SEPARATOR' : 5,
- '$RS' : 5,
- '$/' : 5,
- '$OUTPUT_RECORD_SEPARATOR' : 5,
- '$ORS' : 5,
- '$\\' : 5,
- '$OUTPUT_AUTOFLUSH' : 5,
- '$|' : 5,
- '$ACCUMULATOR' : 5,
- '$^A' : 5,
- '$FORMAT_FORMFEED' : 5,
- '$^L' : 5,
- '$FORMAT_PAGE_NUMBER' : 5,
- '$%' : 5,
- '$FORMAT_LINES_LEFT' : 5,
- '$-' : 5,
- '$FORMAT_LINE_BREAK_CHARACTERS' : 5,
- '$:' : 5,
- '$FORMAT_LINES_PER_PAGE' : 5,
- '$=' : 5,
- '$FORMAT_TOP_NAME' : 5,
- '$^' : 5,
- '$FORMAT_NAME' : 5,
- '$~' : 5,
- '${^CHILD_ERROR_NATIVE}' : 5,
- '$EXTENDED_OS_ERROR' : 5,
- '$^E' : 5,
- '$EXCEPTIONS_BEING_CAUGHT' : 5,
- '$^S' : 5,
- '$WARNING' : 5,
- '$^W' : 5,
- '${^WARNING_BITS}' : 5,
- '$OS_ERROR' : 5,
- '$ERRNO' : 5,
- '$!' : 5,
- '%OS_ERROR' : 5,
- '%ERRNO' : 5,
- '%!' : 5,
- '$CHILD_ERROR' : 5,
- '$?' : 5,
- '$EVAL_ERROR' : 5,
- '$@' : 5,
- '$OFMT' : 5,
- '$#' : 5,
- '$*' : 5,
- '$ARRAY_BASE' : 5,
- '$[' : 5,
- '$OLD_PERL_VERSION' : 5,
- '$]' : 5,
- // PERL blocks
- 'if' :[1,1],
- elsif :[1,1],
- 'else' :[1,1],
- 'while' :[1,1],
- unless :[1,1],
- 'for' :[1,1],
- foreach :[1,1],
- // PERL functions
- 'abs' :1, // - absolute value function
- accept :1, // - accept an incoming socket connect
- alarm :1, // - schedule a SIGALRM
- 'atan2' :1, // - arctangent of Y/X in the range -PI to PI
- bind :1, // - binds an address to a socket
- binmode :1, // - prepare binary files for I/O
- bless :1, // - create an object
- bootstrap :1, //
- 'break' :1, // - break out of a "given" block
- caller :1, // - get context of the current subroutine call
- chdir :1, // - change your current working directory
- chmod :1, // - changes the permissions on a list of files
- chomp :1, // - remove a trailing record separator from a string
- chop :1, // - remove the last character from a string
- chown :1, // - change the owership on a list of files
- chr :1, // - get character this number represents
- chroot :1, // - make directory new root for path lookups
- close :1, // - close file (or pipe or socket) handle
- closedir :1, // - close directory handle
- connect :1, // - connect to a remote socket
- 'continue' :[1,1], // - optional trailing block in a while or foreach
- 'cos' :1, // - cosine function
- crypt :1, // - one-way passwd-style encryption
- dbmclose :1, // - breaks binding on a tied dbm file
- dbmopen :1, // - create binding on a tied dbm file
- 'default' :1, //
- defined :1, // - test whether a value, variable, or function is defined
- 'delete' :1, // - deletes a value from a hash
- die :1, // - raise an exception or bail out
- 'do' :1, // - turn a BLOCK into a TERM
- dump :1, // - create an immediate core dump
- each :1, // - retrieve the next key/value pair from a hash
- endgrent :1, // - be done using group file
- endhostent :1, // - be done using hosts file
- endnetent :1, // - be done using networks file
- endprotoent :1, // - be done using protocols file
- endpwent :1, // - be done using passwd file
- endservent :1, // - be done using services file
- eof :1, // - test a filehandle for its end
- 'eval' :1, // - catch exceptions or compile and run code
- 'exec' :1, // - abandon this program to run another
- exists :1, // - test whether a hash key is present
- exit :1, // - terminate this program
- 'exp' :1, // - raise I to a power
- fcntl :1, // - file control system call
- fileno :1, // - return file descriptor from filehandle
- flock :1, // - lock an entire file with an advisory lock
- fork :1, // - create a new process just like this one
- format :1, // - declare a picture format with use by the write() function
- formline :1, // - internal function used for formats
- getc :1, // - get the next character from the filehandle
- getgrent :1, // - get next group record
- getgrgid :1, // - get group record given group user ID
- getgrnam :1, // - get group record given group name
- gethostbyaddr :1, // - get host record given its address
- gethostbyname :1, // - get host record given name
- gethostent :1, // - get next hosts record
- getlogin :1, // - return who logged in at this tty
- getnetbyaddr :1, // - get network record given its address
- getnetbyname :1, // - get networks record given name
- getnetent :1, // - get next networks record
- getpeername :1, // - find the other end of a socket connection
- getpgrp :1, // - get process group
- getppid :1, // - get parent process ID
- getpriority :1, // - get current nice value
- getprotobyname :1, // - get protocol record given name
- getprotobynumber :1, // - get protocol record numeric protocol
- getprotoent :1, // - get next protocols record
- getpwent :1, // - get next passwd record
- getpwnam :1, // - get passwd record given user login name
- getpwuid :1, // - get passwd record given user ID
- getservbyname :1, // - get services record given its name
- getservbyport :1, // - get services record given numeric port
- getservent :1, // - get next services record
- getsockname :1, // - retrieve the sockaddr for a given socket
- getsockopt :1, // - get socket options on a given socket
- given :1, //
- glob :1, // - expand filenames using wildcards
- gmtime :1, // - convert UNIX time into record or string using Greenwich time
- 'goto' :1, // - create spaghetti code
- grep :1, // - locate elements in a list test true against a given criterion
- hex :1, // - convert a string to a hexadecimal number
- 'import' :1, // - patch a module's namespace into your own
- index :1, // - find a substring within a string
- 'int' :1, // - get the integer portion of a number
- ioctl :1, // - system-dependent device control system call
- 'join' :1, // - join a list into a string using a separator
- keys :1, // - retrieve list of indices from a hash
- kill :1, // - send a signal to a process or process group
- last :1, // - exit a block prematurely
- lc :1, // - return lower-case version of a string
- lcfirst :1, // - return a string with just the next letter in lower case
- length :1, // - return the number of bytes in a string
- 'link' :1, // - create a hard link in the filesytem
- listen :1, // - register your socket as a server
- local : 2, // - create a temporary value for a global variable (dynamic scoping)
- localtime :1, // - convert UNIX time into record or string using local time
- lock :1, // - get a thread lock on a variable, subroutine, or method
- 'log' :1, // - retrieve the natural logarithm for a number
- lstat :1, // - stat a symbolic link
- m :null, // - match a string with a regular expression pattern
- map :1, // - apply a change to a list to get back a new list with the changes
- mkdir :1, // - create a directory
- msgctl :1, // - SysV IPC message control operations
- msgget :1, // - get SysV IPC message queue
- msgrcv :1, // - receive a SysV IPC message from a message queue
- msgsnd :1, // - send a SysV IPC message to a message queue
- my : 2, // - declare and assign a local variable (lexical scoping)
- 'new' :1, //
- next :1, // - iterate a block prematurely
- no :1, // - unimport some module symbols or semantics at compile time
- oct :1, // - convert a string to an octal number
- open :1, // - open a file, pipe, or descriptor
- opendir :1, // - open a directory
- ord :1, // - find a character's numeric representation
- our : 2, // - declare and assign a package variable (lexical scoping)
- pack :1, // - convert a list into a binary representation
- 'package' :1, // - declare a separate global namespace
- pipe :1, // - open a pair of connected filehandles
- pop :1, // - remove the last element from an array and return it
- pos :1, // - find or set the offset for the last/next m//g search
- print :1, // - output a list to a filehandle
- printf :1, // - output a formatted list to a filehandle
- prototype :1, // - get the prototype (if any) of a subroutine
- push :1, // - append one or more elements to an array
- q :null, // - singly quote a string
- qq :null, // - doubly quote a string
- qr :null, // - Compile pattern
- quotemeta :null, // - quote regular expression magic characters
- qw :null, // - quote a list of words
- qx :null, // - backquote quote a string
- rand :1, // - retrieve the next pseudorandom number
- read :1, // - fixed-length buffered input from a filehandle
- readdir :1, // - get a directory from a directory handle
- readline :1, // - fetch a record from a file
- readlink :1, // - determine where a symbolic link is pointing
- readpipe :1, // - execute a system command and collect standard output
- recv :1, // - receive a message over a Socket
- redo :1, // - start this loop iteration over again
- ref :1, // - find out the type of thing being referenced
- rename :1, // - change a filename
- require :1, // - load in external functions from a library at runtime
- reset :1, // - clear all variables of a given name
- 'return' :1, // - get out of a function early
- reverse :1, // - flip a string or a list
- rewinddir :1, // - reset directory handle
- rindex :1, // - right-to-left substring search
- rmdir :1, // - remove a directory
- s :null, // - replace a pattern with a string
- say :1, // - print with newline
- scalar :1, // - force a scalar context
- seek :1, // - reposition file pointer for random-access I/O
- seekdir :1, // - reposition directory pointer
- select :1, // - reset default output or do I/O multiplexing
- semctl :1, // - SysV semaphore control operations
- semget :1, // - get set of SysV semaphores
- semop :1, // - SysV semaphore operations
- send :1, // - send a message over a socket
- setgrent :1, // - prepare group file for use
- sethostent :1, // - prepare hosts file for use
- setnetent :1, // - prepare networks file for use
- setpgrp :1, // - set the process group of a process
- setpriority :1, // - set a process's nice value
- setprotoent :1, // - prepare protocols file for use
- setpwent :1, // - prepare passwd file for use
- setservent :1, // - prepare services file for use
- setsockopt :1, // - set some socket options
- shift :1, // - remove the first element of an array, and return it
- shmctl :1, // - SysV shared memory operations
- shmget :1, // - get SysV shared memory segment identifier
- shmread :1, // - read SysV shared memory
- shmwrite :1, // - write SysV shared memory
- shutdown :1, // - close down just half of a socket connection
- 'sin' :1, // - return the sine of a number
- sleep :1, // - block for some number of seconds
- socket :1, // - create a socket
- socketpair :1, // - create a pair of sockets
- 'sort' :1, // - sort a list of values
- splice :1, // - add or remove elements anywhere in an array
- 'split' :1, // - split up a string using a regexp delimiter
- sprintf :1, // - formatted print into a string
- 'sqrt' :1, // - square root function
- srand :1, // - seed the random number generator
- stat :1, // - get a file's status information
- state :1, // - declare and assign a state variable (persistent lexical scoping)
- study :1, // - optimize input data for repeated searches
- 'sub' :1, // - declare a subroutine, possibly anonymously
- 'substr' :1, // - get or alter a portion of a stirng
- symlink :1, // - create a symbolic link to a file
- syscall :1, // - execute an arbitrary system call
- sysopen :1, // - open a file, pipe, or descriptor
- sysread :1, // - fixed-length unbuffered input from a filehandle
- sysseek :1, // - position I/O pointer on handle used with sysread and syswrite
- system :1, // - run a separate program
- syswrite :1, // - fixed-length unbuffered output to a filehandle
- tell :1, // - get current seekpointer on a filehandle
- telldir :1, // - get current seekpointer on a directory handle
- tie :1, // - bind a variable to an object class
- tied :1, // - get a reference to the object underlying a tied variable
- time :1, // - return number of seconds since 1970
- times :1, // - return elapsed time for self and child processes
- tr :null, // - transliterate a string
- truncate :1, // - shorten a file
- uc :1, // - return upper-case version of a string
- ucfirst :1, // - return a string with just the next letter in upper case
- umask :1, // - set file creation mode mask
- undef :1, // - remove a variable or function definition
- unlink :1, // - remove one link to a file
- unpack :1, // - convert binary structure into normal perl variables
- unshift :1, // - prepend more elements to the beginning of a list
- untie :1, // - break a tie binding to a variable
- use :1, // - load in a module at compile time
- utime :1, // - set a file's last access and modify times
- values :1, // - return a list of the values in a hash
- vec :1, // - test or set particular bits in a string
- wait :1, // - wait for any child process to die
- waitpid :1, // - wait for a particular child process to die
- wantarray :1, // - get void vs scalar vs list context of current subroutine call
- warn :1, // - print debugging info
- when :1, //
- write :1, // - print a picture record
- y :null}; // - transliterate a string
-
- var RXstyle="string-2";
- var RXmodifiers=/[goseximacplud]/; // NOTE: "m", "s", "y" and "tr" need to correct real modifiers for each regexp type
-
- function tokenChain(stream,state,chain,style,tail){ // NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;)
- state.chain=null; // 12 3tail
- state.style=null;
- state.tail=null;
- state.tokenize=function(stream,state){
- var e=false,c,i=0;
- while(c=stream.next()){
- if(c===chain[i]&&!e){
- if(chain[++i]!==undefined){
- state.chain=chain[i];
- state.style=style;
- state.tail=tail;}
- else if(tail)
- stream.eatWhile(tail);
- state.tokenize=tokenPerl;
- return style;}
- e=!e&&c=="\\";}
- return style;};
- return state.tokenize(stream,state);}
-
- function tokenSOMETHING(stream,state,string){
- state.tokenize=function(stream,state){
- if(stream.string==string)
- state.tokenize=tokenPerl;
- stream.skipToEnd();
- return "string";};
- return state.tokenize(stream,state);}
-
- function tokenPerl(stream,state){
- if(stream.eatSpace())
- return null;
- if(state.chain)
- return tokenChain(stream,state,state.chain,state.style,state.tail);
- if(stream.match(/^\-?[\d\.]/,false))
- if(stream.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))
- return 'number';
- if(stream.match(/^<<(?=\w)/)){ // NOTE: <"],RXstyle,RXmodifiers);}
- if(/[\^'"!~\/]/.test(c)){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
- else if(c=="q"){
- c=look(stream, 1);
- if(c=="("){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[")"],"string");}
- if(c=="["){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["]"],"string");}
- if(c=="{"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["}"],"string");}
- if(c=="<"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[">"],"string");}
- if(/[\^'"!~\/]/.test(c)){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[stream.eat(c)],"string");}}
- else if(c=="w"){
- c=look(stream, 1);
- if(c=="("){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[")"],"bracket");}
- if(c=="["){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["]"],"bracket");}
- if(c=="{"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["}"],"bracket");}
- if(c=="<"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[">"],"bracket");}
- if(/[\^'"!~\/]/.test(c)){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[stream.eat(c)],"bracket");}}
- else if(c=="r"){
- c=look(stream, 1);
- if(c=="("){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
- if(c=="["){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
- if(c=="{"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
- if(c=="<"){
- eatSuffix(stream, 2);
- return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}
- if(/[\^'"!~\/]/.test(c)){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
- else if(/[\^'"!~\/(\[{<]/.test(c)){
- if(c=="("){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[")"],"string");}
- if(c=="["){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,["]"],"string");}
- if(c=="{"){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,["}"],"string");}
- if(c=="<"){
- eatSuffix(stream, 1);
- return tokenChain(stream,state,[">"],"string");}
- if(/[\^'"!~\/]/.test(c)){
- return tokenChain(stream,state,[stream.eat(c)],"string");}}}}
- if(ch=="m"){
- var c=look(stream, -2);
- if(!(c&&/\w/.test(c))){
- c=stream.eat(/[(\[{<\^'"!~\/]/);
- if(c){
- if(/[\^'"!~\/]/.test(c)){
- return tokenChain(stream,state,[c],RXstyle,RXmodifiers);}
- if(c=="("){
- return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
- if(c=="["){
- return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
- if(c=="{"){
- return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
- if(c=="<"){
- return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}}}}
- if(ch=="s"){
- var c=/[\/>\]})\w]/.test(look(stream, -2));
- if(!c){
- c=stream.eat(/[(\[{<\^'"!~\/]/);
- if(c){
- if(c=="[")
- return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
- if(c=="{")
- return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
- if(c=="<")
- return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
- if(c=="(")
- return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
- if(ch=="y"){
- var c=/[\/>\]})\w]/.test(look(stream, -2));
- if(!c){
- c=stream.eat(/[(\[{<\^'"!~\/]/);
- if(c){
- if(c=="[")
- return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
- if(c=="{")
- return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
- if(c=="<")
- return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
- if(c=="(")
- return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
- if(ch=="t"){
- var c=/[\/>\]})\w]/.test(look(stream, -2));
- if(!c){
- c=stream.eat("r");if(c){
- c=stream.eat(/[(\[{<\^'"!~\/]/);
- if(c){
- if(c=="[")
- return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
- if(c=="{")
- return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
- if(c=="<")
- return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
- if(c=="(")
- return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
- return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}}
- if(ch=="`"){
- return tokenChain(stream,state,[ch],"variable-2");}
- if(ch=="/"){
- if(!/~\s*$/.test(prefix(stream)))
- return "operator";
- else
- return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);}
- if(ch=="$"){
- var p=stream.pos;
- if(stream.eatWhile(/\d/)||stream.eat("{")&&stream.eatWhile(/\d/)&&stream.eat("}"))
- return "variable-2";
- else
- stream.pos=p;}
- if(/[$@%]/.test(ch)){
- var p=stream.pos;
- if(stream.eat("^")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(look(stream, -2))&&stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){
- var c=stream.current();
- if(PERL[c])
- return "variable-2";}
- stream.pos=p;}
- if(/[$@%&]/.test(ch)){
- if(stream.eatWhile(/[\w$\[\]]/)||stream.eat("{")&&stream.eatWhile(/[\w$\[\]]/)&&stream.eat("}")){
- var c=stream.current();
- if(PERL[c])
- return "variable-2";
- else
- return "variable";}}
- if(ch=="#"){
- if(look(stream, -2)!="$"){
- stream.skipToEnd();
- return "comment";}}
- if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)){
- var p=stream.pos;
- stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);
- if(PERL[stream.current()])
- return "operator";
- else
- stream.pos=p;}
- if(ch=="_"){
- if(stream.pos==1){
- if(suffix(stream, 6)=="_END__"){
- return tokenChain(stream,state,['\0'],"comment");}
- else if(suffix(stream, 7)=="_DATA__"){
- return tokenChain(stream,state,['\0'],"variable-2");}
- else if(suffix(stream, 7)=="_C__"){
- return tokenChain(stream,state,['\0'],"string");}}}
- if(/\w/.test(ch)){
- var p=stream.pos;
- if(look(stream, -2)=="{"&&(look(stream, 0)=="}"||stream.eatWhile(/\w/)&&look(stream, 0)=="}"))
- return "string";
- else
- stream.pos=p;}
- if(/[A-Z]/.test(ch)){
- var l=look(stream, -2);
- var p=stream.pos;
- stream.eatWhile(/[A-Z_]/);
- if(/[\da-z]/.test(look(stream, 0))){
- stream.pos=p;}
- else{
- var c=PERL[stream.current()];
- if(!c)
- return "meta";
- if(c[1])
- c=c[0];
- if(l!=":"){
- if(c==1)
- return "keyword";
- else if(c==2)
- return "def";
- else if(c==3)
- return "atom";
- else if(c==4)
- return "operator";
- else if(c==5)
- return "variable-2";
- else
- return "meta";}
- else
- return "meta";}}
- if(/[a-zA-Z_]/.test(ch)){
- var l=look(stream, -2);
- stream.eatWhile(/\w/);
- var c=PERL[stream.current()];
- if(!c)
- return "meta";
- if(c[1])
- c=c[0];
- if(l!=":"){
- if(c==1)
- return "keyword";
- else if(c==2)
- return "def";
- else if(c==3)
- return "atom";
- else if(c==4)
- return "operator";
- else if(c==5)
- return "variable-2";
- else
- return "meta";}
- else
- return "meta";}
- return null;}
-
- return{
- startState:function(){
- return{
- tokenize:tokenPerl,
- chain:null,
- style:null,
- tail:null};},
- token:function(stream,state){
- return (state.tokenize||tokenPerl)(stream,state);}
- };});
-
-CodeMirror.registerHelper("wordChars", "perl", /[\w$]/);
-
-CodeMirror.defineMIME("text/x-perl", "perl");
-
-// it's like "peek", but need for look-ahead or look-behind if index < 0
-function look(stream, c){
- return stream.string.charAt(stream.pos+(c||0));
-}
-
-// return a part of prefix of current stream from current position
-function prefix(stream, c){
- if(c){
- var x=stream.pos-c;
- return stream.string.substr((x>=0?x:0),c);}
- else{
- return stream.string.substr(0,stream.pos-1);
- }
-}
-
-// return a part of suffix of current stream from current position
-function suffix(stream, c){
- var y=stream.string.length;
- var x=y-stream.pos+1;
- return stream.string.substr(stream.pos,(c&&c=(y=stream.string.length-1))
- stream.pos=y;
- else
- stream.pos=x;
-}
-
-});
diff --git a/public/js/lib/codemirror/mode/php/index.html b/public/js/lib/codemirror/mode/php/index.html
deleted file mode 100644
index adf6b1be22..0000000000
--- a/public/js/lib/codemirror/mode/php/index.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-CodeMirror: PHP mode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-PHP mode
-
- 1, 'b' => 2, 3 => 'c');
-
-echo "$a[a] ${a[3] /* } comment */} {$a[b]} \$a[a]";
-
-function hello($who) {
- return "Hello $who!";
-}
-?>
-The program says = hello("World") ?>.
-
-
-
-
-
- Simple HTML/PHP mode based on
- the C-like mode. Depends on XML,
- JavaScript, CSS, HTMLMixed, and C-like modes.
-
- MIME types defined: application/x-httpd-php
(HTML with PHP code), text/x-php
(plain, non-wrapped PHP code).
-
diff --git a/public/js/lib/codemirror/mode/php/php.js b/public/js/lib/codemirror/mode/php/php.js
deleted file mode 100644
index e112d91121..0000000000
--- a/public/js/lib/codemirror/mode/php/php.js
+++ /dev/null
@@ -1,226 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function(mod) {
- if (typeof exports == "object" && typeof module == "object") // CommonJS
- mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../clike/clike"));
- else if (typeof define == "function" && define.amd) // AMD
- define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../clike/clike"], mod);
- else // Plain browser env
- mod(CodeMirror);
-})(function(CodeMirror) {
- "use strict";
-
- function keywords(str) {
- var obj = {}, words = str.split(" ");
- for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
- return obj;
- }
-
- // Helper for stringWithEscapes
- function matchSequence(list, end) {
- if (list.length == 0) return stringWithEscapes(end);
- return function (stream, state) {
- var patterns = list[0];
- for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) {
- state.tokenize = matchSequence(list.slice(1), end);
- return patterns[i][1];
- }
- state.tokenize = stringWithEscapes(end);
- return "string";
- };
- }
- function stringWithEscapes(closing) {
- return function(stream, state) { return stringWithEscapes_(stream, state, closing); };
- }
- function stringWithEscapes_(stream, state, closing) {
- // "Complex" syntax
- if (stream.match("${", false) || stream.match("{$", false)) {
- state.tokenize = null;
- return "string";
- }
-
- // Simple syntax
- if (stream.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)) {
- // After the variable name there may appear array or object operator.
- if (stream.match("[", false)) {
- // Match array operator
- state.tokenize = matchSequence([
- [["[", null]],
- [[/\d[\w\.]*/, "number"],
- [/\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"],
- [/[\w\$]+/, "variable"]],
- [["]", null]]
- ], closing);
- }
- if (stream.match(/\-\>\w/, false)) {
- // Match object operator
- state.tokenize = matchSequence([
- [["->", null]],
- [[/[\w]+/, "variable"]]
- ], closing);
- }
- return "variable-2";
- }
-
- var escaped = false;
- // Normal string
- while (!stream.eol() &&
- (escaped || (!stream.match("{$", false) &&
- !stream.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false)))) {
- if (!escaped && stream.match(closing)) {
- state.tokenize = null;
- state.tokStack.pop(); state.tokStack.pop();
- break;
- }
- escaped = stream.next() == "\\" && !escaped;
- }
- return "string";
- }
-
- var phpKeywords = "abstract and array as break case catch class clone const continue declare default " +
- "do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final " +
- "for foreach function global goto if implements interface instanceof namespace " +
- "new or private protected public static switch throw trait try use var while xor " +
- "die echo empty exit eval include include_once isset list require require_once return " +
- "print unset __halt_compiler self static parent yield insteadof finally";
- var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";
- var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";
- CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" "));
- CodeMirror.registerHelper("wordChars", "php", /[\w$]/);
-
- var phpConfig = {
- name: "clike",
- helperType: "php",
- keywords: keywords(phpKeywords),
- blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"),
- atoms: keywords(phpAtoms),
- builtin: keywords(phpBuiltin),
- multiLineStrings: true,
- hooks: {
- "$": function(stream) {
- stream.eatWhile(/[\w\$_]/);
- return "variable-2";
- },
- "<": function(stream, state) {
- if (stream.match(/<)) {
- stream.eatWhile(/[\w\.]/);
- var delim = stream.current().slice(3);
- if (delim) {
- (state.tokStack || (state.tokStack = [])).push(delim, 0);
- state.tokenize = stringWithEscapes(delim);
- return "string";
- }
- }
- return false;
- },
- "#": function(stream) {
- while (!stream.eol() && !stream.match("?>", false)) stream.next();
- return "comment";
- },
- "/": function(stream) {
- if (stream.eat("/")) {
- while (!stream.eol() && !stream.match("?>", false)) stream.next();
- return "comment";
- }
- return false;
- },
- '"': function(_stream, state) {
- (state.tokStack || (state.tokStack = [])).push('"', 0);
- state.tokenize = stringWithEscapes('"');
- return "string";
- },
- "{": function(_stream, state) {
- if (state.tokStack && state.tokStack.length)
- state.tokStack[state.tokStack.length - 1]++;
- return false;
- },
- "}": function(_stream, state) {
- if (state.tokStack && state.tokStack.length > 0 &&
- !--state.tokStack[state.tokStack.length - 1]) {
- state.tokenize = stringWithEscapes(state.tokStack[state.tokStack.length - 2]);
- }
- return false;
- }
- }
- };
-
- CodeMirror.defineMode("php", function(config, parserConfig) {
- var htmlMode = CodeMirror.getMode(config, "text/html");
- var phpMode = CodeMirror.getMode(config, phpConfig);
-
- function dispatch(stream, state) {
- var isPHP = state.curMode == phpMode;
- if (stream.sol() && state.pending && state.pending != '"' && state.pending != "'") state.pending = null;
- if (!isPHP) {
- if (stream.match(/^<\?\w*/)) {
- state.curMode = phpMode;
- state.curState = state.php;
- return "meta";
- }
- if (state.pending == '"' || state.pending == "'") {
- while (!stream.eol() && stream.next() != state.pending) {}
- var style = "string";
- } else if (state.pending && stream.pos < state.pending.end) {
- stream.pos = state.pending.end;
- var style = state.pending.style;
- } else {
- var style = htmlMode.token(stream, state.curState);
- }
- if (state.pending) state.pending = null;
- var cur = stream.current(), openPHP = cur.search(/<\?/), m;
- if (openPHP != -1) {
- if (style == "string" && (m = cur.match(/[\'\"]$/)) && !/\?>/.test(cur)) state.pending = m[0];
- else state.pending = {end: stream.pos, style: style};
- stream.backUp(cur.length - openPHP);
- }
- return style;
- } else if (isPHP && state.php.tokenize == null && stream.match("?>")) {
- state.curMode = htmlMode;
- state.curState = state.html;
- return "meta";
- } else {
- return phpMode.token(stream, state.curState);
- }
- }
-
- return {
- startState: function() {
- var html = CodeMirror.startState(htmlMode), php = CodeMirror.startState(phpMode);
- return {html: html,
- php: php,
- curMode: parserConfig.startOpen ? phpMode : htmlMode,
- curState: parserConfig.startOpen ? php : html,
- pending: null};
- },
-
- copyState: function(state) {
- var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html),
- php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur;
- if (state.curMode == htmlMode) cur = htmlNew;
- else cur = phpNew;
- return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur,
- pending: state.pending};
- },
-
- token: dispatch,
-
- indent: function(state, textAfter) {
- if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) ||
- (state.curMode == phpMode && /^\?>/.test(textAfter)))
- return htmlMode.indent(state.html, textAfter);
- return state.curMode.indent(state.curState, textAfter);
- },
-
- blockCommentStart: "/*",
- blockCommentEnd: "*/",
- lineComment: "//",
-
- innerMode: function(state) { return {state: state.curState, mode: state.curMode}; }
- };
- }, "htmlmixed", "clike");
-
- CodeMirror.defineMIME("application/x-httpd-php", "php");
- CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true});
- CodeMirror.defineMIME("text/x-php", phpConfig);
-});
diff --git a/public/js/lib/codemirror/mode/php/test.js b/public/js/lib/codemirror/mode/php/test.js
deleted file mode 100644
index e2ecefc187..0000000000
--- a/public/js/lib/codemirror/mode/php/test.js
+++ /dev/null
@@ -1,154 +0,0 @@
-// CodeMirror, copyright (c) by Marijn Haverbeke and others
-// Distributed under an MIT license: http://codemirror.net/LICENSE
-
-(function() {
- var mode = CodeMirror.getMode({indentUnit: 2}, "php");
- function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
-
- MT('simple_test',
- '[meta ]');
-
- MT('variable_interpolation_non_alphanumeric',
- '[meta $/$\\$}$\\\"$:$;$?$|$[[$]]$+$=aaa"]',
- '[meta ?>]');
-
- MT('variable_interpolation_digits',
- '[meta ]');
-
- MT('variable_interpolation_simple_syntax_1',
- '[meta ]');
-
- MT('variable_interpolation_simple_syntax_2',
- '[meta ]');
-
- MT('variable_interpolation_simple_syntax_3',
- '[meta [variable aaaaa][string .aaaaaa"];',
- '[keyword echo] [string "aaa][variable-2 $aaaa][string ->][variable-2 $aaaaa][string .aaaaaa"];',
- '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string [[2]].aaaaaa"];',
- '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string ->aaaa2.aaaaaa"];',
- '[meta ?>]');
-
- MT('variable_interpolation_escaping',
- '[meta aaa.aaa"];',
- '[keyword echo] [string "aaa\\$aaaa[[2]]aaa.aaa"];',
- '[keyword echo] [string "aaa\\$aaaa[[asd]]aaa.aaa"];',
- '[keyword echo] [string "aaa{\\$aaaa->aaa.aaa"];',
- '[keyword echo] [string "aaa{\\$aaaa[[2]]aaa.aaa"];',
- '[keyword echo] [string "aaa{\\aaaaa[[asd]]aaa.aaa"];',
- '[keyword echo] [string "aaa\\${aaaa->aaa.aaa"];',
- '[keyword echo] [string "aaa\\${aaaa[[2]]aaa.aaa"];',
- '[keyword echo] [string "aaa\\${aaaa[[asd]]aaa.aaa"];',
- '[meta ?>]');
-
- MT('variable_interpolation_complex_syntax_1',
- '[meta aaa.aaa"];',
- '[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa]}[string ->aaa.aaa"];',
- '[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa][[',' [number 42]',']]}[string ->aaa.aaa"];',
- '[keyword echo] [string "aaa][variable-2 $]{[variable aaaa][meta ?>]aaaaaa');
-
- MT('variable_interpolation_complex_syntax_2',
- '[meta } $aaaaaa.aaa"];',
- '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>*/][[',' [string "aaa][variable-2 $aaa][string {}][variable-2 $]{[variable aaa]}[string "]',']]}[string ->aaa.aaa"];',
- '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*} } $aaa } */]}[string ->aaa.aaa"];');
-
-
- function build_recursive_monsters(nt, t, n){
- var monsters = [t];
- for (var i = 1; i <= n; ++i)
- monsters[i] = nt.join(monsters[i - 1]);
- return monsters;
- }
-
- var m1 = build_recursive_monsters(
- ['[string "][variable-2 $]{[variable aaa] [operator +] ', '}[string "]'],
- '[comment /* }?>} */] [string "aaa][variable-2 $aaa][string .aaa"]',
- 10
- );
-
- MT('variable_interpolation_complex_syntax_3_1',
- '[meta ]');
-
- var m2 = build_recursive_monsters(
- ['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', '}[string .a"]'],
- '[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
- 5
- );
-
- MT('variable_interpolation_complex_syntax_3_2',
- '[meta ]');
-
- function build_recursive_monsters_2(mf1, mf2, nt, t, n){
- var monsters = [t];
- for (var i = 1; i <= n; ++i)
- monsters[i] = nt[0] + mf1[i - 1] + nt[1] + mf2[i - 1] + nt[2] + monsters[i - 1] + nt[3];
- return monsters;
- }
-
- var m3 = build_recursive_monsters_2(
- m1,
- m2,
- ['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', ' [operator +] ', '}[string .a"]'],
- '[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]',
- 4
- );
-
- MT('variable_interpolation_complex_syntax_3_3',
- '[meta ]');
-
- MT("variable_interpolation_heredoc",
- "[meta
-
-CodeMirror: Pig Latin mode
-
-
-
-
-
-
-
-
-
-
-Pig Latin mode
-
--- Apache Pig (Pig Latin Language) Demo
-/*
-This is a multiline comment.
-*/
-a = LOAD "\path\to\input" USING PigStorage('\t') AS (x:long, y:chararray, z:bytearray);
-b = GROUP a BY (x,y,3+4);
-c = FOREACH b GENERATE flatten(group) as (x,y), SUM(group.$2) as z;
-STORE c INTO "\path\to\output";
-
---
-
-
-
-
-
- Simple mode that handles Pig Latin language.
-
-
- MIME type defined: text/x-pig
- (PIG code)
-