diff --git a/C++11.tmLanguage b/C++11.tmLanguage index 845c8f7..394db90 100644 --- a/C++11.tmLanguage +++ b/C++11.tmLanguage @@ -45,7 +45,7 @@ begin - R"([a-zA-Z_]*)\( + R"([\p{Alpha}_]*)\( beginCaptures 0 @@ -118,19 +118,19 @@ comment common C constant naming idiom -- kConstantVariable match - \bk[A-Z]\w*\b + \bk\p{Upper}\w*\b name constant.other.variable.mac-classic.c++ match - \bg[A-Z]\w*\b + \bg\p{Upper}\w*\b name variable.other.readwrite.global.mac-classic.c++ match - \bs[A-Z]\w*\b + \bs\p{Upper}\w*\b name variable.other.readwrite.static.mac-classic.c++ @@ -220,12 +220,12 @@ begin (?x) ^\s*\#\s*(define)\s+ # define - ((?:[a-zA-Z_][a-zA-Z0-9_]*)) # macro name + ((?:[\p{Alpha}_]\w*)) # macro name (?: # and optionally: (\() # an open parenthesis ( - \s* [a-zA-Z_][a-zA-Z0-9_]* \s* # first argument - (?:(,) \s* [a-zA-Z_][a-zA-Z0-9_]* \s*)* # additional arguments + \s* [\p{Alpha}_]\w* \s* # first argument + (?:(,) \s* [\p{Alpha}_]\w* \s*)* # additional arguments (?:\.\.\.)? # varargs ellipsis? ) (\)) # a close parenthesis @@ -455,12 +455,12 @@ (?: ^ # begin-of-line | (?: (?= \s ) (?<!else|new|return) (?<=\w) # or word + space before name - | (?= \s*[A-Za-z_] ) (?<!&&) (?<=[*&>]) # or type modifier before name + | (?= \s*[\p{Alpha}_] ) (?<!&&) (?<=[*&>]) # or type modifier before name ) ) (\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate|sizeof|alignof)\s*\() ( - (?: [~A-Za-z_]\w*+ | :: | <(\w+,?\s*)++> )++ | # actual name + (?: [~\p{Alpha}_]\w*+ | :: | <(\w+,?\s*)++> )++ | # actual name (?: (?<=operator) (?: [-*&<>=+!]+ | \(\) | \[\] ) ) # if it is a C++ operator ) \s*(?=\() @@ -536,7 +536,7 @@ comment common C++ instance var naming idiom -- fMemberName match - \b(f|m)[A-Z]\w*\b + \b(f|m)\p{Upper}\w*\b name variable.other.readwrite.member.c++ @@ -588,7 +588,7 @@ (?: ^ # begin-of-line | (?: (?<!else|new|=) ) # or word + space before name ) - ((?:[A-Za-z_]\w*::)*+~[A-Za-z_]\w*) # actual name + ((?:[\p{Alpha}_]\w*::)*+~[\p{Alpha}_]\w*) # actual name \s*(\() # start bracket or end-of-line beginCaptures @@ -630,7 +630,7 @@ (?: ^ # begin-of-line | (?: (?<!else|new|=) ) # or word + space before name ) - ((?:[A-Za-z_]\w*::)*+~[A-Za-z_]\w*) # actual name + ((?:[\p{Alpha}_]\w*::)*+~[\p{Alpha}_]\w*) # actual name \s*(\() # terminating semi-colon beginCaptures @@ -672,7 +672,7 @@ access match - \.[a-zA-Z_]\w*\b(?!\s*\()|\->[a-zA-Z_]\w*\b(?!\s*\() + \.[\p{Alpha}_]\w*\b(?!\s*\()|\->[\p{Alpha}_]\w*\b(?!\s*\() name variable.other.dot-access.c++ @@ -775,7 +775,7 @@ match (?x) (?: (?= \s ) (?:(?<=else|new|return) | (?<!\w)) (\s+))? (\b - (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate|sizeof|alignof)\s*\()(?:(?!NS)[A-Za-z_]\w*+\b | :: )++ # actual name + (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate|sizeof|alignof)\s*\()(?:(?!NS)[\p{Alpha}_]\w*+\b | :: )++ # actual name ) \s*(\() name @@ -803,7 +803,7 @@ ) ) ( - (?: [A-Za-z_]\w*+ | :: )++ | # actual name + (?: [\p{Alpha}_]\w*+ | :: )++ | # actual name (?: (?<=operator) (?: [-*&<>=+!]+ | \(\) | \[\] ) )? # if it is a C++ operator ) \s*(\() @@ -1367,7 +1367,7 @@ begin (?x) (?: ^\s*) # begin-of-line - ((?!while|for|do|if|else|switch|catch|enumerate|r?iterate|sizeof|alignof)[A-Za-z_][A-Za-z0-9_:]*) # actual name + ((?!while|for|do|if|else|switch|catch|enumerate|r?iterate|sizeof|alignof)[\p{Alpha}_][\w:]*) # actual name \s*(\() # start bracket or end-of-line beginCaptures @@ -1407,7 +1407,7 @@ begin (?x) (:) # begin-of-line - ((?=\s*[A-Za-z_][A-Za-z0-9_:]* # actual name + ((?=\s*[\p{Alpha}_][\w:]* # actual name \s*(\())) # start bracket or end-of-line beginCaptures @@ -1438,7 +1438,7 @@ begin - (?mx)\b(namespace)\s+((?:[a-zA-Z_][a-zA-Z0-9_:]*)+)? + (?mx)\b(namespace)\s+((?:[\p{Alpha}_][\w:]*)+)? beginCaptures 1 @@ -1483,7 +1483,7 @@ match - \b(typedef)\s+.*\s+([_A-Za-z][_A-Za-z0-9]*); + \b(typedef)\s+.*\s+([\p{Alpha}_]\w*); captures 1 @@ -1502,7 +1502,7 @@ begin - \b(class|struct)\s+([_A-Za-z][_A-Za-z0-9]*\b) + \b(class|struct)\s+([\p{Alpha}_]\w*\b) beginCaptures 1