added a new pragma pedantic to make syntax check stricter - for now. it flags about unused local and global variables
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
42
bin/hawk.c
42
bin/hawk.c
@@ -333,22 +333,23 @@ struct opttab_t
|
||||
const hawk_bch_t* desc;
|
||||
} opttab[] =
|
||||
{
|
||||
{ "implicit", HAWK_IMPLICIT, "allow undeclared variables" },
|
||||
{ "multilinestr", HAWK_MULTILINESTR, "allow raw multiline string and regular expression literals" },
|
||||
{ "nextofile", HAWK_NEXTOFILE, "enable nextofile & OFILENAME" },
|
||||
{ "rio", HAWK_RIO, "enable builtin I/O including getline & print" },
|
||||
{ "rwpipe", HAWK_RWPIPE, "allow a dual-directional pipe" },
|
||||
{ "newline", HAWK_NEWLINE, "enable a newline to terminate a statement" },
|
||||
{ "striprecspc", HAWK_STRIPRECSPC, "strip spaces in splitting a record" },
|
||||
{ "stripstrspc", HAWK_STRIPSTRSPC, "strip spaces in string-to-number conversion" },
|
||||
{ "blankconcat", HAWK_BLANKCONCAT, "enable concatenation by blanks" },
|
||||
{ "crlf", HAWK_CRLF, "use CRLF for a newline" },
|
||||
{ "flexmap", HAWK_FLEXMAP, "allow a map to be assigned or returned" },
|
||||
{ "pablock", HAWK_PABLOCK, "enable pattern-action loop" },
|
||||
{ "rexbound", HAWK_REXBOUND, "enable {n,m} in a regular expression" },
|
||||
{ "implicit", HAWK_IMPLICIT, "allow undeclared variables" },
|
||||
{ "multilinestr", HAWK_MULTILINESTR, "allow raw multiline string and regular expression literals" },
|
||||
{ "ncmponstr", HAWK_NCMPONSTR, "perform numeric comparsion on numeric strings" },
|
||||
{ "newline", HAWK_NEWLINE, "enable a newline to terminate a statement" },
|
||||
{ "nextofile", HAWK_NEXTOFILE, "enable nextofile & OFILENAME" },
|
||||
{ "numstrdetect", HAWK_NUMSTRDETECT, "detect a numeric string and convert it to a number" },
|
||||
{ "pablock", HAWK_PABLOCK, "enable pattern-action loop" },
|
||||
{ "pedantic", HAWK_PEDANTIC, "enable pedantic mode" },
|
||||
{ "rexbound", HAWK_REXBOUND, "enable {n,m} in a regular expression" },
|
||||
{ "rio", HAWK_RIO, "enable builtin I/O including getline & print" },
|
||||
{ "rwpipe", HAWK_RWPIPE, "allow a dual-directional pipe" },
|
||||
{ "strictnaming", HAWK_STRICTNAMING, "enable the strict naming rule" },
|
||||
{ "striprecspc", HAWK_STRIPRECSPC, "strip spaces in splitting a record" },
|
||||
{ "stripstrspc", HAWK_STRIPSTRSPC, "strip spaces in string-to-number conversion" },
|
||||
{ "tolerant", HAWK_TOLERANT, "make more fault-tolerant" },
|
||||
{ HAWK_NULL, 0, HAWK_NULL }
|
||||
};
|
||||
@@ -408,22 +409,23 @@ static int process_argv (int argc, hawk_bch_t* argv[], const hawk_bch_t* real_ar
|
||||
{
|
||||
static hawk_bcli_lng_t lng[] =
|
||||
{
|
||||
{ ":implicit", '\0' },
|
||||
{ ":multilinestr", '\0' },
|
||||
{ ":nextofile", '\0' },
|
||||
{ ":rio", '\0' },
|
||||
{ ":rwpipe", '\0' },
|
||||
{ ":newline", '\0' },
|
||||
{ ":striprecspc", '\0' },
|
||||
{ ":stripstrspc", '\0' },
|
||||
{ ":blankconcat", '\0' },
|
||||
{ ":crlf", '\0' },
|
||||
{ ":flexmap", '\0' },
|
||||
{ ":pablock", '\0' },
|
||||
{ ":rexbound", '\0' },
|
||||
{ ":implicit", '\0' },
|
||||
{ ":multilinestr", '\0' },
|
||||
{ ":ncmponstr", '\0' },
|
||||
{ ":newline", '\0' },
|
||||
{ ":nextofile", '\0' },
|
||||
{ ":numstrdetect", '\0' },
|
||||
{ ":pablock", '\0' },
|
||||
{ ":pedantic", '\0' },
|
||||
{ ":rexbound", '\0' },
|
||||
{ ":rio", '\0' },
|
||||
{ ":rwpipe", '\0' },
|
||||
{ ":strictnaming", '\0' },
|
||||
{ ":striprecspc", '\0' },
|
||||
{ ":stripstrspc", '\0' },
|
||||
{ ":tolerant", '\0' },
|
||||
|
||||
{ ":call", 'c' },
|
||||
|
||||
Reference in New Issue
Block a user