Raw string literal changes in paper N3077 changes delimiters to use round brackets instead of square brackets
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12152 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
da182a09f5
commit
adffcd60e1
4 changed files with 83 additions and 39 deletions
|
|
@ -673,7 +673,7 @@ static int look(Scanner * s) {
|
|||
Swig_error(cparse_file, cparse_start_line, "Unterminated string\n");
|
||||
return SWIG_TOKEN_ERROR;
|
||||
}
|
||||
else if (c == '[') {
|
||||
else if (c == '(') {
|
||||
state = 20;
|
||||
}
|
||||
else {
|
||||
|
|
@ -698,8 +698,8 @@ static int look(Scanner * s) {
|
|||
Delitem(s->text, DOH_END);
|
||||
get_escape(s);
|
||||
}
|
||||
} else { /* Custom delimiter string: R"XXXX[value]XXXX" */
|
||||
if (c==']') {
|
||||
} else { /* Custom delimiter string: R"XXXX(value)XXXX" */
|
||||
if (c==')') {
|
||||
int i=0;
|
||||
String *end_delimiter = NewStringEmpty();
|
||||
while ((c = nextchar(s)) != 0 && c!='\"') {
|
||||
|
|
@ -710,7 +710,7 @@ static int look(Scanner * s) {
|
|||
}
|
||||
|
||||
if (Strcmp( str_delimiter, end_delimiter )==0) {
|
||||
Delete( end_delimiter ); /* Correct end delimiter ]XXXX" occured */
|
||||
Delete( end_delimiter ); /* Correct end delimiter )XXXX" occured */
|
||||
Delete( str_delimiter );
|
||||
str_delimiter = 0;
|
||||
return SWIG_TOKEN_STRING;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue