Skip to content

Commit

Permalink
rust: detect all macros directly exported from std
Browse files Browse the repository at this point in the history
So far only a rather arbitrary subset was recognized.
  • Loading branch information
LingMan committed Oct 22, 2023
1 parent 2b7dfc8 commit e7ac1e2
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions src/basic-languages/rust/rust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,41 @@ export const language = <languages.IMonarchLanguage>{
constants: ['true', 'false', 'Some', 'None', 'Ok', 'Err'],

supportMacros: [
'assert!',
'assert_eq!',
'assert_ne!',
'cfg!',
'column!',
'compile_error!',
'concat!',
'dbg!',
'debug_assert!',
'debug_assert_eq!',
'debug_assert_ne!',
'env!',
'eprint!',
'eprintln!',
'file!',
'format!',
'format_args!',
'include!',
'include_bytes!',
'include_str!',
'is_x86_feature_detected!',
'line!',
'matches!',
'module_path!',
'option_env!',
'panic!',
'print!',
'println!',
'panic!',
'format_args!',
'stringify!',
'thread_local!',
'todo!',
'try!',
'unimplemented!',
'unreachable!',
'vec!',
'write!',
'writeln!'
],
Expand Down

0 comments on commit e7ac1e2

Please sign in to comment.