pike.git/
src/
cpp.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2018-02-22
2018-02-22 16:57:21 by Henrik Grubbström (Grubba) <grubba@grubba.org>
dddfca7394d1aeafcf76802df4393139276b78fe (
28
lines) (+
18
/-
10
)
[
Show
|
Annotate
]
Branch:
master
Cpp: Use directive_* function for #pragma.
Improves code readablility somewhat.
920:
*! Disable disassembly output (default). *! @endstring */
+
PIKEFUN string(0..0) directive_pragma(int flags, string line)
+
{
+
struct CPP_struct *this = THIS;
-
+
if (OUTP()) {
+
/* FIXME: Prefix with this->prefix? */
+
string_builder_strcat(&this->buf, "#pragma ");
+
+
ref_push_string(line);
+
push_int(flags);
+
apply_current(f_CPP_low_cpp_fun_num, 2);
+
pop_stack();
+
}
+
+
push_empty_string();
+
}
+
/*! @decl int(0..1) defined(mixed identifier) *! *! Check whether an identifier is a cpp macro or not.
4113:
} case 'p': /* pragma */ {
-
-
if(GOBBLE_WORD(pragma_))
-
{
-
if(OUTP())
-
string_builder_strcat(&this->buf, "#pragma");
-
else
-
FIND_EOL();
-
break;
-
}
+
if(GOBBLE_WORD(pike_)) { if(OUTP())