Modula-3 convention: enumeration item names shall start with a capital
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7553 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
625eaac62c
commit
3575cd6e06
1 changed files with 15 additions and 13 deletions
|
|
@ -493,7 +493,7 @@ MODULA3 ():
|
||||||
if ((c == '_') || (c == ':')) {
|
if ((c == '_') || (c == ':')) {
|
||||||
cap = true;
|
cap = true;
|
||||||
} else {
|
} else {
|
||||||
if (isdigit(c)) {
|
if (isdigit (c)) {
|
||||||
m3sym[i] = c;
|
m3sym[i] = c;
|
||||||
cap = true;
|
cap = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -796,9 +796,9 @@ MODULA3 ():
|
||||||
} else if (strcmp (argv[i], "-noproxy") == 0) {
|
} else if (strcmp (argv[i], "-noproxy") == 0) {
|
||||||
Swig_mark_arg (i);
|
Swig_mark_arg (i);
|
||||||
proxy_flag = false;
|
proxy_flag = false;
|
||||||
} else if (strcmp(argv[i],"-oldvarnames") == 0) {
|
} else if (strcmp (argv[i], "-oldvarnames") == 0) {
|
||||||
Swig_mark_arg(i);
|
Swig_mark_arg (i);
|
||||||
old_variable_names = true;
|
old_variable_names = true;
|
||||||
} else if (strcmp (argv[i], "-help") == 0) {
|
} else if (strcmp (argv[i], "-help") == 0) {
|
||||||
Printf (stdout, "%s\n", usage);
|
Printf (stdout, "%s\n", usage);
|
||||||
}
|
}
|
||||||
|
|
@ -1923,7 +1923,7 @@ MODULA3 ():
|
||||||
if (name != NIL) {
|
if (name != NIL) {
|
||||||
Printv (file, name, NIL);
|
Printv (file, name, NIL);
|
||||||
} else {
|
} else {
|
||||||
Printf (file, "dummy%d", i);
|
Printf (file, "Dummy%d", i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Printf (file, "\n};\n");
|
Printf (file, "\n};\n");
|
||||||
|
|
@ -2232,7 +2232,7 @@ MODULA3 ():
|
||||||
newname = NewStringf ("%s%s", newprefix, newstem);
|
newname = NewStringf ("%s%s", newprefix, newstem);
|
||||||
Delete (newstem);
|
Delete (newstem);
|
||||||
} else {
|
} else {
|
||||||
newname = nameToModula3 (stem, false);
|
newname = nameToModula3 (stem, true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (srcstyle != NIL) {
|
if (srcstyle != NIL) {
|
||||||
|
|
@ -2322,7 +2322,7 @@ MODULA3 ():
|
||||||
Iterator patternit;
|
Iterator patternit;
|
||||||
for (patternit = First (patterndesc); patternit.item != NIL;
|
for (patternit = First (patterndesc); patternit.item != NIL;
|
||||||
patternit = Next (patternit)) {
|
patternit = Next (patternit)) {
|
||||||
String *patternassign = Split (patternit.item, '=', 2);
|
List *patternassign = Split (patternit.item, '=', 2);
|
||||||
String *tag = Getitem (patternassign, 0);
|
String *tag = Getitem (patternassign, 0);
|
||||||
String *data = Getitem (patternassign, 1);
|
String *data = Getitem (patternassign, 1);
|
||||||
if (Strcmp (tag, "prefix") == 0) {
|
if (Strcmp (tag, "prefix") == 0) {
|
||||||
|
|
@ -2801,7 +2801,7 @@ MODULA3 ():
|
||||||
Printf (methods, "%s(%s)%s%s;%s\n",
|
Printf (methods, "%s(%s)%s%s;%s\n",
|
||||||
methodname, arguments,
|
methodname, arguments,
|
||||||
hasContent (rettype) ? ": " : "",
|
hasContent (rettype) ? ": " : "",
|
||||||
hasContent (rettype) ? (const String *)rettype : "",
|
hasContent (rettype) ? (const String *) rettype : "",
|
||||||
isVirtual ? " (* base method *)" : "");
|
isVirtual ? " (* base method *)" : "");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -2996,7 +2996,8 @@ MODULA3 ():
|
||||||
}
|
}
|
||||||
|
|
||||||
generateThrowsClause (throws_hash, function_code);
|
generateThrowsClause (throws_hash, function_code);
|
||||||
Printf (function_code, " %s\n\n", tm ? (const String *)tm : empty_string);
|
Printf (function_code, " %s\n\n",
|
||||||
|
tm ? (const String *) tm : empty_string);
|
||||||
|
|
||||||
if (proxy_flag && wrapping_member_flag && !enum_constant_flag) {
|
if (proxy_flag && wrapping_member_flag && !enum_constant_flag) {
|
||||||
// Properties
|
// Properties
|
||||||
|
|
@ -3193,7 +3194,8 @@ MODULA3 ():
|
||||||
String *inmode = getMappedTypeNew (n, "m3wrapinmode", "", false);
|
String *inmode = getMappedTypeNew (n, "m3wrapinmode", "", false);
|
||||||
String *intype = getMappedTypeNew (n, "m3wrapintype", "");
|
String *intype = getMappedTypeNew (n, "m3wrapintype", "");
|
||||||
Printf (methods, "set%s(%s val:%s);\n",
|
Printf (methods, "set%s(%s val:%s);\n",
|
||||||
m3name, (inmode != NIL) ? (const String *)inmode : "", intype);
|
m3name, (inmode != NIL) ? (const String *) inmode : "",
|
||||||
|
intype);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
/* this was attached by functionWrapper
|
/* this was attached by functionWrapper
|
||||||
|
|
@ -3752,7 +3754,7 @@ MODULA3 ():
|
||||||
|
|
||||||
Printf (function_code, " =\n%s%s%s%sBEGIN\n%s%sEND %s;\n\n",
|
Printf (function_code, " =\n%s%s%s%sBEGIN\n%s%sEND %s;\n\n",
|
||||||
hasContent (local_constants) ? "CONST\n" : "", local_constants,
|
hasContent (local_constants) ? "CONST\n" : "", local_constants,
|
||||||
hasContent (local_variables) ? "VAR\n" : "", local_variables,
|
hasContent (local_variables) ? "VAR\n" : "", local_variables,
|
||||||
exc_handler, outarg, func_name);
|
exc_handler, outarg, func_name);
|
||||||
|
|
||||||
Delete (exc_handler);
|
Delete (exc_handler);
|
||||||
|
|
@ -4013,8 +4015,8 @@ MODULA3 ():
|
||||||
NewStringf ("%s%s.m3", Swig_file_dirname (outfile), classname);
|
NewStringf ("%s%s.m3", Swig_file_dirname (outfile), classname);
|
||||||
File *f_swigtype = NewFile (filen, "w");
|
File *f_swigtype = NewFile (filen, "w");
|
||||||
if (!f_swigtype) {
|
if (!f_swigtype) {
|
||||||
FileErrorDisplay(filen);
|
FileErrorDisplay (filen);
|
||||||
SWIG_exit(EXIT_FAILURE);
|
SWIG_exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
String *swigtype = NewString ("");
|
String *swigtype = NewString ("");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue