Insert boundary token at quotes, makes things like $foo"bar" work right

darcs-hash:20051207144307-ac50b-a708fa43b196f435efdcb1bfac17ce592cdb4533.gz
This commit is contained in:
axel 2005-12-08 00:43:07 +10:00
parent ab13c4caad
commit 8b4637e900
2 changed files with 9 additions and 9 deletions

View File

@ -1208,14 +1208,14 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
case L'\'':
{
mode = 1;
out_pos--;
in[out_pos] = INTERNAL_SEPARATOR;
break;
}
case L'\"':
{
mode = 2;
out_pos--;
in[out_pos] = INTERNAL_SEPARATOR;
break;
}
@ -1236,7 +1236,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
{
if( c == L'\'' )
{
out_pos--;
in[out_pos] = INTERNAL_SEPARATOR;
mode = 0;
}
else
@ -1257,7 +1257,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special )
case '"':
{
mode = 0;
out_pos--;
in[out_pos] = INTERNAL_SEPARATOR;
break;
}

View File

@ -81,6 +81,11 @@ enum
/** Character representing separation between two bracket elements */
BRACKET_SEP,
/**
Separate subtokens in a token with this character.
*/
INTERNAL_SEPARATOR,
}
;
@ -107,11 +112,6 @@ enum
/** String containing the character for separating two array elements */
#define ARRAY_SEP_STR L"\x1e"
/**
Separate subtokens in a token with this character.
*/
#define INTERNAL_SEPARATOR 0xfffffff0
/**