pyebnf/util.py
def get_newline_positions(text):
  """Returns a list of the positions in the text where all new lines occur. This is used by
  get_line_and_char to efficiently find coordinates represented by offset positions.
  """
  pos = []
  for i, c in enumerate(text):
    if c == "\n":
      pos.append(i)
  return pos
def get_newline_positions(text):
  """Returns a list of the positions in the text where all new lines occur. This is used by
  get_line_and_char to efficiently find coordinates represented by offset positions.
  """
  pos = []
  for i, c in enumerate(text):
    if c == "\n":
      pos.append(i)
  return pos
Returns a list of the positions in the text where all new lines occur. This is used by
  get_line_and_char to efficiently find coordinates represented by offset positions.