From: Ben Beltran Date: Sat, 5 Sep 2015 20:35:21 +0000 (-0500) Subject: Fixes language files so they work on sublime X-Git-Url: https://git.r.bdr.sh/rbdr/api-notation.tmLanguage/commitdiff_plain/3421ec3df3e3350f2a931a30798cae65230a8d0c?hp=-c Fixes language files so they work on sublime --- 3421ec3df3e3350f2a931a30798cae65230a8d0c diff --git a/api-notation.YAML-tmLanguage b/api-notation.YAML-tmLanguage index e1f8462..d731252 100644 --- a/api-notation.YAML-tmLanguage +++ b/api-notation.YAML-tmLanguage @@ -5,13 +5,16 @@ scopeName: source.api-notation fileTypes: ['api'] uuid: fc8dc5cf-b7aa-4b64-a665-80e8dc1b2553 patterns: - - begin: '^([a-zA-Z0-9_.]+)' + - begin: '([a-zA-Z0-9_.]+)' end: '\n' name: constant.language patterns: - include: '#dataTypes' - include: '#comment' - - begin: '[ \t]*' + - begin: '^//.*' + end: '\n' + name: 'comment.line' + - begin: '[ \t]+' end: '\n' patterns: - include: '#apiMember' @@ -26,15 +29,15 @@ patterns: - include: '#comment' repository: dataTypes: - begin: '\\<' - end: '\\>' + begin: '\<' + end: '\>' name: 'keyword.operator' patterns: - include: '#dataType' - include: '#separators' parameterList: - begin: '\\(' - end: '\\)' + begin: '\(' + end: '\)' name: 'keyword.operator' patterns: - 'include': '#parameters' @@ -48,18 +51,18 @@ repository: match: '[a-zA-Z0-9_.]+' name: 'string.other' optionalParameters: - begin: '\\[' - end: '\\]' + begin: '\[' + end: '\]' patterns: - 'include': '#optionalParameter' optionalParameter: match: '[a-zA-Z0-9_.]+' - name: 'meta.separator' + name: 'comment.line' separators: - match: '\\||,' + match: '\||,' name: 'comment.line' apiMember: - match: '((?:<\\+)|(?:<\\~)|(?:<\\-)|(?:\\+>)|(?:\\~>)|(?:\\->)|\\-|\\+|(?:::)|#)([a-zA-z0-9_]+)' + match: '((?:<\+)|(?:<\~)|(?:<\-)|(?:\+>)|(?:\~>)|(?:\->)|\-|\+|(?:::)|#)([a-zA-z0-9_]+)' captures: '1': name: 'keyword.control' @@ -69,5 +72,5 @@ repository: match: '[ \t]*//[ \t]*.*' name: 'comment.line' operators: - match: '(?:\\->)|(?:\\=>)' + match: '(?:\->)|(?:\=>)' name: 'keyword.control' \ No newline at end of file diff --git a/api-notation.tmLanguage b/api-notation.tmLanguage index a7200de..e546929 100644 --- a/api-notation.tmLanguage +++ b/api-notation.tmLanguage @@ -12,7 +12,7 @@ begin - ^([a-zA-Z0-9_.]+) + ([a-zA-Z0-9_.]+) end \n name @@ -31,7 +31,15 @@ begin - [ \t]* + ^//.* + end + \n + name + comment.line + + + begin + [ \t]+ end \n patterns @@ -94,7 +102,7 @@ match - ((?:<\\+)|(?:<\\~)|(?:<\\-)|(?:\\+>)|(?:\\~>)|(?:\\->)|\\-|\\+|(?:::)|#)([a-zA-z0-9_]+) + ((?:<\+)|(?:<\~)|(?:<\-)|(?:\+>)|(?:\~>)|(?:\->)|\-|\+|(?:::)|#)([a-zA-z0-9_]+) comment @@ -113,9 +121,9 @@ dataTypes begin - \\< + \< end - \\> + \> name keyword.operator patterns @@ -133,7 +141,7 @@ operators match - (?:\\->)|(?:\\=>) + (?:\->)|(?:\=>) name keyword.control @@ -142,14 +150,14 @@ match [a-zA-Z0-9_.]+ name - meta.separator + comment.line optionalParameters begin - \\[ + \[ end - \\] + \] patterns @@ -161,9 +169,9 @@ parameterList begin - \\( + \( end - \\) + \) name keyword.operator patterns @@ -196,7 +204,7 @@ separators match - \\||, + \||, name comment.line