Generate only minimal set of ineresting tokens

This commit is contained in:
Aleksey Kladov 2020-04-10 15:53:09 +02:00
parent 8d71a6bf0c
commit 4560fe2abf
8 changed files with 61 additions and 1306 deletions

View file

@ -225,6 +225,7 @@ pub(crate) const KINDS_SRC: KindsSrc = KindsSrc {
};
pub(crate) struct AstSrc<'a> {
pub(crate) tokens: &'a [&'a str],
pub(crate) nodes: &'a [AstNodeSrc<'a>],
pub(crate) enums: &'a [AstEnumSrc<'a>],
}
@ -303,6 +304,7 @@ macro_rules! ast_enums {
}
pub(crate) const AST_SRC: AstSrc = AstSrc {
tokens: &["Whitespace", "Comment", "String", "RawString"],
nodes: &ast_nodes! {
struct SourceFile: ModuleItemOwner, AttrsOwner {
modules: [Module],