diff --git a/README.md b/README.md index 17d9dfe..4ef5f06 100644 --- a/README.md +++ b/README.md @@ -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`) @@ -162,7 +163,6 @@ Note: support for specific languages is strictly community maintained and can br - [ ] `pioasm` - [ ] `po` - [ ] `poe_filter` - - [ ] `proto` - [ ] `prql` - [ ] `pug` - [ ] `ql` diff --git a/queries/proto/context.scm b/queries/proto/context.scm new file mode 100644 index 0000000..9745cf7 --- /dev/null +++ b/queries/proto/context.scm @@ -0,0 +1,4 @@ +([ + (enum) + (message) +] @context) diff --git a/test/lang/test.proto b/test/lang/test.proto new file mode 100644 index 0000000..ac16eaa --- /dev/null +++ b/test/lang/test.proto @@ -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}} +} + + + + + + + + + + + + + + + +