Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,6 @@ function onFileChange(evt){

document.getElementById('fileinput').addEventListener('change', onFileChange, false);

// Registered helper accumulates a list of 'lint'-like hints
CodeMirror.registerHelper("lint", "lua", function(text) {
var obj = parsePPrint(text);
// console.log("lint helper: ", obj, obj.errors);
var line = obj.errors.line - 1;
var column = obj.errors.column - 1;
var found = [];
found.push({ from: CodeMirror.Pos(line, column),
to: CodeMirror.Pos(line, column + 1),
message: obj.errors.msg,
severity: "error"
});
console.log("warnings: ", obj.warnings);
var warnings = obj.warnings;
for (num in warnings) {
var warning = warnings[num];
console.log("warning: ", warning);
found.push({ from: CodeMirror.Pos(warning.line - 1, 1),
to: CodeMirror.Pos(warning.line - 1, 1),
message: warning.msg,
severity: "warning"
});
};
return found;
});

var heaps = {}; // global string array
var label_map = {}; // global int array
var cache = {}; // global dom/html array
Expand Down Expand Up @@ -85,8 +59,7 @@ var orig_editor = CodeMirror.fromTextArea(document.getElementById("original"), {
// readOnly : "nocursor",
lineNumbers : true,
firstLineNumber : 0,
gutters : ["CodeMirror-lint-markers","CodeMirror-linenumbers"],
lint : true
gutters : ["CodeMirror-lint-markers","CodeMirror-linenumbers"]
// textHover : true
});

Expand Down