mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-09 20:05:51 +00:00
add macros support
Macros should be declared as `aw_macro<name,arg1,arg2,...>{{macro body}}` and then they may be used as `aw_name<arg1,arg2,...>{{}}`. It just puts `macro body` to pattern and replaces arguments to provided ones according to macro call. E.g.: ``` $aw_macro<test,phrase>{{phrase}}$aw_test<hello world>{{}} ``` will transform into ``` hello world ```
This commit is contained in:
@ -342,6 +342,7 @@ void AWKeyOperations::reinitKeys()
|
||||
m_pattern = AWPatternFunctions::insertKeyCount(m_pattern, allKeys);
|
||||
m_pattern = AWPatternFunctions::insertKeyNames(m_pattern, allKeys);
|
||||
m_pattern = AWPatternFunctions::insertKeys(m_pattern, allKeys);
|
||||
m_pattern = AWPatternFunctions::insertMacros(m_pattern);
|
||||
// wrap templates
|
||||
m_pattern = AWPatternFunctions::expandTemplates(m_pattern);
|
||||
|
||||
|
Reference in New Issue
Block a user