summaryrefslogtreecommitdiff
path: root/indra/lscript
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-06-30 14:50:37 -0400
committerNat Goodspeed <nat@lindenlab.com>2015-06-30 14:50:37 -0400
commit77da469d6f7901ee0cddf5fb351cd2a756b217f0 (patch)
treee0d7326fc438f7b579e3ddbcbb4772afa5402d23 /indra/lscript
parent4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff)
parentd4fb82c217bccda536f7a7b2ca1809bb8c2dba40 (diff)
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/lscript')
-rwxr-xr-xindra/lscript/lscript_compile/indra.l2
-rwxr-xr-xindra/lscript/lscript_compile/indra.y6
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index c2e21335e9..025cbfc3a3 100755
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -102,7 +102,7 @@ int yyerror(const char *fmt, ...);
"event" { count(); return(EVENT); }
"jump" { count(); return(JUMP); }
"return" { count(); return(RETURN); }
-"if" { count(); return(IF); }
+"if" { count(); return(IFF); }
"else" { count(); return(ELSE); }
"for" { count(); return(FOR); }
"do" { count(); return(DO); }
diff --git a/indra/lscript/lscript_compile/indra.y b/indra/lscript/lscript_compile/indra.y
index c451eee3d8..efe4f1a60c 100755
--- a/indra/lscript/lscript_compile/indra.y
+++ b/indra/lscript/lscript_compile/indra.y
@@ -118,7 +118,7 @@
%token SHIFT_LEFT
%token SHIFT_RIGHT
-%token IF
+%token IFF /* IF used by a helper library */
%token ELSE
%token FOR
%token DO
@@ -1347,13 +1347,13 @@ statement
{
$$ = $1;
}
- | IF '(' expression ')' statement %prec LOWER_THAN_ELSE
+ | IFF '(' expression ')' statement %prec LOWER_THAN_ELSE
{
$$ = new LLScriptIf(gLine, gColumn, $3, $5);
$5->mAllowDeclarations = FALSE;
gAllocationManager->addAllocation($$);
}
- | IF '(' expression ')' statement ELSE statement
+ | IFF '(' expression ')' statement ELSE statement
{
$$ = new LLScriptIfElse(gLine, gColumn, $3, $5, $7);
$5->mAllowDeclarations = FALSE;