@param Stmt\ElseIf_ $node

@return string
349241
public function pStmt_ElseIf(Stmt\ElseIf_ $node)
    {
        return sprintf(
            " %s (%s) %s%s\n%s",
            $this->color('elseif', SyntaxHighlighterConfig::TYPE_KEYWORD),
            $this->p($node->cond),
            $this->color('{', SyntaxHighlighterConfig::TYPE_BRACE),
            $this->pStmts($node->stmts),
            $this->color('}', SyntaxHighlighterConfig::TYPE_BRACE)
        );
    }
951763
def p_elseif_stmt(p):
    
    if len(p) == 1:
        p[0] = node.stmt_list()
    elif len(p) == 3:
        p[0] = p[2]
    elif len(p) == 6:
        p[0] = node.if_stmt(cond_expr=p[2], then_stmt=p[4], else_stmt=p[5])
    elif len(p) == 7:
        p[0] = node.if_stmt(cond_expr=p[3], then_stmt=p[5], else_stmt=p[6])
    else:
        assert 0
93130
protected function getVNodeValue($node)
    {
        // for cell types having a "v" tag containing the value.
        // if not, the returned value should be empty string.
        $vNode = $node->getElementsByTagName(self::XML_NODE_VALUE)->item(0);
        return ($vNode !== null) ? $vNode->nodeValue : '';
    }
1236934
public function leaveNode(Node $node)
    {
        if (!$node instanceof Class_) {
            return null;
        }

        $method = $this->findOrCreateMethod($node, $this->getMethodName());

        $this->replaceMethod($method);

        return $node;
    }
1238775
private function getExpression(Node $node) {
		if ($node instanceof ConstFetch) {
			$const = $node->name->parts[0];
			if (isset($this->constMap[$const])) {
				return $this->constMap[$const];
			}
	
			return $const;
		}
		
		if ($node instanceof ClassConstFetch) {
			return $node->class->parts[0] . '::' . $node->name;
		}
	
		if ($node instanceof MagicConst) {
			return $node->getName();
		}
		
		if ($node instanceof Array_) {
			$prettyPrinter = new PrettyPrinter();
			return $prettyPrinter->prettyPrintExpr($node);
		}
	}
134596
function parseNode($node) {
		$src=false;
		$params = array();
		if (isset($node['@attrib'])) {
			$params = $node['@attrib'];
			unset($node['@attrib']);
		}
		// find src
		if (array_key_exists('src',$params))
			$src = $params['src'];
		elseif (array_key_exists('href',$params))
			$src = $params['href'];
		if ($src) {
			$out = '<?php \Assets::instance()->addNode(array(';
			foreach($params as $key=>$val)
				$out.=var_export($key,true).'=>'.(preg_match('/{{(.+?)}}/s',$val)
					?$this->template->token($val):var_export($val,true)).',';
			$out.=')); ?>';
			return $out;
		}
		// inner content
		if (isset($node[0]) && isset($params['type'])) {
			if (!isset($params['group']))
				$params['group'] = ($params['type'] == 'js')
					? 'footer' : 'head';
			if (!isset($params['slot']))
				$params['slot'] = 'inline';
			if ($this->f3->get('ASSETS.handle_inline'))
				return '<?php \Assets::instance()->addInline('.
				'$this->resolve('.(var_export($node,true)).
					',get_defined_vars(),0,false,false),'.
				var_export($params['type'],true).','.
				var_export($params['group'],true).','.
				var_export($params['slot'],true).'); ?>';
			else
				// just bypass
				return $this->f3->call($this->formatter[$params['type']],array(array(
					'data'=>$this->template->build($node),
					'origin'=>'inline'
				)));
		}
	}
137635
protected function generateText($node)
    {
        $buffer = '';
        
        $value = explode("\n", $node['value']);
        $last = count($value) - 1;
        
        foreach ($value as $i => $line) {
            $line = str_replace("'", '\\\'', $line);
            
            if ($i === $last) {
                $buffer .= $this->prettyPrint(sprintf(self::BLOCK_TEXT_LAST, $line));
                continue;
            }

            $buffer .= $this->prettyPrint(sprintf(self::BLOCK_TEXT_LINE, $line));
        }
        
        return $buffer;
    }
371641
public function pStmt_Switch(Stmt\Switch_ $node)
    {
        return sprintf(
            "%s (%s) %s%s\n%s",
            $this->color('switch', SyntaxHighlighterConfig::TYPE_KEYWORD),
            $this->p($node->cond),
            $this->color('{', SyntaxHighlighterConfig::TYPE_BRACE),
            $this->pStmts($node->cases),
            $this->color('}', SyntaxHighlighterConfig::TYPE_BRACE)
        );
    }
940786
protected function _case(array $node) {
		$attrib=$node['@attrib'];
		unset($node['@attrib']);
		return
			'<?php case '.(preg_match('/\{\{(.+?)\}\}/',$attrib['value'])?
				$this->token($attrib['value']):
				Base::instance()->stringify($attrib['value'])).': ?>'.
				$this->build($node).
			'<?php '.(isset($attrib['break'])?
				'if ('.$this->token($attrib['break']).') ':'').
				'break; ?>';
	}
