Fix highlighting of multiline comments.

time-shift
Stéphane Adjemian (Charybdis) 2021-04-21 10:54:27 +02:00
parent 919cec4c0f
commit aa020adc7f
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2018-2019 Dynare Team
# Copyright (C) 2018-2021 Dynare Team
#
# This file is part of Dynare.
#
@ -70,7 +70,8 @@ class DynareLexer(RegexLexer):
tokens = {
'root': [
(r'\s*(%|//).*$', Comment),
(r'\s*(%|//).*$', Comment.Single),
(r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline),
(words((
'model','steady_state_model','initval','endval','histval','epilogue',
@ -81,6 +82,7 @@ class DynareLexer(RegexLexer):
'moment_calibration','identification','svar_identification',
'verbatim','end','node','cluster','paths','hooks'), prefix=r'\b', suffix=r'\s*\b'),Keyword.Reserved),
# FIXME: Commands following multiline comments are not highlighted properly.
(words(commands + report_commands,
prefix=r'\b', suffix=r'\s*\b'), Name.Entity),