Verified Commit aa020adc authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fix highlighting of multiline comments.

parent 919cec4c
# Copyright (C) 2018-2019 Dynare Team # Copyright (C) 2018-2021 Dynare Team
# #
# This file is part of Dynare. # This file is part of Dynare.
# #
...@@ -70,7 +70,8 @@ class DynareLexer(RegexLexer): ...@@ -70,7 +70,8 @@ class DynareLexer(RegexLexer):
tokens = { tokens = {
'root': [ 'root': [
(r'\s*(%|//).*$', Comment), (r'\s*(%|//).*$', Comment.Single),
(r'/(\\\n)?[*][\w\W]*?[*](\\\n)?/', Comment.Multiline),
(words(( (words((
'model','steady_state_model','initval','endval','histval','epilogue', 'model','steady_state_model','initval','endval','histval','epilogue',
...@@ -81,6 +82,7 @@ class DynareLexer(RegexLexer): ...@@ -81,6 +82,7 @@ class DynareLexer(RegexLexer):
'moment_calibration','identification','svar_identification', 'moment_calibration','identification','svar_identification',
'verbatim','end','node','cluster','paths','hooks'), prefix=r'\b', suffix=r'\s*\b'),Keyword.Reserved), '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, (words(commands + report_commands,
prefix=r'\b', suffix=r'\s*\b'), Name.Entity), prefix=r'\b', suffix=r'\s*\b'), Name.Entity),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment