@@ -9,7 +9,10 @@ use std::{
99} ;
1010
1111use derive_more:: Add ;
12- use gll:: runtime:: { MoreThanOne , ParseNodeKind , ParseNodeShape } ;
12+ use gll:: {
13+ forest:: { MoreThanOne , GrammarReflector } ,
14+ parse_node:: ParseNodeShape ,
15+ } ;
1316use rayon:: prelude:: * ;
1417use rust_grammar:: parse;
1518use serde:: { Deserialize , Serialize } ;
@@ -78,7 +81,7 @@ type ModuleContentsHandle = parse::OwnedHandle<
7881
7982enum Error < A > {
8083 Lex ( proc_macro2:: LexError ) ,
81- Parse ( gll:: runtime :: ParseError < A > ) ,
84+ Parse ( gll:: parser :: ParseError < A > ) ,
8285}
8386
8487impl < A > From < proc_macro2:: LexError > for Error < A > {
@@ -87,8 +90,8 @@ impl<A> From<proc_macro2::LexError> for Error<A> {
8790 }
8891}
8992
90- impl < A > From < gll:: runtime :: ParseError < A > > for Error < A > {
91- fn from ( error : gll:: runtime :: ParseError < A > ) -> Self {
93+ impl < A > From < gll:: parser :: ParseError < A > > for Error < A > {
94+ fn from ( error : gll:: parser :: ParseError < A > ) -> Self {
9295 Error :: Parse ( error)
9396 }
9497}
@@ -159,11 +162,11 @@ fn ambiguity_check(handle: &ModuleContentsHandle) -> Result<(), MoreThanOne> {
159162 }
160163 }
161164 } ;
162- match source . kind . shape ( ) {
165+ match forest . grammar . parse_node_shape ( source . kind ) {
163166 ParseNodeShape :: Opaque => { }
164- ParseNodeShape :: Alias ( _) => add_children ( & [ source . unpack_alias ( ) ] ) ,
167+ ParseNodeShape :: Alias ( _) => add_children ( & [ forest . unpack_alias ( source ) ] ) ,
165168 ParseNodeShape :: Opt ( _) => {
166- if let Some ( child) = source . unpack_opt ( ) {
169+ if let Some ( child) = forest . unpack_opt ( source ) {
167170 add_children ( & [ child] ) ;
168171 }
169172 }
0 commit comments