macro_rules! sdk {
(
context: $context:ty;
target: $target:ident;
tokens: [ $( $token_type:ident ),* , ];
rules: [ $( $token_rule:expr ),* , ];
semantics: [ $( $sem_type:ident ),* , ];
) => { ... };
}Expand description
Macro that implements the language SDK.
This is used in the generated code to avoid code duplication. It also creates convenience macros for tree parsing.