-
Notifications
You must be signed in to change notification settings - Fork 625
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
WIP: Vala #2320
WIP: Vala #2320
Conversation
edac74d
to
d4c1fc3
Compare
I think this is a wrong way to approach the implementation. |
Reopening this as is the only acceptable approach to include vala into ctags. |
Codecov Report
@@ Coverage Diff @@
## master #2320 +/- ##
==========================================
+ Coverage 86.25% 86.29% +0.03%
==========================================
Files 176 177 +1
Lines 35717 35921 +204
==========================================
+ Hits 30808 30997 +189
- Misses 4909 4924 +15
Continue to review full report at Codecov.
|
/* * Vala Hello World */ void main(string[] args) { print("Hello, World\n"); } [jet@living]~/var/ctags% ./ctags -o - /tmp/foo.vala main /tmp/foo.vala /^void main(string[] args) {$/;" m
7e823e8
to
1b1b9eb
Compare
f405135
to
538a597
Compare
@masatake I have first question on this parsers: How to detect a vala field (inside a class) and a property (field with
Understanding this seems the key to me. (maybe I should reread the links you suggest right now?) |
Please show the pair of "input.vala" and "exepected.tags". The pair is very important for me to understand what you need. If you cannot image "expected.tags" for the input, I cannot help you. In that case, what you have to do is reading ctags(1) man page carefully. |
I added a review comment in Thanks for help here! |
I promised @k-takata I will focus on releasing related work till we can find a long term volunteer who drives the documentation related work of this project. So I will show only sample code. I hope it helps you. |
$ cat foo.vala void main(string[] args) { print("Hello, World\n"); } class Address { public string street; } $ ./ctags -o - ./foo.vala ./ctags -o - ./foo.vala Address ./foo.vala /^class Address {$/;" c language:Vala main ./foo.vala /^void main(string[] args) {$/;" m language:Vala
$ cat foo.vala void main(string[] args) { print("Hello, World\n"); } class Address { public string street; int floor; } $ ./ctags -o - --fields=+a ./foo.vala ./ctags -o - --fields=+a ./foo.vala Address ./foo.vala /^class Address {$/;" c language:Vala floor ./foo.vala /^ int floor; $/;" f language:Vala class:Address typeref:unknown:int main ./foo.vala /^void main(string[] args) {$/;" m language:Vala street ./foo.vala /^ public string street;$/;" f language:Vala class:Address typeref:typename:string access:public Signed-off-by: Masatake YAMATO <yamato@redhat.com>
$ cat foo.vala void main(string[] args) { print("Hello, World\n"); } class Address { public string street; int floor; } class Person { public Address address; public string name {get; set;} } $ ./ctags --sort=no -o - --fields=+a ./foo.vala main ./foo.vala /^void main(string[] args) {$/;" m language:Vala Address ./foo.vala /^class Address {$/;" c language:Vala street ./foo.vala /^ public string street;$/;" f language:Vala class:Address typeref:typename:string access:public floor ./foo.vala /^ int floor; $/;" f language:Vala class:Address typeref:unknown:int Person ./foo.vala /^class Person {$/;" c language:Vala address ./foo.vala /^ public Address address;$/;" f language:Vala class:Person typeref:unknown:Address access:public name ./foo.vala /^ public string name {get; set;}$/;" p language:Vala class:Person typeref:typename:string access:public
See #621. I updated my branch. |
@masatake I think I get it. I rebase this on top of your branch (I rebased on top of master too.
|
* tokenCat * tokenLast Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…eninfo Signed-off-by: Masatake YAMATO <yamato@redhat.com>
$ cat /tmp/foo.vala class Person { public Data.Address address; } $ ./ctags -o - /tmp/foo.vala Person /tmp/foo.vala /^class Person {$/;" c address /tmp/foo.vala /^ public Data.Address address;$/;" f class:Person typeref:class:Data.Address
$ cat /tmp/foo.vala /* * Vala Hello World */ void main(string[] args) { print("Hello, World\n"); $ ./ctags -o - --fields=+S /tmp/foo.vala main /tmp/foo.vala /^void main(string[] args) {$/;" m signature:(string [] args)
$ cat /tmp/foo.vala void main(string[] args) { print("Hello, World\n"); } class Address { public string street; int floor; } class Person { public Address address; public string name {get; set;} } $ ./ctags -o - --sort=no --extras=+q /tmp/foo.vala main /tmp/foo.vala /^ void main(string[] args) {$/;" m language:Vala Address /tmp/foo.vala /^ class Address {$/;" c language:Vala street /tmp/foo.vala /^ public string street;$/;" f language:Vala class:Address typeref:typename:string Address.street /tmp/foo.vala /^ public string street;$/;" f language:Vala class:Address typeref:typename:string floor /tmp/foo.vala /^ int floor;$/;" f language:Vala class:Address typeref:unknown:int Address.floor /tmp/foo.vala /^ int floor;$/;" f language:Vala class:Address typeref:unknown:int Person /tmp/foo.vala /^ class Person {$/;" c language:Vala address /tmp/foo.vala /^ public Address address;$/;" f language:Vala class:Person typeref:unknown:Address Person.address /tmp/foo.vala /^ public Address address;$/;" f language:Vala class:Person typeref:unknown:Address name /tmp/foo.vala /^ public string name {get; set;}$/;" p language:Vala class:Person typeref:typename:string Person.name /tmp/foo.vala /^ public string name {get; set;}$/;" p language:Vala class:Person typeref:typename:string
4d2f4ed
to
1c3b2ad
Compare
if, while, for shouldn't be detected as methods
Closing in favor of masatake#6 where the development is really happening |
Work in progress for vala parser.
Written from scratch.
Right now is just a plain copy/paste from tcl parser
relates to #621