Checks whether `node` has any comments _inside,_ except inside the `{...}` part (if any).
321568
function hasCommentInsideNonSpecifiers(node, sourceCode) {
  const tokens = sourceCode.getTokens(node)
  const openBraceIndex = tokens.findIndex(token => isPunctuator(token, '{'))
  const closeBraceIndex = tokens.findIndex(token => isPunctuator(token, '}'))
  // Slice away the first token, since we're no looking for comments _before_
  // `node` (only inside). If there's a `{...}` part, look for comments before
  // the `{`, but not before the `}` (hence the `+1`s).
  const someTokens = openBraceIndex >= 0 && closeBraceIndex >= 0
    ? tokens.slice(1, openBraceIndex + 1).concat(tokens.slice(closeBraceIndex + 1))
    : tokens.slice(1)
  return someTokens.some(token => sourceCode.getCommentsBefore(token).length > 0)
}
135968
def check_preceding_node(node, type)
      case prev_node(node)
      when
        nil,
        Sass::Tree::FunctionNode,
        Sass::Tree::MixinNode,
        Sass::Tree::MixinDefNode,
        Sass::Tree::RuleNode,
        Sass::Tree::CommentNode
        # Ignore
        nil
      else
        unless engine.lines[node.line - 2].strip.empty?
          add_lint(node.line, MESSAGE_FORMAT % [type, 'preceded'])
        end
      end
    end
87836
private boolean gatherComments(org.parboiled.Node<Node> parsed) {
		boolean foundComments = false;
		for (org.parboiled.Node<Node> child : parsed.getChildren()) {
			foundComments |= gatherComments(child);
		}
		
		List<Comment> cmts = registeredComments.get(parsed);
		if (cmts != null) for (Comment c : cmts) {
			comments.add(c);
			return true;
		}
		
		return foundComments;
	}
750067
function hasCommentAfter(node, sourceCode) {
  return sourceCode.getCommentsAfter(node)
    .some(comment => comment.loc.start.line === node.loc.end.line)
}
143995
function ignoredNode(node) {
  return node.nodeType === Node.COMMENT_NODE
      || node.nodeType === Node.PROCESSING_INSTRUCTION_NODE
      || (node.nodeType === Node.ELEMENT_NODE && getComputedStyle(node, null).getPropertyValue('display') === 'none')
}
1369527
function checkIfNodeCanBeChildOfStyle( def, currentNode, lastNode, nodeName, dtd, nodeIsNoStyle, nodeIsReadonly, includeReadonly ) {
		// Style can be applied to text node.
		if ( !nodeName )
			return 1;

		// Style definitely cannot be applied if DTD or data-nostyle do not allow.
		if ( !dtd[ nodeName ] || nodeIsNoStyle  )
			return 0;

		// Non-editable element cannot be styled is we shouldn't include readonly elements.
		if ( nodeIsReadonly && !includeReadonly  )
			return 0;

		// Check that we haven't passed lastNode yet and that style's childRule allows this style on current element.
		return checkPositionAndRule( currentNode, lastNode, def, posPrecedingIdenticalContained );
	}
480609
function isPaddingBetweenTokens(first, second) {
            const comments = sourceCode.getCommentsBefore(second);
            const len = comments.length;

            // If there is no comments
            if (len === 0) {
                const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1;

                return linesBetweenFstAndSnd >= 1;
            }


            // If there are comments
            let sumOfCommentLines = 0; // the numbers of lines of comments
            let prevCommentLineNum = -1; // line number of the end of the previous comment

            for (let i = 0; i < len; i++) {
                const commentLinesOfThisComment = comments[i].loc.end.line - comments[i].loc.start.line + 1;

                sumOfCommentLines += commentLinesOfThisComment;

                /*
                 * If this comment and the previous comment are in the same line,
                 * the count of comment lines is duplicated. So decrement sumOfCommentLines.
                 */
                if (prevCommentLineNum === comments[i].loc.start.line) {
                    sumOfCommentLines -= 1;
                }

                prevCommentLineNum = comments[i].loc.end.line;
            }

            /*
             * If the first block and the first comment are in the same line,
             * the count of comment lines is duplicated. So decrement sumOfCommentLines.
             */
            if (first.loc.end.line === comments[0].loc.start.line) {
                sumOfCommentLines -= 1;
            }

            /*
             * If the last comment and the second block are in the same line,
             * the count of comment lines is duplicated. So decrement sumOfCommentLines.
             */
            if (comments[len - 1].loc.end.line === second.loc.start.line) {
                sumOfCommentLines -= 1;
            }

            const linesBetweenFstAndSnd = second.loc.start.line - first.loc.end.line - 1;

            return linesBetweenFstAndSnd - sumOfCommentLines >= 1;
        }