455471
def p_elseif_elseiflist(p):
    
    label_, cond_ = p[1]
    then_ = p[2]
    else_ = p[3]
    p[0] = make_block(label_, make_sentence('IF', cond_, then_, else_, lineno=p.lineno(1)))
194832
public function noteFromNodeToDslText(NodeInterface $node)
    {
        if (!$node instanceof NoteProviderInterface) {
            throw new \InvalidArgumentException('Node must implement NoteProviderInterface');
        }

        $note   = $node->getNote();
        $noteBg = $node->getNoteBg();

        if (!is_string($note) || strlen($note) < 1) {
            return '';
        }

        if (!is_string($noteBg) || strlen($noteBg) < 1) {
            $noteBg = NoteProviderInterface::BG_BEIGE;
        }

        $noteDslText = $this->useCaseNodeToDslText($node)
                     . $this->dependncyTypeToDslText[Dependency::TYPE_ASSOCIATION]
                     . sprintf($this->nodeTypeToDslText[Node::TYPE_NOTE], $note, $noteBg)
                     . ',';

        return $noteDslText;
    }
392980
protected void generateNonExpressionIfNode(IfNode node) {
    ConditionalBuilder conditional = null;

    for (SoyNode child : node.getChildren()) {
      if (child instanceof IfCondNode) {
        IfCondNode condNode = (IfCondNode) child;

        // Convert predicate.
        Expression predicate = translateExpr(condNode.getExpr());
        // Convert body.
        Statement consequent = visitChildrenReturningCodeChunk(condNode);
        // Add if-block to conditional.
        if (conditional == null) {
          conditional = ifStatement(predicate, consequent);
        } else {
          conditional.addElseIf(predicate, consequent);
        }

      } else if (child instanceof IfElseNode) {
        // Convert body.
        Statement trailingElse = visitChildrenReturningCodeChunk((IfElseNode) child);
        // Add else-block to conditional.
        conditional.setElse(trailingElse);
      } else {
        throw new AssertionError();
      }
    }

    jsCodeBuilder.append(conditional.build());
  }
536276
public function matchIfValueReturnValue(If_ $ifNode): ?Expr
    {
        if (count($ifNode->stmts) !== 1) {
            return null;
        }

        $insideIfNode = $ifNode->stmts[0];
        if (! $insideIfNode instanceof Return_) {
            return null;
        }

        /** @var Return_ $returnNode */
        $returnNode = $insideIfNode;

        if (! $ifNode->cond instanceof Identical) {
            return null;
        }

        if ($this->betterStandardPrinter->areNodesEqual($ifNode->cond->left, $returnNode->expr)) {
            return $ifNode->cond->right;
        }

        if ($this->betterStandardPrinter->areNodesEqual($ifNode->cond->right, $returnNode->expr)) {
            return $ifNode->cond->left;
        }

        return null;
    }
1066596
public function pStmt_If(Stmt\If_ $node)
    {
        return sprintf(
            "%s (%s) %s%s\n%s%s%s",
            $this->color('if', SyntaxHighlighterConfig::TYPE_KEYWORD),
            $this->p($node->cond),
            $this->color('{', SyntaxHighlighterConfig::TYPE_BRACE),
            $this->pStmts($node->stmts),
            $this->color('}', SyntaxHighlighterConfig::TYPE_BRACE),
            $this->pImplode($node->elseifs),
            (null !== $node->else ? $this->p($node->else) : '')
        );
    }
210387
public function enterNode(Node $node)
    {
        parent::enterNode($node);

        if (self::isConditional($node)) {
            $this->conditionalScopes++;
        } elseif ($node instanceof Function_) {
            $name = $this->getFullyQualifiedName($node->name);

            // @todo add an "else" here which adds a runtime check for instances where we can't tell
            // whether a function is being redefined by static analysis alone.
            if ($this->conditionalScopes === 0) {
                if (\function_exists($name) ||
                    isset($this->currentScope[\strtolower($name)])) {
                    $msg = \sprintf('Cannot redeclare %s()', $name);
                    throw new FatalErrorException($msg, 0, E_ERROR, null, $node->getLine());
                }
            }

            $this->currentScope[\strtolower($name)] = true;
        }
    }
911071
protected function transpileSanitizedTagNode(Node $node) : string
    {
        $code = '';

        foreach ($node->getChildren() as $childNode) {
            $code .= '<?php echo $__opulenceFortuneTranspiler->sanitize(' . $childNode->getValue() . '); ?>';
        }

        return $code;
    }
756175
static function staticNodeData( $node )
    {
        $nodeType = $node[0];
        if ( $nodeType == eZTemplate::NODE_TEXT )
        {
            return $node[2];
        }
        else if ( $nodeType == eZTemplate::NODE_VARIABLE )
        {
            $data = $node[2];
            if ( is_array( $data ) and
                 count( $data ) > 0 )
            {
                $dataType = $data[0][0];
                if ( $dataType == eZTemplate::TYPE_STRING or
                     $dataType == eZTemplate::TYPE_NUMERIC or
                     $dataType == eZTemplate::TYPE_IDENTIFIER or
                     $dataType == eZTemplate::TYPE_ARRAY or
                     $dataType == eZTemplate::TYPE_BOOLEAN )
                {
                    return $data[0][1];
                }
            }
        }
        return null;
    }