/* ----------------------------------------------------------------------------1Copyright (c) 2021, Daan Leijen2This is free software; you can redistribute it and/or modify it3under the terms of the MIT License. A copy of the license can be4found in the "LICENSE" file at the root of this distribution.5-----------------------------------------------------------------------------*/6#pragma once7#ifndef IC_HIGHLIGHT_H8#define IC_HIGHLIGHT_H910#include "common.h"11#include "attr.h"12#include "term.h"13#include "bbcode.h"1415//-------------------------------------------------------------16// Syntax highlighting17//-------------------------------------------------------------1819ic_private void highlight( alloc_t* mem, bbcode_t* bb, const char* s, attrbuf_t* attrs, ic_highlight_fun_t* highlighter, void* arg );20ic_private void highlight_match_braces(const char* s, attrbuf_t* attrs, ssize_t cursor_pos, const char* braces, attr_t match_attr, attr_t error_attr);21ic_private ssize_t find_matching_brace(const char* s, ssize_t cursor_pos, const char* braces, bool* is_balanced);2223#endif // IC_HIGHLIGHT_H242526