314_uppsrc.diff
uppsrc/CodeEditor/Highlight.cpp 2012-07-25 09:07:02 +0400 | ||
---|---|---|
401 | 401 |
"CLASSNAME", "THISBACK", "THISBACK1", "THISBACK2", "THISBACK3", "THISBACK4", |
402 | 402 |
"PTEBACK", "PTEBACK1", "PTEBACK2", "PTEBACK3", "PTEBACK4", |
403 | 403 |
"QUOTE", "XASSERT", "NEVER", "XNEVER", "CHECK", "XCHECK", "ASSERT", |
404 |
"NAMESPACE_UPP", "END_UPP_NAMESPACE", "NEVER_", "SKYLARK", |
|
404 |
"NAMESPACE_UPP", "END_UPP_NAMESPACE", "NEVER_", "SKYLARK", "RPC_METHOD", "RPC_GMETHOD",
|
|
405 | 405 |
NULL |
406 | 406 |
}; |
407 | 407 |
static const char *upp_logs[] = { |
uppsrc/Core/Rpc/Rpc.h 2012-07-25 13:25:02 +0400 | ||
---|---|---|
235 | 235 |
|
236 | 236 |
void Register(const char *name, void (*method)(RpcData&), const char *group = NULL); |
237 | 237 |
|
238 |
#define RPC_METHOD(x) \ |
|
239 |
void rpc_method_##x(RpcData& rpc); \ |
|
240 |
INITBLOCK { Register(#x, rpc_method_##x); } \ |
|
241 |
void rpc_method_##x(RpcData& rpc) |
|
242 |
|
|
243 |
#define RPC_GMETHOD(x, group) \ |
|
244 |
void rpc_method_##x(RpcData& rpc); \ |
|
245 |
INITBLOCK { Register(#x, rpc_method_##x, group); } \ |
|
246 |
void rpc_method_##x(RpcData& rpc) |
|
238 |
#define RPC_METHOD(name) void name(RpcData& rpc); INITBLOCK { Register(#name, name); } void name(RpcData& rpc) |
|
239 |
#define RPC_GMETHOD(name, group) void name(RpcData& rpc); INITBLOCK { Register(#name, name, group); } void name(RpcData& rpc) |
|
247 | 240 |
|
248 | 241 |
struct RpcError { |
249 | 242 |
int code; |
uppsrc/CppBase/keyword.i 2012-07-25 09:08:32 +0400 | ||
---|---|---|
81 | 81 |
CPPID(do) |
82 | 82 |
|
83 | 83 |
CPPID(SKYLARK) |
84 |
|
|
85 |
CPPID(RPC_METHOD) |
|
86 |
CPPID(RPC_GMETHOD) |
uppsrc/CppBase/Parser.cpp 2012-07-25 14:24:47 +0400 | ||
---|---|---|
668 | 668 |
break; |
669 | 669 |
} |
670 | 670 |
Qualifier(); |
671 |
if(l0 && lex == tk_SKYLARK && lex[1] == '(') { |
|
672 |
++lex; |
|
673 |
++lex; |
|
674 |
Decl& a = r.Add(); |
|
675 |
a.name = lex.GetId(); |
|
676 |
a.function = true; |
|
677 |
a.natural = String().Cat() << "void " << a.name << "(Http& http)"; |
|
678 |
Decl& p = a.param.Add(); |
|
679 |
p.name = "http"; |
|
680 |
p.type = "Http"; |
|
681 |
p.natural = "Http& http"; |
|
682 |
Key(','); |
|
683 |
lex.GetText(); |
|
684 |
Key(')'); |
|
685 |
return r; |
|
686 |
} |
|
671 |
if(l0) |
|
672 |
if(lex == tk_SKYLARK && lex[1] == '(') { |
|
673 |
++lex; |
|
674 |
++lex; |
|
675 |
Decl& a = r.Add(); |
|
676 |
a.name = lex.GetId(); |
|
677 |
a.function = true; |
|
678 |
a.natural = String().Cat() << "void " << a.name << "(Http& http)"; |
|
679 |
Decl& p = a.param.Add(); |
|
680 |
p.name = "http"; |
|
681 |
p.type = "Http"; |
|
682 |
p.natural = "Http& http"; |
|
683 |
Key(','); |
|
684 |
lex.GetText(); |
|
685 |
Key(')'); |
|
686 |
return r; |
|
687 |
} else |
|
688 |
if((lex == tk_RPC_METHOD || lex == tk_RPC_GMETHOD) && lex[1] == '(') { |
|
689 |
++lex; |
|
690 |
++lex; |
|
691 |
Decl& a = r.Add(); |
|
692 |
a.name = lex.GetId(); |
|
693 |
a.function = true; |
|
694 |
a.natural = String().Cat() << "void " << a.name << "(RpcData& rpc)"; |
|
695 |
Decl& p = a.param.Add(); |
|
696 |
p.name = "rpc"; |
|
697 |
p.type = "RpcData"; |
|
698 |
p.natural = "RpcData& rpc"; |
|
699 |
if (Key(',')) |
|
700 |
lex.GetText(); |
|
701 |
Key(')'); |
|
702 |
return r; |
|
703 |
} |
|
687 | 704 |
bool isdestructor = Key('~'); |
688 | 705 |
if(l0 && context.typenames.Find(lex) >= 0 && lex[1] == '(' && lex.IsId()) { |
689 | 706 |
Decl& a = r.Add(); |