@@ -71,7 +71,7 @@ class ThingsDBLexer(RegexLexer):
7171 # name constants
7272 (r'(FULL|USER|GRANT|CHANGE|JOIN|RUN|QUERY|'
7373 r'DEBUG|INFO|WARNING|ERROR|CRITICAL|'
74- r'NO_IDS|INT_MIN|INT_MAX)\b' , Name .Constant ),
74+ r'NO_IDS|INT_MIN|INT_MAX|MATH_E|MATH_PI )\b' , Name .Constant ),
7575
7676 # regular expressions
7777 (r'(/[^/\\]*(?:\\.[^/\\]*)*/i?)' , String .Regex ),
@@ -124,7 +124,8 @@ class ThingsDBLexer(RegexLexer):
124124 r'run|assert_err|auth_err|bad_data_err|cancelled_err|'
125125 r'rename_type|forbidden_err|lookup_err|max_quota_err|node_err|'
126126 r'num_arguments_err|operation_err|overflow_err|syntax_err|'
127- r'collection_info|type_err|value_err|zero_div_err)'
127+ r'collection_info|type_err|value_err|zero_div_err|abs|ceil|cos|'
128+ r'exp|floor|log10|log2|loge|pow|sin|sqrt|tan)'
128129 r'(\()' ,
129130 bygroups (Name .Function , Punctuation ),
130131 'arguments' ),
@@ -141,7 +142,7 @@ class ThingsDBLexer(RegexLexer):
141142 (r'\s+' , Whitespace ),
142143 ],
143144 'comments' : [
144- (r'//(.*?)\n ' , Comment .Single ),
145+ (r'//(.*?)(\n|$) ' , Comment .Single ),
145146 (r'/\*' , Comment .Multiline , 'comment' ),
146147 ],
147148 'comment' : [
@@ -150,10 +151,6 @@ class ThingsDBLexer(RegexLexer):
150151 (r'\*/' , Comment .Multiline , '#pop' ),
151152 (r'[*/]' , Comment .Multiline ),
152153 ],
153- 'tstringescape' : [
154- (r'\{' , String .Escape ),
155- (r'\}' , String .Escape ),
156- ],
157154 'arguments' : [
158155 include ('expression' ),
159156 (',' , Punctuation ),
0 commit comments