Warning: session_start(): open(/var/lib/php/sessions/sess_81jdijcgtdhoeca0vom13lv7qm, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!include once #1015780 // RSyntaxTextArea libs / imports [include]
import org.fife.ui.rsyntaxtextarea.RSyntaxDocument;
sclass RSTADummyParser extends org.fife.ui.rsyntaxtextarea.parser.AbstractParser {
delegate ParseResult, DefaultParseResult, DefaultParserNotice
to org.fife.ui.rsyntaxtextarea.parser.
// pair of input text, list of errors to show
gettable Pair> errors;
sclass Error {
settable LineAndColumn start;
settable LineAndColumn end;
settable S msg;
}
@Override
public ParseResult parse(RSyntaxDocument doc, String style) ctex {
print("RSTADummyParser.parse called");
var result = new DefaultParseResult(this);
var p = this.errors;
if (p == null) ret result;
S src = p.a;
var errors = p.b;
if (empty(errors)) ret result;
// if wrong text, temporarily return no errors
// (forceReparse will be called by actual parser)
S text = doc.getText(0, doc.getLength());
if (!eq(text, src)) {
print("RSTADummyParser: Wrong text");
ret result;
}
// We're on the right text, convert messages and return them
for (Error e : errors) {
LineAndColumn start = e.start;
LineAndColumn end = e.end;
int length = end.line > start.line
// spanning multiple lines
? lengthOfLine(text, start.line-1)-(start.col-1)
// start and end in same line
: end.col-start.col;
print("Got error of length " + length);
result.addNotice(new DefaultParserNotice(this,
e.msg, start.line-1, start.col-1, length));
}
ret result;
}
void setErrors(S text, L errors, RSyntaxTextArea textArea) {
this.errors = pair(text, errors);
swing {
textArea.forceReparsing(RSTADummyParser.this);
print("Forced reparsing");
}
}
void install(RSyntaxTextArea textArea) swing {
textArea.addParser(RSTADummyParser.this);
print("Installed " + this);
}
}