Skip to content

Commit

Permalink
Changed reg and removed xsl
Browse files Browse the repository at this point in the history
Co-authored-by: htcfreek <[email protected]>
  • Loading branch information
Aaron-Junker and htcfreek committed Apr 12, 2022
1 parent d3786ef commit 75359b4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
41 changes: 26 additions & 15 deletions src/modules/previewpane/MonacoPreviewHandler/customLanguages/reg.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,39 @@ export function regDefinition() {
tokenPostfix: '.reg',
tokenizer: {
root: [
// Header
[/Windows Registry Editor Version 5.00/, 'keyword'],
[/REGEDIT4/, 'keyword'],
// Header (case sensitive)
[/Windows Registry Editor Version 5.00/, 'comment'],
[/REGEDIT4/, 'comment'],
// Comments
[/;.*/, "comment"],
// Keys
[/\[\-.*\]/, 'invalid'],
[/\[/, 'number.float'],
[/\\.*\]/, 'number.float'],
[/\\.*[^\]]/, 'keyword'],
// Values
[/@=/, "keyword"],
[/@/, "keyword"],
[/\".*\"=\-/, "invalid"],
[/\".*\"=/, "keyword"],
[/\".*\"(?=\=)/, "keyword"],
[/\".*\"(?!\=)/, 'string'],
[/((hex\({0,1}[0-9,a,b]*\){0,1})|dword):.*/, "string"],
// Hive names
[/HKEY_CLASSES_ROOT/, 'constant'],
[/HKEY_LOCAL_MACHINE/, 'constant'],
[/HKEY_USERS/, 'constant'],
[/HKEY_CURRENT_USER/, 'constant'],
[/HKEY_PERFORMANCE_DATA/, 'constant'],
[/HKEY_DYN_DATA/, 'constant'],
[/hex\({0,1}[0-9,a,b]\)|hex|dword(?=\:)/, "type"],
[/[0-9,a-f,A-F][0-9,a-f,A-F],*/, 'string'],
// Hive names (case in-sensitive)
[/HKEY_CLASSES_ROOT/, 'type'],
[/HKEY_LOCAL_MACHINE/, 'type'],
[/HKEY_USERS/, 'type'],
[/HKEY_CURRENT_USER/, 'type'],
[/HKEY_PERFORMANCE_DATA/, 'type'],
[/HKEY_DYN_DATA/, 'type'],
[/hkey_classes_root/, 'type'],
[/hkey_local_machine/, 'type'],
[/hkey_users/, 'type'],
[/hkey_current_user/, 'type'],
[/hkey_performance_data/, 'type'],
[/hkey_dyn_data/, 'type'],
// Symbols (For better contrast on hc-black)
[/=/, 'delimiter'],
[/\[/, 'delimiter'],
[/]/, 'delimiter'],
[/:/, 'delimiter'],
]
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit 75359b4

@Aaron-Junker
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@htcfreek I added you as a co-author to this commit so you will also appear when the PR gets squashed and merged. Just FYI

Please sign in to comment.