Skip to content

Commit

Permalink
Update HACKING regarding adding a lexer and using meson
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Sep 5, 2022
1 parent 4640330 commit a3efba0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions HACKING
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ printf("Prefix: %s", GEANY_PREFIX);

Adding a source file foo.[hc] in src/ or plugins/
-------------------------------------------------
* Add foo.c, foo.h to SRCS in path/Makefile.am.
* Add foo.c, foo.h to SRCS in path/Makefile.am and meson.build.
* Add path/foo.c to po/POTFILES.in (for string translation).

Adding a filetype
Expand Down Expand Up @@ -585,10 +585,12 @@ LexFoo.cxx. Try the official Scintilla project first.
Scintilla. All new lexers should be submitted back to the Scintilla
project to save duplication of work.

When adding a lexer, update:
When adding a lexer:

* scintilla/Makefile.am
* scintilla/src/Catalogue.cxx - add a LINK_LEXER command *manually*
* add LexFoo.cxx to scintilla/lexilla/lexers
* add `&lmFoo` to scintilla/lexilla/src/Lexilla.cxx and
scintilla/scintilla_changes.patch
* update scintilla/Makefile.am and meson.build

For syntax highlighting, you will need to edit highlighting.c and
highlightingmappings.h and add the following things:
Expand Down Expand Up @@ -659,7 +661,7 @@ https://github.com/universal-ctags/ctags

Method
``````
* Add foo.c to SRCS in Makefile.am.
* Add foo.c to SRCS in Makefile.am and meson.build.
* Add Foo to src/tagmanager/tm_parsers.h
* Add TM_PARSER_FOO to src/tagmanager/tm_parser.h. The list here must follow
exactly the order in src/tagmanager/tm_parsers.h.
Expand Down Expand Up @@ -704,8 +706,8 @@ the tag information expected to be generated from the corresponding
source file.

When you have these two files, you have to list your new test along the
other ones in the ``test_source`` variable in ``tests/ctags/Makefile.am``.
Please keep this list sorted alphabetically.
other ones in the ``test_source`` variable in ``tests/ctags/Makefile.am``
and ``tests/meson.build``. Please keep this list sorted alphabetically.

Upgrading Scintilla
-------------------
Expand Down

0 comments on commit a3efba0

Please sign in to comment.