Skip to content
This repository has been archived by the owner on Oct 1, 2023. It is now read-only.

Commit

Permalink
Undo support for v variable definitions
Browse files Browse the repository at this point in the history
See the `README.md` change.
I was too eager to enable things without actually checking if they work.
Partially reverts 2374ff1 (#6)
  • Loading branch information
ParadoxV5 committed Jul 5, 2023
1 parent f12765f commit c6811ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ exit !bytes.zero? # `#qoi_write` returns 0 on failure
* Miscellaneous
* `t` typedefs
* `x` external and forward variable declarations
* `v` variable definitions

### 📝 Developing
* Structs/Unions
Expand Down Expand Up @@ -95,7 +94,9 @@ exit !bytes.zero? # `#qoi_write` returns 0 on failure

### 🧊 Nope
* Non-literal Macros (i.e., C code macros)
* Miscellaneous Ctags Kinds
* Miscellaneous u-ctags Kinds
* `v` variable definitions
* Unlike `x`, these are not exported to dynamic libraries (`.so`s).
* `l` local variables
* `L` goto labels

Expand Down
4 changes: 2 additions & 2 deletions lib/ffi/uctags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def ffi_const(name)
def call(library_name, header_path, &blk)
instance = new(library_name)
#noinspection SpellCheckingInspection this command use letter flags
cmd = %w[ctags --language-force=C --param-CPreProcessor._expand=1 --kinds-C=defgmpstuvxz --fields=NFPkSst --fields-C={macrodef} -nuo -] #: Array[_ToS]
cmd = %w[ctags --language-force=C --param-CPreProcessor._expand=1 --kinds-C=defgmpstuxz --fields=NFPkSst --fields-C={macrodef} -nuo -] #: Array[_ToS]
cmd.insert(2, '-V') if $DEBUG
cmd << header_path
# Run and pipe-read. `err: :err` connects command stderr to Ruby stderr
Expand Down Expand Up @@ -385,7 +385,7 @@ def process(k, name, fields)
typedef name.to_sym
when 'd' # macro definitions
# https://github.com/ParadoxV5/FFI-UCtags/issues/2
when 'x', 'v' # external and forward variable declarations, variable definitions
when 'x' # external and forward variable declarations
new_construct
@library.attach_variable name, extract_and_process_type
else
Expand Down

0 comments on commit c6811ec

Please sign in to comment.