From 368db002392a569763cc292778b833e99ba47b52 Mon Sep 17 00:00:00 2001 From: Olivier ROLAND Date: Sat, 27 Aug 2022 15:33:28 +0200 Subject: [PATCH] fix TerminalNode getter --- templates/Rust.stg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/Rust.stg b/templates/Rust.stg index e945963..97b642a 100644 --- a/templates/Rust.stg +++ b/templates/Rust.stg @@ -962,8 +962,9 @@ fn (&self) -> Option\ContextType> ContextTokenListGetterDecl(t) ::=<< /// Retrieves all `TerminalNode`s corresponding to token in current rule fn _all(&self) -> Vec\ContextType>\>> where Self:Sized{ - self.children_of_type() -}>> + self.get_tokens() +} +>> ContextTokenListIndexedGetterDecl(t) ::= << /// Retrieves 'i's TerminalNode corresponding to token , starting from 0. /// Returns `None` if number of children corresponding to token is less or equal than `i`.