789662
function isContainedInCondition(node) {
  while (node) {
    if (isConditionCheck(node) || isNegationOperator(node) || isBooleanConstructorCall(node)) {
      return true
    }
    node = node.parent
  }
  return false
}
1055283
function hasJSDocThisTag(node, sourceCode) {
		var jsdocComment = sourceCode.getJSDocComment(node);
	
		if (jsdocComment && thisTagPattern.test(jsdocComment.value)) {
			return true;
		}
	
		// Checks '@this' in its leading comments for callbacks,
		// because callbacks don't have its JSDoc comment.
		// e.g.
		//     sinon.test(/* @this sinon.Sandbox */function() { this.spy(); });
		return sourceCode.getComments(node).leading.some(function(comment) {
			return thisTagPattern.test(comment.value);
		});
	}
1023530
def check_node(node, level, ctr)
     if (@@text_elements.include? node.name)
       ctr << {:type => :para, :level => level, :words => count_content_words(node)}
     elsif (@@section_elements.include? node.name)
       title = find_section_title(node)
       ctr << {:type => :section, :level => level, :title => title, :name => node.name}
       node.children.each {|inner_elem| check_node(inner_elem, level+1, ctr)} if node.children?
     else
       node.children.each {|inner_elem| check_node(inner_elem, level+1, ctr)} if node.children?
     end

     ctr
   end
1232520
function checkCommentForSuppress(node) {
      // Skip if types aren't provided or the comment is empty.
      if (!node || !node.value || node.value.length === 0) {
        return;
      }

      const match = node.value.match(/@suppress \{(.*?)\}/);
      if (match && match.length === 2) {
        if (!blacklistedTypes || blacklistedTypes.length === 0) {
          // Array is not present or empty, so block all types.
          context.report(node, '@suppress not allowed for any types');
        } else {
          // Report which matched types are blocked.
          const matched = [];
          const types = match[1].split('|');
          types.forEach(function(type) {
            if (blacklistedTypes.indexOf(type) !== -1 && matched.indexOf(type) === -1) {
              matched.push(type);
            }
          });

          if (matched.length > 0) {
            const typeString = matched.join(', ');
            context.report(node, `@suppress not allowed for: ${typeString}`);
          }
        }
      }
    }
1221706
private boolean skipComment(final String s) throws KNXMLException
	{
		if (s.startsWith("!--")) {
			String comment = s;
			while (canRead() && !comment.endsWith("--"))
				comment = read('>');
			return true;
		}
		return false;
	}
884532
function commentNode(outNode, options) {
	const node = outNode.node;

	if (!options.enabled || !options.trigger || !node.name) {
		return;
	}

	const attrs = outNode.node.attributes.reduce((out, attr) => {
		if (attr.name && attr.value != null) {
			out[attr.name.toUpperCase().replace(/-/g, '_')] = attr.value;
		}

		return out;
	}, {});

	// add comment only if attribute trigger is present
	for (let i = 0, il = options.trigger.length; i < il; i++) {
		if (options.trigger[i].toUpperCase() in attrs) {
			outNode.open = template(options.before, attrs) + outNode.open;
			if (outNode.close) {
				outNode.close += template(options.after, attrs);
			}
			break;
		}
	}
}
140050
function containsNode(outerNode, innerNode) {
  if (!outerNode || !innerNode) {
    return false;
  } else if (outerNode === innerNode) {
    return true;
  } else if (isTextNode(outerNode)) {
    return false;
  } else if (isTextNode(innerNode)) {
    return containsNode(outerNode, innerNode.parentNode);
  } else if (outerNode.contains) {
    return outerNode.contains(innerNode);
  } else if (outerNode.compareDocumentPosition) {
    return !!(outerNode.compareDocumentPosition(innerNode) & 16);
  } else {
    return false;
  }
}
1320562
function checkForSemicolon(node) {
				var lastToken = sourceCode.getLastToken(node);

				if (never) {
					if (isUnnecessarySemicolon(lastToken)) {
						report(node, true);
					}
				} else {
					if (!isSemicolon(lastToken)) {
						if (!exceptOneLine || !isOneLinerBlock(node)) {
							report(node);
						}
					} else {
						if (exceptOneLine && isOneLinerBlock(node)) {
							report(node, true);
						}
					}
				}
			}
712393
function isComment (token) {
  return token != null && (token.type === 'Block' || token.type === 'Line' || token.type === 'Shebang' || token.type.endsWith('Comment'))
}
1369758
function hasNewlineBefore(node) {
            const lineNumNode = node.loc.start.line;
            const lineNumTokenBefore = getLineNumberOfTokenBefore(node);
            const commentLines = calcCommentLines(node, lineNumTokenBefore);

            return (lineNumNode - lineNumTokenBefore - commentLines) > 1;
        }