From 2886fdf422493a5b8def4cd440171b061f413629 Mon Sep 17 00:00:00 2001 From: Yang Su Date: Mon, 29 Feb 2016 15:32:03 -0800 Subject: [PATCH] Allow dashes in import statements --- Protobuf.JSON-tmLanguage | 4 ++-- Protobuf.YAML-tmLanguage | 2 +- Protobuf.tmLanguage | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Protobuf.JSON-tmLanguage b/Protobuf.JSON-tmLanguage index 854ec7f..85987f4 100644 --- a/Protobuf.JSON-tmLanguage +++ b/Protobuf.JSON-tmLanguage @@ -268,7 +268,7 @@ "name": "keyword.source.proto" } }, - "match": "(package|import)(?=(\\s+)([\"]?[A-Za-z][A-Za-z0-9_./]*[\"]?)(;))" + "match": "(package|import)(?=(\\s+)([\"]?[A-Za-z][A-Za-z0-9-_./]*[\"]?)(;))" } } -} \ No newline at end of file +} diff --git a/Protobuf.YAML-tmLanguage b/Protobuf.YAML-tmLanguage index 8293d97..421fcaa 100644 --- a/Protobuf.YAML-tmLanguage +++ b/Protobuf.YAML-tmLanguage @@ -117,7 +117,7 @@ repository: match: (CODE\_SIZE|SPEED) packaging: - match: (package|import)(?=(\s+)(["]?[A-Za-z][A-Za-z0-9_./]*["]?)(;)) + match: (package|import)(?=(\s+)(["]?[A-Za-z][A-Za-z0-9-_./]*["]?)(;)) captures: '1': {name: keyword.source.proto} '2': {name: entity.name.tag} diff --git a/Protobuf.tmLanguage b/Protobuf.tmLanguage index ec1172a..9b07c57 100644 --- a/Protobuf.tmLanguage +++ b/Protobuf.tmLanguage @@ -348,7 +348,7 @@ match - (package|import)(?=(\s+)(["]?[A-Za-z][A-Za-z0-9_./]*["]?)(;)) + (package|import)(?=(\s+)(["]?[A-Za-z][A-Za-z0-9-_./]*["]?)(;)) service