@param [TagNode] current_node

 @return [nil]
557093
def visit_tag(current_node)
      attributes = formatted_attributes(current_node)
      children_wo_attributes = (current_node.children - current_node.attributes)

      text = "<#{current_node.name}"

      text += attributes.to_s unless attributes.empty?

      other_than_new_lines = children_wo_attributes.any? { |n| n.type != :newline }

      text += if other_than_new_lines
                '>'
              else
                '/>'
              end

      conditional_nodes = current_node.children.select { |n| n.type == :output && n.conditional }

      unless conditional_nodes.empty?
        buff_code "if (#{conditional_nodes.map(&:value).join(') && (')})"

        @code_indent += 1
      end

      buff_print_text(text, new_line: true, indent: true)

      if other_than_new_lines
        last_node = children_wo_attributes.last
        is_last_newline = !last_node.nil? && last_node.type == :newline
        nodes = if is_last_newline
                  children_wo_attributes[0...-1]
                else
                  children_wo_attributes
                end

        code_indent do
          visit_nodes(nodes)
        end

        buff_print_text("</#{current_node.name}>", new_line: true, indent: true)

        # print new line after the tag
        visit_node(last_node) if is_last_newline
      end

      unless conditional_nodes.empty? # rubocop:disable Style/GuardClause
        @code_indent -= 1

        buff_code 'end'
      end
    end
217313
def visit_tag(node)
      return unless enabled?

      visit_script(node) ||
        if node.parsed_attributes.contains_instance_variables?
          record_lint(node, "Avoid using instance variables in #{file_types} views")
        end
    end
711955
function(node) {
				var current = stack.getCurrent();

				if (current && !current.valid) {
					context.report(node, ProblemMessages.noInvalidThis);
				}
			}
822948
def tag_present
      ptr = ::FFI::MemoryPointer.new(:int)
      Klass.getTagStatus(@handle, ptr)
      (ptr.get_int(0) == 0) ? false : true
    end
818965
public Node getCurrentNode()
  {

    if (!m_cacheNodes)
      throw new RuntimeException(
        XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_CANNOT_INDEX, null)); //"This NodeSet can not do indexing or counting functions!");

    int saved = m_next;
    Node n = (m_next < m_firstFree) ? elementAt(m_next) : null;
    m_next = saved; // HACK: I think this is a bit of a hack.  -sb
    return n;
  }
500607
def search_current_el xpath
      # try to find the rule in the current verb
      desired_el = @current_el.at_xpath xpath
      return desired_el unless desired_el.nil?
      
      # check all the verb's parents, walking up the hierarchy
      @current_el_parents.each do |parent|
        desired_el = parent.at_xpath xpath
        return desired_el unless desired_el.nil?
      end
      
      nil
    end
1006213
def root_snapshot
      return nil if current_snapshot.nil?

      current = current_snapshot
      current = current.parent while current.parent != nil
      current
    end
1163451
def retrogress_bbtree
      if @tags_list[-1].definition[:self_closable]
        # It is possible that the next (self_closable) tag is on the next line
        # Remove newline of current tag and parent tag as they are (probably) not intented as an actual newline here but as tag separator
        @tags_list[-1][:nodes][0][:text].chomp! unless @tags_list[-1][:nodes][0][:text].nil?
        @tags_list[-2][:nodes][0][:text].chomp! unless @tags_list.length < 2 or @tags_list[-2][:nodes][0][:text].nil?
      end

      @tags_list.pop     # remove latest tag in tags_list since it's closed now...
      # The parsed data manifests in @bbtree.current_node.children << TagNode.new(element) which I think is more confusing than needed

      if within_open_tag?
        @current_node = @tags_list[-1]
      else # If we're still at the root of the BBTree or have returned back to the root via encountring closing tags...
        @current_node = TagNode.new({:nodes => self.nodes})  # Note:  just passing in self works too...
      end
    end
255208
def on_def(node)
      receiver = nil

      if node.type == :defs
        receiver = evaluate_node(node.children[0])
      end

      builder = DefinitionBuilder::RubyMethod.new(
        node,
        self,
        :type       => @method_type,
        :receiver   => receiver,
        :visibility => @visibility
      )

      definition = builder.build

      builder.scope.add_definition(definition)

      associate_node(node, definition)

      buffer_docstring_tags(node)

      if docstring_tags and docstring_tags.return_tag
        assign_return_value_from_tag(
          docstring_tags.return_tag,
          definition
        )
      end

      push_scope(definition)
    end
1183973
def each(&block)
      node = @first_leaf
      while node
        break unless node.each(&block)
        node = node.next_sibling
      end
    end
1338571
function _tag_open( &$parser, $tag, $attributes ) {
		$this->currentElement = strtoupper( $tag );

		switch( $this->currentElement ) {
			case 'DROP':
				$this->drop();
				break;
			case 'CLUSTERED':
			case 'BITMAP':
			case 'UNIQUE':
			case 'FULLTEXT':
			case 'HASH':
				// Add index Option
				$this->addIndexOpt( $this->currentElement );
				break;
			default:
				// print_r( array( $tag, $attributes ) );
		}
	}
115785
def text
      assert_exists

      tn = @element.node_name.downcase

      case tn
      when 'input'
        @element.get_attribute(:value)
      when 'button'
        @element.text
      else
        raise Exception::Error, "unknown tag name for button: #{tn}"
      end
    end
372177
def <<(node)
      @nodes << node
      @index_names.each { |name| add_to_index(name, value(node, name), node) }
      @contexts.each { |context| eval_context(context, node) }
      self
    end
787603
def set_current(current)
      if length.zero?
        self.scene = nil
        return
      # Don't bother looking for current image
      elsif scene.nil? || scene >= length
        self.scene = length - 1
        return
      elsif !current.nil?
        # Find last instance of "current" in the list.
        # If "current" isn't in the list, set current to last image.
        self.scene = length - 1
        each_with_index do |f, i|
          self.scene = i if f.__id__ == current
        end
        return
      end
      self.scene = length - 1
    end
706772
def root(current, indent)
      if KEYWORDS.include? current[@type]
        send :"#{current[@type]}_node", current, indent
      else
        send current[@type], current, indent
      end
    end
58565
def loaded
      fail UnsetRelatedNodeError, 'Node not set, cannot load' if @node.nil?
      @node = if @node.respond_to?(:neo_id)
                @node
              else
                Neo4j::ActiveBase.new_query.match(:n).where(n: {neo_id: @node}).pluck(:n).first
              end
    end
63072
def next_element
      element = next_sibling
      element = element.next_sibling until element.nil? or element.kind_of? Element 
      return element
    end