This script reads Geany binary tags files from stdin and writes
to stdout a file where each of the tags is followed by a line where
the tag is printed in the following human-readable form:
tag_type: return_value scope :: tag_name(arglist) additional_stuff
Especially the tag_type is currently hard to understand when looking at
unit tests and easy to miss if there's a problem.
Autotools-based builds will be supported for some time. This patch makes
some modifications to the Autotools build system necessary to to co-exist
with meson.
- LOCALEDIR and DATADIR won't be defined, replace with GEANY_* where necessary
- VERSION won't be defined, use PACKAGE_VERSION and PACKAGE_STRING instead
- Doxyfile cannot be generated by configure, which wouldn't run in a meson
build. Generate both Doxyfile and Doxyfile-gi manually using sed
- actual shell script to generate signallist.i (inline shell not a thing in meson)
- path of signallist.i will change, exclude callbacks.c from doxygen
to make it happy
- geany icon for 24x24 size such that one exists for all sizes
- install license file for Lexilla
- change how tests are run a bit so that runner.sh will also work for meson
- check for dirent.h, required by ctags
There are several problems with how we handle anonymous tags which this pull request tries to resolve:
1. Anonymous tags are currently determined based on how these tags are named by ctags which may not be completely reliable and unnecessary. ctags now has XTAG_ANONYMOUS flag we can query and determine whether a tag is anonymous or not based on that. Our fortran parser didn't report XTAG_ANONYMOUS so it has been updated to do so.
2. In order to store the information about anonymous tags, this pull request renames the unused `pointerOrder` member of TMTag (see the corresponding commit about more details to `flags` and uses one bit to indicate whether a tag is anonymous. This is technically a API change but since pointerOrder always contained 0 and was unused (or maybe used by some super-old parser 15 years back), it doesn't really matter (no g-p plugin uses this field).
3. With the introduction of the new cxx parser, anonymous tags are reported as `__anonNUM` - before they were reported as e.g `anon_struct_NUM` - i.e. they contained information about the type in their name which made them easier to identify in the symbol tree. This pull request adds back this naming.
4. In addition to (3), the NUM in the previous parser was global for all types - i.e. tags were named as `anon_enum_1`, `anon_struct_2`, `anon_enum_3` which is a bit strange as it suggests there are 3 enums but there are 2 instead. This pull request makes these numbers per-type so the above becomes `anon_enum_1`, `anon_struct_1`, `anon_enum_2`.
5. This pull request sets the name of anonymous tag if it's followed by the corresponding typedef tag and the typedef tag is removed. For instance, for `typedef struct{int a} Foo;` you would previously get an anonymous tag for the struct under which `a` would be shown and then separately tag `Foo` as a typedef. After this patch, you get a tag `Foo` for the struct with `a` as its member and the anonymous name is dropped which makes things much clearer in the sidebar.
And finally, thanks to the fact that we do renaming of anonymous tags ourselves now, the last diff against ctags main can be dropped so we can use the upstream version without any modifications and the patch file isn't necessary any more. Hurray!!!
Use python3 whenever possible. Python 2 is EOL and the python binary might not be installed.
This obsoletes a Debian patch applied to their package.
Co-authored-by: Enrico Tröger <enrico.troeger@uvena.de>
Check all the collected tags once a file is parsed (i.e. when
we have all tags, including those from subparsers) and renamea
them in the form
anon_enum_1
anon_struct_1
anon_enum_2
anon_struct_2
where the second component is a ctags kind and the number is
per-kind.
In addition, scopes of the nested tags have to be updated if the parent
tag is an anonymous tag.
Finally, for anonymous tags of the form typedef struct Foo{int a;};
we can use the name of the typedef instead of generating the
anonymous name. In this case we can drop the typedef tag once
the anonymous tag is updated with its name.
More details can be found in comments.
* Add "l" prefix to functions in lcpp.c/h
This is to avoid clash with cpreprocessor.c/h used by the new cxx parser.
Merging lcpp.c/h with cpreprocessor.c/h would be difficult (at least for
now) because of the differences in c.c so keep them separate for now.
* Rename C/C++ parsers to "Old"
As a result, when we copy the new cxx parser, we don't have clashes of
these symbols from the two different parsers.
* Add the new cxx parser
This patch only makes the parser compile, it doesn't enable
it yet.
* Enable the new cxx parser
There are several things needed for this:
1. The new preprocessor has to be defined as a separate parser.
2. Tags from the new c/c++ parsers and the preprocessor parser have to
be mapped to Geany types. We still need to keep the old mappings because
some parsers like Ferite or GLSL still use the old C parser.
3. Anonymous tags have a different name so we have to reflect this in
tm_tag_is_anon().
* Update C/C++ unit tests
The changes are mostly these:
1. Spaces in function argument list
(int var1, int var2, ...) - before
(int var1,int var2,...) - now
2. Anonymous tags
anon_struct_1
anon_union_2
anon_typedef_3
vs
__anon1
__anon2
__anon3
3. Improved parsing of the new parser
* Eliminate console warning for cxx 'using' tags
Fix from
fb305d8814
* Update update-ctags.py to also update the cxx parser
* Pass our ignore.tags file with ignored symbols to cxx preprocessor
The syntax is slightly different from the previous syntax and is
described here:
https://docs.ctags.io/en/latest/parser-cxx.html
Basic usage should be the same, uctags just doesn't support Geany's
wildcard ignores like G_GNUC_*. On the other hand the new parser is
much more resilient to macros so there shouldn't be so much need
for manual ignores.
The original code is still kept for parsers from c.c that still use the
old preprocessor.
* Update documentation regarding ignore.tags
Scintilla:
- SCI_GETTEXT, SCI_GETSELTEXT, and SCI_GETCURLINE behaviorial changes
- Autocompletion on Wayland (see #3009)
Lexilla:
- New parsers: gdscript (see #3012) and asciidoc (see #2986) but not imported yet
* Update Scintilla to version 5.1.1
A few notes:
- C++17 is required
Not exactly new since we already imported the latest julia lexer.
- upstream split out lexers into a lexilla library
We do "comply" by building a separate static library. So in effect, all
lexers are built-in like before. In the future it may be possible to add
lexer plugins at runtime.
- Lexer IDs are deprecated in favor of names
For now we use LexerNameFromID() to map IDs to names but we should
transition to names soon.
That being said, the upstream transition seems also not complete.
There is no name-based version of SCI_GETLEXER, so we're stuck with IDs
there.
Closes#2824
* Update scintilla_changes.patch
The "which lexers" part is now a separate function that should be less
of a pain when updating to scintilla version that adds lexers.
* Update update-scintilla.sh
You need to extract lexilla sources too now and pass it to the script.
Also the script calls dos2unix for the files, kill that CRLF!
Changes in the bundle creation script:
- the GTK (and other dependencies) bundle is now created for the x86_64
platform
- the new parameter "-x" allows to run script on a Linux system using
Wine, therefore it is necessary to run the post-install scripts after
all packages have been extracted.
- use "-Sdd" for Pacman to ignore dependencies as we resolve them
manually
- do not use "tar -x --xz" as Pacman nowadays also downloads .zst
packages, instead just download the file and let tar choose the format
automatically based on the filename
- install grep with Pacman as the build and target platform are now
identical
- update GTK dependencies to match current packages
Newer versions of libxml2 (used by lxml) crash in tostring() when no
encoding argument is present. Passing "unicode" as encoding makes
tostring() returning already a Python unicode string, so we don't
need to decode it anymore.
The script:
1. Copies all parsers from universal ctags not starting with geany_
2. Copies all files from universal ctags main
3. Prints files which were added/removed to/from main so the corresponding
changes can be done manually in Makefile.am
4. Patches main with the provided patch
* Replace `--enable-gtk3` with `--enable-gtk2`
* Update Travis CI builds
* Change `cross-build-mingw.sh` default to GTK3 and cleanup a little
After this commit it will be required to pass `--enable-gtk2` to
the Autoconf script in order to build with GTK+2, otherwise GTK+3
will be required.
We do not need those anymore in Geany directly. But there are still some
plugins using this API instead of Geany's spawn API.
So to support those plugins, provide the GLib helper binaries.
And so remove the current year to ease maintenance and since it is not
strictly necessary.
Also remove individual copyright holders (where appropriate) and replace
the name with "The Geany contributors". The detailed authorship
information is still available in the GIT history.
Also remove copyright notice and author names from READMEs.
We can now use @array and @arraylen{param} annotations for arrays that
will make it to the generated gtkdoc header.
g-ir-scanner cannot properly parse 'gchar **' parameters without this.
* Update Scintilla to version 3.7.5
This now requires a C++11-capable compiler.
Closes#1308.
* Test using newer dist on Travis
Since Scintilla needs C++11
* Add debugging code for when configure fails
* Workaround a pkg-config-corsswrapper bug on Ubuntu 14.04
See https://bugs.launchpad.net/ubuntu/+source/mingw-w64/+bug/1327242