Skip to content

Commit

Permalink
Un-inline the enums in the CST (#698)
Browse files Browse the repository at this point in the history
Part of #638

As we discussed, inlining some nodes types causes us to lose information
that is otherwise hard/inconvenient to reconstruct and this hopefully
increases the usability of CST alone.
  • Loading branch information
Xanewok authored Dec 8, 2023
1 parent 9a78865 commit 678545e
Show file tree
Hide file tree
Showing 166 changed files with 7,147 additions and 7,137 deletions.
3 changes: 1 addition & 2 deletions crates/solidity/inputs/language/src/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ fn resolve_grammar_element(ident: &Identifier, ctx: &mut ResolveCtx<'_>) -> Gram
let thunk = Rc::new(NamedParserThunk {
name: ident.to_string().leak(),
context: lex_ctx,
// Enums have a single reference per variant, so they should be inlined.
is_inline: matches!(elem.as_ref(), Item::Enum { .. }),
is_inline: false,
def: OnceCell::new(),
});
ctx.resolved.insert(
Expand Down
68 changes: 68 additions & 0 deletions crates/solidity/outputs/cargo/crate/src/generated/kinds.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 678545e

Please sign in to comment.