コード例 #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);
 }
コード例 #2
0
ファイル: if.cs プロジェクト: 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);
 }
コード例 #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);
 }
コード例 #4
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the statement
     return(m_statement != null ? m_statement.EncloseBlock(type) : false);
 }
コード例 #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));
 }
コード例 #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));
 }
コード例 #7
0
ファイル: if.cs プロジェクト: Aliceljm1/kiss-project.web
 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;
 }
コード例 #8
0
 internal virtual bool EncloseBlock(EncloseBlockType type)
 {
     // almost all statements return false
     return(false);
 }
コード例 #9
0
ファイル: forin.cs プロジェクト: nuxleus/ajaxmin
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the body
     return Body == null ? false : Body.EncloseBlock(type);
 }
コード例 #10
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the statement
     return (Statement != null ? Statement.EncloseBlock(type) : false);
 }
コード例 #11
0
ファイル: JsBlock.cs プロジェクト: modulexcite/misakai-baker
 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));
 }
コード例 #12
0
ファイル: dowhile.cs プロジェクト: Aliceljm1/kiss-project.web
 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);
 }
コード例 #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;
 }
コード例 #14
0
 internal override bool EncloseBlock(EncloseBlockType type)
 {
     // pass the query on to the body
     return(m_block == null ? false : m_block.EncloseBlock(type));
 }