Skip to content

Commit

Permalink
Added Dynamix configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
ChielBruin committed Aug 29, 2019
1 parent c5c3712 commit ebe4172
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions spoofax-pygments/lexers/dynamix_lexer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class DynamixLexer(AbstractSpoofaxLexer):
def __init__(self, **options):
table_location = 'dnx.tbl'
types = {
'LAYOUT': Comment,
'INT': Number.Integer,
'STRING': String.Double,
'ID': Name.Variable,
'PRIMNAME': Name.Builtin,
'CONSTRUCTOR': Name.Namespace,
'DEFNAME': Name.Function,
'CONTNAME': Name.Constant,
'LABEL': Name.Label,
'LINKNAME': Name.Label,
'NAMESPACE': Name.Namespace,
'MODULENAME': Name.Constant,

'Imports': Keyword.Declaration,
'Import': Name.Namespace,
'Header': Keyword.Declaration,
'Module': Keyword.Declaration,
'ModuleElem': Text,

'Definitions': Keyword.Declaration,
'Definition.Def': Text,
'Definition.TypeDef': Name.Decorator,
'Instruction': Name.Keyword
}
super(DynamixLexer, self).__init__('DynamixLexer', table_location, types, default_type=Text, **options)
1 change: 1 addition & 0 deletions spoofax-pygments/lexers/tables/dnx.tbl

Large diffs are not rendered by default.

0 comments on commit ebe4172

Please sign in to comment.