def accept(token, required = false, strip = false)
      # Consume leading whitespace if we want to ignore it
      accept :whitespace if strip

      # We reached the end of the parsing process and there are no more lines
      # left to parse
      return nil unless @line

      # Match the token to the current line. If we find it, return the match.
      # If it is required, signal an :expected error
      if (match = @line[@offset..-1].match(Tokens[token]))
        # Advance current offset with match length
        @offset += match[0].size
        @j += match[0].size

        return match[0]
      elsif required
        Logger.error :parse, @code, @i, @j, :expected, token
      end
    end
def accept(token, required = false, strip = false)
      # Consume leading whitespace if we want to ignore it
      accept :whitespace if strip

      # We reached the end of the parsing process and there are no more lines
      # left to parse
      return nil unless @line

      # Match the token to the current line. If we find it, return the match.
      # If it is required, signal an :expected error
      if (match = @line[@offset..-1].match(Tokens[token]))
        # Advance current offset with match length
        @offset += match[0].size
        @j += match[0].size

        return match[0]
      elsif required
        Logger.error :parse, @code, @i, @j, :expected, token
      end
    end
Check and accept or reject a given token as long as we have tokens
 remaining. Shift the code with the match length plus any extra character
 count around the capture group

 @param token [RegEx] Token to be accepted by the parser
 @param required [Boolean] Expect the given token syntax
 @param strip [Boolean] Left strip the current code to remove whitespace