141 lines
2.3 KiB
Plaintext
141 lines
2.3 KiB
Plaintext
![]() |
======================================================
|
||
|
Function definition with no arguments [block_commands]
|
||
|
======================================================
|
||
|
|
||
|
function(fn)
|
||
|
endfunction()
|
||
|
|
||
|
---
|
||
|
(source_file
|
||
|
(function_def
|
||
|
(function_command
|
||
|
(function)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
)
|
||
|
(endfunction_command
|
||
|
(endfunction)
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
|
||
|
========================================================
|
||
|
Function definition with many arguments [block_commands]
|
||
|
========================================================
|
||
|
|
||
|
function(fn arg1 arg2 arg3)
|
||
|
endfunction()
|
||
|
|
||
|
---
|
||
|
(source_file
|
||
|
(function_def
|
||
|
(function_command
|
||
|
(function)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
)
|
||
|
(endfunction_command
|
||
|
(endfunction)
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
|
||
|
===================================================
|
||
|
Macro definition with no arguments [block_commands]
|
||
|
===================================================
|
||
|
|
||
|
macro(fn)
|
||
|
endmacro()
|
||
|
|
||
|
---
|
||
|
(source_file
|
||
|
(macro_def
|
||
|
(macro_command
|
||
|
(macro)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
)
|
||
|
(endmacro_command
|
||
|
(endmacro)
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
|
||
|
========================================================
|
||
|
macro definition with many arguments [block_commands]
|
||
|
========================================================
|
||
|
|
||
|
macro(fn arg1 arg2 arg3)
|
||
|
endmacro()
|
||
|
|
||
|
---
|
||
|
(source_file
|
||
|
(macro_def
|
||
|
(macro_command
|
||
|
(macro)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
)
|
||
|
(endmacro_command
|
||
|
(endmacro)
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
|
||
|
============================
|
||
|
Block scope [block_commands]
|
||
|
============================
|
||
|
|
||
|
block(SCOPE_FOR POLICIES VARIABLES PROPAGATE var)
|
||
|
endblock()
|
||
|
|
||
|
---
|
||
|
(source_file
|
||
|
(block_def
|
||
|
(block_command
|
||
|
(block)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
(argument
|
||
|
(unquoted_argument)
|
||
|
)
|
||
|
)
|
||
|
(endblock_command
|
||
|
(endblock)
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
|