diff --git a/Syntaxes/Thrift.tmLanguage b/Syntaxes/Thrift.tmLanguage
index e6ecaa1..570b386 100644
--- a/Syntaxes/Thrift.tmLanguage
+++ b/Syntaxes/Thrift.tmLanguage
@@ -144,7 +144,7 @@
comment
begin the definition list
end
- $ ^
+ (?x)$.^ # this regex should never end
patterns
@@ -686,7 +686,7 @@
match
- (#).*
+ #.*\n?
name
comment.line.number-sign.thrift
@@ -700,7 +700,7 @@
match
- (//).*
+ //.*\n?
name
comment.line.double-slash.thrift
@@ -777,7 +777,7 @@
end
- [,;]|$
+ [,;]|(?=\))|$
endCaptures
0
@@ -820,14 +820,14 @@
end
- (?=[,;])|$
+ (?=[,;]|\))|$
patterns
begin
=
end
- [,;]|$
+ (?=[,;]|\))|$
patterns