Example #1
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // there is an IE bug (up to IE7, at this time) that do-while
     // statements cause problems when they happen before else or while
     // statements without a closing curly-brace between them.
     // So if we get here, flag this as possibly requiring a block.
     return(type == EncloseBlockType.SingleDoWhile);
 }
Example #2
0
File: if.cs Project: formist/LinkMe
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // if there's an else block, recurse down that branch
     if (FalseBlock != null)
     {
         return(FalseBlock.EncloseBlock(type));
     }
     else if (type == EncloseBlockType.IfWithoutElse)
     {
         // there is no else branch -- we might have to enclose the outer block
         return(true);
     }
     else if (TrueBlock != null)
     {
         return(TrueBlock.EncloseBlock(type));
     }
     return(false);
 }
Example #3
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // if there's an else block, recurse down that branch.
     // if we aren't forcing braces and the block contains nothing, then we don't
     // really have a false block.
     if (FalseBlock != null && (FalseBlock.ForceBraces || FalseBlock.Count > 0))
     {
         return(FalseBlock.EncloseBlock(type));
     }
     else if (type == EncloseBlockType.IfWithoutElse)
     {
         // there is no else branch -- we might have to enclose the outer block
         return(true);
     }
     else if (TrueBlock != null)
     {
         return(TrueBlock.EncloseBlock(type));
     }
     return(false);
 }
Example #4
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the statement
     return(m_statement != null ? m_statement.EncloseBlock(type) : false);
 }
Example #5
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // if there's more than one item, then return false.
     // otherwise recurse the call
     return (m_list.Count == 1 && m_list[0].EncloseBlock(type));
 }
Example #6
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the body
     return(Body == null || Body.Count == 0 ? false : Body.EncloseBlock(type));
 }
Example #7
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // if there's an else block, recurse down that branch
     if (FalseBlock != null)
     {
         return FalseBlock.EncloseBlock(type);
     }
     else if (type == EncloseBlockType.IfWithoutElse)
     {
         // there is no else branch -- we might have to enclose the outer block
         return true;
     }
     else if (TrueBlock != null)
     {
         return TrueBlock.EncloseBlock(type);
     }
     return false;
 }
Example #8
0
 internal virtual bool EncloseBlock(EncloseBlockType type)
 {
     // almost all statements return false
     return(false);
 }
Example #9
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the body
     return Body == null ? false : Body.EncloseBlock(type);
 }
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the statement
     return (Statement != null ? Statement.EncloseBlock(type) : false);
 }
Example #11
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // if there's more than one item, then return false.
     // otherwise recurse the call
     return(m_list.Count == 1 && m_list[0].EncloseBlock(type));
 }
Example #12
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // there is an IE bug (up to IE7, at this time) that do-while
     // statements cause problems when they happen before else or while
     // statements without a closing curly-brace between them.
     // So if we get here, flag this as possibly requiring a block.
     return (type == EncloseBlockType.SingleDoWhile);
 }
Example #13
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // if there's an else block, recurse down that branch.
     // if we aren't forcing braces and the block contains nothing, then we don't
     // really have a false block.
     if (FalseBlock != null && (FalseBlock.ForceBraces || FalseBlock.Count > 0))
     {
         return FalseBlock.EncloseBlock(type);
     }
     else if (type == EncloseBlockType.IfWithoutElse)
     {
         // there is no else branch -- we might have to enclose the outer block
         return true;
     }
     else if (TrueBlock != null)
     {
         return TrueBlock.EncloseBlock(type);
     }
     return false;
 }
Example #14
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the body
     return(m_block == null ? false : m_block.EncloseBlock(type));
 }