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); }
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); }
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); }
internal override bool EncloseBlock(EncloseBlockType type) { // pass the query on to the statement return(m_statement != null ? m_statement.EncloseBlock(type) : false); }
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)); }
internal override bool EncloseBlock(EncloseBlockType type) { // pass the query on to the body return(Body == null || Body.Count == 0 ? false : Body.EncloseBlock(type)); }
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; }
internal virtual bool EncloseBlock(EncloseBlockType type) { // almost all statements return false return(false); }
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); }
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)); }
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); }
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; }
internal override bool EncloseBlock(EncloseBlockType type) { // pass the query on to the body return(m_block == null ? false : m_block.EncloseBlock(type)); }