summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2014-05-20 07:34:32 -0700
committerTim Hatch <tim@timhatch.com>2014-05-20 07:34:32 -0700
commitcb9e8a8dd6f8d2d78c9084f2cb6a34118838c3af (patch)
treecedcd70a477dba38c06583b519efdeca11335994
parent13b47fd9064ac601454fff196b6e052107975a81 (diff)
downloadpygments-cb9e8a8dd6f8d2d78c9084f2cb6a34118838c3af.tar.gz
Go allows unicode for identifiers.
Resolves #983
-rw-r--r--pygments/lexers/compiled.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 77b11bf1..d52ab950 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -2106,6 +2106,8 @@ class GoLexer(RegexLexer):
aliases = ['go']
mimetypes = ['text/x-gosrc']
+ flags = re.MULTILINE | re.UNICODE
+
tokens = {
'root': [
(r'\n', Text),
@@ -2165,7 +2167,7 @@ class GoLexer(RegexLexer):
r'|<-|\+\+|--|==|!=|:=|\.\.\.|[+\-*/%&])', Operator),
(r'[|^<>=!()\[\]{}.,;:]', Punctuation),
# identifier
- (r'[a-zA-Z_]\w*', Name.Other),
+ (r'[^\W\d]\w*', Name.Other),
]
}