config/syntax/R.rb in ver-2010.02 vs config/syntax/R.rb in ver-2010.08

- old
+ new

@@ -1,35 +1,35 @@ # Encoding: UTF-8 {fileTypes: ["R", "r", "s", "S", "Rprofile"], - foldingStartMarker: /^[^#]*(\([^\)]*$|\{\s*$)/, - foldingStopMarker: /(^\s*\)|^\s*\})/, + foldingStartMarker: /^[^#]*(?<_1>\([^\)]*$|\{\s*$)/, + foldingStopMarker: /(?<_1>^\s*\)|^\s*\})/, keyEquivalent: "^~R", name: "R", patterns: [{captures: {1 => {name: "punctuation.definition.comment.r"}}, - match: /(#).*$\n?/, + match: /(?<_1>#).*$\n?/, name: "comment.line.number-sign.r"}, {match: - /\b(logical|numeric|character|complex|matrix|array|data\.frame|list|factor)(?=\s*\()/, + /\b(?<_1>logical|numeric|character|complex|matrix|array|data\.frame|list|factor)(?=\s*\()/, name: "storage.type.r"}, {match: - /\b(function|if|break|next|repeat|else|for|return|switch|while|in|invisible)\b/, + /\b(?<_1>function|if|break|next|repeat|else|for|return|switch|while|in|invisible)\b/, name: "keyword.control.r"}, {match: - /\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(i|L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b/, + /\b(?<_1>(?<_2>0(?<_3>x|X)[0-9a-fA-F]*)|(?<_4>(?<_5>[0-9]+\.?[0-9]*)|(?<_6>\.[0-9]+))(?<_7>(?<_8>e|E)(?<_9>\+|-)?[0-9]+)?)(?<_10>i|L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b/, name: "constant.numeric.r"}, - {match: /\b(T|F|TRUE|FALSE|NULL|NA|Inf|NaN)\b/, + {match: /\b(?<_1>T|F|TRUE|FALSE|NULL|NA|Inf|NaN)\b/, name: "constant.language.r"}, - {match: /\b(pi|letters|LETTERS|month\.abb|month\.name)\b/, + {match: /\b(?<_1>pi|letters|LETTERS|month\.abb|month\.name)\b/, name: "support.constant.misc.r"}, - {match: /(\-|\+|\*|\/|%\/%|%%|%\*%|%in%|%o%|%x%|\^)/, + {match: /(?<_1>\-|\+|\*|\/|%\/%|%%|%\*%|%in%|%o%|%x%|\^)/, name: "keyword.operator.arithmetic.r"}, - {match: /(=|<-|<<-|->|->>)/, name: "keyword.operator.assignment.r"}, - {match: /(==|!=|<>|<|>|<=|>=)/, name: "keyword.operator.comparison.r"}, - {match: /(!|&{1,2}|[|]{1,2})/, name: "keyword.operator.logical.r"}, - {match: /(\.\.\.|\$|@|:|\~)/, name: "keyword.other.r"}, + {match: /(?<_1>=|<-|<<-|->|->>)/, name: "keyword.operator.assignment.r"}, + {match: /(?<_1>==|!=|<>|<|>|<=|>=)/, name: "keyword.operator.comparison.r"}, + {match: /(?<_1>!|&{1,2}|[|]{1,2})/, name: "keyword.operator.logical.r"}, + {match: /(?<_1>\.\.\.|\$|@|:|\~)/, name: "keyword.other.r"}, {begin: /"/, beginCaptures: {0 => {name: "punctuation.definition.string.begin.r"}}, end: "\"", endCaptures: {0 => {name: "punctuation.definition.string.end.r"}}, name: "string.quoted.double.r", @@ -42,23 +42,24 @@ patterns: [{match: /\\./, name: "constant.character.escape.r"}]}, {captures: {1 => {name: "entity.name.function.r"}, 2 => {name: "keyword.operator.assignment.r"}, 3 => {name: "keyword.control.r"}}, - match: /([[:alpha:].][[:alnum:]._]*)\s*(<-)\s*(function)/, + match: /(?<_1>[[:alpha:].][[:alnum:]._]*)\s*(?<_2><-)\s*(?<_3>function)/, name: "meta.function.r"}, {captures: {1 => {name: "entity.name.tag.r"}, 3 => {name: "entity.name.type.r"}}, match: - /(setMethod|setGeneric|setGroupGeneric|setClass)\s*\(\s*("|\x27)([a-zA-Z._\[\$@][a-zA-Z0-9._\[]*?)\2/, + /(?<_1>setMethod|setGeneric|setGroupGeneric|setClass)\s*\(\s*(?<_2>"|\x27)(?<_3>[a-zA-Z._\[\$@][a-zA-Z0-9._\[]*?)\k<_2>/, name: "meta.method.declaration.r"}, - {match: /([[:alpha:].][[:alnum:]._]*)\s*\(/}, + {match: /(?<_1>[[:alpha:].][[:alnum:]._]*)\s*\(/}, {captures: {1 => {name: "variable.parameter.r"}, 2 => {name: "keyword.operator.assignment.r"}}, - match: /([[:alpha:].][[:alnum:]._]*)\s*(=)(?=[^=])/}, - {match: /\b([\d_][[:alnum:]._]+)\b/, + match: /(?<_1>[[:alpha:].][[:alnum:]._]*)\s*(?<_2>=)(?=[^=])/}, + {match: /\b(?<_1>[\d_][[:alnum:]._]+)\b/, name: "invalid.illegal.variable.other.r"}, - {match: /\b([[:alnum:]_]+)(?=::)/, name: "entity.name.type.namespace.r"}, - {match: /\b([[:alnum:]._]+)\b/, name: "variable.other.r"}], + {match: /\b(?<_1>[[:alnum:]_]+)(?=::)/, + name: "entity.name.type.namespace.r"}, + {match: /\b(?<_1>[[:alnum:]._]+)\b/, name: "variable.other.r"}], scopeName: "source.r", uuid: "B2E6B78D-6E70-11D9-A369-000D93B3A10E"}