this PR is adding the ctags for FORTH. It's very simple, it only detects the ":" for the beginning of a word:
![image](https://user-images.githubusercontent.com/477243/214932630-f14a944e-fb7b-43a...)
Possible improvements:
- it could write "words" instead of "section" in the symbol list - it could only parse the first word after the ":", and not the eventual code after it
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3377
-- Commit Summary --
* adding forth ctags * adding forth.c for ctags
-- File Changes --
M ctags/Makefile.am (1) M ctags/main/parsers_p.h (1) A ctags/parsers/forth.c (78) M src/filetypes.c (2) M src/tagmanager/tm_parser.c (6) M src/tagmanager/tm_parser.h (1) M src/tagmanager/tm_parsers.h (1)
-- Patch Links --
https://github.com/geany/geany/pull/3377.patch https://github.com/geany/geany/pull/3377.diff
Please have the parser accepted upstream first, even though its very simple it adds work to updating ctags to check if a change breaks it.
Also without `geany_` on the name, being a parser in Geany without an upstream, it will break `scripts/update_ctags.py` (perhaps the script could be more resilient, but on the other hand it indicates that an upstream parser has been moved or renamed, so it _should_ stop).
Please have the parser accepted upstream first, even though its very simple it adds work to updating ctags to check if a change breaks it.
Also without `geany_` on the name, being a parser in Geany without an upstream, it will break `scripts/update_ctags.py` (perhaps the script could be more resilient, but on the other hand it indicates that an upstream parser has been moved or renamed, so it _should_ stop).
I'm in the process of doing it, and the forth.c file had been converted to a forth.ctags for optlib.
https://github.com/universal-ctags/ctags/pull/3810
There is an automated forth.c generated from the optlib code. It's located there: https://github.com/universal-ctags/ctags/blob/18f4f91fc18893a5e984bff3018e15...
I have problems to compile it, this is giving me those errors:
``` parsers/forth.c:44:12: error: ‘parserDefinition’ {aka ‘struct sParserDefinition’} has no m ember named ‘versionCurrent’ 44 | def->versionCurrent= 0; | ^~ parsers/forth.c:45:12: error: ‘parserDefinition’ {aka ‘struct sParserDefinition’} has no m ember named ‘versionAge’ 45 | def->versionAge = 0; ```
does geany handles optlib?
https://docs.ctags.io/en/latest/optlib.html#translating-an-option-file-into-...
does geany handles optlib?
The optlib directory of ctags is not imported to Geany, so probably not.
@farvardin pushed 1 commit.
ab5a8c1a78990540d8b8d2095d2812a7b8f0b045 Merge branch 'geany:master' into master
@farvardin pushed 1 commit.
d550424d7ad7e6cd3ddc0d26d969f5d1b2b68721 updating forth.c
Closed #3377.
Fixed by #4013.
github-comments@lists.geany.org