1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
KJS::Value KJS::KateJSViewProtoFunc::call(KJS::ExecState *exec, KJS::Object &thisObj, const KJS::List &args)
{
switch (id)
{
case KateJSView::SetCursorPositionReal:
{
return KJS::Boolean( view->setCursorPositionReal( args[0].toUInt32(exec), args[1].toUInt32(exec) ) );
}
// SelectionInterface goes in the view, in anticipation of the future
case KateJSView::Selection:
{
return KJS::String( view->selection() );
}
}
return KJS::Undefined();
}
void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags,
uint &attrCol, bool &unclosedTag)
{
for(pos = 0; pos < len; ++pos) {
int ch = text.at(pos).unicode();
switch(ch) {
case '<':
{
++numTags;
break;
}
// don't indent because of DOCTYPE, comment, CDATA, etc.
case '!':
{
if(lastCh == '<') --numTags;
break;
}
// don't indent because of xml decl or PI
case '?':
{
if(lastCh == '<') --numTags;
break;
}
}
}
}
static YYSIZE_T yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
for (;;)
switch (*++yyp)
{
case '\\':
{
if (*++yyp != '\\')
yyres[yyn] = *yyp;
}
/* Fall through. */
default:
{
if (yyres)
yyres[yyn] = *yyp;
yyn++;
break;
}
}
}
return yystpcpy (yyres, yystr) - yyres;
}
Value RegExpProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &args)
{
if (!thisObj.inherits(&RegExpImp::info)) {
if (thisObj.inherits(&RegExpPrototypeImp::info)) {
switch (id) {
case ToString:
{ return String("//"); // FireFox returns /(?:)/
}
}
}
return err;
}
}
|