cairo_lang_semantic/inline_macros/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
mod array;
mod assert;
mod consteval_int;
mod format;
mod panic;
mod print;
mod write;

use cairo_lang_plugins::get_base_plugins;

use self::assert::AssertMacro;
use self::format::FormatMacro;
use self::panic::PanicMacro;
use self::print::{PrintMacro, PrintlnMacro};
use self::write::{WriteMacro, WritelnMacro};
use super::inline_macros::array::ArrayMacro;
use super::inline_macros::consteval_int::ConstevalIntMacro;
use crate::plugin::PluginSuite;

/// Gets the default plugin suite to load into the Cairo compiler.
pub fn get_default_plugin_suite() -> PluginSuite {
    let mut suite = PluginSuite { plugins: get_base_plugins(), ..Default::default() };
    suite
        .add_inline_macro_plugin::<ArrayMacro>()
        .add_inline_macro_plugin::<AssertMacro>()
        .add_inline_macro_plugin::<ConstevalIntMacro>()
        .add_inline_macro_plugin::<FormatMacro>()
        .add_inline_macro_plugin::<PanicMacro>()
        .add_inline_macro_plugin::<PrintMacro>()
        .add_inline_macro_plugin::<PrintlnMacro>()
        .add_inline_macro_plugin::<WriteMacro>()
        .add_inline_macro_plugin::<WritelnMacro>();
    suite
}