global : define the __parser__
attribute related to __parser__global__(...) …
More...
Macros | |
#define | __parser__global__return_type_default return-type-default:NAMESPACE=OLD-RETURN@NEW-RETURN |
Replace an already defined old-return-type with a new-return-type… | |
#define | __parser__global global=ATTRIBUTE |
Add the global keyword to the PLMK (Programming-Language-Micro-Kernel)-Compiler … | |
#define | __parser__global__pattern2prefix pattern2prefix:PATTERN=PREFIX |
Add PREFIX attribute to all functions found by regexp '^PATTERN[A-Z]' … | |
#define | __parser__global__prefix2attribute prefix2attribute@LIST=PREFIX@ATTRIBUTE?=VALUE? |
Add ATTRIBUTE to all functions starting with PREFIX* …… | |
#define | __parser__global__prefix2title prefix2title:PREFIX=TITLE |
Migrate a function name with PREFIX to a new Title prefix … | |
#define | __parser__global__prefix2doc prefix2doc:PREFIX=DOC?@DOC-INDEX? |
Set the doc-group / doc-index attribute for all functions found by ^PREFIX(:?[A-Z].*)?$ … | |
#define | __parser__global__prefix2class prefix2class:PREFIX=CLASS |
Set the defgroup attribute for all functions starting with prefix … | |
#define | __parser__global__formatter formatter=VARIABLE |
Set the formatter attribute to all arguments with name VARIABLE … | |
#define | __parser__global__error_check error-check=ERROR_RETURN_ENUM |
Verify the enum-return-value of a function using the enum-error-check-code … | |
#define | __parser__global__default_cast default-cast:ORIG-TYP=FROM-SYSTEM-TYP?@ TO-SYSTEM-TYP? |
Add a default-cast to native-type … | |
global : define the __parser__
attribute related to __parser__global__(...) …
#define __parser__global global=ATTRIBUTE |
Add the global keyword to the PLMK (Programming-Language-Micro-Kernel)-Compiler …
The global keyword is used to define a PLMK (Programming-Language-Micro-Kernel)-Compiler feature on toplevel. This is an compiler internal feature and not related to a function.
With the global feature additional features are useable like:
prefix2doc pattern2prefix pattern2attribute prefix2class
doc-force hide native2class
scope | toplevel |
usage | __parser__global__(ATTRIBUTE); |
Definition at line 1557 of file parser_mk.h.
#define __parser__global__default_cast default-cast:ORIG-TYP=FROM-SYSTEM-TYP?@ TO-SYSTEM-TYP? |
Add a default-cast to native-type …
Sometimes a type cannot be recognized correctly by the All-Language-Compiler (ALC),
sqlite3_int64
in theSq3Lite.To avoid complications, a hard-assignment to a known-type can be created using default-cast, where the FROM-SYSTEM-TYP is required and the TO-SYSTEM-TYP is optional.
scope | global |
usage | __parser__global__(default-cast:ORIG-TYP=FROM-SYSTEM-TYP?@ TO-SYSTEM-TYP?) |
Definition at line 1719 of file parser_mk.h.
#define __parser__global__error_check error-check=ERROR_RETURN_ENUM |
Verify the enum-return-value of a function using the enum-error-check-code …
The goal is to reuse an already availalable declaration from an external header-file and add the error-check feature from the Programming-Language-Micro-Kernel (PLMK).
The return-value for error-check is an enum and the macro ENUM_Check
like LcErrorE_Check
is added to verify the enum and jump to the error:
label on error.
scope | global |
usage | __parser__global__(error-check=ERROR_RETURN_ENUM); |
see also | __parser__(error-check) |
parser__global(error-check=LcErrorE); native function after error-check was added
LcErrorE_Check(config, (enum LcErrorE)config_read_file (config->nat, filename));return MK_OK;error:return MkErrorStack_1X(config);}
Definition at line 1696 of file parser_mk.h.
#define __parser__global__formatter formatter=VARIABLE |
Set the formatter attribute to all arguments with name VARIABLE …
By default the FIRST argument of an instance-method is used as formatter, this attibute change the default to an other global defined argument.
usage | __parser__global__(formatter=VARIABLE); |
example | __parser__global__(formatter=fmtobj); |
Definition at line 1664 of file parser_mk.h.
#define __parser__global__pattern2prefix pattern2prefix:PATTERN=PREFIX |
Add PREFIX attribute to all functions found by regexp '^PATTERN[A-Z]' …
The prefix is used to split the name into prefix and postfix :
The prefix usually include the namespace and the root :
By default the prefix is related to the class:
usage | __parser__global__(pattern2prefix:PATTERN=PREFIX); |
example | __parser__global__(pattern2prefix:MkSelf=MkObj); |
see also | __parser__(prefix) |
Definition at line 1582 of file parser_mk.h.
#define __parser__global__prefix2attribute prefix2attribute@LIST=PREFIX@ATTRIBUTE?=VALUE? |
Add ATTRIBUTE to all functions starting with PREFIX* ……
There are some ways to add an ATTRIBUTE to a bunch of functions:
","
lo link usage | __parser__global__(prefix2attribute=PREFIX@ATTRIBUTE); |
example | __parser__global__(prefix2attribute=MkType@class=MkTypeC); |
see also | __parser__push__ __parser__pop__ |
Definition at line 1618 of file parser_mk.h.
#define __parser__global__prefix2class prefix2class:PREFIX=CLASS |
Set the defgroup attribute for all functions starting with prefix …
usage | __parser__global__(prefix2class:PREFIX=CLASS); |
example | __parser__global__(prefix2class:MkSys=MkKernel); |
see also | __parser__(prefix); __parser__(class) |
Definition at line 1653 of file parser_mk.h.
#define __parser__global__prefix2doc prefix2doc:PREFIX=DOC?@DOC-INDEX? |
Set the doc-group / doc-index attribute for all functions found by ^PREFIX(:?[A-Z].*)?$
…
usage | __parser__global__(prefix2doc:PREFIX=DOC?@DOC-INDEX?); |
example | __parser__global__(prefix2doc:LcConfigLookup=Lookup); |
see also | __parser__(prefix); __parser__(doc-group); __parser__(doc-index) |
Definition at line 1642 of file parser_mk.h.
#define __parser__global__prefix2title prefix2title:PREFIX=TITLE |
Migrate a function name with PREFIX to a new Title prefix …
example: The __parser__global__(prefix2title:Sq3Str=Sq3Str)
migrate all functions start with Sq3Str
like Sq3Strglob
to Sq3StrGlob
by changing the first character after the PREFIX to upper-char.
The PREFIX and TITLE have to be a string follow the NsTitle syntax.
usage | __parser__global__(prefix2title:PREFIX=TITLE); |
example | __parser__global__(prefix2title:Sq3Str=Sq3Str); |
see also | __parser__(prefix); __parser__global__(pattern2prefix) |
Definition at line 1633 of file parser_mk.h.
#define __parser__global__return_type_default return-type-default:NAMESPACE=OLD-RETURN@NEW-RETURN |
Replace an already defined old-return-type with a new-return-type…
This is the same as #__parser__(return-type) but ONLY of the global level.
This is usefull is a native-api return an integer as erro-indicator BUT the meta-api is using an enum for this purpose.
scope | global |
usage | __parser__global__(return-type-default:NAMESPACE=OLD-RETURN@NEW-RETURN); |
see also | __parser__(return-type); __parser__(return-type-default-no) |
Definition at line 1294 of file parser_mk.h.