Assembled 2
A column based text editor
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions
syntax.h File Reference
#include <editor/buffer/editor.h>
#include <editor/buffer/buffer.h>

Go to the source code of this file.

Classes

struct  AS_SyntaxBackendMeta
 

Macros

#define AS_MAX_BACKENDS   256
 Maximum number of syntax backends.
 
#define AS_MAX_BACKEND_EXTS   32
 Maximum number of extensions per backend.
 

Enumerations

enum  AS_SYNTAX_TYPE { AS_SYNTAX_TYPE_ASM }
 

Functions

void init_syntax ()
 
struct AS_SyntaxPointget_syntax (struct AS_TextFile *file, struct AS_LLElement *element)
 

Detailed Description

Author
awewsomegamer awews.nosp@m.omeg.nosp@m.amer@.nosp@m.gmai.nosp@m.l.com

LICENSE

Assembled - Column based text editor Copyright (C) 2023-2024 awewsomegamer

This file is apart of Assembled.

Assembled is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

DESCRIPTION

Responsible for selecting the proper syntax backend for a given file, and installing all syntax backends into as_ctx.syn_backends.

Enumeration Type Documentation

◆ AS_SYNTAX_TYPE

Indices used for extension names.

Function Documentation

◆ get_syntax()

struct AS_SyntaxPoint * get_syntax ( struct AS_TextFile * file,
struct AS_LLElement * element )

Wrapper function to get syntax for a file.

This function determines which syntax backend to use based on the file's extension.

Parameters
structAS_TextFile *file - File in which next parameter is in.
structAS_LLElement *element - The line for which to create a syntax point linked list.

◆ init_syntax()

void init_syntax ( )

Initalize as_ctx.syn_backends.