Macro regen::sdk

source ·
macro_rules! sdk {
    (
    $regen:ident;
    target: $target:ident;
    tokens: [ $( $token_type:ident ),* , ];
    regex: [ $( $token_regex:ident = $token_regex_literal:literal ),* , ];
    rules: [ $( [ $( $token_rule:tt ),* ] ),* , ];
    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.