mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 09:15:35 +00:00
allow a space in the middle of multi-character comparison operators (Fixes #2185)
This commit is contained in:
parent
1937ace1b7
commit
cda0363f29
1 changed files with 17 additions and 1 deletions
|
@ -391,6 +391,10 @@ namespace Compiler
|
||||||
{
|
{
|
||||||
if (get (c))
|
if (get (c))
|
||||||
{
|
{
|
||||||
|
/// \todo hack to allow a space in comparison operators (add option to disable)
|
||||||
|
if (c==' ')
|
||||||
|
get (c);
|
||||||
|
|
||||||
if (c=='=')
|
if (c=='=')
|
||||||
special = S_cmpEQ;
|
special = S_cmpEQ;
|
||||||
else
|
else
|
||||||
|
@ -398,7 +402,7 @@ namespace Compiler
|
||||||
special = S_cmpEQ;
|
special = S_cmpEQ;
|
||||||
putback (c);
|
putback (c);
|
||||||
// return false;
|
// return false;
|
||||||
// Allow = as synonym for ==. \todo optionally disable for post-1.0 scripting improvements.
|
/// Allow = as synonym for ==. \todo optionally disable for post-1.0 scripting improvements.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -411,6 +415,10 @@ namespace Compiler
|
||||||
{
|
{
|
||||||
if (get (c))
|
if (get (c))
|
||||||
{
|
{
|
||||||
|
/// \todo hack to allow a space in comparison operators (add option to disable)
|
||||||
|
if (c==' ' && !get (c))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (c=='=')
|
if (c=='=')
|
||||||
special = S_cmpNE;
|
special = S_cmpNE;
|
||||||
else
|
else
|
||||||
|
@ -441,6 +449,10 @@ namespace Compiler
|
||||||
{
|
{
|
||||||
if (get (c))
|
if (get (c))
|
||||||
{
|
{
|
||||||
|
/// \todo hack to allow a space in comparison operators (add option to disable)
|
||||||
|
if (c==' ')
|
||||||
|
get (c);
|
||||||
|
|
||||||
if (c=='=')
|
if (c=='=')
|
||||||
{
|
{
|
||||||
special = S_cmpLE;
|
special = S_cmpLE;
|
||||||
|
@ -461,6 +473,10 @@ namespace Compiler
|
||||||
{
|
{
|
||||||
if (get (c))
|
if (get (c))
|
||||||
{
|
{
|
||||||
|
/// \todo hack to allow a space in comparison operators (add option to disable)
|
||||||
|
if (c==' ')
|
||||||
|
get (c);
|
||||||
|
|
||||||
if (c=='=')
|
if (c=='=')
|
||||||
{
|
{
|
||||||
special = S_cmpGE;
|
special = S_cmpGE;
|
||||||
|
|
Loading…
Reference in a new issue