@keboola/codemirror-mode-sfsql
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -1,12 +0,9 @@ | ||
// CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
// Distributed under an MIT license: http://codemirror.net/LICENSE | ||
// | ||
// Copied from https://github.com/codemirror/CodeMirror/blob/5.6.0/mode/sql/sql.js (CodeMirror 5.6.0). | ||
// | ||
// --- | ||
// Copied from https://keboola.snowflakecomputing.com/assets/ui/Main/scripts/codemirror-extensions/5.6.0/mode/sql/sfsql.js | ||
// and modified by Keboola | ||
"use strict"; | ||
import Codemirror from 'codemirror'; | ||
var _codemirror = require("codemirror"); | ||
var _codemirror2 = _interopRequireDefault(_codemirror); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
CodeMirror.defineMode("sfsql", function (config, parserConfig) { | ||
@@ -186,7 +183,7 @@ "use strict"; | ||
return { | ||
startState: function () { | ||
startState: function startState() { | ||
return { tokenize: tokenBase, context: null }; | ||
}, | ||
token: function (stream, state) { | ||
token: function token(stream, state) { | ||
if (stream.sol()) { | ||
@@ -207,3 +204,3 @@ if (state.context && state.context.align == null) state.context.align = false; | ||
indent: function (state, textAfter) { | ||
indent: function indent(state, textAfter) { | ||
var cx = state.context; | ||
@@ -219,3 +216,10 @@ if (!cx) return CodeMirror.Pass; | ||
}; | ||
}); | ||
}); // CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
// Distributed under an MIT license: http://codemirror.net/LICENSE | ||
// | ||
// Copied from https://github.com/codemirror/CodeMirror/blob/5.6.0/mode/sql/sql.js (CodeMirror 5.6.0). | ||
// | ||
// --- | ||
// Copied from https://keboola.snowflakecomputing.com/assets/ui/Main/scripts/codemirror-extensions/5.6.0/mode/sql/sfsql.js | ||
// and modified by Keboola | ||
@@ -284,4 +288,5 @@ (function () { | ||
words = str.split(" "); | ||
for (var i = 0; i < words.length; ++i) obj[words[i]] = true; | ||
return obj; | ||
for (var i = 0; i < words.length; ++i) { | ||
obj[words[i]] = true; | ||
}return obj; | ||
} | ||
@@ -288,0 +293,0 @@ |
{ | ||
"name": "@keboola/codemirror-mode-sfsql", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "A CodeMirror mode for the Snowflake Data Warehouse", | ||
@@ -17,2 +17,3 @@ "main": "lib/index.js", | ||
"babel-cli": "^6.26.0", | ||
"babel-preset-env": "^1.7.0", | ||
"codemirror": "^5.46.0" | ||
@@ -19,0 +20,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16263
312
3