Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding forth ctags (optlib based) #3810

Closed
wants to merge 1 commit into from

Conversation

masatake
Copy link
Member

(@masatake converted to the original forth.c proposed in #3809 to forth.ctags.)

(@masatake converted to the original forth.c proposed in universal-ctags#3809 to
forth.ctags.)
@masatake masatake mentioned this pull request Sep 10, 2023
@codecov
Copy link

codecov bot commented Sep 10, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.04% ⚠️

Comparison is base (f7e27b4) 85.06% compared to head (18f4f91) 85.03%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3810      +/-   ##
==========================================
- Coverage   85.06%   85.03%   -0.04%     
==========================================
  Files         226      227       +1     
  Lines       53857    53878      +21     
==========================================
  Hits        45816    45816              
- Misses       8041     8062      +21     
Files Changed Coverage Δ
optlib/forth.c 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@masatake
Copy link
Member Author

@farvardin we need more test cases that show this optlib-based implementation doesn't satisfy you.

What I need are pairs of (input.forth, expecected.tags).

@farvardin
Copy link
Contributor

@farvardin we need more test cases that show this optlib-based implementation doesn't satisfy you.

What I need are pairs of (input.forth, expecected.tags).

It should be satisfying :)
It just doesn't look comptatible with geany, but other IDE are using ctags anyway...

I've put some examples there:

#3809 (comment)

@farvardin
Copy link
Contributor

What I need are pairs of (input.forth, expecected.tags).

I've managed to make a working optlib regex:

--kinddef-Forth=w,word,words
--kinddef-Forth=v,variable,variables
--kinddef-Forth=c,constant,constants

--regex-Forth=/^:[[:space:]]*([^[:space:]]+)/\1/w/
--regex-Forth=/^(variable|VARIABLE)[[:space:]]*([^[:space:]]+)/\2/v/
--regex-Forth=/^([[:alnum:]]+)[[:space:]](constant|CONSTANT)[[:space:]]*([^[:space:]]+)/\3/c/

it should catch correctly to give this result:

DUMMY1	input.fth	/^10 constant DUMMY1$/;"	c
DUMMY2	input.fth	/^12 constant DUMMY2$/;"	c
dummy3	input.fth	/^variable dummy3$/;"	v
dummy4	input.fth	/^variable dummy4$/;"	v
dummy5	input.fth	/^VARIABLE dummy5$/;"	v
fizz?	input.fth	/^: fizz?  $/;"	w
buzz?	input.fth	/^: buzz?  $/;"	w
fizz-buzz?	input.fth	/^: fizz-buzz?  $/;"	w
do-fizz-buzz	input.fth	/^: do-fizz-buzz  $/;"	w

I'll make a PR ASAP (on a branch this time)

@farvardin farvardin mentioned this pull request Sep 11, 2023
@masatake
Copy link
Member Author

See #3812.

@masatake masatake closed this Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants