Skip to content

Commit

Permalink
Add new keywords ndk_header and rust_type.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Sep 5, 2023
1 parent e2244fa commit 406de92
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Added new keywords `ndk_header` and `rust_type`.

## [0.1.1]

- Fixed issue with declarations nested under interface, parcelable, and union declarations.
Expand Down
17 changes: 11 additions & 6 deletions syntaxes/aidl.tmLanguage.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,20 @@ repository:
'5': {name: punctuation.definition.generic.end.aidl}
'6': {name: punctuation.terminator.aidl}
- name: meta.parcelable.aidl
match: '(parcelable)\s+((?:[_a-zA-Z][_a-zA-Z0-9]*)(?:\.([_a-zA-Z][_a-zA-Z0-9]*))*)\s*(cpp_header)\s*(")([^\"]*)(")(;)'
match: '(parcelable)\s+((?:[_a-zA-Z][_a-zA-Z0-9]*)(?:\.([_a-zA-Z][_a-zA-Z0-9]*))*)\s*(;)?'
captures:
'1': {name: storage.type.parcelable.aidl}
'2': {name: entity.name.type.parcelable.aidl}
'3': {name: keyword.aidl}
'4': {name: punctuation.definition.string.begin.aidl}
'5': {name: string.quoted.double.aidl}
'6': {name: punctuation.definition.string.end.aidl}
'7': {name: punctuation.terminator.aidl}
'3': {name: punctuation.terminator.aidl}
- name: meta.parcelable.aidl
match: '(cpp_header|ndk_header|rust_type)\s*(")([^\"]*)(")'
captures:
'1': {name: keyword.aidl}
'2': {name: punctuation.definition.string.begin.aidl}
'3': {name: string.quoted.double.aidl}
'4': {name: punctuation.definition.string.end.aidl}
- name: punctuation.terminator.aidl
match: ';'
# enum_decl
- name: meta.enum.aidl
begin: '(enum)\s+([_a-zA-Z][_a-zA-Z0-9]*)\s*(\{)'
Expand Down
24 changes: 17 additions & 7 deletions syntaxes/aidl.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
},
{
"name": "meta.parcelable.aidl",
"match": "(parcelable)\\s+((?:[_a-zA-Z][_a-zA-Z0-9]*)(?:\\.([_a-zA-Z][_a-zA-Z0-9]*))*)\\s*(cpp_header)\\s*(\")([^\\\"]*)(\")(;)",
"match": "(parcelable)\\s+((?:[_a-zA-Z][_a-zA-Z0-9]*)(?:\\.([_a-zA-Z][_a-zA-Z0-9]*))*)\\s*(;)?",
"captures": {
"1": {
"name": "storage.type.parcelable.aidl"
Expand All @@ -193,22 +193,32 @@
"name": "entity.name.type.parcelable.aidl"
},
"3": {
"name": "punctuation.terminator.aidl"
}
}
},
{
"name": "meta.parcelable.aidl",
"match": "(cpp_header|ndk_header|rust_type)\\s*(\")([^\\\"]*)(\")",
"captures": {
"1": {
"name": "keyword.aidl"
},
"4": {
"2": {
"name": "punctuation.definition.string.begin.aidl"
},
"5": {
"3": {
"name": "string.quoted.double.aidl"
},
"6": {
"4": {
"name": "punctuation.definition.string.end.aidl"
},
"7": {
"name": "punctuation.terminator.aidl"
}
}
},
{
"name": "punctuation.terminator.aidl",
"match": ";"
},
{
"name": "meta.enum.aidl",
"begin": "(enum)\\s+([_a-zA-Z][_a-zA-Z0-9]*)\\s*(\\{)",
Expand Down

0 comments on commit 406de92

Please sign in to comment.