org.millscript.millscript.syntax
Class OrAbsentSyntax

java.lang.Object
  extended by org.millscript.millscript.syntax.Syntax
      extended by org.millscript.millscript.syntax.PostfixSyntax
          extended by org.millscript.millscript.syntax.SimplePostfixSyntax
              extended by org.millscript.millscript.syntax.OrAbsentSyntax
All Implemented Interfaces:
PostfixSyntaxInterface

public final class OrAbsentSyntax
extends SimplePostfixSyntax

This class implements || syntax.

<expr> || <expr>

The expression on the right hand side will only be executed if the left hand side returns null, e.g. it is equivalent to writing: if x == absent then y else absent endif

See Also:
OrAbsentExpr

Constructor Summary
OrAbsentSyntax()
           
 
Method Summary
 OrAbsentExpr simple(Expr lhs, Expr rhs)
          Returns the expression for this simple postfix syntax, which is made by combining the left and right hand side expressions.
 
Methods inherited from class org.millscript.millscript.syntax.SimplePostfixSyntax
postfix
 
Methods inherited from class org.millscript.millscript.syntax.PostfixSyntax
getPrecedence, setPrec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrAbsentSyntax

public OrAbsentSyntax()
Method Detail

simple

public OrAbsentExpr simple(Expr lhs,
                           Expr rhs)
Description copied from class: SimplePostfixSyntax
Returns the expression for this simple postfix syntax, which is made by combining the left and right hand side expressions.

Parameters:
lhs - the expression on the left hand side of this syntax
rhs - the expression on the right hand side of this syntax
Returns:
the expression for this syntax
See Also:
SimplePostfixSyntax.simple(org.millscript.millscript.expr.Expr, org.millscript.millscript.expr.Expr)


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.