Skip to content

Commit

Permalink
feat(proto): add proto support
Browse files Browse the repository at this point in the history
  • Loading branch information
aliaksandr-trush authored and lewis6991 committed Jul 4, 2024
1 parent 1ac390a commit 2e5aef3
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Note: support for specific languages is strictly community maintained and can br
- [x] `php`
- [x] `php_only`
- [x] `prisma`
- [x] `proto`
- [x] `python`
- [x] `r`
- [x] `ruby` (and `rspec`)
Expand Down Expand Up @@ -162,7 +163,6 @@ Note: support for specific languages is strictly community maintained and can br
- [ ] `pioasm`
- [ ] `po`
- [ ] `poe_filter`
- [ ] `proto`
- [ ] `prql`
- [ ] `pug`
- [ ] `ql`
Expand Down
4 changes: 4 additions & 0 deletions queries/proto/context.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
([
(enum)
(message)
] @context)
107 changes: 107 additions & 0 deletions test/lang/test.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@

syntax = "proto2"

package test;

// {{TEST}}
enum SomeEnum { // {{CONTEXT}}
UNDEFINED = 0

FIRST = 1

SECOND = 2

THIRD = 3

FORTH = 4
















FIFTH = 5

SIXTH = 6

SEVENTH = 7

EIGHTH = 8

NINTH = 9
// {{CURSOR}}
}



// {{TEST}}
message SomeMessage { // {{CONTEXT}}










optional SomeEnum someEnum = 1;

optional string name = 2;

optional int32 id = 3;

optional int32 age = 4;

optional bool isMale = 5;











optional int32 height = 6;

optional int32 weight = 7;

optional int32 score = 8;

optional int32 level = 9;




{{CURSOR}}
}
















0 comments on commit 2e5aef3

Please sign in to comment.